persona-harness 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/workflow-finish-authority.d.ts +2 -0
- package/dist/cli/workflow-finish-authority.js +25 -21
- package/dist/cli/workflow-finish-authority.js.map +1 -1
- package/dist/cli/workflow-finish-runner.js +1 -1
- package/dist/cli/workflow-finish-runner.js.map +1 -1
- package/dist/cli/workflow-verification-decision.d.ts +4 -1
- package/dist/cli/workflow-verification-decision.js +52 -8
- package/dist/cli/workflow-verification-decision.js.map +1 -1
- package/dist/core/completion-decision.d.ts +29 -0
- package/dist/core/completion-decision.js +40 -0
- package/dist/core/completion-decision.js.map +1 -0
- package/docs/current/docs-inventory.md +1 -1
- package/docs/current/ph-core-adapter-boundary-design.md +39 -18
- package/docs/current/release/consumer-authority-v088-acceptance.json +1070 -0
- package/docs/current/release/v0.8.8-release-notes.md +20 -0
- package/package.json +3 -1
- package/packages/shared-skills/package.json +1 -1
- package/scripts/consumer-authority-v088-acceptance-schema.d.mts +26 -0
- package/scripts/consumer-authority-v088-acceptance-schema.mjs +93 -0
- package/scripts/preflight-consumer-authority-external-artifact-transport.mjs +2 -2
- package/scripts/preflight-consumer-authority-external-attestation.mjs +2 -2
|
@@ -3,12 +3,14 @@ import type { ProjectReadBoundary } from "../io/bootstrap-write-boundary.js";
|
|
|
3
3
|
import { type VerificationAuthorityAssessment } from "./workflow-verification-receipt.js";
|
|
4
4
|
import { type SemanticTddAssessment } from "./workflow-semantic-tdd.js";
|
|
5
5
|
import { type VerificationDecision } from "./workflow-verification-decision.js";
|
|
6
|
+
import type { CompletionDecision } from "../core/completion-decision.js";
|
|
6
7
|
import { type FinishAttestationAssessment } from "./workflow-finish-attestation.js";
|
|
7
8
|
import { type ProjectFinishAttestationVerifierAssessment } from "./project-finish-attestation-verifier.js";
|
|
8
9
|
export declare const TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID = "trusted-authority-required";
|
|
9
10
|
export type WorkflowFinishAuthority = {
|
|
10
11
|
readonly assessment: VerificationAuthorityAssessment;
|
|
11
12
|
readonly blocker: ClosureBlocker;
|
|
13
|
+
readonly completion: CompletionDecision;
|
|
12
14
|
readonly decision: VerificationDecision;
|
|
13
15
|
readonly externalAttestation: FinishAttestationAssessment;
|
|
14
16
|
readonly projectAttestation?: ProjectFinishAttestationVerifierAssessment;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveSafeEvidenceRootResult } from "../config/harness-config.js";
|
|
2
2
|
import { assessVerificationAuthority, } from "./workflow-verification-receipt.js";
|
|
3
3
|
import { assessSemanticTddChain, } from "./workflow-semantic-tdd.js";
|
|
4
|
-
import { blockedVerificationDecision,
|
|
4
|
+
import { blockedVerificationDecision, completionDecisionForVerification, diagnosticVerificationDecision, externalAttestedVerificationDecision, } from "./workflow-verification-decision.js";
|
|
5
5
|
import { verifyExternalFinishAttestation, verifyExternalFinishAttestationForClosure, } from "./workflow-finish-attestation.js";
|
|
6
6
|
import { consumeProjectFinishAttestationArtifact, } from "./project-finish-attestation-verifier.js";
|
|
7
7
|
import { readEnrolledProjectFinishAttestations } from "./authority-project-attestation.js";
|
|
@@ -31,8 +31,9 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
31
31
|
sourceSnapshotDigest: externalAttestation.receipt.source.identity.contentDigest,
|
|
32
32
|
verifiedAt: now.toISOString(),
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const completion = completionDecisionForVerification(decision);
|
|
35
|
+
if (completion.passed) {
|
|
36
|
+
return workflowFinishAuthorityResult({
|
|
36
37
|
assessment,
|
|
37
38
|
blocker: {
|
|
38
39
|
id: TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID,
|
|
@@ -42,8 +43,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
42
43
|
decision,
|
|
43
44
|
externalAttestation,
|
|
44
45
|
semanticTdd,
|
|
45
|
-
|
|
46
|
-
};
|
|
46
|
+
}, completion);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
const decision = blockedVerificationDecision(TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID, [
|
|
@@ -55,7 +55,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
55
55
|
"An existing external attestation cannot fall through to user-scoped project authority after failed consumption.",
|
|
56
56
|
"Only a product-verified original external attestation matching its enrolled policy can provide trusted authority before finish can pass.",
|
|
57
57
|
].join(" "));
|
|
58
|
-
return {
|
|
58
|
+
return workflowFinishAuthorityResult({
|
|
59
59
|
assessment,
|
|
60
60
|
decision,
|
|
61
61
|
blocker: {
|
|
@@ -65,8 +65,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
65
65
|
},
|
|
66
66
|
externalAttestation,
|
|
67
67
|
semanticTdd,
|
|
68
|
-
|
|
69
|
-
};
|
|
68
|
+
});
|
|
70
69
|
}
|
|
71
70
|
const projectRead = readEnrolledProjectFinishAttestations(projectDir, { storeRoot: options.authorityStoreRoot }, now);
|
|
72
71
|
const trustedProjects = projectRead.values.filter((candidate) => candidate.assessment.authorityEligible);
|
|
@@ -84,8 +83,9 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
84
83
|
sourceSnapshotDigest: projectAttestation.receipt.source.identity.contentDigest,
|
|
85
84
|
verifiedAt: now.toISOString(),
|
|
86
85
|
});
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
const completion = completionDecisionForVerification(decision);
|
|
87
|
+
if (completion.passed) {
|
|
88
|
+
return workflowFinishAuthorityResult({
|
|
89
89
|
assessment,
|
|
90
90
|
blocker: {
|
|
91
91
|
id: TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID,
|
|
@@ -96,8 +96,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
96
96
|
externalAttestation: externalInspection,
|
|
97
97
|
projectAttestation,
|
|
98
98
|
semanticTdd,
|
|
99
|
-
|
|
100
|
-
};
|
|
99
|
+
}, completion);
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -115,7 +114,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
115
114
|
`Enrolled project attestation assessment: ${projectSummary}.`,
|
|
116
115
|
"Only a product-verified original external attestation matching its enrolled policy can provide trusted authority before finish can pass.",
|
|
117
116
|
].join(" "));
|
|
118
|
-
return {
|
|
117
|
+
return workflowFinishAuthorityResult({
|
|
119
118
|
assessment,
|
|
120
119
|
decision,
|
|
121
120
|
blocker: {
|
|
@@ -126,8 +125,7 @@ export function readWorkflowFinishAuthority(projectDir, options = {}) {
|
|
|
126
125
|
projectAttestation: projectRead.values[0]?.assessment,
|
|
127
126
|
semanticTdd,
|
|
128
127
|
externalAttestation,
|
|
129
|
-
|
|
130
|
-
};
|
|
128
|
+
});
|
|
131
129
|
}
|
|
132
130
|
function readCapabilityBoundWorkflowFinishAuthority(projectDir, projectReadBoundary, options) {
|
|
133
131
|
const now = options.now ?? new Date();
|
|
@@ -172,8 +170,9 @@ function readCapabilityBoundWorkflowFinishAuthority(projectDir, projectReadBound
|
|
|
172
170
|
sourceSnapshotDigest: projectAttestation.receipt.source.identity.contentDigest,
|
|
173
171
|
verifiedAt: now.toISOString(),
|
|
174
172
|
});
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
const completion = completionDecisionForVerification(decision);
|
|
174
|
+
if (completion.passed) {
|
|
175
|
+
return workflowFinishAuthorityResult({
|
|
177
176
|
assessment,
|
|
178
177
|
blocker: {
|
|
179
178
|
id: TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID,
|
|
@@ -184,8 +183,7 @@ function readCapabilityBoundWorkflowFinishAuthority(projectDir, projectReadBound
|
|
|
184
183
|
externalAttestation,
|
|
185
184
|
projectAttestation,
|
|
186
185
|
semanticTdd,
|
|
187
|
-
|
|
188
|
-
};
|
|
186
|
+
}, completion);
|
|
189
187
|
}
|
|
190
188
|
}
|
|
191
189
|
}
|
|
@@ -198,7 +196,7 @@ function readCapabilityBoundWorkflowFinishAuthority(projectDir, projectReadBound
|
|
|
198
196
|
`Enrolled project attestation assessment: ${projectSummary}.`,
|
|
199
197
|
"Only a product-verified original external attestation matching its enrolled policy can provide trusted authority before finish can pass.",
|
|
200
198
|
].join(" "));
|
|
201
|
-
return {
|
|
199
|
+
return workflowFinishAuthorityResult({
|
|
202
200
|
assessment,
|
|
203
201
|
blocker: {
|
|
204
202
|
id: TRUSTED_AUTHORITY_REQUIRED_BLOCKER_ID,
|
|
@@ -209,7 +207,13 @@ function readCapabilityBoundWorkflowFinishAuthority(projectDir, projectReadBound
|
|
|
209
207
|
externalAttestation,
|
|
210
208
|
projectAttestation: projectRead.values[0]?.assessment,
|
|
211
209
|
semanticTdd,
|
|
212
|
-
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function workflowFinishAuthorityResult(input, completion = completionDecisionForVerification(input.decision)) {
|
|
213
|
+
return {
|
|
214
|
+
...input,
|
|
215
|
+
completion,
|
|
216
|
+
status: completion.passed ? "trusted" : "blocked",
|
|
213
217
|
};
|
|
214
218
|
}
|
|
215
219
|
//# sourceMappingURL=workflow-finish-authority.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-finish-authority.js","sourceRoot":"","sources":["../../src/cli/workflow-finish-authority.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EACL,2BAA2B,GAE5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,sBAAsB,GAEvB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,2BAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"workflow-finish-authority.js","sourceRoot":"","sources":["../../src/cli/workflow-finish-authority.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAA;AAC3E,O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MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC;QAC/C,CAAC,CAAC,oHAAoH;QACtH,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,IAAI,+DAA+D,CAAA;IAChH,MAAM,QAAQ,GAAG,2BAA2B,CAC1C,qCAAqC,EACrC;QACE,qDAAqD;QACrD,4CAA4C,cAAc,GAAG;QAC7D,0IAA0I;KAC3I,CAAC,IAAI,CAAC,GAAG,CAAC,CACZ,CAAA;IACD,OAAO,6BAA6B,CAAC;QACnC,UAAU;QACV,OAAO,EAAE;YACP,EAAE,EAAE,qCAAqC;YACzC,MAAM,EAAE,QAAQ,CAAC,OAAO;YACxB,MAAM,EAAE,yDAAyD;SAClE;QACD,QAAQ;QACR,mBAAmB;QACnB,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU;QACrD,WAAW;KACZ,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,6BAA6B,CACpC,KAA6D,EAC7D,aAAiC,iCAAiC,CAAC,KAAK,CAAC,QAAQ,CAAC;IAElF,OAAO;QACL,GAAG,KAAK;QACR,UAAU;QACV,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KAClD,CAAA;AACH,CAAC"}
|
|
@@ -19,7 +19,7 @@ export function runWorkflowFinishResult(runnerKind, projectDir, assurance = DEFA
|
|
|
19
19
|
const authority = readWorkflowFinishAuthority(projectDir, {
|
|
20
20
|
projectReadBoundary: projectRead?.boundary,
|
|
21
21
|
});
|
|
22
|
-
if (authority.
|
|
22
|
+
if (!authority.completion.passed) {
|
|
23
23
|
const blocker = authority.blocker;
|
|
24
24
|
const followUp = workflowFinishFollowUpForStep({
|
|
25
25
|
blockerId: blocker.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-finish-runner.js","sourceRoot":"","sources":["../../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mB,EAAE,WAAW,EAAE,QAAQ;QAC1C,mBAAmB,EAAE,WAAW,EAAE,QAAQ;QAC1C,sBAAsB,EAAE,KAAK;KAC9B,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,4BAA4B,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC;SACrF,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,KAAK,4BAA4B,CAAC,CAAA;IACxE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IAEhF,MAAM,MAAM,GAAG,kCAAkC,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACnG,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;QAC7B,CAAC,CAAC,kBAAkB,CAAC,UAAU,EAAE,aAAa,CAAC;QAC/C,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,qCAAqC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAA;AACrG,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { CooperativeCurrentProcessVerificationDecision } from "./cooperative-finish-authority.js";
|
|
2
|
+
import { type CompletionDecision } from "../core/completion-decision.js";
|
|
3
|
+
import type { CompletionAssuranceRequirement } from "../core/completion-decision.js";
|
|
2
4
|
export type VerificationAssurance = "diagnostic-only" | "none" | "cooperative" | "external";
|
|
3
5
|
export type VerificationAuthorityProvider = "none" | "cooperative-current-process" | "external-attested";
|
|
4
6
|
export type VerificationConsumptionState = "not-applicable" | "unconsumed" | "consumed";
|
|
5
|
-
export type FinishAssuranceRequirement =
|
|
7
|
+
export type FinishAssuranceRequirement = CompletionAssuranceRequirement;
|
|
6
8
|
export declare const DEFAULT_FINISH_ASSURANCE_REQUIREMENT: "external";
|
|
7
9
|
export type DiagnosticVerificationDecision = {
|
|
8
10
|
readonly assurance: "diagnostic-only";
|
|
@@ -52,5 +54,6 @@ export declare function isCompletionEligibleVerificationDecision(value: unknown)
|
|
|
52
54
|
export declare function isExternalAttestedVerificationDecision(value: unknown): value is ExternalAttestedVerificationDecision;
|
|
53
55
|
export declare function isTrustedVerificationDecision(value: unknown): value is ExternalAttestedVerificationDecision;
|
|
54
56
|
export declare function completionEligibleForAssurance(value: unknown, requirement?: FinishAssuranceRequirement): boolean;
|
|
57
|
+
export declare function completionDecisionForVerification(value: unknown, requirement?: FinishAssuranceRequirement): CompletionDecision;
|
|
55
58
|
export declare function verificationDecisionSummary(decision: VerificationDecision): string;
|
|
56
59
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isLiveCooperativeDecision } from "./cooperative-finish-authority.js";
|
|
2
|
+
import { resolveCompletionDecision, } from "../core/completion-decision.js";
|
|
2
3
|
export const DEFAULT_FINISH_ASSURANCE_REQUIREMENT = "external";
|
|
3
4
|
const externalAttestedDecisionObjects = new WeakSet();
|
|
4
5
|
export function diagnosticVerificationDecision(code, summary) {
|
|
@@ -48,14 +49,14 @@ export function isTrustedVerificationDecision(value) {
|
|
|
48
49
|
return isExternalAttestedVerificationDecision(value);
|
|
49
50
|
}
|
|
50
51
|
export function completionEligibleForAssurance(value, requirement = DEFAULT_FINISH_ASSURANCE_REQUIREMENT) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
52
|
+
return completionDecisionForVerification(value, requirement).passed;
|
|
53
|
+
}
|
|
54
|
+
export function completionDecisionForVerification(value, requirement = DEFAULT_FINISH_ASSURANCE_REQUIREMENT) {
|
|
55
|
+
return resolveCompletionDecision({
|
|
56
|
+
authority: authorityEvidenceForVerification(value),
|
|
57
|
+
policyBlocker: policyBlockerForRequirement(requirement),
|
|
58
|
+
requirement,
|
|
59
|
+
});
|
|
59
60
|
}
|
|
60
61
|
export function verificationDecisionSummary(decision) {
|
|
61
62
|
switch (decision.kind) {
|
|
@@ -73,4 +74,47 @@ export function verificationDecisionSummary(decision) {
|
|
|
73
74
|
function assertNever(value) {
|
|
74
75
|
throw new TypeError(`Unknown verification decision status: ${String(value)}`);
|
|
75
76
|
}
|
|
77
|
+
function authorityEvidenceForVerification(value) {
|
|
78
|
+
if (isExternalAttestedVerificationDecision(value)) {
|
|
79
|
+
return { assurance: "external", kind: "trusted" };
|
|
80
|
+
}
|
|
81
|
+
if (isLiveCooperativeDecision(value)) {
|
|
82
|
+
return { assurance: "cooperative", kind: "trusted" };
|
|
83
|
+
}
|
|
84
|
+
if (isDescriptiveNonEligibleVerificationDecision(value)) {
|
|
85
|
+
return { code: value.code, kind: "blocked", summary: value.summary };
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
code: "verification-authority-unavailable",
|
|
89
|
+
kind: "blocked",
|
|
90
|
+
summary: "No live verification authority is available for completion.",
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function isDescriptiveNonEligibleVerificationDecision(value) {
|
|
94
|
+
if (!isRecord(value)) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return (value["kind"] === "blocked" || value["kind"] === "diagnostic-only")
|
|
98
|
+
&& typeof value["code"] === "string"
|
|
99
|
+
&& typeof value["summary"] === "string";
|
|
100
|
+
}
|
|
101
|
+
function isRecord(value) {
|
|
102
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
103
|
+
}
|
|
104
|
+
function policyBlockerForRequirement(requirement) {
|
|
105
|
+
switch (requirement) {
|
|
106
|
+
case "cooperative":
|
|
107
|
+
return {
|
|
108
|
+
code: "cooperative-authority-required",
|
|
109
|
+
summary: "A live cooperative verification result is required before completion can pass.",
|
|
110
|
+
};
|
|
111
|
+
case "external":
|
|
112
|
+
return {
|
|
113
|
+
code: "trusted-authority-required",
|
|
114
|
+
summary: "A trusted external authority is required before completion can pass.",
|
|
115
|
+
};
|
|
116
|
+
default:
|
|
117
|
+
return assertNever(requirement);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
76
120
|
//# sourceMappingURL=workflow-verification-decision.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-verification-decision.js","sourceRoot":"","sources":["../../src/cli/workflow-verification-decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"workflow-verification-decision.js","sourceRoot":"","sources":["../../src/cli/workflow-verification-decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAE7E,OAAO,EACL,yBAAyB,GAG1B,MAAM,gCAAgC,CAAA;AAqBvC,MAAM,CAAC,MAAM,oCAAoC,GAAG,UAAmB,CAAA;AAsDvE,MAAM,+BAA+B,GAAG,IAAI,OAAO,EAAU,CAAA;AAE7D,MAAM,UAAU,8BAA8B,CAC5C,IAAY,EACZ,OAAe;IAEf,OAAO;QACL,SAAS,EAAE,iBAAiB;QAC5B,iBAAiB,EAAE,MAAM;QACzB,IAAI;QACJ,kBAAkB,EAAE,KAAK;QACzB,gBAAgB,EAAE,gBAAgB;QAClC,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,iBAAiB;QACzB,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,IAAY,EACZ,OAAe;IAEf,OAAO;QACL,SAAS,EAAE,MAAM;QACjB,iBAAiB,EAAE,MAAM;QACzB,IAAI;QACJ,kBAAkB,EAAE,KAAK;QACzB,gBAAgB,EAAE,gBAAgB;QAClC,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,KAAoC;IAEpC,MAAM,QAAQ,GAAyC,MAAM,CAAC,MAAM,C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O,KAAK,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAA;AAC3C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC;AAED,SAAS,2BAA2B,CAAC,WAAuC;IAC1E,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,aAAa;YAChB,OAAO;gBACL,IAAI,EAAE,gCAAgC;gBACtC,OAAO,EAAE,gFAAgF;aAC1F,CAAA;QACH,KAAK,UAAU;YACb,OAAO;gBACL,IAAI,EAAE,4BAA4B;gBAClC,OAAO,EAAE,sEAAsE;aAChF,CAAA;QACH;YACE,OAAO,WAAW,CAAC,WAAW,CAAC,CAAA;IACnC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const COMPLETION_ASSURANCE_REQUIREMENTS: {
|
|
2
|
+
readonly COOPERATIVE: "cooperative";
|
|
3
|
+
readonly EXTERNAL: "external";
|
|
4
|
+
};
|
|
5
|
+
export type CompletionAssuranceRequirement = (typeof COMPLETION_ASSURANCE_REQUIREMENTS)[keyof typeof COMPLETION_ASSURANCE_REQUIREMENTS];
|
|
6
|
+
export type CompletionState = "blocked" | "externally-attested" | "locally-verified";
|
|
7
|
+
export type CompletionBlocker = {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly summary: string;
|
|
10
|
+
};
|
|
11
|
+
export type CompletionAuthorityEvidence = {
|
|
12
|
+
readonly code: string;
|
|
13
|
+
readonly kind: "blocked";
|
|
14
|
+
readonly summary: string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly assurance: CompletionAssuranceRequirement;
|
|
17
|
+
readonly kind: "trusted";
|
|
18
|
+
};
|
|
19
|
+
export type CompletionDecisionInput = {
|
|
20
|
+
readonly authority: CompletionAuthorityEvidence;
|
|
21
|
+
readonly policyBlocker: CompletionBlocker;
|
|
22
|
+
readonly requirement: CompletionAssuranceRequirement;
|
|
23
|
+
};
|
|
24
|
+
export type CompletionDecision = {
|
|
25
|
+
readonly blockers: readonly CompletionBlocker[];
|
|
26
|
+
readonly passed: boolean;
|
|
27
|
+
readonly state: CompletionState;
|
|
28
|
+
};
|
|
29
|
+
export declare function resolveCompletionDecision(input: CompletionDecisionInput): CompletionDecision;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const COMPLETION_ASSURANCE_REQUIREMENTS = {
|
|
2
|
+
COOPERATIVE: "cooperative",
|
|
3
|
+
EXTERNAL: "external",
|
|
4
|
+
};
|
|
5
|
+
export function resolveCompletionDecision(input) {
|
|
6
|
+
switch (input.authority.kind) {
|
|
7
|
+
case "blocked":
|
|
8
|
+
return {
|
|
9
|
+
blockers: [{ code: input.authority.code, summary: input.authority.summary }],
|
|
10
|
+
passed: false,
|
|
11
|
+
state: "blocked",
|
|
12
|
+
};
|
|
13
|
+
case "trusted":
|
|
14
|
+
switch (input.requirement) {
|
|
15
|
+
case "cooperative":
|
|
16
|
+
return input.authority.assurance === "cooperative"
|
|
17
|
+
? { blockers: [], passed: true, state: "locally-verified" }
|
|
18
|
+
: blockedByPolicy(input.policyBlocker);
|
|
19
|
+
case "external":
|
|
20
|
+
return input.authority.assurance === "external"
|
|
21
|
+
? { blockers: [], passed: true, state: "externally-attested" }
|
|
22
|
+
: blockedByPolicy(input.policyBlocker);
|
|
23
|
+
default:
|
|
24
|
+
return assertNever(input.requirement);
|
|
25
|
+
}
|
|
26
|
+
default:
|
|
27
|
+
return assertNever(input.authority);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function blockedByPolicy(blocker) {
|
|
31
|
+
return {
|
|
32
|
+
blockers: [blocker],
|
|
33
|
+
passed: false,
|
|
34
|
+
state: "blocked",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function assertNever(value) {
|
|
38
|
+
throw new TypeError(`Unknown completion decision value: ${String(value)}`);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=completion-decision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion-decision.js","sourceRoot":"","sources":["../../src/core/completion-decision.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;CACZ,CAAA;AAmCV,MAAM,UAAU,yBAAyB,CAAC,KAA8B;IACtE,QAAQ,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC7B,KAAK,SAAS;YACZ,OAAO;gBACL,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;gBAC5E,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,SAAS;aACjB,CAAA;QACH,KAAK,SAAS;YACZ,QAAQ,KAAK,CAAC,WAAW,EAAE,CAAC;gBAC1B,KAAK,aAAa;oBAChB,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,KAAK,aAAa;wBAChD,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE;wBAC3D,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;gBAC1C,KAAK,UAAU;oBACb,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,KAAK,UAAU;wBAC7C,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE;wBAC9D,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;gBAC1C;oBACE,OAAO,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;YACzC,CAAC;QACH;YACE,OAAO,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IACvC,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,OAA0B;IACjD,OAAO;QACL,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,SAAS;KACjB,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAY;IAC/B,MAAM,IAAI,SAAS,CAAC,sCAAsC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAC5E,CAAC"}
|
|
@@ -113,7 +113,7 @@ Total indexed files: 337
|
|
|
113
113
|
| `docs/current/p0-go-acceptance-record.md` | current active pointer/status | - | P0-1 exact-main acceptance, provenance, package evidence, and claim boundary record. |
|
|
114
114
|
| `docs/current/p0-public-discovery-acceptance-record.md` | current active pointer/status | - | P0-3 exact-main public discovery, writer safety, package evidence, and claim boundary record. |
|
|
115
115
|
| `docs/current/ph-bearshell-mvp.md` | current compatibility doc | - | Compatibility/current-era doc retained in place; migrate by summary and pointer before moving. |
|
|
116
|
-
| `docs/current/ph-core-adapter-boundary-design.md` | current active pointer/status | - |
|
|
116
|
+
| `docs/current/ph-core-adapter-boundary-design.md` | current active pointer/status | - | PH-core/language-pack/adapter ownership boundary, including the implemented internal completion-decision seam and deferred extraction work. |
|
|
117
117
|
| `docs/current/p3-integrity-roadmap.md` | current active pointer/status | - | Accepted P3-first integrity roadmap, release hold, assurance model, and P2 hold; docs-only pending implementation. |
|
|
118
118
|
| `docs/current/p3-2-closure-authority-acceptance-record.md` | current active pointer/status | - | Candidate finish boundary: unsigned project-local evidence is diagnostic-only and no trusted authority path exists yet. |
|
|
119
119
|
| `docs/current/p3-3-verification-receipt-acceptance-record.md` | current active pointer/status | - | Strict receipt/attempt parser and read-only lifecycle diagnostics; no receipt issuance or finish-authority acceptance. |
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# PH-Core And Adapter Boundary Design
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
direction
|
|
5
|
-
|
|
3
|
+
Status: Phase 1 partially implemented. This page defines ownership and
|
|
4
|
+
dependency direction. The host-neutral completion-decision core is now an
|
|
5
|
+
internal boundary; package/workspace extraction, public APIs, schemas,
|
|
6
|
+
defaults, and adapters remain deferred.
|
|
6
7
|
|
|
7
|
-
**Source snapshot:** `
|
|
8
|
-
(`
|
|
9
|
-
|
|
8
|
+
**Source snapshot:** `175c08b15c450bae9477c8698f016846ea8443e9`
|
|
9
|
+
(`fix: canonicalize packer output parent (#280)`). Source references below
|
|
10
|
+
describe the baseline before the completion-decision core extraction.
|
|
10
11
|
|
|
11
12
|
## Decision
|
|
12
13
|
|
|
@@ -41,6 +42,26 @@ Adapters may call public PH entry and diagnostic surfaces. They may not
|
|
|
41
42
|
reinterpret a successful methodology step, host event, or CI wrapper action as
|
|
42
43
|
a passed PH finish result.
|
|
43
44
|
|
|
45
|
+
## Implemented Completion-Decision Core
|
|
46
|
+
|
|
47
|
+
`src/core/completion-decision.ts` owns the final decision shape used by the
|
|
48
|
+
workflow finish authority:
|
|
49
|
+
|
|
50
|
+
- a trusted cooperative authority can satisfy only cooperative assurance;
|
|
51
|
+
- a trusted external authority can satisfy only external assurance;
|
|
52
|
+
- a blocked or unavailable authority preserves a blocker and cannot pass;
|
|
53
|
+
- a policy mismatch remains blocked rather than falling back to another
|
|
54
|
+
assurance level.
|
|
55
|
+
|
|
56
|
+
The core has no imports. It does not read project files, run commands, call a
|
|
57
|
+
host, inspect a provider artifact, or know about Java/Spring. Existing CLI
|
|
58
|
+
code maps its live authority capabilities into the core and retains ownership
|
|
59
|
+
of verification and artifact consumption. `workflow-finish-authority` derives
|
|
60
|
+
its `trusted` or `blocked` status from the core decision's `passed` field.
|
|
61
|
+
|
|
62
|
+
This is intentionally an internal seam, not a new user-facing command or a
|
|
63
|
+
claim that every planned PH-core interface already exists.
|
|
64
|
+
|
|
44
65
|
## PH-Core Boundary
|
|
45
66
|
|
|
46
67
|
PH-core owns these stable responsibilities:
|
|
@@ -128,7 +149,8 @@ cannot auto-finish work, verify reports, alter gates, or create a host default.
|
|
|
128
149
|
| PH-core ticket contract | `src/cli/workflow-ticket-model.ts:BacklogTicket, formatTaskCard, parseBacklog @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Defines current backlog/task-card state material and schema-versioned text contracts. |
|
|
129
150
|
| PH-core workflow mutation | `src/cli/workflow-tickets.ts:writeWorkflowStateSnapshot, archiveBlockingBlockers @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Applies conflict-aware state writes and consults closure before archive. |
|
|
130
151
|
| PH-core closure state | `src/cli/workflow-closure.ts:readWorkflowClosurePayload, closureBlockers @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Derives the structured closure state and deterministic blockers. |
|
|
131
|
-
| PH-core
|
|
152
|
+
| PH-core completion decision | `src/core/completion-decision.ts:resolveCompletionDecision` | Maps trusted or blocked authority evidence and the requested assurance into final state, blockers, and `passed`; it has no adapter/provider/runtime imports. |
|
|
153
|
+
| PH-core finish | `src/cli/workflow-finish-runner.ts:runWorkflowFinishResult @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d`; `src/cli/workflow-finish-authority.ts:workflowFinishAuthorityResult` | Uses closure reasons and the core decision to render the existing plaintext pass/block result. |
|
|
132
154
|
| PH-core verification authority | `src/cli/workflow-closure-verification.ts:readClosureVerification @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d`; `src/cli/closure-verification-runner.ts:runDirectClosureVerification @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Selects direct PH verification when configured and otherwise classifies report/execution evidence without silently treating prose as proof. |
|
|
133
155
|
| Language-pack profile | `src/config/project-profile.ts:readBackendProjectProfileState @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Reads the current supported Java/Spring backend profile state. |
|
|
134
156
|
| Language-pack conventions | `src/cli/convention-pack.ts:collectConventionFiles @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d`; `src/cli/ast-grep-convention-runner.ts:loadAstGrepConventionDefinitions @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Loads convention declarations and maps their pack metadata into current convention definitions. |
|
|
@@ -138,15 +160,15 @@ cannot auto-finish work, verify reports, alter gates, or create a host default.
|
|
|
138
160
|
| Host adapter | `src/runtime/hooks.ts:createPhase0Hooks @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Current host hook/injection translation point, guarded by the existing runtime-injection configuration. |
|
|
139
161
|
| Methodology driver | `packages/shared-skills/skills/advanced/superpowers-driver/SKILL.md:Superpowers Driver @ 16c741026c3b0c6abc6e3022c976c4f6909e9a2d` | Manual source-only driver that explicitly defers authority to PH CLI exit and closure/finish surfaces. |
|
|
140
162
|
|
|
141
|
-
|
|
142
|
-
|
|
163
|
+
All references other than the implemented completion-decision core describe
|
|
164
|
+
current placement only. They are not a mandate to rename, extract, or relocate
|
|
165
|
+
the listed files in this tranche.
|
|
143
166
|
|
|
144
167
|
## Future Implementation Tickets
|
|
145
168
|
|
|
146
|
-
1. **I25-1
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
schemas.
|
|
169
|
+
1. **I25-1 Completion-decision core:** implemented as an internal authority
|
|
170
|
+
seam. It does not yet extract ticket, evidence, profile-verification, or
|
|
171
|
+
command-execution responsibilities.
|
|
150
172
|
2. **I25-2 Java/Spring pack inventory:** define the accepted Java/Spring
|
|
151
173
|
profile/catalog, convention, fixture, delivery-reference, and precision
|
|
152
174
|
inventory before any new language-pack mechanism or enforcement promotion.
|
|
@@ -172,8 +194,8 @@ rename, extract, or relocate any listed file in this design tranche.
|
|
|
172
194
|
- Item 19's proposed fresh CI verification artifact remains its own design and
|
|
173
195
|
implementation decision.
|
|
174
196
|
|
|
175
|
-
None of these forks permits a
|
|
176
|
-
|
|
197
|
+
None of these deferred forks permits a new public API, a schema change, a
|
|
198
|
+
default change, or a runtime hook.
|
|
177
199
|
|
|
178
200
|
## Non-Goals And Preserved State
|
|
179
201
|
|
|
@@ -183,6 +205,5 @@ quality, efficacy, or broad reliability, provide a hostile-workspace security
|
|
|
183
205
|
guarantee, or implement multiple languages.
|
|
184
206
|
|
|
185
207
|
`runtimeInjection=false`, existing commands and public help, workflow/evidence
|
|
186
|
-
schemas, package version, release state
|
|
187
|
-
|
|
188
|
-
docs policy.
|
|
208
|
+
schemas, package version, and release state remain unchanged. The only code
|
|
209
|
+
extraction in this tranche is the internal completion-decision core.
|