@patronage/software-factory 0.30.0 → 1.0.0-alpha.1
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/README.md +1 -1
- package/dist/index.d.ts +354 -43
- package/dist/index.js +983 -54
- package/dist/schemas.d.ts +73 -0
- package/dist/schemas.js +299 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
|
61
61
|
}>;
|
|
62
62
|
producer: z.ZodString;
|
|
63
63
|
rung: z.ZodEnum<{
|
|
64
|
-
oracle: "oracle";
|
|
65
64
|
"independent-model": "independent-model";
|
|
65
|
+
oracle: "oracle";
|
|
66
66
|
human: "human";
|
|
67
67
|
}>;
|
|
68
68
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -105,8 +105,8 @@ declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
|
105
105
|
}>;
|
|
106
106
|
producer: z.ZodString;
|
|
107
107
|
rung: z.ZodEnum<{
|
|
108
|
-
oracle: "oracle";
|
|
109
108
|
"independent-model": "independent-model";
|
|
109
|
+
oracle: "oracle";
|
|
110
110
|
human: "human";
|
|
111
111
|
}>;
|
|
112
112
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -533,6 +533,13 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
533
533
|
enabled: z.ZodBoolean;
|
|
534
534
|
endpoint: z.ZodIntersection<z.ZodString, z.ZodString>;
|
|
535
535
|
}, z.core.$strict>>;
|
|
536
|
+
impact: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
538
|
+
importers: z.ZodArray<z.ZodString>;
|
|
539
|
+
name: z.ZodString;
|
|
540
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
}, z.core.$strict>>;
|
|
536
543
|
proof: z.ZodObject<{
|
|
537
544
|
classificationPolicy: z.ZodObject<{
|
|
538
545
|
docsOnly: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -547,8 +554,8 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
547
554
|
name: z.ZodString;
|
|
548
555
|
scope: z.ZodOptional<z.ZodObject<{
|
|
549
556
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
550
|
-
trivial: "trivial";
|
|
551
557
|
"docs/process-only": "docs/process-only";
|
|
558
|
+
trivial: "trivial";
|
|
552
559
|
"non-trivial": "non-trivial";
|
|
553
560
|
}>>;
|
|
554
561
|
}, z.core.$strict>>;
|
|
@@ -563,6 +570,7 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
563
570
|
commands: z.ZodArray<z.ZodObject<{
|
|
564
571
|
command: z.ZodString;
|
|
565
572
|
description: z.ZodString;
|
|
573
|
+
impactTarget: z.ZodOptional<z.ZodString>;
|
|
566
574
|
name: z.ZodString;
|
|
567
575
|
requiredCheck: z.ZodOptional<z.ZodString>;
|
|
568
576
|
scope: z.ZodDefault<z.ZodEnum<{
|
|
@@ -763,8 +771,8 @@ declare const mergeFreezeStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
763
771
|
}, z.core.$strip>], "active">;
|
|
764
772
|
type MergeFreezeState = z.infer<typeof mergeFreezeStateSchema>;
|
|
765
773
|
/**
|
|
766
|
-
* The write side of this contract lives in the generated
|
|
767
|
-
* workflow (#356, ADR 0016 as amended): it is the ONLY producer of
|
|
774
|
+
* The write side of this contract lives in the generated merge-target push
|
|
775
|
+
* Verify workflow (#356, ADR 0016 as amended; #429): it is the ONLY producer of
|
|
768
776
|
* `patronage-factory/merge-freeze` generations. Its emitted `output.text`
|
|
769
777
|
* payload must parse under this exact reader schema, which is what the
|
|
770
778
|
* workflow's own tests assert through this export.
|
|
@@ -784,7 +792,7 @@ interface MergeFreezeStore {
|
|
|
784
792
|
* `read` above collapses three different situations into one refusal, because
|
|
785
793
|
* merge time treated all of them as "do not merge". Readiness distinguishes
|
|
786
794
|
* them: a settled generation is the writer's verdict, a **settling** one is the
|
|
787
|
-
* window between a merge landing and its
|
|
795
|
+
* window between a merge landing and its merge-target Verify completing (a
|
|
788
796
|
* running generation, or a missing generation proven by the immediately prior
|
|
789
797
|
* settled tip plus a current source-pinned verify run), and an **unreadable**
|
|
790
798
|
* one is ambiguous, malformed, foreign-App, or unavailable state. Same
|
|
@@ -1126,8 +1134,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1126
1134
|
baseSha: z.ZodString;
|
|
1127
1135
|
blockingReasons: z.ZodArray<z.ZodString>;
|
|
1128
1136
|
classification: z.ZodEnum<{
|
|
1129
|
-
trivial: "trivial";
|
|
1130
1137
|
"docs/process-only": "docs/process-only";
|
|
1138
|
+
trivial: "trivial";
|
|
1131
1139
|
"non-trivial": "non-trivial";
|
|
1132
1140
|
}>;
|
|
1133
1141
|
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1140,8 +1148,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1140
1148
|
reason: z.ZodOptional<z.ZodString>;
|
|
1141
1149
|
scope: z.ZodOptional<z.ZodObject<{
|
|
1142
1150
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
1143
|
-
trivial: "trivial";
|
|
1144
1151
|
"docs/process-only": "docs/process-only";
|
|
1152
|
+
trivial: "trivial";
|
|
1145
1153
|
"non-trivial": "non-trivial";
|
|
1146
1154
|
}>>;
|
|
1147
1155
|
}, z.core.$strict>>;
|
|
@@ -1191,15 +1199,15 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1191
1199
|
unknown: "unknown";
|
|
1192
1200
|
critical: "critical";
|
|
1193
1201
|
high: "high";
|
|
1194
|
-
low: "low";
|
|
1195
1202
|
medium: "medium";
|
|
1203
|
+
low: "low";
|
|
1196
1204
|
}>>;
|
|
1197
1205
|
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
1198
1206
|
unknown: "unknown";
|
|
1199
1207
|
critical: "critical";
|
|
1200
1208
|
high: "high";
|
|
1201
|
-
low: "low";
|
|
1202
1209
|
medium: "medium";
|
|
1210
|
+
low: "low";
|
|
1203
1211
|
}>>;
|
|
1204
1212
|
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
1205
1213
|
nonBlockingFindings: z.ZodNumber;
|
|
@@ -1227,8 +1235,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1227
1235
|
}>;
|
|
1228
1236
|
stage: z.ZodEnum<{
|
|
1229
1237
|
gate: "gate";
|
|
1230
|
-
interior: "interior";
|
|
1231
1238
|
"interior-complete": "interior-complete";
|
|
1239
|
+
interior: "interior";
|
|
1232
1240
|
}>;
|
|
1233
1241
|
}, z.core.$strip>>;
|
|
1234
1242
|
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
@@ -1506,19 +1514,90 @@ declare function validatePrReadyProof(value: unknown): PrReadyProof;
|
|
|
1506
1514
|
declare function readPrReadyProof(filePath: string): PrReadyProof;
|
|
1507
1515
|
declare function runPrReady(args: PrReadyArgs, dependencies?: PrReadyDependencies): Promise<PrReadyProof>;
|
|
1508
1516
|
//#endregion
|
|
1517
|
+
//#region src/impact-stamp.d.ts
|
|
1518
|
+
/**
|
|
1519
|
+
* The recorded stamp. `targets` satisfies the completeness invariant: every
|
|
1520
|
+
* target the profile declares is present, each with its exact basis — never
|
|
1521
|
+
* silently absent. `basis: "conservative"` means an unmodelled or unprovable
|
|
1522
|
+
* input widened every target to full impact.
|
|
1523
|
+
*/
|
|
1524
|
+
declare const impactStampSchema: z.ZodObject<{
|
|
1525
|
+
basis: z.ZodEnum<{
|
|
1526
|
+
"target-scoped": "target-scoped";
|
|
1527
|
+
conservative: "conservative";
|
|
1528
|
+
}>;
|
|
1529
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
1530
|
+
stampVersion: z.ZodLiteral<2>;
|
|
1531
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
1532
|
+
basis: z.ZodString;
|
|
1533
|
+
impact: z.ZodEnum<{
|
|
1534
|
+
affected: "affected";
|
|
1535
|
+
"not-affected": "not-affected";
|
|
1536
|
+
}>;
|
|
1537
|
+
name: z.ZodString;
|
|
1538
|
+
}, z.core.$strip>>;
|
|
1539
|
+
}, z.core.$strip>;
|
|
1540
|
+
type ImpactStamp = z.infer<typeof impactStampSchema>;
|
|
1541
|
+
/**
|
|
1542
|
+
* The surfaces that consume the stamp. One classification, consumed
|
|
1543
|
+
* everywhere (#430): every surface routes through
|
|
1544
|
+
* {@link impactStampScopeDecision}, so no surface can be more trusting than
|
|
1545
|
+
* another, and no surface re-derives path rules of its own. The value only
|
|
1546
|
+
* selects the wording of the conservative floor a refusal falls back to.
|
|
1547
|
+
*/
|
|
1548
|
+
declare const IMPACT_SCOPE_SURFACES: {
|
|
1549
|
+
readonly demand: "full demand floor";
|
|
1550
|
+
readonly "preview-lifecycle": "full preview-lifecycle floor";
|
|
1551
|
+
readonly "verification-battery": "full verification-battery floor";
|
|
1552
|
+
};
|
|
1553
|
+
type ImpactScopeSurface = keyof typeof IMPACT_SCOPE_SURFACES;
|
|
1554
|
+
interface ImpactScopeDecision {
|
|
1555
|
+
reason: string;
|
|
1556
|
+
/** True ⇒ this target's work is provably unreachable and may be released. */
|
|
1557
|
+
scoped: boolean;
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* Whether a trusted stamp RELEASES one target-scoped unit of work — an
|
|
1561
|
+
* external proof demand (#542 wave 2), a verification-battery command, or a
|
|
1562
|
+
* preview (Alchemy) lifecycle stack (#430 wave 3).
|
|
1563
|
+
*
|
|
1564
|
+
* The only release path is a `target-scoped` stamp of exactly this build's
|
|
1565
|
+
* stamp version whose target entry for exactly this name is provably
|
|
1566
|
+
* `not-affected`. Every other input — no trusted stamp, an unknown stamp
|
|
1567
|
+
* version, a conservative stamp, a name the stamp does not classify, or an
|
|
1568
|
+
* `affected` verdict — keeps today's full-work floor. Work only ever gets
|
|
1569
|
+
* released, never added or satisfied: this function can withdraw a demand, it
|
|
1570
|
+
* can never certify one.
|
|
1571
|
+
*
|
|
1572
|
+
* Identity binding is the CALLER's precondition: pass only a stamp computed
|
|
1573
|
+
* for, or read from a pr:verify proof bound to, the current candidate (see
|
|
1574
|
+
* `trustedImpactStamp` in `pr-readiness/verification-proof.ts`); pass
|
|
1575
|
+
* `undefined` otherwise.
|
|
1576
|
+
*/
|
|
1577
|
+
declare const impactStampScopeDecision: ({
|
|
1578
|
+
stamp,
|
|
1579
|
+
surface,
|
|
1580
|
+
targetName
|
|
1581
|
+
}: {
|
|
1582
|
+
stamp: ImpactStamp | undefined;
|
|
1583
|
+
surface: ImpactScopeSurface;
|
|
1584
|
+
targetName: string;
|
|
1585
|
+
}) => ImpactScopeDecision;
|
|
1586
|
+
//#endregion
|
|
1509
1587
|
//#region src/required-check-policy.d.ts
|
|
1510
1588
|
declare const EVIDENCE_CHECK_TYPES: readonly ["review", "verify"];
|
|
1511
1589
|
type EvidenceCheckType = (typeof EVIDENCE_CHECK_TYPES)[number];
|
|
1512
1590
|
declare const requiredCheckScopeSchema: z.ZodObject<{
|
|
1513
1591
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
1514
|
-
trivial: "trivial";
|
|
1515
1592
|
"docs/process-only": "docs/process-only";
|
|
1593
|
+
trivial: "trivial";
|
|
1516
1594
|
"non-trivial": "non-trivial";
|
|
1517
1595
|
}>>;
|
|
1518
1596
|
}, z.core.$strict>;
|
|
1519
1597
|
type RequiredCheckScope = z.infer<typeof requiredCheckScopeSchema>;
|
|
1520
1598
|
interface RequiredCheckScopeContext {
|
|
1521
1599
|
classification: DiffClassification | undefined;
|
|
1600
|
+
impactStamp?: ImpactStamp;
|
|
1522
1601
|
}
|
|
1523
1602
|
interface ScopeDecision {
|
|
1524
1603
|
inScope: boolean;
|
|
@@ -1546,7 +1625,7 @@ declare const resolveAuthoringSessionIds: ({
|
|
|
1546
1625
|
recorded?: string;
|
|
1547
1626
|
}) => string[];
|
|
1548
1627
|
declare namespace external_evidence_d_exports {
|
|
1549
|
-
export { EVIDENCE_CHECK_TYPES, EVIDENCE_DIR, EVIDENCE_ENVELOPE_SCHEMA_VERSION, EVIDENCE_REVIEW_RUNGS, EvidenceCandidateIdentity, EvidenceCheckType, EvidenceEnvelope, EvidenceEnvelopeParse, EvidenceReviewRung, IndependenceResult, LoadedEvidenceEnvelope, RequiredCheck, RequiredCheckEvaluation, RequiredCheckEvaluationInput, RequiredCheckOutcome, RequiredCheckScope, RequiredCheckScopeContext, ScopeDecision, evaluateRequiredChecks, evidenceBindingFresh, evidenceEnvelopeSchema, evidenceReviewIndependence, loadEvidenceEnvelopes, parseEvidenceEnvelope, requiredCheckInScope, requiredCheckScopeSchema, resolveAuthoringSessionIds };
|
|
1628
|
+
export { EVIDENCE_CHECK_TYPES, EVIDENCE_DIR, EVIDENCE_ENVELOPE_SCHEMA_VERSION, EVIDENCE_REVIEW_RUNGS, EvidenceCandidateIdentity, EvidenceCheckType, EvidenceEnvelope, EvidenceEnvelopeParse, EvidenceReviewRung, IndependenceResult, LoadedEvidenceEnvelope, RequiredCheck, RequiredCheckEvaluation, RequiredCheckEvaluationInput, RequiredCheckOutcome, RequiredCheckScope, RequiredCheckScopeContext, ScopeDecision, boundFailingCheckNames, evaluateRequiredChecks, evidenceBindingFresh, evidenceEnvelopeSchema, evidenceReviewIndependence, loadEvidenceEnvelopes, parseEvidenceEnvelope, requiredCheckInScope, requiredCheckScopeSchema, resolveAuthoringSessionIds };
|
|
1550
1629
|
}
|
|
1551
1630
|
declare const EVIDENCE_ENVELOPE_SCHEMA_VERSION = 1;
|
|
1552
1631
|
declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
@@ -1568,8 +1647,8 @@ declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
|
1568
1647
|
producer: z.ZodString;
|
|
1569
1648
|
requestId: z.ZodOptional<z.ZodString>;
|
|
1570
1649
|
rung: z.ZodOptional<z.ZodEnum<{
|
|
1571
|
-
oracle: "oracle";
|
|
1572
1650
|
"independent-model": "independent-model";
|
|
1651
|
+
oracle: "oracle";
|
|
1573
1652
|
human: "human";
|
|
1574
1653
|
}>>;
|
|
1575
1654
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -1595,8 +1674,8 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
|
|
|
1595
1674
|
producer: z.ZodString;
|
|
1596
1675
|
requestId: z.ZodOptional<z.ZodString>;
|
|
1597
1676
|
rung: z.ZodOptional<z.ZodEnum<{
|
|
1598
|
-
oracle: "oracle";
|
|
1599
1677
|
"independent-model": "independent-model";
|
|
1678
|
+
oracle: "oracle";
|
|
1600
1679
|
human: "human";
|
|
1601
1680
|
}>>;
|
|
1602
1681
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -1645,6 +1724,26 @@ type LoadedEvidenceEnvelope = {
|
|
|
1645
1724
|
ok: false;
|
|
1646
1725
|
path: string;
|
|
1647
1726
|
};
|
|
1727
|
+
/**
|
|
1728
|
+
* Every check name with a current, candidate-bound FAILING envelope on disk.
|
|
1729
|
+
*
|
|
1730
|
+
* The wave-3 scoping veto input. Callers pass the resolved set to
|
|
1731
|
+
* `planVerificationBattery` / `planPreviewLifecycle`, which stay pure — the
|
|
1732
|
+
* planners decide, they never read the filesystem.
|
|
1733
|
+
*
|
|
1734
|
+
* `checkType` is the caller's, not a guess: schema-v5 requiredChecks are
|
|
1735
|
+
* verify-only (`resolveProfileRequiredChecks`), so a scoping caller passes
|
|
1736
|
+
* `"verify"` and matches exactly the pair wave 2 evaluates.
|
|
1737
|
+
*/
|
|
1738
|
+
declare const boundFailingCheckNames: ({
|
|
1739
|
+
candidate,
|
|
1740
|
+
checkType,
|
|
1741
|
+
envelopes
|
|
1742
|
+
}: {
|
|
1743
|
+
candidate: EvidenceCandidateIdentity;
|
|
1744
|
+
checkType: EvidenceCheckType;
|
|
1745
|
+
envelopes: LoadedEvidenceEnvelope[];
|
|
1746
|
+
}) => string[];
|
|
1648
1747
|
interface RequiredCheckEvaluationInput {
|
|
1649
1748
|
authoringSessionIds: string[];
|
|
1650
1749
|
candidate: EvidenceCandidateIdentity;
|
|
@@ -1781,7 +1880,7 @@ declare const validatePrReviewProof: (value: unknown) => PrReviewProof;
|
|
|
1781
1880
|
declare const readPrReviewProof: (filePath: string) => PrReviewProof;
|
|
1782
1881
|
declare const PR_REVIEW_PROOF_DESCRIPTOR: ProofDescriptor<PrReviewProof>;
|
|
1783
1882
|
declare namespace verification_proof_d_exports {
|
|
1784
|
-
export { PrVerifyBaselineFullProof, PrVerifyCommandResult, PrVerifyExecutedCommand, PrVerifyProof, PrVerifySchemaVersion, ResolvedPrVerifyMode, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, VerificationHeadShas, VerificationProofState, VerifiedHeadShas, prVerifyFullHeadShasForDiff, prVerifyProofHeadShas, readPrVerifyProof, resolveVerifyProofApplicability, validatePrVerifyProof, verificationProofApplicabilityFor, verificationProofBlockingReason, verificationProofForReadiness, verificationProofStateFor, verifyProofIdentityMatches, verifyProofPassed };
|
|
1883
|
+
export { PrVerifyBaselineFullProof, PrVerifyCommandResult, PrVerifyExecutedCommand, PrVerifyNotRequiredCommand, PrVerifyProof, PrVerifySchemaVersion, ResolvedPrVerifyMode, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, VerificationHeadShas, VerificationProofState, VerifiedHeadShas, prVerifyFullHeadShasForDiff, prVerifyProofHeadShas, readPrVerifyProof, resolveVerifyProofApplicability, trustedImpactStamp, validatePrVerifyProof, verificationProofApplicabilityFor, verificationProofBlockingReason, verificationProofForReadiness, verificationProofStateFor, verifyProofIdentityMatches, verifyProofPassed };
|
|
1785
1884
|
}
|
|
1786
1885
|
interface VerifiedHeadShas {
|
|
1787
1886
|
docsOnlyVerifiedHeadShas: string[];
|
|
@@ -1796,6 +1895,15 @@ type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number
|
|
|
1796
1895
|
interface PrVerifyCommandResult {
|
|
1797
1896
|
command: string;
|
|
1798
1897
|
description: string;
|
|
1898
|
+
/**
|
|
1899
|
+
* Epic #550 wave 3 (#430): the profile's declared impact target for this
|
|
1900
|
+
* command, recorded from v4 on. It is the proof's own command→target
|
|
1901
|
+
* mapping: a `notRequiredCommands` entry must name the target recorded HERE
|
|
1902
|
+
* for the same command, so a withholding cannot point at whichever released
|
|
1903
|
+
* target happens to be convenient. Absent for a command the profile does
|
|
1904
|
+
* not scope, and for v1–v3 proofs, which predate the field.
|
|
1905
|
+
*/
|
|
1906
|
+
impactTarget?: string;
|
|
1799
1907
|
name: string;
|
|
1800
1908
|
scope: "always" | "docs-only" | "trivial" | "full";
|
|
1801
1909
|
}
|
|
@@ -1810,6 +1918,21 @@ interface PrVerifyExecutedCommand {
|
|
|
1810
1918
|
name: string;
|
|
1811
1919
|
scope: "always" | "docs-only" | "trivial" | "full";
|
|
1812
1920
|
}
|
|
1921
|
+
/**
|
|
1922
|
+
* Epic #550 wave 3 (#430): a verification command the impact stamp proved this
|
|
1923
|
+
* candidate cannot reach, so the battery did not run it.
|
|
1924
|
+
*
|
|
1925
|
+
* The completeness invariant lives in the pairing: `verificationCommands`
|
|
1926
|
+
* records every command the resolved mode selected, `executedCommands` records
|
|
1927
|
+
* what ran, and this list records the rest WITH the stamp's own basis. A
|
|
1928
|
+
* withheld stack is therefore never silently absent from the proof — it is
|
|
1929
|
+
* present, named, and explained.
|
|
1930
|
+
*/
|
|
1931
|
+
interface PrVerifyNotRequiredCommand {
|
|
1932
|
+
basis: string;
|
|
1933
|
+
impactTarget: string;
|
|
1934
|
+
name: string;
|
|
1935
|
+
}
|
|
1813
1936
|
interface PrVerifyProof {
|
|
1814
1937
|
schemaVersion: PrVerifySchemaVersion;
|
|
1815
1938
|
authoringSession?: string;
|
|
@@ -1830,8 +1953,10 @@ interface PrVerifyProof {
|
|
|
1830
1953
|
endedAt: string;
|
|
1831
1954
|
executedCommands?: PrVerifyExecutedCommand[];
|
|
1832
1955
|
headSha: string;
|
|
1956
|
+
impactStamp?: ImpactStamp;
|
|
1833
1957
|
mode: ResolvedPrVerifyMode;
|
|
1834
1958
|
mergeBaseSha?: string;
|
|
1959
|
+
notRequiredCommands?: PrVerifyNotRequiredCommand[];
|
|
1835
1960
|
outcome?: "aborted" | "passed";
|
|
1836
1961
|
patchId?: string;
|
|
1837
1962
|
profilePath: string;
|
|
@@ -1855,6 +1980,28 @@ declare const verifyProofIdentityMatches: ({
|
|
|
1855
1980
|
};
|
|
1856
1981
|
proof?: PrVerifyProof;
|
|
1857
1982
|
}) => boolean;
|
|
1983
|
+
/**
|
|
1984
|
+
* Wave-2 consumption (#542): the recorded impact stamp, released for demand
|
|
1985
|
+
* resolution ONLY when it is identity-bound to the current candidate — the
|
|
1986
|
+
* proof passed, and its recorded headSha AND patchId both name exactly this
|
|
1987
|
+
* candidate (the same identities the proof already binds). Everything else —
|
|
1988
|
+
* no proof, an aborted run, a stale head, a moved patch id, a pre-stamp proof
|
|
1989
|
+
* — returns `undefined`, and the consumer keeps today's full-demand floor.
|
|
1990
|
+
*
|
|
1991
|
+
* Deliberately stricter than verify-once applicability (which tolerates a
|
|
1992
|
+
* head-only or patch-id-only match): a stamp narrows external demands, so it
|
|
1993
|
+
* is trusted only on an exact double binding, fail closed.
|
|
1994
|
+
*/
|
|
1995
|
+
declare const trustedImpactStamp: ({
|
|
1996
|
+
candidate,
|
|
1997
|
+
proof
|
|
1998
|
+
}: {
|
|
1999
|
+
candidate: {
|
|
2000
|
+
headSha: string;
|
|
2001
|
+
patchId: string;
|
|
2002
|
+
};
|
|
2003
|
+
proof: PrVerifyProof | undefined;
|
|
2004
|
+
}) => ImpactStamp | undefined;
|
|
1858
2005
|
declare const prVerifyFullHeadShasForDiff: ({
|
|
1859
2006
|
docsOnlyDeltaAcceptedSince,
|
|
1860
2007
|
files,
|
|
@@ -2040,9 +2187,9 @@ declare const retroEnvelopeV1Schema: z.ZodObject<{
|
|
|
2040
2187
|
kind: z.ZodLiteral<"retro-envelope">;
|
|
2041
2188
|
outcome: z.ZodOptional<z.ZodObject<{
|
|
2042
2189
|
status: z.ZodEnum<{
|
|
2190
|
+
blocked: "blocked";
|
|
2043
2191
|
success: "success";
|
|
2044
2192
|
fail: "fail";
|
|
2045
|
-
blocked: "blocked";
|
|
2046
2193
|
"ship-with-followups": "ship-with-followups";
|
|
2047
2194
|
}>;
|
|
2048
2195
|
verdict: z.ZodOptional<z.ZodString>;
|
|
@@ -2148,8 +2295,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
2148
2295
|
wave: z.ZodString;
|
|
2149
2296
|
}, z.core.$strip>>;
|
|
2150
2297
|
demandedRung: z.ZodOptional<z.ZodEnum<{
|
|
2151
|
-
oracle: "oracle";
|
|
2152
2298
|
"independent-model": "independent-model";
|
|
2299
|
+
oracle: "oracle";
|
|
2153
2300
|
human: "human";
|
|
2154
2301
|
}>>;
|
|
2155
2302
|
epicIssue: z.ZodNumber;
|
|
@@ -2164,8 +2311,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
2164
2311
|
commentUrl: z.ZodOptional<z.ZodString>;
|
|
2165
2312
|
producer: z.ZodString;
|
|
2166
2313
|
rung: z.ZodEnum<{
|
|
2167
|
-
oracle: "oracle";
|
|
2168
2314
|
"independent-model": "independent-model";
|
|
2315
|
+
oracle: "oracle";
|
|
2169
2316
|
human: "human";
|
|
2170
2317
|
}>;
|
|
2171
2318
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -2368,6 +2515,7 @@ interface PrVerifyGitDependencies {
|
|
|
2368
2515
|
emptyTreeHash: (cwd: string) => string;
|
|
2369
2516
|
mergeBaseSha: (cwd: string, base: string) => string;
|
|
2370
2517
|
runVerificationCommand: (command: string, cwd: string, env: Record<string, string>) => VerificationCommandOutcome;
|
|
2518
|
+
showFileAtRef?: (cwd: string, ref: string, absolutePath: string) => string | undefined;
|
|
2371
2519
|
statusPorcelain: (cwd: string) => string;
|
|
2372
2520
|
stablePatchId: (cwd: string, base: string) => string;
|
|
2373
2521
|
}
|
|
@@ -3191,8 +3339,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3191
3339
|
slotResolution: z.ZodObject<{
|
|
3192
3340
|
effort: z.ZodEnum<{
|
|
3193
3341
|
high: "high";
|
|
3194
|
-
low: "low";
|
|
3195
3342
|
medium: "medium";
|
|
3343
|
+
low: "low";
|
|
3196
3344
|
xhigh: "xhigh";
|
|
3197
3345
|
}>;
|
|
3198
3346
|
engine: z.ZodString;
|
|
@@ -3204,18 +3352,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3204
3352
|
}>;
|
|
3205
3353
|
model: z.ZodString;
|
|
3206
3354
|
tier: z.ZodEnum<{
|
|
3355
|
+
oracle: "oracle";
|
|
3207
3356
|
review: "review";
|
|
3208
3357
|
delegate: "delegate";
|
|
3209
|
-
oracle: "oracle";
|
|
3210
3358
|
workhorse: "workhorse";
|
|
3211
3359
|
scout: "scout";
|
|
3212
3360
|
}>;
|
|
3213
3361
|
}, z.core.$strict>;
|
|
3214
3362
|
startedAt: z.ZodString;
|
|
3215
3363
|
tier: z.ZodEnum<{
|
|
3364
|
+
oracle: "oracle";
|
|
3216
3365
|
review: "review";
|
|
3217
3366
|
delegate: "delegate";
|
|
3218
|
-
oracle: "oracle";
|
|
3219
3367
|
workhorse: "workhorse";
|
|
3220
3368
|
scout: "scout";
|
|
3221
3369
|
}>;
|
|
@@ -3270,8 +3418,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3270
3418
|
slotResolution: z.ZodObject<{
|
|
3271
3419
|
effort: z.ZodEnum<{
|
|
3272
3420
|
high: "high";
|
|
3273
|
-
low: "low";
|
|
3274
3421
|
medium: "medium";
|
|
3422
|
+
low: "low";
|
|
3275
3423
|
xhigh: "xhigh";
|
|
3276
3424
|
}>;
|
|
3277
3425
|
engine: z.ZodString;
|
|
@@ -3283,18 +3431,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3283
3431
|
}>;
|
|
3284
3432
|
model: z.ZodString;
|
|
3285
3433
|
tier: z.ZodEnum<{
|
|
3434
|
+
oracle: "oracle";
|
|
3286
3435
|
review: "review";
|
|
3287
3436
|
delegate: "delegate";
|
|
3288
|
-
oracle: "oracle";
|
|
3289
3437
|
workhorse: "workhorse";
|
|
3290
3438
|
scout: "scout";
|
|
3291
3439
|
}>;
|
|
3292
3440
|
}, z.core.$strict>;
|
|
3293
3441
|
startedAt: z.ZodString;
|
|
3294
3442
|
tier: z.ZodEnum<{
|
|
3443
|
+
oracle: "oracle";
|
|
3295
3444
|
review: "review";
|
|
3296
3445
|
delegate: "delegate";
|
|
3297
|
-
oracle: "oracle";
|
|
3298
3446
|
workhorse: "workhorse";
|
|
3299
3447
|
scout: "scout";
|
|
3300
3448
|
}>;
|
|
@@ -3340,8 +3488,8 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3340
3488
|
slotResolution: z.ZodObject<{
|
|
3341
3489
|
effort: z.ZodEnum<{
|
|
3342
3490
|
high: "high";
|
|
3343
|
-
low: "low";
|
|
3344
3491
|
medium: "medium";
|
|
3492
|
+
low: "low";
|
|
3345
3493
|
xhigh: "xhigh";
|
|
3346
3494
|
}>;
|
|
3347
3495
|
engine: z.ZodString;
|
|
@@ -3353,18 +3501,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3353
3501
|
}>;
|
|
3354
3502
|
model: z.ZodString;
|
|
3355
3503
|
tier: z.ZodEnum<{
|
|
3504
|
+
oracle: "oracle";
|
|
3356
3505
|
review: "review";
|
|
3357
3506
|
delegate: "delegate";
|
|
3358
|
-
oracle: "oracle";
|
|
3359
3507
|
workhorse: "workhorse";
|
|
3360
3508
|
scout: "scout";
|
|
3361
3509
|
}>;
|
|
3362
3510
|
}, z.core.$strict>;
|
|
3363
3511
|
startedAt: z.ZodString;
|
|
3364
3512
|
tier: z.ZodEnum<{
|
|
3513
|
+
oracle: "oracle";
|
|
3365
3514
|
review: "review";
|
|
3366
3515
|
delegate: "delegate";
|
|
3367
|
-
oracle: "oracle";
|
|
3368
3516
|
workhorse: "workhorse";
|
|
3369
3517
|
scout: "scout";
|
|
3370
3518
|
}>;
|
|
@@ -3409,15 +3557,15 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3409
3557
|
observedAt: string;
|
|
3410
3558
|
purpose: "review" | "code";
|
|
3411
3559
|
slotResolution: {
|
|
3412
|
-
effort: "high" | "
|
|
3560
|
+
effort: "high" | "medium" | "low" | "xhigh";
|
|
3413
3561
|
engine: string;
|
|
3414
3562
|
layerSource: "committedDefault" | "operatorSession" | "userConfig";
|
|
3415
3563
|
model: string;
|
|
3416
|
-
tier: "
|
|
3564
|
+
tier: "oracle" | "review" | "delegate" | "workhorse" | "scout";
|
|
3417
3565
|
fallbackTier?: "delegate" | undefined;
|
|
3418
3566
|
};
|
|
3419
3567
|
startedAt: string;
|
|
3420
|
-
tier: "
|
|
3568
|
+
tier: "oracle" | "review" | "delegate" | "workhorse" | "scout";
|
|
3421
3569
|
tokenUsage: {
|
|
3422
3570
|
source: "cursor-csv" | "codex-json" | "cursor-json" | "claude-json";
|
|
3423
3571
|
status: "available";
|
|
@@ -3776,8 +3924,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
|
|
|
3776
3924
|
boundary: z.ZodString;
|
|
3777
3925
|
closeout: z.ZodOptional<z.ZodObject<{
|
|
3778
3926
|
review: z.ZodEnum<{
|
|
3779
|
-
oracle: "oracle";
|
|
3780
3927
|
"independent-model": "independent-model";
|
|
3928
|
+
oracle: "oracle";
|
|
3781
3929
|
human: "human";
|
|
3782
3930
|
}>;
|
|
3783
3931
|
}, z.core.$loose>>;
|
|
@@ -3785,8 +3933,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
|
|
|
3785
3933
|
prs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3786
3934
|
schemaVersion: z.ZodLiteral<1>;
|
|
3787
3935
|
topology: z.ZodEnum<{
|
|
3788
|
-
flagged: "flagged";
|
|
3789
3936
|
"each-to-main": "each-to-main";
|
|
3937
|
+
flagged: "flagged";
|
|
3790
3938
|
stacked: "stacked";
|
|
3791
3939
|
}>;
|
|
3792
3940
|
waves: z.ZodArray<z.ZodObject<{
|
|
@@ -3794,8 +3942,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
|
|
|
3794
3942
|
issues: z.ZodArray<z.ZodNumber>;
|
|
3795
3943
|
name: z.ZodString;
|
|
3796
3944
|
review: z.ZodEnum<{
|
|
3797
|
-
oracle: "oracle";
|
|
3798
3945
|
"independent-model": "independent-model";
|
|
3946
|
+
oracle: "oracle";
|
|
3799
3947
|
human: "human";
|
|
3800
3948
|
}>;
|
|
3801
3949
|
}, z.core.$loose>>;
|
|
@@ -3804,8 +3952,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
|
|
|
3804
3952
|
boundary: z.ZodString;
|
|
3805
3953
|
closeout: z.ZodOptional<z.ZodObject<{
|
|
3806
3954
|
review: z.ZodEnum<{
|
|
3807
|
-
oracle: "oracle";
|
|
3808
3955
|
"independent-model": "independent-model";
|
|
3956
|
+
oracle: "oracle";
|
|
3809
3957
|
human: "human";
|
|
3810
3958
|
}>;
|
|
3811
3959
|
}, z.core.$loose>>;
|
|
@@ -3813,8 +3961,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
|
|
|
3813
3961
|
prs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3814
3962
|
schemaVersion: z.ZodLiteral<1>;
|
|
3815
3963
|
topology: z.ZodEnum<{
|
|
3816
|
-
flagged: "flagged";
|
|
3817
3964
|
"each-to-main": "each-to-main";
|
|
3965
|
+
flagged: "flagged";
|
|
3818
3966
|
stacked: "stacked";
|
|
3819
3967
|
}>;
|
|
3820
3968
|
waves: z.ZodArray<z.ZodObject<{
|
|
@@ -3822,8 +3970,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
|
|
|
3822
3970
|
issues: z.ZodArray<z.ZodNumber>;
|
|
3823
3971
|
name: z.ZodString;
|
|
3824
3972
|
review: z.ZodEnum<{
|
|
3825
|
-
oracle: "oracle";
|
|
3826
3973
|
"independent-model": "independent-model";
|
|
3974
|
+
oracle: "oracle";
|
|
3827
3975
|
human: "human";
|
|
3828
3976
|
}>;
|
|
3829
3977
|
}, z.core.$loose>>;
|
|
@@ -3908,7 +4056,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3908
4056
|
ledger: {
|
|
3909
4057
|
baseSha: string;
|
|
3910
4058
|
blockingReasons: string[];
|
|
3911
|
-
classification: "
|
|
4059
|
+
classification: "docs/process-only" | "trivial" | "non-trivial";
|
|
3912
4060
|
github: {
|
|
3913
4061
|
draft: boolean;
|
|
3914
4062
|
mergeStateStatus: string;
|
|
@@ -3957,7 +4105,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3957
4105
|
status: "satisfied" | "unmet" | "out-of-scope";
|
|
3958
4106
|
reason?: string | undefined;
|
|
3959
4107
|
scope?: {
|
|
3960
|
-
classifications: ("
|
|
4108
|
+
classifications: ("docs/process-only" | "trivial" | "non-trivial")[];
|
|
3961
4109
|
} | undefined;
|
|
3962
4110
|
}[] | undefined;
|
|
3963
4111
|
mergeBaseSha?: string | undefined;
|
|
@@ -3973,8 +4121,8 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3973
4121
|
nonBlockingFindings: number;
|
|
3974
4122
|
openFindings: number;
|
|
3975
4123
|
windowExhausted: boolean;
|
|
3976
|
-
highestBlockingSeverity?: "unknown" | "critical" | "high" | "
|
|
3977
|
-
highestOpenSeverity?: "unknown" | "critical" | "high" | "
|
|
4124
|
+
highestBlockingSeverity?: "unknown" | "critical" | "high" | "medium" | "low" | undefined;
|
|
4125
|
+
highestOpenSeverity?: "unknown" | "critical" | "high" | "medium" | "low" | undefined;
|
|
3978
4126
|
maxReviewCycles?: number | undefined;
|
|
3979
4127
|
reviewCycle?: number | undefined;
|
|
3980
4128
|
staleRepeatFindings?: number | undefined;
|
|
@@ -3985,7 +4133,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
3985
4133
|
interior: number;
|
|
3986
4134
|
};
|
|
3987
4135
|
nextAction: "run-gate-cycle" | "accept-nonblocking-findings" | "escalate-to-triage" | "ready-for-human" | "advance-to-gate" | "run-interior-cycle";
|
|
3988
|
-
stage: "gate" | "interior" | "interior
|
|
4136
|
+
stage: "gate" | "interior-complete" | "interior";
|
|
3989
4137
|
forcedTransition?: "gate-cap-exhausted" | "interior-cap-reached" | undefined;
|
|
3990
4138
|
} | undefined;
|
|
3991
4139
|
reviewRuns?: PrReviewResult[] | undefined;
|
|
@@ -4310,6 +4458,169 @@ declare const appendReviewLadderStageTraceEvent: ({
|
|
|
4310
4458
|
}) => AppendFactoryTraceEventResult;
|
|
4311
4459
|
declare const tryAppendReviewLadderStageTraceEvent: (input: Parameters<typeof appendReviewLadderStageTraceEvent>[0]) => ReviewLadderStageTraceWriteResult;
|
|
4312
4460
|
//#endregion
|
|
4461
|
+
//#region src/verification-battery.d.ts
|
|
4462
|
+
type BatteryDisposition = "executed" | "not-required";
|
|
4463
|
+
/**
|
|
4464
|
+
* The structural subset of a profile verification command this planner reads.
|
|
4465
|
+
* Kept structural — not a `Pick` of the profile type — so this leaf module
|
|
4466
|
+
* never imports `profile.ts` (which already depends on the impact modules).
|
|
4467
|
+
*/
|
|
4468
|
+
interface BatteryCandidateCommand {
|
|
4469
|
+
impactTarget?: string;
|
|
4470
|
+
name: string;
|
|
4471
|
+
}
|
|
4472
|
+
interface BatteryCommandDisposition {
|
|
4473
|
+
/** Why this command runs or is withheld — the stamp's own words when scoped. */
|
|
4474
|
+
basis: string;
|
|
4475
|
+
disposition: BatteryDisposition;
|
|
4476
|
+
/** The declared impact target, when the command declares one. */
|
|
4477
|
+
impactTarget?: string;
|
|
4478
|
+
name: string;
|
|
4479
|
+
}
|
|
4480
|
+
/**
|
|
4481
|
+
* A withheld command. `impactTarget` is REQUIRED here, not optional: only a
|
|
4482
|
+
* command that declared a target can be released, so the proof record can
|
|
4483
|
+
* always name the target whose classification released it.
|
|
4484
|
+
*/
|
|
4485
|
+
interface ScopedOutCommand {
|
|
4486
|
+
basis: string;
|
|
4487
|
+
impactTarget: string;
|
|
4488
|
+
name: string;
|
|
4489
|
+
}
|
|
4490
|
+
interface VerificationBatteryPlan<Command> {
|
|
4491
|
+
/** Every input command with its disposition, in input order. */
|
|
4492
|
+
dispositions: BatteryCommandDisposition[];
|
|
4493
|
+
/** The commands to run, in input order. */
|
|
4494
|
+
execute: Command[];
|
|
4495
|
+
/** The withheld commands, in input order. Recorded on the proof. */
|
|
4496
|
+
notRequired: ScopedOutCommand[];
|
|
4497
|
+
}
|
|
4498
|
+
/**
|
|
4499
|
+
* Plan one verification battery against the candidate's impact stamp.
|
|
4500
|
+
*
|
|
4501
|
+
* Pure and total: it makes a decision, it never reads a proof, a profile file,
|
|
4502
|
+
* or the filesystem, and no INPUT can make it throw — every doubt path is a
|
|
4503
|
+
* decision, not an exception. A malformed CALL is the one exception to that,
|
|
4504
|
+
* and deliberately so: omitting `vetoedTargets` is API misuse rather than data
|
|
4505
|
+
* doubt, and it throws (see {@link assertVetoedTargets}).
|
|
4506
|
+
*
|
|
4507
|
+
* `stamp` must already be trusted by
|
|
4508
|
+
* the caller — inside `pr:verify` that is the stamp just computed for this
|
|
4509
|
+
* candidate's own identity triple; anywhere else it is `trustedImpactStamp`'s
|
|
4510
|
+
* output or `undefined`.
|
|
4511
|
+
*/
|
|
4512
|
+
declare const planVerificationBattery: <Command extends BatteryCandidateCommand>({
|
|
4513
|
+
commands,
|
|
4514
|
+
stamp,
|
|
4515
|
+
vetoedTargets
|
|
4516
|
+
}: {
|
|
4517
|
+
commands: readonly Command[];
|
|
4518
|
+
stamp: ImpactStamp | undefined;
|
|
4519
|
+
/**
|
|
4520
|
+
* Target names with a current, candidate-bound FAILING envelope. Scoping is
|
|
4521
|
+
* withheld for these whatever the stamp says.
|
|
4522
|
+
*
|
|
4523
|
+
* REQUIRED, with no default, on purpose: the veto is the rule that keeps a
|
|
4524
|
+
* scoped-away command from leaving a demand nothing on this head could meet,
|
|
4525
|
+
* and a defaulted `[]` cannot tell "I inspected the envelopes and found no
|
|
4526
|
+
* bound failure" apart from "I never looked". Pass the result of
|
|
4527
|
+
* `boundFailingCheckNames`; pass `[]` only to mean the former.
|
|
4528
|
+
*
|
|
4529
|
+
* This tightening is deliberately visible to `api:check` as a breaking
|
|
4530
|
+
* signature change (pre-1.0, no external callers yet): an external producer
|
|
4531
|
+
* must be made to state the veto set rather than silently skip it.
|
|
4532
|
+
*/
|
|
4533
|
+
vetoedTargets: readonly string[];
|
|
4534
|
+
}) => VerificationBatteryPlan<Command>;
|
|
4535
|
+
/** Console lines naming every withheld command and why. Never silent. */
|
|
4536
|
+
declare const batteryScopeSummaryLines: (plan: VerificationBatteryPlan<BatteryCandidateCommand>) => string[];
|
|
4537
|
+
//#endregion
|
|
4538
|
+
//#region src/preview-lifecycle.d.ts
|
|
4539
|
+
type PreviewDisposition = "deploy" | "not-required";
|
|
4540
|
+
interface PreviewTargetPlan {
|
|
4541
|
+
basis: string;
|
|
4542
|
+
disposition: PreviewDisposition;
|
|
4543
|
+
name: string;
|
|
4544
|
+
}
|
|
4545
|
+
interface PreviewLifecyclePlan {
|
|
4546
|
+
/** The declared preview stacks to deploy, in declaration order. */
|
|
4547
|
+
deploy: string[];
|
|
4548
|
+
/** The withheld stacks, in declaration order. */
|
|
4549
|
+
notRequired: PreviewTargetPlan[];
|
|
4550
|
+
/** Whether a trusted, identity-bound stamp was available at all. */
|
|
4551
|
+
stampTrusted: boolean;
|
|
4552
|
+
/** Every declared preview target with its disposition, in declaration order. */
|
|
4553
|
+
targets: PreviewTargetPlan[];
|
|
4554
|
+
}
|
|
4555
|
+
/**
|
|
4556
|
+
* Structural subset of the profile: the impact declarations plus the external
|
|
4557
|
+
* demand list. Structural rather than a `Pick` so this module does not import
|
|
4558
|
+
* `profile.ts`.
|
|
4559
|
+
*/
|
|
4560
|
+
interface PreviewLifecycleProfile {
|
|
4561
|
+
impact?: {
|
|
4562
|
+
targets: {
|
|
4563
|
+
name: string;
|
|
4564
|
+
}[];
|
|
4565
|
+
};
|
|
4566
|
+
requiredChecks?: {
|
|
4567
|
+
name: string;
|
|
4568
|
+
}[];
|
|
4569
|
+
}
|
|
4570
|
+
/**
|
|
4571
|
+
* The declared preview stacks: impact targets that are ALSO declared required
|
|
4572
|
+
* checks — i.e. targets whose proof is produced externally, which is exactly
|
|
4573
|
+
* what a preview producer is.
|
|
4574
|
+
*
|
|
4575
|
+
* Deriving the list from the two existing declarations rather than adding a
|
|
4576
|
+
* third is what makes lifecycle and demand unable to disagree: the stacks this
|
|
4577
|
+
* plan can withhold are precisely the demands wave 2 can release, so a stack
|
|
4578
|
+
* can never be skipped while its proof stays demanded.
|
|
4579
|
+
*/
|
|
4580
|
+
declare const previewLifecycleTargets: (profile: PreviewLifecycleProfile) => string[];
|
|
4581
|
+
/**
|
|
4582
|
+
* Plan the preview lifecycle for one candidate.
|
|
4583
|
+
*
|
|
4584
|
+
* Trust is resolved here through the SAME identity gate demand release uses
|
|
4585
|
+
* (`trustedImpactStamp`): the proof must have passed and must bind both the
|
|
4586
|
+
* candidate's headSha and its patchId. A stale, aborted, absent, or
|
|
4587
|
+
* differently-bound proof yields no stamp, and every declared stack is planned
|
|
4588
|
+
* for deploy. Total over its INPUTS — no proof, stamp, or profile can make it
|
|
4589
|
+
* throw. A malformed CALL is the deliberate exception: omitting
|
|
4590
|
+
* `vetoedTargets` is API misuse, not data doubt, and throws.
|
|
4591
|
+
*/
|
|
4592
|
+
declare const planPreviewLifecycle: ({
|
|
4593
|
+
candidate,
|
|
4594
|
+
profile,
|
|
4595
|
+
proof,
|
|
4596
|
+
vetoedTargets
|
|
4597
|
+
}: {
|
|
4598
|
+
candidate: {
|
|
4599
|
+
headSha: string;
|
|
4600
|
+
patchId: string;
|
|
4601
|
+
};
|
|
4602
|
+
profile: PreviewLifecycleProfile;
|
|
4603
|
+
proof: PrVerifyProof | undefined;
|
|
4604
|
+
/**
|
|
4605
|
+
* Stack names with a current, candidate-bound FAILING envelope. Scoping is
|
|
4606
|
+
* withheld for these whatever the stamp says — the same veto demand release
|
|
4607
|
+
* applies, and for the same reason: a withheld stack is a stack that can
|
|
4608
|
+
* never re-emit the envelope its standing demand needs. Callers hold the
|
|
4609
|
+
* checkout context, so they resolve the set with `boundFailingCheckNames`
|
|
4610
|
+
* and pass it in; this module stays pure.
|
|
4611
|
+
*
|
|
4612
|
+
* REQUIRED, with no default, on purpose: a defaulted `[]` reads the same
|
|
4613
|
+
* whether the caller inspected the envelopes or never looked, and this seam
|
|
4614
|
+
* exists precisely for EXTERNAL preview producers — the callers most likely
|
|
4615
|
+
* to skip the lookup. Pass the result of `boundFailingCheckNames`; pass `[]`
|
|
4616
|
+
* only to mean "inspected the envelopes and found no bound failure".
|
|
4617
|
+
*
|
|
4618
|
+
* Deliberately visible to `api:check` as a breaking signature change
|
|
4619
|
+
* (pre-1.0, no external callers yet).
|
|
4620
|
+
*/
|
|
4621
|
+
vetoedTargets: readonly string[];
|
|
4622
|
+
}) => PreviewLifecyclePlan;
|
|
4623
|
+
//#endregion
|
|
4313
4624
|
//#region src/worker-checkout-guard.d.ts
|
|
4314
4625
|
type CheckoutDirsProbe = (cwd: string) => {
|
|
4315
4626
|
gitCommonDir: string;
|
|
@@ -4343,4 +4654,4 @@ interface CreateProgramOptions {
|
|
|
4343
4654
|
declare function createProgram(options?: CreateProgramOptions): Command;
|
|
4344
4655
|
declare function run(argv?: string[]): Promise<void>;
|
|
4345
4656
|
//#endregion
|
|
4346
|
-
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPublishFollowUp, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, retroEnvelopeSchemaVersionOf, retroEnvelopeV1Schema, retroEpicReference, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
|
|
4657
|
+
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BatteryCommandDisposition, type BatteryDisposition, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type ImpactScopeDecision, type ImpactScopeSurface, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PreviewDisposition, type PreviewLifecyclePlan, type PreviewTargetPlan, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type ScopedOutCommand, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationBatteryPlan, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, batteryScopeSummaryLines, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, impactStampScopeDecision, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPreviewLifecycle, planPublishFollowUp, planVerificationBattery, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, previewLifecycleTargets, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, retroEnvelopeSchemaVersionOf, retroEnvelopeV1Schema, retroEpicReference, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
|