@patronage/software-factory 1.0.0-alpha.45 → 1.0.0-alpha.47
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 +27 -2
- package/dist/cli.js +1 -2
- package/dist/cloud/credentials.d.mts +21 -0
- package/dist/cloud/credentials.mjs +136 -0
- package/dist/cloud/install-tools.sh +59 -0
- package/dist/index.d.ts +2607 -2462
- package/dist/index.js +593 -639
- package/dist/{chunk-pbuEa-1d.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/schemas.d.ts +543 -532
- package/dist/schemas.js +46 -48
- package/package.json +25 -19
package/dist/schemas.d.ts
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
declare const reviewPromptSectionSchema: z.ZodObject<{
|
|
2
|
+
export declare const reviewPromptSectionSchema: z.ZodObject<{
|
|
4
3
|
provenance: z.ZodEnum<{
|
|
5
4
|
"coding-standards": "coding-standards";
|
|
6
|
-
"prior-review-ledger": "prior-review-ledger";
|
|
7
5
|
"issue-review-focus": "issue-review-focus";
|
|
6
|
+
"prior-review-ledger": "prior-review-ledger";
|
|
8
7
|
}>;
|
|
9
8
|
source: z.ZodString;
|
|
10
9
|
text: z.ZodString;
|
|
11
10
|
}, z.core.$strict>;
|
|
12
11
|
type ReviewPromptSection = z.infer<typeof reviewPromptSectionSchema>;
|
|
13
12
|
type ReviewPromptSectionProvenance = ReviewPromptSection["provenance"];
|
|
14
|
-
declare const reviewPromptSectionsSchema: z.ZodArray<z.ZodObject<{
|
|
13
|
+
export declare const reviewPromptSectionsSchema: z.ZodArray<z.ZodObject<{
|
|
15
14
|
provenance: z.ZodEnum<{
|
|
16
15
|
"coding-standards": "coding-standards";
|
|
17
|
-
"prior-review-ledger": "prior-review-ledger";
|
|
18
16
|
"issue-review-focus": "issue-review-focus";
|
|
17
|
+
"prior-review-ledger": "prior-review-ledger";
|
|
19
18
|
}>;
|
|
20
19
|
source: z.ZodString;
|
|
21
20
|
text: z.ZodString;
|
|
22
21
|
}, z.core.$strict>>;
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/policy-resolution.d.ts
|
|
25
22
|
/** How a gate resolved the review policy it evaluated a candidate under. */
|
|
26
23
|
declare const policyResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
24
|
basePolicyDigest: z.ZodString;
|
|
@@ -34,16 +31,14 @@ declare const policyResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
34
31
|
}, z.core.$strict>, z.ZodObject<{
|
|
35
32
|
baseRefName: z.ZodString;
|
|
36
33
|
cause: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
"no-pull-request": "no-pull-request";
|
|
38
34
|
"lookup-failed": "lookup-failed";
|
|
35
|
+
"no-pull-request": "no-pull-request";
|
|
39
36
|
"policy-unreadable": "policy-unreadable";
|
|
40
37
|
}>>;
|
|
41
38
|
reason: z.ZodString;
|
|
42
39
|
status: z.ZodLiteral<"unresolved">;
|
|
43
40
|
}, z.core.$strict>], "status">;
|
|
44
41
|
type PolicyResolution = z.infer<typeof policyResolutionSchema>;
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/review-ladder-policy.d.ts
|
|
47
42
|
type ReviewFindingCategory = "correctness" | "safety" | "coordination" | "maintainability" | "unknown";
|
|
48
43
|
interface ReviewFindingAttributes {
|
|
49
44
|
blockingAfterCap?: boolean;
|
|
@@ -58,12 +53,8 @@ interface ReviewFindingAttributes {
|
|
|
58
53
|
};
|
|
59
54
|
title: string;
|
|
60
55
|
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/review-rungs.d.ts
|
|
63
56
|
declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
|
|
64
57
|
type EvidenceReviewRung = (typeof EVIDENCE_REVIEW_RUNGS)[number];
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/review-ladder-ledger.d.ts
|
|
67
58
|
type LadderCycleStage = "interior" | "gate";
|
|
68
59
|
type LadderFindingReport = ReviewFindingAttributes;
|
|
69
60
|
/** One finding as recorded in one cycle (GLOSSARY.md: finding occurrence). */
|
|
@@ -97,8 +88,6 @@ type ReviewDeclarationRecord = {
|
|
|
97
88
|
rule: PolicyDeclarationRule;
|
|
98
89
|
target: string;
|
|
99
90
|
};
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/review-recording-schema.d.ts
|
|
102
91
|
interface ReviewRecordedCycleIdentity {
|
|
103
92
|
/**
|
|
104
93
|
* SHA-256 of the proof file bytes this recording was applied to, or
|
|
@@ -117,11 +106,10 @@ interface ReviewRecordedCycleIdentity {
|
|
|
117
106
|
recordingId: string;
|
|
118
107
|
}
|
|
119
108
|
type ReviewCycleRecording = {
|
|
120
|
-
declarations: ReviewDeclarationRecord[];
|
|
109
|
+
declarations: ReviewDeclarationRecord[];
|
|
110
|
+
/** Index-aligned with the cycle's `findings`. */
|
|
121
111
|
occurrences: ReviewOccurrenceRecord[];
|
|
122
112
|
} & ReviewRecordedCycleIdentity;
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/review-ladder.d.ts
|
|
125
113
|
interface LadderSessionAttribution {
|
|
126
114
|
orchestrationMode?: "autonomous" | "manual";
|
|
127
115
|
resumedSession?: boolean;
|
|
@@ -146,18 +134,16 @@ interface ReviewLadderCycle {
|
|
|
146
134
|
session?: LadderSessionAttribution;
|
|
147
135
|
stage: LadderCycleStage;
|
|
148
136
|
usage?: LadderUsageReport;
|
|
137
|
+
verdicts?: {
|
|
138
|
+
outcome: "error" | "failed" | "passed";
|
|
139
|
+
rung?: EvidenceReviewRung;
|
|
140
|
+
}[];
|
|
149
141
|
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/pr-readiness/ladder-proof-state.d.ts
|
|
152
142
|
interface PrReviewLadderState {
|
|
153
143
|
cycles: ReviewLadderCycle[];
|
|
154
144
|
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/pr-readiness/review-proof-types.d.ts
|
|
157
145
|
type PrReviewKind = "correctness" | "security";
|
|
158
146
|
type PrReviewOutcome = "passed" | "failed" | "error";
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/pr-readiness/review-proof-shape.d.ts
|
|
161
147
|
interface PrReviewFinding extends ReviewFindingAttributes {
|
|
162
148
|
body: string;
|
|
163
149
|
category?: ReviewFindingCategory;
|
|
@@ -208,33 +194,12 @@ interface PrReviewProof {
|
|
|
208
194
|
};
|
|
209
195
|
reviews: PrReviewResult[];
|
|
210
196
|
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/demand-waiver.d.ts
|
|
213
|
-
/**
|
|
214
|
-
* A demand that was in force, was NOT met, and was waived by the operator.
|
|
215
|
-
*
|
|
216
|
-
* `unmetReasons` is required and non-empty: every reason the demand refused is
|
|
217
|
-
* carried through verbatim. There is no field on this record that could say
|
|
218
|
-
* "satisfied", and no code path constructs one without a refusal to carry.
|
|
219
|
-
*/
|
|
220
|
-
interface WaivedDemand {
|
|
221
|
-
demand: string;
|
|
222
|
-
operator: string;
|
|
223
|
-
rationale: string;
|
|
224
|
-
recordedAt: string;
|
|
225
|
-
session?: string;
|
|
226
|
-
/** The demand's refusals at evaluation time, preserved verbatim. */
|
|
227
|
-
unmetReasons: string[];
|
|
228
|
-
}
|
|
229
|
-
declare const waivedDemandSchema: z.ZodType<WaivedDemand>;
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/blocked-reasons.d.ts
|
|
232
197
|
/**
|
|
233
198
|
* The wire bound on one `detail`. A blocked proof carries one short sentence
|
|
234
199
|
* per demand, never a transcript: HQ's ingest cap is 256 KB and this field
|
|
235
200
|
* must stay far under it even when a candidate blocks on every gate at once.
|
|
236
201
|
*/
|
|
237
|
-
declare const BLOCKED_REASON_DETAIL_MAX = 280;
|
|
202
|
+
export declare const BLOCKED_REASON_DETAIL_MAX = 280;
|
|
238
203
|
/**
|
|
239
204
|
* The wire bound on how many demands one proof may name. Well past any real
|
|
240
205
|
* candidate (there are a dozen fixed demands plus the profile's checks and the
|
|
@@ -243,18 +208,223 @@ declare const BLOCKED_REASON_DETAIL_MAX = 280;
|
|
|
243
208
|
* downstream: HQ rejects an over-long list loudly instead of storing a quietly
|
|
244
209
|
* truncated one.
|
|
245
210
|
*/
|
|
246
|
-
declare const BLOCKED_REASONS_MAX = 100;
|
|
247
|
-
declare const blockedReasonSchema: z.ZodObject<{
|
|
211
|
+
export declare const BLOCKED_REASONS_MAX = 100;
|
|
212
|
+
export declare const blockedReasonSchema: z.ZodObject<{
|
|
248
213
|
code: z.ZodString;
|
|
249
214
|
detail: z.ZodString;
|
|
250
215
|
}, z.core.$strip>;
|
|
251
|
-
declare const blockedReasonsSchema: z.ZodArray<z.ZodObject<{
|
|
216
|
+
export declare const blockedReasonsSchema: z.ZodArray<z.ZodObject<{
|
|
252
217
|
code: z.ZodString;
|
|
253
218
|
detail: z.ZodString;
|
|
254
219
|
}, z.core.$strip>>;
|
|
255
220
|
type BlockedReason = z.infer<typeof blockedReasonSchema>;
|
|
256
|
-
|
|
257
|
-
|
|
221
|
+
/**
|
|
222
|
+
* A demand that was in force, was NOT met, and was waived by the operator.
|
|
223
|
+
*
|
|
224
|
+
* `unmetReasons` is required and non-empty: every reason the demand refused is
|
|
225
|
+
* carried through verbatim. There is no field on this record that could say
|
|
226
|
+
* "satisfied", and no code path constructs one without a refusal to carry.
|
|
227
|
+
*/
|
|
228
|
+
interface WaivedDemand {
|
|
229
|
+
demand: string;
|
|
230
|
+
operator: string;
|
|
231
|
+
rationale: string;
|
|
232
|
+
recordedAt: string;
|
|
233
|
+
session?: string;
|
|
234
|
+
/** The demand's refusals at evaluation time, preserved verbatim. */
|
|
235
|
+
unmetReasons: string[];
|
|
236
|
+
}
|
|
237
|
+
export declare const waivedDemandSchema: z.ZodType<WaivedDemand>;
|
|
238
|
+
interface FollowUpAction {
|
|
239
|
+
/**
|
|
240
|
+
* Machine-safe argv-style array for the obvious next action, e.g.
|
|
241
|
+
* ["gh","pr","merge","513","--squash"]. Same shape and field name that
|
|
242
|
+
* `factory:delegate --print` emits, so an orchestrating agent can spawn the
|
|
243
|
+
* next command without reconstructing a shell string. argv[0] is the
|
|
244
|
+
* executable; the rest are literal, already-split arguments.
|
|
245
|
+
*/
|
|
246
|
+
argv: string[];
|
|
247
|
+
/**
|
|
248
|
+
* Human-readable rendering of {@link argv} for logs and operators. Additive
|
|
249
|
+
* to argv, never a substitute for it — argv is the source of truth.
|
|
250
|
+
*/
|
|
251
|
+
command: string;
|
|
252
|
+
}
|
|
253
|
+
declare const readinessRepairSchema: z.ZodObject<{
|
|
254
|
+
action: z.ZodString;
|
|
255
|
+
code: z.ZodEnum<{
|
|
256
|
+
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
257
|
+
"undraft-pr": "undraft-pr";
|
|
258
|
+
}>;
|
|
259
|
+
command: z.ZodString;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
262
|
+
baseSha: z.ZodString;
|
|
263
|
+
blockingReasons: z.ZodArray<z.ZodString>;
|
|
264
|
+
classification: z.ZodEnum<{
|
|
265
|
+
"docs/process-only": "docs/process-only";
|
|
266
|
+
"non-trivial": "non-trivial";
|
|
267
|
+
trivial: "trivial";
|
|
268
|
+
}>;
|
|
269
|
+
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
|
+
checkType: z.ZodEnum<{
|
|
271
|
+
review: "review";
|
|
272
|
+
verify: "verify";
|
|
273
|
+
}>;
|
|
274
|
+
name: z.ZodString;
|
|
275
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
276
|
+
scope: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
classifications: z.ZodArray<z.ZodEnum<{
|
|
278
|
+
"docs/process-only": "docs/process-only";
|
|
279
|
+
"non-trivial": "non-trivial";
|
|
280
|
+
trivial: "trivial";
|
|
281
|
+
}>>;
|
|
282
|
+
}, z.core.$strict>>;
|
|
283
|
+
scopeReason: z.ZodString;
|
|
284
|
+
status: z.ZodEnum<{
|
|
285
|
+
"out-of-scope": "out-of-scope";
|
|
286
|
+
satisfied: "satisfied";
|
|
287
|
+
unmet: "unmet";
|
|
288
|
+
}>;
|
|
289
|
+
}, z.core.$strip>>>;
|
|
290
|
+
github: z.ZodObject<{
|
|
291
|
+
draft: z.ZodBoolean;
|
|
292
|
+
mergeStateStatus: z.ZodString;
|
|
293
|
+
mergeable: z.ZodString;
|
|
294
|
+
requiredChecks: z.ZodEnum<{
|
|
295
|
+
failed: "failed";
|
|
296
|
+
none: "none";
|
|
297
|
+
passed: "passed";
|
|
298
|
+
pending: "pending";
|
|
299
|
+
unknown: "unknown";
|
|
300
|
+
}>;
|
|
301
|
+
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
|
+
unresolvedReviewThreads: z.ZodNumber;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
headSha: z.ZodString;
|
|
305
|
+
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
306
|
+
patchId: z.ZodString;
|
|
307
|
+
pr: z.ZodNumber;
|
|
308
|
+
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
309
|
+
action: z.ZodString;
|
|
310
|
+
code: z.ZodEnum<{
|
|
311
|
+
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
312
|
+
"undraft-pr": "undraft-pr";
|
|
313
|
+
}>;
|
|
314
|
+
command: z.ZodString;
|
|
315
|
+
}, z.core.$strip>>>;
|
|
316
|
+
reviewCycleState: z.ZodOptional<z.ZodObject<{
|
|
317
|
+
autoBlockingFindings: z.ZodNumber;
|
|
318
|
+
countsBySeverity: z.ZodObject<{
|
|
319
|
+
critical: z.ZodNumber;
|
|
320
|
+
high: z.ZodNumber;
|
|
321
|
+
low: z.ZodNumber;
|
|
322
|
+
medium: z.ZodNumber;
|
|
323
|
+
unknown: z.ZodNumber;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
critical: "critical";
|
|
327
|
+
high: "high";
|
|
328
|
+
low: "low";
|
|
329
|
+
medium: "medium";
|
|
330
|
+
unknown: "unknown";
|
|
331
|
+
}>>;
|
|
332
|
+
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
333
|
+
critical: "critical";
|
|
334
|
+
high: "high";
|
|
335
|
+
low: "low";
|
|
336
|
+
medium: "medium";
|
|
337
|
+
unknown: "unknown";
|
|
338
|
+
}>>;
|
|
339
|
+
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
nonBlockingFindings: z.ZodNumber;
|
|
341
|
+
openFindings: z.ZodNumber;
|
|
342
|
+
reviewCycle: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
staleRepeatFindings: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
windowExhausted: z.ZodBoolean;
|
|
345
|
+
}, z.core.$strip>>;
|
|
346
|
+
reviewLadder: z.ZodOptional<z.ZodObject<{
|
|
347
|
+
cycleCounts: z.ZodObject<{
|
|
348
|
+
gate: z.ZodNumber;
|
|
349
|
+
interior: z.ZodNumber;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
forcedTransition: z.ZodOptional<z.ZodEnum<{
|
|
352
|
+
"gate-cap-exhausted": "gate-cap-exhausted";
|
|
353
|
+
"interior-cap-reached": "interior-cap-reached";
|
|
354
|
+
}>>;
|
|
355
|
+
nextAction: z.ZodEnum<{
|
|
356
|
+
"accept-nonblocking-findings": "accept-nonblocking-findings";
|
|
357
|
+
"advance-to-gate": "advance-to-gate";
|
|
358
|
+
"escalate-to-triage": "escalate-to-triage";
|
|
359
|
+
"ready-for-human": "ready-for-human";
|
|
360
|
+
"run-gate-cycle": "run-gate-cycle";
|
|
361
|
+
"run-interior-cycle": "run-interior-cycle";
|
|
362
|
+
}>;
|
|
363
|
+
stage: z.ZodEnum<{
|
|
364
|
+
gate: "gate";
|
|
365
|
+
interior: "interior";
|
|
366
|
+
"interior-complete": "interior-complete";
|
|
367
|
+
}>;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
370
|
+
reviewTerminalState: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
"accepted-with-findings": "accepted-with-findings";
|
|
372
|
+
blocked: "blocked";
|
|
373
|
+
clean: "clean";
|
|
374
|
+
}>>;
|
|
375
|
+
reviews: z.ZodObject<{
|
|
376
|
+
correctness: z.ZodObject<{
|
|
377
|
+
required: z.ZodBoolean;
|
|
378
|
+
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
379
|
+
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
380
|
+
status: z.ZodEnum<{
|
|
381
|
+
blocked: "blocked";
|
|
382
|
+
current: "current";
|
|
383
|
+
missing: "missing";
|
|
384
|
+
"not-required": "not-required";
|
|
385
|
+
stale: "stale";
|
|
386
|
+
}>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
security: z.ZodOptional<z.ZodObject<{
|
|
389
|
+
required: z.ZodBoolean;
|
|
390
|
+
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
391
|
+
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
392
|
+
status: z.ZodEnum<{
|
|
393
|
+
blocked: "blocked";
|
|
394
|
+
current: "current";
|
|
395
|
+
missing: "missing";
|
|
396
|
+
"not-required": "not-required";
|
|
397
|
+
stale: "stale";
|
|
398
|
+
}>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
}, z.core.$strip>;
|
|
401
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
402
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
403
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
404
|
+
prVerify: z.ZodLiteral<"missing">;
|
|
405
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
406
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
407
|
+
prVerify: z.ZodLiteral<"stale">;
|
|
408
|
+
verifiedHeadSha: z.ZodString;
|
|
409
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
410
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
411
|
+
prVerify: z.ZodLiteral<"passed-via-head">;
|
|
412
|
+
verifiedHeadSha: z.ZodString;
|
|
413
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
414
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
415
|
+
docsOnlyVerifiedHeadSha: z.ZodString;
|
|
416
|
+
prVerify: z.ZodLiteral<"docs-only-delta">;
|
|
417
|
+
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
418
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
419
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
420
|
+
prVerify: z.ZodLiteral<"trivial-delta">;
|
|
421
|
+
trivialVerifiedHeadSha: z.ZodString;
|
|
422
|
+
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, z.core.$strict>], "prVerify">;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
|
|
426
|
+
type ReadinessStatus = "ready" | "blocked";
|
|
427
|
+
type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
|
|
258
428
|
declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
259
429
|
boundary: z.ZodString;
|
|
260
430
|
coveredSet: z.ZodArray<z.ZodObject<{
|
|
@@ -282,14 +452,14 @@ declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
|
282
452
|
value: z.ZodString;
|
|
283
453
|
}, z.core.$loose>;
|
|
284
454
|
outcome: z.ZodEnum<{
|
|
285
|
-
pass: "pass";
|
|
286
455
|
fail: "fail";
|
|
456
|
+
pass: "pass";
|
|
287
457
|
}>;
|
|
288
458
|
producer: z.ZodString;
|
|
289
459
|
rung: z.ZodEnum<{
|
|
460
|
+
human: "human";
|
|
290
461
|
"independent-model": "independent-model";
|
|
291
462
|
oracle: "oracle";
|
|
292
|
-
human: "human";
|
|
293
463
|
}>;
|
|
294
464
|
schemaVersion: z.ZodLiteral<1>;
|
|
295
465
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -300,8 +470,6 @@ declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
|
300
470
|
}, z.core.$loose>>;
|
|
301
471
|
}, z.core.$loose>;
|
|
302
472
|
type BoundaryReviewProof = z.infer<typeof boundaryReviewProofBaseSchema>;
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/catch-up-recognition-record.d.ts
|
|
305
473
|
interface CatchUpRecognition {
|
|
306
474
|
/** The ref the candidate targets, as the recognizing command resolved it. */
|
|
307
475
|
baseRef: string;
|
|
@@ -317,12 +485,8 @@ interface CatchUpRecognition {
|
|
|
317
485
|
/** The ref that proves the second parent is admitted content. */
|
|
318
486
|
upstreamRef: string;
|
|
319
487
|
}
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region src/diff-classification.d.ts
|
|
322
488
|
declare const DIFF_CLASSIFICATIONS: readonly ["docs/process-only", "trivial", "non-trivial"];
|
|
323
489
|
type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
|
|
324
|
-
//#endregion
|
|
325
|
-
//#region src/impact-stamp.d.ts
|
|
326
490
|
/**
|
|
327
491
|
* The recorded stamp. `targets` satisfies the completeness invariant: every
|
|
328
492
|
* target the profile declares is present, each with its exact basis — never
|
|
@@ -331,8 +495,8 @@ type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
|
|
|
331
495
|
*/
|
|
332
496
|
declare const impactStampSchema: z.ZodObject<{
|
|
333
497
|
basis: z.ZodEnum<{
|
|
334
|
-
"target-scoped": "target-scoped";
|
|
335
498
|
conservative: "conservative";
|
|
499
|
+
"target-scoped": "target-scoped";
|
|
336
500
|
}>;
|
|
337
501
|
inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
338
502
|
reasons: z.ZodArray<z.ZodString>;
|
|
@@ -349,35 +513,46 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
349
513
|
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
350
514
|
}, z.core.$strip>;
|
|
351
515
|
type ImpactStamp = z.infer<typeof impactStampSchema>;
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
516
|
+
declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
517
|
+
check: z.ZodString;
|
|
518
|
+
checkType: z.ZodEnum<{
|
|
519
|
+
review: "review";
|
|
520
|
+
verify: "verify";
|
|
521
|
+
}>;
|
|
522
|
+
findingsPointer: z.ZodOptional<z.ZodString>;
|
|
523
|
+
headSha: z.ZodString;
|
|
524
|
+
mergeBaseSha: z.ZodString;
|
|
525
|
+
model: z.ZodOptional<z.ZodString>;
|
|
526
|
+
outcome: z.ZodEnum<{
|
|
527
|
+
fail: "fail";
|
|
528
|
+
pass: "pass";
|
|
529
|
+
}>;
|
|
530
|
+
patchId: z.ZodString;
|
|
531
|
+
policyVersion: z.ZodOptional<z.ZodString>;
|
|
532
|
+
producer: z.ZodString;
|
|
533
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
534
|
+
rung: z.ZodOptional<z.ZodEnum<{
|
|
535
|
+
human: "human";
|
|
536
|
+
"independent-model": "independent-model";
|
|
537
|
+
oracle: "oracle";
|
|
538
|
+
}>>;
|
|
539
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
540
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
541
|
+
timestamp: z.ZodOptional<z.ZodISODateTime>;
|
|
542
|
+
}, z.core.$loose>;
|
|
543
|
+
type EvidenceEnvelope = z.infer<typeof evidenceEnvelopeBaseSchema>;
|
|
544
|
+
export declare const PR_REVIEW_SCHEMA_VERSION = 3;
|
|
545
|
+
export declare const prReviewFindingSchema: z.ZodType<PrReviewFinding>;
|
|
546
|
+
export declare const prReviewResultSchema: z.ZodType<PrReviewResult>;
|
|
547
|
+
export declare const prReviewProofSchema: z.ZodType<PrReviewProof>;
|
|
548
|
+
/**
|
|
549
|
+
* The verification mode `pr:verify` resolved for a run.
|
|
550
|
+
*
|
|
551
|
+
* Canonically declared here rather than inside `pr-readiness/` so that modules
|
|
552
|
+
* on either side of that boundary — the readiness proof shape and the durable
|
|
553
|
+
* check-run payload — can name the same union without importing each other.
|
|
377
554
|
*/
|
|
378
555
|
type ResolvedPrVerifyMode = "docs-only" | "trivial" | "full";
|
|
379
|
-
//#endregion
|
|
380
|
-
//#region src/pr-verify-proof-contract.d.ts
|
|
381
556
|
/**
|
|
382
557
|
* The pr:verify proof versions a reader accepts: the current one only (#920
|
|
383
558
|
* item 1). #917 narrowed the pr:ready reader the same way. A pr:verify proof
|
|
@@ -386,7 +561,7 @@ type ResolvedPrVerifyMode = "docs-only" | "trivial" | "full";
|
|
|
386
561
|
* applies: one current contract, no compat reader. A consumer on an older
|
|
387
562
|
* factory must adopt this release before HQ ingests its pr:verify proofs.
|
|
388
563
|
*/
|
|
389
|
-
declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [4];
|
|
564
|
+
export declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [4];
|
|
390
565
|
type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
|
|
391
566
|
interface PrVerifyCommandResult {
|
|
392
567
|
command: string;
|
|
@@ -447,6 +622,34 @@ interface PrVerifyExecutedCommand {
|
|
|
447
622
|
name: string;
|
|
448
623
|
scope: "docs-only" | "trivial" | "full";
|
|
449
624
|
}
|
|
625
|
+
/** Where a verification battery ran (#1570). */
|
|
626
|
+
declare const PR_VERIFY_RUNNER_KINDS: readonly ["ci", "cloud", "local"];
|
|
627
|
+
/**
|
|
628
|
+
* The machine a pr:verify battery ran on (#1570), so per-step durations in
|
|
629
|
+
* `executedCommands` can be compared like for like: a Mac against a Mac, a
|
|
630
|
+
* cloud agent VM against a cloud agent VM. It names the class of machine, not
|
|
631
|
+
* the machine: no hostname, user, or path is recorded, because this proof is
|
|
632
|
+
* sent to HQ.
|
|
633
|
+
*/
|
|
634
|
+
interface PrVerifyRunner {
|
|
635
|
+
/** Node's `process.arch`, such as `arm64` or `x64`. */
|
|
636
|
+
arch: string;
|
|
637
|
+
/** Logical CPUs the run could see. */
|
|
638
|
+
cpuCount: number;
|
|
639
|
+
/**
|
|
640
|
+
* `ci` is a hosted CI runner, `cloud` an agent's cloud VM, and `local` a
|
|
641
|
+
* developer machine: everything that is neither.
|
|
642
|
+
*/
|
|
643
|
+
kind: (typeof PR_VERIFY_RUNNER_KINDS)[number];
|
|
644
|
+
/** Node's `process.platform`, such as `darwin` or `linux`. */
|
|
645
|
+
os: string;
|
|
646
|
+
/**
|
|
647
|
+
* The host that provided a `ci` or `cloud` runner when its environment
|
|
648
|
+
* names it: `claude-code`, `cursor`, or `github-actions`. Absent for
|
|
649
|
+
* `local` and for an unnamed CI.
|
|
650
|
+
*/
|
|
651
|
+
provider?: "claude-code" | "cursor" | "github-actions";
|
|
652
|
+
}
|
|
450
653
|
/**
|
|
451
654
|
* Epic #550 wave 3 (#430): a verification command the impact stamp proved this
|
|
452
655
|
* candidate cannot reach, so the battery did not run it.
|
|
@@ -518,10 +721,16 @@ interface PrVerifyProof {
|
|
|
518
721
|
profilePath: string;
|
|
519
722
|
projectKey: string;
|
|
520
723
|
repository: string;
|
|
724
|
+
/**
|
|
725
|
+
* The machine the battery ran on (#1570). Optional and additive: a proof
|
|
726
|
+
* written before it existed parses unchanged, and the schema version does
|
|
727
|
+
* not move.
|
|
728
|
+
*/
|
|
729
|
+
runner?: PrVerifyRunner;
|
|
521
730
|
startedAt: string;
|
|
522
731
|
verificationCommands: PrVerifyCommandResult[];
|
|
523
732
|
}
|
|
524
|
-
declare const prVerifyProofSchema: z.ZodObject<{
|
|
733
|
+
export declare const prVerifyProofSchema: z.ZodObject<{
|
|
525
734
|
authoringSession: z.ZodString;
|
|
526
735
|
base: z.ZodString;
|
|
527
736
|
baseSha: z.ZodOptional<z.ZodString>;
|
|
@@ -537,8 +746,8 @@ declare const prVerifyProofSchema: z.ZodObject<{
|
|
|
537
746
|
changedFiles: z.ZodArray<z.ZodString>;
|
|
538
747
|
classification: z.ZodEnum<{
|
|
539
748
|
"docs/process-only": "docs/process-only";
|
|
540
|
-
trivial: "trivial";
|
|
541
749
|
"non-trivial": "non-trivial";
|
|
750
|
+
trivial: "trivial";
|
|
542
751
|
}>;
|
|
543
752
|
classificationReasons: z.ZodArray<z.ZodString>;
|
|
544
753
|
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
@@ -547,406 +756,121 @@ declare const prVerifyProofSchema: z.ZodObject<{
|
|
|
547
756
|
executedCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
548
757
|
command: z.ZodString;
|
|
549
758
|
counts: z.ZodOptional<z.ZodObject<{
|
|
550
|
-
testFiles: z.ZodOptional<z.ZodNumber>;
|
|
551
|
-
tests: z.ZodOptional<z.ZodNumber>;
|
|
552
|
-
}, z.core.$strip>>;
|
|
553
|
-
durationMs: z.ZodNumber;
|
|
554
|
-
exitCode: z.ZodNumber;
|
|
555
|
-
failures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
556
|
-
file: z.ZodString;
|
|
557
|
-
kind: z.ZodEnum<{
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
timeout: "timeout";
|
|
561
|
-
}>;
|
|
562
|
-
title: z.ZodString;
|
|
563
|
-
}, z.core.$strip>>>;
|
|
564
|
-
name: z.ZodString;
|
|
565
|
-
scope: z.ZodEnum<{
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}>;
|
|
570
|
-
}, z.core.$strip>>>;
|
|
571
|
-
headSha: z.ZodString;
|
|
572
|
-
impactStamp: z.ZodOptional<z.ZodObject<{
|
|
573
|
-
basis: z.ZodEnum<{
|
|
574
|
-
"target-scoped": "target-scoped";
|
|
575
|
-
conservative: "conservative";
|
|
576
|
-
}>;
|
|
577
|
-
inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
578
|
-
reasons: z.ZodArray<z.ZodString>;
|
|
579
|
-
stampVersion: z.ZodLiteral<4>;
|
|
580
|
-
targets: z.ZodArray<z.ZodObject<{
|
|
581
|
-
basis: z.ZodString;
|
|
582
|
-
impact: z.ZodEnum<{
|
|
583
|
-
affected: "affected";
|
|
584
|
-
"not-affected": "not-affected";
|
|
585
|
-
}>;
|
|
586
|
-
name: z.ZodString;
|
|
587
|
-
subscribedPaths: z.ZodArray<z.ZodString>;
|
|
588
|
-
}, z.core.$strip>>;
|
|
589
|
-
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
590
|
-
}, z.core.$strip>>;
|
|
591
|
-
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
592
|
-
mode: z.ZodEnum<{
|
|
593
|
-
trivial: "trivial";
|
|
594
|
-
"docs-only": "docs-only";
|
|
595
|
-
full: "full";
|
|
596
|
-
}>;
|
|
597
|
-
notDemandedRecords: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
598
|
-
basis: z.ZodString;
|
|
599
|
-
name: z.ZodString;
|
|
600
|
-
}, z.core.$strip>>>;
|
|
601
|
-
notRequiredCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
602
|
-
basis: z.ZodString;
|
|
603
|
-
impactTarget: z.ZodString;
|
|
604
|
-
name: z.ZodString;
|
|
605
|
-
}, z.core.$strip>>>;
|
|
606
|
-
outcome: z.ZodOptional<z.ZodEnum<{
|
|
607
|
-
passed: "passed";
|
|
608
|
-
aborted: "aborted";
|
|
609
|
-
}>>;
|
|
610
|
-
patchId: z.ZodOptional<z.ZodString>;
|
|
611
|
-
policyResolution: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
612
|
-
basePolicyDigest: z.ZodString;
|
|
613
|
-
baseRefName: z.ZodString;
|
|
614
|
-
candidatePolicyDigest: z.ZodString;
|
|
615
|
-
effectiveDigest: z.ZodString;
|
|
616
|
-
policyBaseSha: z.ZodString;
|
|
617
|
-
reviewPolicyChanged: z.ZodBoolean;
|
|
618
|
-
status: z.ZodLiteral<"authoritative">;
|
|
619
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
620
|
-
baseRefName: z.ZodString;
|
|
621
|
-
cause: z.ZodOptional<z.ZodEnum<{
|
|
622
|
-
"no-pull-request": "no-pull-request";
|
|
623
|
-
"lookup-failed": "lookup-failed";
|
|
624
|
-
"policy-unreadable": "policy-unreadable";
|
|
625
|
-
}>>;
|
|
626
|
-
reason: z.ZodString;
|
|
627
|
-
status: z.ZodLiteral<"unresolved">;
|
|
628
|
-
}, z.core.$strict>], "status">>;
|
|
629
|
-
profilePath: z.ZodString;
|
|
630
|
-
projectKey: z.ZodString;
|
|
631
|
-
repository: z.ZodString;
|
|
632
|
-
schemaVersion: z.ZodLiteral<4>;
|
|
633
|
-
startedAt: z.ZodISODateTime;
|
|
634
|
-
verificationCommands: z.ZodArray<z.ZodObject<{
|
|
635
|
-
command: z.ZodString;
|
|
636
|
-
description: z.ZodString;
|
|
637
|
-
impactTarget: z.ZodOptional<z.ZodString>;
|
|
638
|
-
name: z.ZodString;
|
|
639
|
-
scope: z.ZodEnum<{
|
|
640
|
-
trivial: "trivial";
|
|
641
|
-
"docs-only": "docs-only";
|
|
642
|
-
full: "full";
|
|
643
|
-
}>;
|
|
644
|
-
}, z.core.$strip>>;
|
|
645
|
-
}, z.core.$strip>;
|
|
646
|
-
//#endregion
|
|
647
|
-
//#region src/pr-readiness/readiness-ledger.d.ts
|
|
648
|
-
declare const readinessRepairSchema: z.ZodObject<{
|
|
649
|
-
action: z.ZodString;
|
|
650
|
-
code: z.ZodEnum<{
|
|
651
|
-
"undraft-pr": "undraft-pr";
|
|
652
|
-
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
653
|
-
}>;
|
|
654
|
-
command: z.ZodString;
|
|
655
|
-
}, z.core.$strip>;
|
|
656
|
-
declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
657
|
-
baseSha: z.ZodString;
|
|
658
|
-
blockingReasons: z.ZodArray<z.ZodString>;
|
|
659
|
-
classification: z.ZodEnum<{
|
|
660
|
-
"docs/process-only": "docs/process-only";
|
|
661
|
-
trivial: "trivial";
|
|
662
|
-
"non-trivial": "non-trivial";
|
|
663
|
-
}>;
|
|
664
|
-
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
665
|
-
checkType: z.ZodEnum<{
|
|
666
|
-
review: "review";
|
|
667
|
-
verify: "verify";
|
|
668
|
-
}>;
|
|
669
|
-
name: z.ZodString;
|
|
670
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
671
|
-
scope: z.ZodOptional<z.ZodObject<{
|
|
672
|
-
classifications: z.ZodArray<z.ZodEnum<{
|
|
673
|
-
"docs/process-only": "docs/process-only";
|
|
674
|
-
trivial: "trivial";
|
|
675
|
-
"non-trivial": "non-trivial";
|
|
676
|
-
}>>;
|
|
677
|
-
}, z.core.$strict>>;
|
|
678
|
-
scopeReason: z.ZodString;
|
|
679
|
-
status: z.ZodEnum<{
|
|
680
|
-
satisfied: "satisfied";
|
|
681
|
-
unmet: "unmet";
|
|
682
|
-
"out-of-scope": "out-of-scope";
|
|
683
|
-
}>;
|
|
684
|
-
}, z.core.$strip>>>;
|
|
685
|
-
github: z.ZodObject<{
|
|
686
|
-
draft: z.ZodBoolean;
|
|
687
|
-
mergeStateStatus: z.ZodString;
|
|
688
|
-
mergeable: z.ZodString;
|
|
689
|
-
requiredChecks: z.ZodEnum<{
|
|
690
|
-
unknown: "unknown";
|
|
691
|
-
passed: "passed";
|
|
692
|
-
failed: "failed";
|
|
693
|
-
pending: "pending";
|
|
694
|
-
none: "none";
|
|
695
|
-
}>;
|
|
696
|
-
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
697
|
-
unresolvedReviewThreads: z.ZodNumber;
|
|
698
|
-
}, z.core.$strip>;
|
|
699
|
-
headSha: z.ZodString;
|
|
700
|
-
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
701
|
-
patchId: z.ZodString;
|
|
702
|
-
pr: z.ZodNumber;
|
|
703
|
-
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
704
|
-
action: z.ZodString;
|
|
705
|
-
code: z.ZodEnum<{
|
|
706
|
-
"undraft-pr": "undraft-pr";
|
|
707
|
-
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
708
|
-
}>;
|
|
709
|
-
command: z.ZodString;
|
|
710
|
-
}, z.core.$strip>>>;
|
|
711
|
-
reviewCycleState: z.ZodOptional<z.ZodObject<{
|
|
712
|
-
autoBlockingFindings: z.ZodNumber;
|
|
713
|
-
countsBySeverity: z.ZodObject<{
|
|
714
|
-
critical: z.ZodNumber;
|
|
715
|
-
high: z.ZodNumber;
|
|
716
|
-
low: z.ZodNumber;
|
|
717
|
-
medium: z.ZodNumber;
|
|
718
|
-
unknown: z.ZodNumber;
|
|
719
|
-
}, z.core.$strip>;
|
|
720
|
-
highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
|
|
721
|
-
unknown: "unknown";
|
|
722
|
-
critical: "critical";
|
|
723
|
-
high: "high";
|
|
724
|
-
low: "low";
|
|
725
|
-
medium: "medium";
|
|
726
|
-
}>>;
|
|
727
|
-
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
728
|
-
unknown: "unknown";
|
|
729
|
-
critical: "critical";
|
|
730
|
-
high: "high";
|
|
731
|
-
low: "low";
|
|
732
|
-
medium: "medium";
|
|
733
|
-
}>>;
|
|
734
|
-
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
735
|
-
nonBlockingFindings: z.ZodNumber;
|
|
736
|
-
openFindings: z.ZodNumber;
|
|
737
|
-
reviewCycle: z.ZodOptional<z.ZodNumber>;
|
|
738
|
-
staleRepeatFindings: z.ZodOptional<z.ZodNumber>;
|
|
739
|
-
windowExhausted: z.ZodBoolean;
|
|
740
|
-
}, z.core.$strip>>;
|
|
741
|
-
reviewLadder: z.ZodOptional<z.ZodObject<{
|
|
742
|
-
cycleCounts: z.ZodObject<{
|
|
743
|
-
gate: z.ZodNumber;
|
|
744
|
-
interior: z.ZodNumber;
|
|
745
|
-
}, z.core.$strip>;
|
|
746
|
-
forcedTransition: z.ZodOptional<z.ZodEnum<{
|
|
747
|
-
"gate-cap-exhausted": "gate-cap-exhausted";
|
|
748
|
-
"interior-cap-reached": "interior-cap-reached";
|
|
749
|
-
}>>;
|
|
750
|
-
nextAction: z.ZodEnum<{
|
|
751
|
-
"run-interior-cycle": "run-interior-cycle";
|
|
752
|
-
"advance-to-gate": "advance-to-gate";
|
|
753
|
-
"run-gate-cycle": "run-gate-cycle";
|
|
754
|
-
"accept-nonblocking-findings": "accept-nonblocking-findings";
|
|
755
|
-
"escalate-to-triage": "escalate-to-triage";
|
|
756
|
-
"ready-for-human": "ready-for-human";
|
|
757
|
-
}>;
|
|
758
|
-
stage: z.ZodEnum<{
|
|
759
|
-
gate: "gate";
|
|
760
|
-
interior: "interior";
|
|
761
|
-
"interior-complete": "interior-complete";
|
|
762
|
-
}>;
|
|
763
|
-
}, z.core.$strip>>;
|
|
764
|
-
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
765
|
-
reviewTerminalState: z.ZodOptional<z.ZodEnum<{
|
|
766
|
-
blocked: "blocked";
|
|
767
|
-
"accepted-with-findings": "accepted-with-findings";
|
|
768
|
-
clean: "clean";
|
|
769
|
-
}>>;
|
|
770
|
-
reviews: z.ZodObject<{
|
|
771
|
-
correctness: z.ZodObject<{
|
|
772
|
-
required: z.ZodBoolean;
|
|
773
|
-
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
774
|
-
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
775
|
-
status: z.ZodEnum<{
|
|
776
|
-
blocked: "blocked";
|
|
777
|
-
"not-required": "not-required";
|
|
778
|
-
current: "current";
|
|
779
|
-
stale: "stale";
|
|
780
|
-
missing: "missing";
|
|
781
|
-
}>;
|
|
782
|
-
}, z.core.$strip>;
|
|
783
|
-
security: z.ZodOptional<z.ZodObject<{
|
|
784
|
-
required: z.ZodBoolean;
|
|
785
|
-
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
786
|
-
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
787
|
-
status: z.ZodEnum<{
|
|
788
|
-
blocked: "blocked";
|
|
789
|
-
"not-required": "not-required";
|
|
790
|
-
current: "current";
|
|
791
|
-
stale: "stale";
|
|
792
|
-
missing: "missing";
|
|
793
|
-
}>;
|
|
794
|
-
}, z.core.$strip>>;
|
|
795
|
-
}, z.core.$strip>;
|
|
796
|
-
schemaVersion: z.ZodLiteral<2>;
|
|
797
|
-
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
798
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
799
|
-
prVerify: z.ZodLiteral<"missing">;
|
|
800
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
801
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
802
|
-
prVerify: z.ZodLiteral<"stale">;
|
|
803
|
-
verifiedHeadSha: z.ZodString;
|
|
804
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
805
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
806
|
-
prVerify: z.ZodLiteral<"passed-via-head">;
|
|
807
|
-
verifiedHeadSha: z.ZodString;
|
|
808
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
809
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
810
|
-
docsOnlyVerifiedHeadSha: z.ZodString;
|
|
811
|
-
prVerify: z.ZodLiteral<"docs-only-delta">;
|
|
812
|
-
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
813
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
814
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
815
|
-
prVerify: z.ZodLiteral<"trivial-delta">;
|
|
816
|
-
trivialVerifiedHeadSha: z.ZodString;
|
|
817
|
-
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
818
|
-
}, z.core.$strict>], "prVerify">;
|
|
819
|
-
}, z.core.$strip>;
|
|
820
|
-
type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
|
|
821
|
-
type ReadinessStatus = "ready" | "blocked";
|
|
822
|
-
type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
|
|
823
|
-
//#endregion
|
|
824
|
-
//#region src/pr-ready.d.ts
|
|
825
|
-
interface PrReadyProof {
|
|
826
|
-
schemaVersion: 3;
|
|
827
|
-
/**
|
|
828
|
-
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
829
|
-
* Also reports an already-merged no-op (#1456). Otherwise present exactly
|
|
830
|
-
* when a ready run called the arming module (#1299): not
|
|
831
|
-
* for an `autoMerge: false` wave, and not when a notice names why the run
|
|
832
|
-
* did not arm. Read back from the PR rather than inferred from the
|
|
833
|
-
* invocation, because `gh pr merge --auto` arms, merges, or does nothing
|
|
834
|
-
* with the same exit code and the same empty output. `not-armed` means the
|
|
835
|
-
* candidate is admitted but nothing will merge it, and `followUp` carries
|
|
836
|
-
* the re-dispatch.
|
|
837
|
-
*/
|
|
838
|
-
arming?: {
|
|
839
|
-
detail?: string;
|
|
840
|
-
headSha: string;
|
|
841
|
-
outcome: "armed" | "merged" | "not-armed";
|
|
842
|
-
};
|
|
843
|
-
/**
|
|
844
|
-
* The authoring session readiness resolved for the review-independence
|
|
845
|
-
* cross-check (#1037). Recorded so the branded check can print it beside the
|
|
846
|
-
* review session, model, and producer the ledger already carries — the four
|
|
847
|
-
* identities a human weighs at merge time. Additive and optional: proofs
|
|
848
|
-
* written before it carry no field, so no schema version moves.
|
|
849
|
-
*/
|
|
850
|
-
authoringSession?: string;
|
|
851
|
-
/**
|
|
852
|
-
* Why this run blocked, one entry per refusing demand (#391): `code` is the
|
|
853
|
-
* demand key from the resolver's vocabulary, `detail` the one-sentence
|
|
854
|
-
* refusal. Same refusals as `blockingReasons`, in the same order — the
|
|
855
|
-
* analyzable projection of a flat string list, so a wall of blocked proofs
|
|
856
|
-
* on one PR can be counted by cause. Absent when nothing blocked.
|
|
857
|
-
*/
|
|
858
|
-
blockedReasons?: BlockedReason[];
|
|
859
|
-
blockingReasons: string[];
|
|
860
|
-
humanBlockingReasons: string[];
|
|
861
|
-
command: "patronage-factory pr:ready";
|
|
862
|
-
/**
|
|
863
|
-
* Machine-safe arg array for the obvious next action (#523): when `ready`
|
|
864
|
-
* but arming did not take effect, a `pr:ready` re-dispatch (idempotent on
|
|
865
|
-
* an unchanged head); otherwise the `gh pr ready` undraft repair or the
|
|
866
|
-
* `pr:verify` re-run that the blocking reasons name (re-verify the head,
|
|
867
|
-
* then re-run pr:ready). Same `argv` shape `factory:delegate --print`
|
|
868
|
-
* emits. Optional and purely additive.
|
|
869
|
-
*/
|
|
870
|
-
followUp?: FollowUpAction;
|
|
871
|
-
/**
|
|
872
|
-
* `ledger.headSha` is the evaluated head SHA: the GitHub `pr.headRefOid`
|
|
873
|
-
* captured at evaluation time (not a local git read), recorded explicitly
|
|
874
|
-
* so merge-time identity checks are a pure comparison against the live
|
|
875
|
-
* pushed HEAD, not a re-derivation. See the ledger schema.
|
|
876
|
-
*/
|
|
877
|
-
ledger: ManagedReadinessLedger;
|
|
878
|
-
/**
|
|
879
|
-
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
880
|
-
* generation that permitted readiness and any authorized arming with a
|
|
881
|
-
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
882
|
-
* waived demand reads to a human. Absent when there are none.
|
|
883
|
-
*/
|
|
884
|
-
notices?: string[];
|
|
885
|
-
/**
|
|
886
|
-
* The policy identity readiness resolved review demand under (#922): the
|
|
887
|
-
* base ref, its live tip, and the digests of the base, candidate, and merged
|
|
888
|
-
* review policies. Optional on the wire and additive — this is a new record
|
|
889
|
-
* on an unchanged contract, so no schema version moves.
|
|
890
|
-
*/
|
|
891
|
-
policyResolution?: PolicyResolution;
|
|
892
|
-
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
893
|
-
profileBlobSha?: string;
|
|
894
|
-
/** Checkout-relative committed profile path evaluated by readiness. */
|
|
895
|
-
profilePath?: string;
|
|
896
|
-
repairs: ReadinessRepair[];
|
|
897
|
-
/** Trusted checkout repository used for all GitHub reads and writes. */
|
|
898
|
-
repository?: string;
|
|
899
|
-
status: ReadinessStatus;
|
|
900
|
-
/**
|
|
901
|
-
* Demands that were in force, were NOT met, and were waived by the operator
|
|
902
|
-
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
903
|
-
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
904
|
-
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
905
|
-
*/
|
|
906
|
-
waivedDemands?: WaivedDemand[];
|
|
907
|
-
}
|
|
908
|
-
//#endregion
|
|
909
|
-
//#region src/pr-readiness/external-evidence.d.ts
|
|
910
|
-
declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
|
|
911
|
-
check: z.ZodString;
|
|
912
|
-
checkType: z.ZodEnum<{
|
|
913
|
-
review: "review";
|
|
914
|
-
verify: "verify";
|
|
915
|
-
}>;
|
|
916
|
-
findingsPointer: z.ZodOptional<z.ZodString>;
|
|
759
|
+
testFiles: z.ZodOptional<z.ZodNumber>;
|
|
760
|
+
tests: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
}, z.core.$strip>>;
|
|
762
|
+
durationMs: z.ZodNumber;
|
|
763
|
+
exitCode: z.ZodNumber;
|
|
764
|
+
failures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
765
|
+
file: z.ZodString;
|
|
766
|
+
kind: z.ZodEnum<{
|
|
767
|
+
assertion: "assertion";
|
|
768
|
+
error: "error";
|
|
769
|
+
timeout: "timeout";
|
|
770
|
+
}>;
|
|
771
|
+
title: z.ZodString;
|
|
772
|
+
}, z.core.$strip>>>;
|
|
773
|
+
name: z.ZodString;
|
|
774
|
+
scope: z.ZodEnum<{
|
|
775
|
+
"docs-only": "docs-only";
|
|
776
|
+
full: "full";
|
|
777
|
+
trivial: "trivial";
|
|
778
|
+
}>;
|
|
779
|
+
}, z.core.$strip>>>;
|
|
917
780
|
headSha: z.ZodString;
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
781
|
+
impactStamp: z.ZodOptional<z.ZodObject<{
|
|
782
|
+
basis: z.ZodEnum<{
|
|
783
|
+
conservative: "conservative";
|
|
784
|
+
"target-scoped": "target-scoped";
|
|
785
|
+
}>;
|
|
786
|
+
inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
787
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
788
|
+
stampVersion: z.ZodLiteral<4>;
|
|
789
|
+
targets: z.ZodArray<z.ZodObject<{
|
|
790
|
+
basis: z.ZodString;
|
|
791
|
+
impact: z.ZodEnum<{
|
|
792
|
+
affected: "affected";
|
|
793
|
+
"not-affected": "not-affected";
|
|
794
|
+
}>;
|
|
795
|
+
name: z.ZodString;
|
|
796
|
+
subscribedPaths: z.ZodArray<z.ZodString>;
|
|
797
|
+
}, z.core.$strip>>;
|
|
798
|
+
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
799
|
+
}, z.core.$strip>>;
|
|
800
|
+
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
801
|
+
mode: z.ZodEnum<{
|
|
802
|
+
"docs-only": "docs-only";
|
|
803
|
+
full: "full";
|
|
804
|
+
trivial: "trivial";
|
|
923
805
|
}>;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
806
|
+
notDemandedRecords: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
807
|
+
basis: z.ZodString;
|
|
808
|
+
name: z.ZodString;
|
|
809
|
+
}, z.core.$strip>>>;
|
|
810
|
+
notRequiredCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
811
|
+
basis: z.ZodString;
|
|
812
|
+
impactTarget: z.ZodString;
|
|
813
|
+
name: z.ZodString;
|
|
814
|
+
}, z.core.$strip>>>;
|
|
815
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
816
|
+
aborted: "aborted";
|
|
817
|
+
passed: "passed";
|
|
932
818
|
}>>;
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
819
|
+
patchId: z.ZodOptional<z.ZodString>;
|
|
820
|
+
policyResolution: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
821
|
+
basePolicyDigest: z.ZodString;
|
|
822
|
+
baseRefName: z.ZodString;
|
|
823
|
+
candidatePolicyDigest: z.ZodString;
|
|
824
|
+
effectiveDigest: z.ZodString;
|
|
825
|
+
policyBaseSha: z.ZodString;
|
|
826
|
+
reviewPolicyChanged: z.ZodBoolean;
|
|
827
|
+
status: z.ZodLiteral<"authoritative">;
|
|
828
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
829
|
+
baseRefName: z.ZodString;
|
|
830
|
+
cause: z.ZodOptional<z.ZodEnum<{
|
|
831
|
+
"lookup-failed": "lookup-failed";
|
|
832
|
+
"no-pull-request": "no-pull-request";
|
|
833
|
+
"policy-unreadable": "policy-unreadable";
|
|
834
|
+
}>>;
|
|
835
|
+
reason: z.ZodString;
|
|
836
|
+
status: z.ZodLiteral<"unresolved">;
|
|
837
|
+
}, z.core.$strict>], "status">>;
|
|
838
|
+
profilePath: z.ZodString;
|
|
839
|
+
projectKey: z.ZodString;
|
|
840
|
+
repository: z.ZodString;
|
|
841
|
+
runner: z.ZodOptional<z.ZodObject<{
|
|
842
|
+
arch: z.ZodString;
|
|
843
|
+
cpuCount: z.ZodNumber;
|
|
844
|
+
kind: z.ZodEnum<{
|
|
845
|
+
ci: "ci";
|
|
846
|
+
cloud: "cloud";
|
|
847
|
+
local: "local";
|
|
848
|
+
}>;
|
|
849
|
+
os: z.ZodString;
|
|
850
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
851
|
+
"claude-code": "claude-code";
|
|
852
|
+
cursor: "cursor";
|
|
853
|
+
"github-actions": "github-actions";
|
|
854
|
+
}>>;
|
|
855
|
+
}, z.core.$strip>>;
|
|
856
|
+
schemaVersion: z.ZodLiteral<4>;
|
|
857
|
+
startedAt: z.ZodISODateTime;
|
|
858
|
+
verificationCommands: z.ZodArray<z.ZodObject<{
|
|
859
|
+
command: z.ZodString;
|
|
860
|
+
description: z.ZodString;
|
|
861
|
+
impactTarget: z.ZodOptional<z.ZodString>;
|
|
862
|
+
name: z.ZodString;
|
|
863
|
+
scope: z.ZodEnum<{
|
|
864
|
+
"docs-only": "docs-only";
|
|
865
|
+
full: "full";
|
|
866
|
+
trivial: "trivial";
|
|
867
|
+
}>;
|
|
868
|
+
}, z.core.$strip>>;
|
|
869
|
+
}, z.core.$strip>;
|
|
946
870
|
/** Artifact versions accepted at ingest. */
|
|
947
|
-
declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
|
|
871
|
+
export declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
|
|
948
872
|
/** Strict, bounded runtime transport contract emitted by factory:closeout. */
|
|
949
|
-
declare const closeoutArtifactSchema: z.ZodObject<{
|
|
873
|
+
export declare const closeoutArtifactSchema: z.ZodObject<{
|
|
950
874
|
budget: z.ZodObject<{
|
|
951
875
|
note: z.ZodString;
|
|
952
876
|
tier: z.ZodLiteral<"overseer">;
|
|
@@ -978,9 +902,7 @@ declare const closeoutArtifactSchema: z.ZodObject<{
|
|
|
978
902
|
schemaVersion: z.ZodLiteral<5>;
|
|
979
903
|
}, z.core.$strict>;
|
|
980
904
|
type CloseoutArtifact = z.infer<typeof closeoutArtifactSchema>;
|
|
981
|
-
|
|
982
|
-
//#region src/gate-timing-record.d.ts
|
|
983
|
-
declare const gateTimingRecordSchema: z.ZodObject<{
|
|
905
|
+
export declare const gateTimingRecordSchema: z.ZodObject<{
|
|
984
906
|
agentRunId: z.ZodString;
|
|
985
907
|
cycle: z.ZodNumber;
|
|
986
908
|
durationMs: z.ZodNumber;
|
|
@@ -992,18 +914,16 @@ declare const gateTimingRecordSchema: z.ZodObject<{
|
|
|
992
914
|
"pr:verify": "pr:verify";
|
|
993
915
|
}>;
|
|
994
916
|
outcome: z.ZodEnum<{
|
|
995
|
-
pass: "pass";
|
|
996
917
|
fail: "fail";
|
|
918
|
+
pass: "pass";
|
|
997
919
|
}>;
|
|
998
920
|
schemaVersion: z.ZodLiteral<1>;
|
|
999
921
|
startOffsetMs: z.ZodNumber;
|
|
1000
922
|
startedAt: z.ZodISODateTime;
|
|
1001
923
|
}, z.core.$strict>;
|
|
1002
924
|
type GateTimingRecord = z.infer<typeof gateTimingRecordSchema>;
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
declare const EVIDENCE_ENVELOPE_SCHEMA_VERSION = 1;
|
|
1006
|
-
declare const evidenceEnvelopeSchema: z.ZodObject<{
|
|
925
|
+
export declare const EVIDENCE_ENVELOPE_SCHEMA_VERSION = 1;
|
|
926
|
+
export declare const evidenceEnvelopeSchema: z.ZodObject<{
|
|
1007
927
|
check: z.ZodString;
|
|
1008
928
|
checkType: z.ZodEnum<{
|
|
1009
929
|
review: "review";
|
|
@@ -1014,24 +934,24 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
|
|
|
1014
934
|
mergeBaseSha: z.ZodString;
|
|
1015
935
|
model: z.ZodOptional<z.ZodString>;
|
|
1016
936
|
outcome: z.ZodEnum<{
|
|
1017
|
-
pass: "pass";
|
|
1018
937
|
fail: "fail";
|
|
938
|
+
pass: "pass";
|
|
1019
939
|
}>;
|
|
1020
940
|
patchId: z.ZodString;
|
|
1021
941
|
policyVersion: z.ZodOptional<z.ZodString>;
|
|
1022
942
|
producer: z.ZodString;
|
|
1023
943
|
requestId: z.ZodOptional<z.ZodString>;
|
|
1024
944
|
rung: z.ZodOptional<z.ZodEnum<{
|
|
945
|
+
human: "human";
|
|
1025
946
|
"independent-model": "independent-model";
|
|
1026
947
|
oracle: "oracle";
|
|
1027
|
-
human: "human";
|
|
1028
948
|
}>>;
|
|
1029
949
|
schemaVersion: z.ZodLiteral<1>;
|
|
1030
950
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1031
951
|
timestamp: z.ZodOptional<z.ZodISODateTime>;
|
|
1032
952
|
}, z.core.$loose>;
|
|
1033
|
-
declare const BOUNDARY_REVIEW_PROOF_KIND = "boundary-review-proof";
|
|
1034
|
-
declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
953
|
+
export declare const BOUNDARY_REVIEW_PROOF_KIND = "boundary-review-proof";
|
|
954
|
+
export declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
1035
955
|
boundary: z.ZodString;
|
|
1036
956
|
coveredSet: z.ZodArray<z.ZodObject<{
|
|
1037
957
|
headSha: z.ZodOptional<z.ZodString>;
|
|
@@ -1058,14 +978,14 @@ declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
|
1058
978
|
value: z.ZodString;
|
|
1059
979
|
}, z.core.$loose>;
|
|
1060
980
|
outcome: z.ZodEnum<{
|
|
1061
|
-
pass: "pass";
|
|
1062
981
|
fail: "fail";
|
|
982
|
+
pass: "pass";
|
|
1063
983
|
}>;
|
|
1064
984
|
producer: z.ZodString;
|
|
1065
985
|
rung: z.ZodEnum<{
|
|
986
|
+
human: "human";
|
|
1066
987
|
"independent-model": "independent-model";
|
|
1067
988
|
oracle: "oracle";
|
|
1068
|
-
human: "human";
|
|
1069
989
|
}>;
|
|
1070
990
|
schemaVersion: z.ZodLiteral<1>;
|
|
1071
991
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -1075,8 +995,8 @@ declare const boundaryReviewProofSchema: z.ZodObject<{
|
|
|
1075
995
|
value: z.ZodString;
|
|
1076
996
|
}, z.core.$loose>>;
|
|
1077
997
|
}, z.core.$loose>;
|
|
1078
|
-
declare const BOUNDARY_CHECK_SCHEMA_VERSION = 1;
|
|
1079
|
-
declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
998
|
+
export declare const BOUNDARY_CHECK_SCHEMA_VERSION = 1;
|
|
999
|
+
export declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
1080
1000
|
blockingReasons: z.ZodArray<z.ZodString>;
|
|
1081
1001
|
boundary: z.ZodOptional<z.ZodString>;
|
|
1082
1002
|
command: z.ZodLiteral<"patronage-factory boundary:check">;
|
|
@@ -1091,9 +1011,9 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
1091
1011
|
wave: z.ZodString;
|
|
1092
1012
|
}, z.core.$strip>>;
|
|
1093
1013
|
demandedRung: z.ZodOptional<z.ZodEnum<{
|
|
1014
|
+
human: "human";
|
|
1094
1015
|
"independent-model": "independent-model";
|
|
1095
1016
|
oracle: "oracle";
|
|
1096
|
-
human: "human";
|
|
1097
1017
|
}>>;
|
|
1098
1018
|
epicIssue: z.ZodNumber;
|
|
1099
1019
|
manifestHash: z.ZodOptional<z.ZodObject<{
|
|
@@ -1107,9 +1027,9 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
1107
1027
|
commentUrl: z.ZodOptional<z.ZodString>;
|
|
1108
1028
|
producer: z.ZodString;
|
|
1109
1029
|
rung: z.ZodEnum<{
|
|
1030
|
+
human: "human";
|
|
1110
1031
|
"independent-model": "independent-model";
|
|
1111
1032
|
oracle: "oracle";
|
|
1112
|
-
human: "human";
|
|
1113
1033
|
}>;
|
|
1114
1034
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1115
1035
|
specHash: z.ZodOptional<z.ZodObject<{
|
|
@@ -1124,12 +1044,104 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
1124
1044
|
value: z.ZodString;
|
|
1125
1045
|
}, z.core.$strip>>;
|
|
1126
1046
|
status: z.ZodEnum<{
|
|
1127
|
-
ready: "ready";
|
|
1128
1047
|
blocked: "blocked";
|
|
1048
|
+
ready: "ready";
|
|
1129
1049
|
}>;
|
|
1130
1050
|
}, z.core.$strip>;
|
|
1131
|
-
type BoundaryCheckProofRecord = z.infer<typeof boundaryCheckProofSchema>;
|
|
1132
|
-
declare const PR_READY_SCHEMA_VERSION = 3;
|
|
1051
|
+
export type BoundaryCheckProofRecord = z.infer<typeof boundaryCheckProofSchema>;
|
|
1052
|
+
export declare const PR_READY_SCHEMA_VERSION = 3;
|
|
1053
|
+
/**
|
|
1054
|
+
* The pr:ready proof, declared once here (the published wire contract) and
|
|
1055
|
+
* re-exported by `pr-ready.ts`, which writes and reads it through
|
|
1056
|
+
* `prReadyProofSchema` below. The ledger types are type-only imports from
|
|
1057
|
+
* their owner `pr-readiness/readiness-ledger.ts`, so the declaration names the
|
|
1058
|
+
* same types the evaluator produces. The writer therefore applies the wire
|
|
1059
|
+
* schema's strictness too: an unknown key on a ledger review state fails the
|
|
1060
|
+
* write instead of being stripped.
|
|
1061
|
+
*/
|
|
1062
|
+
export interface PrReadyProof {
|
|
1063
|
+
schemaVersion: 3;
|
|
1064
|
+
/**
|
|
1065
|
+
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
1066
|
+
* Also reports an already-merged no-op (#1456). Otherwise present exactly
|
|
1067
|
+
* when a ready run called the arming module (#1299): not
|
|
1068
|
+
* for an `autoMerge: false` wave, and not when a notice names why the run
|
|
1069
|
+
* did not arm. Read back from the PR rather than inferred from the
|
|
1070
|
+
* invocation, because `gh pr merge --auto` arms, merges, or does nothing
|
|
1071
|
+
* with the same exit code and the same empty output. `not-armed` means the
|
|
1072
|
+
* candidate is admitted but nothing will merge it, and `followUp` carries
|
|
1073
|
+
* the re-dispatch.
|
|
1074
|
+
*/
|
|
1075
|
+
arming?: {
|
|
1076
|
+
detail?: string;
|
|
1077
|
+
headSha: string;
|
|
1078
|
+
outcome: "armed" | "merged" | "not-armed";
|
|
1079
|
+
};
|
|
1080
|
+
/**
|
|
1081
|
+
* The authoring session readiness resolved for the review-independence
|
|
1082
|
+
* cross-check (#1037). Recorded so the branded check can print it beside the
|
|
1083
|
+
* review session, model, and producer the ledger already carries — the four
|
|
1084
|
+
* identities a human weighs at merge time. Additive and optional: proofs
|
|
1085
|
+
* written before it carry no field, so no schema version moves.
|
|
1086
|
+
*/
|
|
1087
|
+
authoringSession?: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Why this run blocked, one entry per refusing demand (#391): `code` is the
|
|
1090
|
+
* demand key from the resolver's vocabulary, `detail` the one-sentence
|
|
1091
|
+
* refusal. Same refusals as `blockingReasons`, in the same order — the
|
|
1092
|
+
* analyzable projection of a flat string list, so a wall of blocked proofs
|
|
1093
|
+
* on one PR can be counted by cause. Absent when nothing blocked.
|
|
1094
|
+
*/
|
|
1095
|
+
blockedReasons?: BlockedReason[];
|
|
1096
|
+
blockingReasons: string[];
|
|
1097
|
+
humanBlockingReasons: string[];
|
|
1098
|
+
command: "patronage-factory pr:ready";
|
|
1099
|
+
/**
|
|
1100
|
+
* Machine-safe arg array for the obvious next action (#523): when `ready`
|
|
1101
|
+
* but arming did not take effect, a `pr:ready` re-dispatch (idempotent on
|
|
1102
|
+
* an unchanged head); otherwise the `gh pr ready` undraft repair or the
|
|
1103
|
+
* `pr:verify` re-run that the blocking reasons name (re-verify the head,
|
|
1104
|
+
* then re-run pr:ready). Same `argv` shape `factory:delegate --print`
|
|
1105
|
+
* emits. Optional and purely additive.
|
|
1106
|
+
*/
|
|
1107
|
+
followUp?: FollowUpAction;
|
|
1108
|
+
/**
|
|
1109
|
+
* `ledger.headSha` is the evaluated head SHA: the GitHub `pr.headRefOid`
|
|
1110
|
+
* captured at evaluation time (not a local git read), recorded explicitly
|
|
1111
|
+
* so merge-time identity checks are a pure comparison against the live
|
|
1112
|
+
* pushed HEAD, not a re-derivation. See the ledger schema.
|
|
1113
|
+
*/
|
|
1114
|
+
ledger: ManagedReadinessLedger;
|
|
1115
|
+
/**
|
|
1116
|
+
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
1117
|
+
* generation that permitted readiness and any authorized arming with a
|
|
1118
|
+
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
1119
|
+
* waived demand reads to a human. Absent when there are none.
|
|
1120
|
+
*/
|
|
1121
|
+
notices?: string[];
|
|
1122
|
+
/**
|
|
1123
|
+
* The policy identity readiness resolved review demand under (#922): the
|
|
1124
|
+
* base ref, its live tip, and the digests of the base, candidate, and merged
|
|
1125
|
+
* review policies. Optional on the wire and additive — this is a new record
|
|
1126
|
+
* on an unchanged contract, so no schema version moves.
|
|
1127
|
+
*/
|
|
1128
|
+
policyResolution?: PolicyResolution;
|
|
1129
|
+
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
1130
|
+
profileBlobSha?: string;
|
|
1131
|
+
/** Checkout-relative committed profile path evaluated by readiness. */
|
|
1132
|
+
profilePath?: string;
|
|
1133
|
+
repairs: ReadinessRepair[];
|
|
1134
|
+
/** Trusted checkout repository used for all GitHub reads and writes. */
|
|
1135
|
+
repository?: string;
|
|
1136
|
+
status: ReadinessStatus;
|
|
1137
|
+
/**
|
|
1138
|
+
* Demands that were in force, were NOT met, and were waived by the operator
|
|
1139
|
+
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
1140
|
+
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
1141
|
+
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
1142
|
+
*/
|
|
1143
|
+
waivedDemands?: WaivedDemand[];
|
|
1144
|
+
}
|
|
1133
1145
|
/**
|
|
1134
1146
|
* The pr:ready proof versions a reader accepts: the current one only (#917
|
|
1135
1147
|
* item 1). #894 narrowed the nested readiness ledger to `schemaVersion: 2` and
|
|
@@ -1139,14 +1151,14 @@ declare const PR_READY_SCHEMA_VERSION = 3;
|
|
|
1139
1151
|
* reader. An alpha.22 consumer must adopt alpha.23 before HQ ingests its
|
|
1140
1152
|
* pr:ready proofs.
|
|
1141
1153
|
*/
|
|
1142
|
-
declare const SUPPORTED_PR_READY_SCHEMA_VERSIONS: readonly [3];
|
|
1143
|
-
declare const prReadyProofSchema: z.ZodObject<{
|
|
1154
|
+
export declare const SUPPORTED_PR_READY_SCHEMA_VERSIONS: readonly [3];
|
|
1155
|
+
export declare const prReadyProofSchema: z.ZodObject<{
|
|
1144
1156
|
arming: z.ZodOptional<z.ZodObject<{
|
|
1145
1157
|
detail: z.ZodOptional<z.ZodString>;
|
|
1146
1158
|
headSha: z.ZodString;
|
|
1147
1159
|
outcome: z.ZodEnum<{
|
|
1148
|
-
merged: "merged";
|
|
1149
1160
|
armed: "armed";
|
|
1161
|
+
merged: "merged";
|
|
1150
1162
|
"not-armed": "not-armed";
|
|
1151
1163
|
}>;
|
|
1152
1164
|
}, z.core.$strip>>;
|
|
@@ -1167,8 +1179,8 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1167
1179
|
blockingReasons: z.ZodArray<z.ZodString>;
|
|
1168
1180
|
classification: z.ZodEnum<{
|
|
1169
1181
|
"docs/process-only": "docs/process-only";
|
|
1170
|
-
trivial: "trivial";
|
|
1171
1182
|
"non-trivial": "non-trivial";
|
|
1183
|
+
trivial: "trivial";
|
|
1172
1184
|
}>;
|
|
1173
1185
|
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1174
1186
|
checkType: z.ZodEnum<{
|
|
@@ -1180,15 +1192,15 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1180
1192
|
scope: z.ZodOptional<z.ZodObject<{
|
|
1181
1193
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
1182
1194
|
"docs/process-only": "docs/process-only";
|
|
1183
|
-
trivial: "trivial";
|
|
1184
1195
|
"non-trivial": "non-trivial";
|
|
1196
|
+
trivial: "trivial";
|
|
1185
1197
|
}>>;
|
|
1186
1198
|
}, z.core.$strict>>;
|
|
1187
1199
|
scopeReason: z.ZodString;
|
|
1188
1200
|
status: z.ZodEnum<{
|
|
1201
|
+
"out-of-scope": "out-of-scope";
|
|
1189
1202
|
satisfied: "satisfied";
|
|
1190
1203
|
unmet: "unmet";
|
|
1191
|
-
"out-of-scope": "out-of-scope";
|
|
1192
1204
|
}>;
|
|
1193
1205
|
}, z.core.$strip>>>;
|
|
1194
1206
|
github: z.ZodObject<{
|
|
@@ -1196,11 +1208,11 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1196
1208
|
mergeStateStatus: z.ZodString;
|
|
1197
1209
|
mergeable: z.ZodString;
|
|
1198
1210
|
requiredChecks: z.ZodEnum<{
|
|
1199
|
-
unknown: "unknown";
|
|
1200
|
-
passed: "passed";
|
|
1201
1211
|
failed: "failed";
|
|
1202
|
-
pending: "pending";
|
|
1203
1212
|
none: "none";
|
|
1213
|
+
passed: "passed";
|
|
1214
|
+
pending: "pending";
|
|
1215
|
+
unknown: "unknown";
|
|
1204
1216
|
}>;
|
|
1205
1217
|
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1206
1218
|
unresolvedReviewThreads: z.ZodNumber;
|
|
@@ -1212,8 +1224,8 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1212
1224
|
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1213
1225
|
action: z.ZodString;
|
|
1214
1226
|
code: z.ZodEnum<{
|
|
1215
|
-
"undraft-pr": "undraft-pr";
|
|
1216
1227
|
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
1228
|
+
"undraft-pr": "undraft-pr";
|
|
1217
1229
|
}>;
|
|
1218
1230
|
command: z.ZodString;
|
|
1219
1231
|
}, z.core.$strip>>>;
|
|
@@ -1227,18 +1239,18 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1227
1239
|
unknown: z.ZodNumber;
|
|
1228
1240
|
}, z.core.$strip>;
|
|
1229
1241
|
highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
|
|
1230
|
-
unknown: "unknown";
|
|
1231
1242
|
critical: "critical";
|
|
1232
1243
|
high: "high";
|
|
1233
1244
|
low: "low";
|
|
1234
1245
|
medium: "medium";
|
|
1246
|
+
unknown: "unknown";
|
|
1235
1247
|
}>>;
|
|
1236
1248
|
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
1237
|
-
unknown: "unknown";
|
|
1238
1249
|
critical: "critical";
|
|
1239
1250
|
high: "high";
|
|
1240
1251
|
low: "low";
|
|
1241
1252
|
medium: "medium";
|
|
1253
|
+
unknown: "unknown";
|
|
1242
1254
|
}>>;
|
|
1243
1255
|
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
1244
1256
|
nonBlockingFindings: z.ZodNumber;
|
|
@@ -1257,12 +1269,12 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1257
1269
|
"interior-cap-reached": "interior-cap-reached";
|
|
1258
1270
|
}>>;
|
|
1259
1271
|
nextAction: z.ZodEnum<{
|
|
1260
|
-
"run-interior-cycle": "run-interior-cycle";
|
|
1261
|
-
"advance-to-gate": "advance-to-gate";
|
|
1262
|
-
"run-gate-cycle": "run-gate-cycle";
|
|
1263
1272
|
"accept-nonblocking-findings": "accept-nonblocking-findings";
|
|
1273
|
+
"advance-to-gate": "advance-to-gate";
|
|
1264
1274
|
"escalate-to-triage": "escalate-to-triage";
|
|
1265
1275
|
"ready-for-human": "ready-for-human";
|
|
1276
|
+
"run-gate-cycle": "run-gate-cycle";
|
|
1277
|
+
"run-interior-cycle": "run-interior-cycle";
|
|
1266
1278
|
}>;
|
|
1267
1279
|
stage: z.ZodEnum<{
|
|
1268
1280
|
gate: "gate";
|
|
@@ -1272,8 +1284,8 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1272
1284
|
}, z.core.$strip>>;
|
|
1273
1285
|
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
1274
1286
|
reviewTerminalState: z.ZodOptional<z.ZodEnum<{
|
|
1275
|
-
blocked: "blocked";
|
|
1276
1287
|
"accepted-with-findings": "accepted-with-findings";
|
|
1288
|
+
blocked: "blocked";
|
|
1277
1289
|
clean: "clean";
|
|
1278
1290
|
}>>;
|
|
1279
1291
|
reviews: z.ZodObject<{
|
|
@@ -1283,10 +1295,10 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1283
1295
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1284
1296
|
status: z.ZodEnum<{
|
|
1285
1297
|
blocked: "blocked";
|
|
1286
|
-
"not-required": "not-required";
|
|
1287
1298
|
current: "current";
|
|
1288
|
-
stale: "stale";
|
|
1289
1299
|
missing: "missing";
|
|
1300
|
+
"not-required": "not-required";
|
|
1301
|
+
stale: "stale";
|
|
1290
1302
|
}>;
|
|
1291
1303
|
}, z.core.$strict>;
|
|
1292
1304
|
security: z.ZodOptional<z.ZodObject<{
|
|
@@ -1295,10 +1307,10 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1295
1307
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1296
1308
|
status: z.ZodEnum<{
|
|
1297
1309
|
blocked: "blocked";
|
|
1298
|
-
"not-required": "not-required";
|
|
1299
1310
|
current: "current";
|
|
1300
|
-
stale: "stale";
|
|
1301
1311
|
missing: "missing";
|
|
1312
|
+
"not-required": "not-required";
|
|
1313
|
+
stale: "stale";
|
|
1302
1314
|
}>;
|
|
1303
1315
|
}, z.core.$strict>>;
|
|
1304
1316
|
}, z.core.$strip>;
|
|
@@ -1338,8 +1350,8 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1338
1350
|
}, z.core.$strict>, z.ZodObject<{
|
|
1339
1351
|
baseRefName: z.ZodString;
|
|
1340
1352
|
cause: z.ZodOptional<z.ZodEnum<{
|
|
1341
|
-
"no-pull-request": "no-pull-request";
|
|
1342
1353
|
"lookup-failed": "lookup-failed";
|
|
1354
|
+
"no-pull-request": "no-pull-request";
|
|
1343
1355
|
"policy-unreadable": "policy-unreadable";
|
|
1344
1356
|
}>>;
|
|
1345
1357
|
reason: z.ZodString;
|
|
@@ -1350,18 +1362,17 @@ declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1350
1362
|
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1351
1363
|
action: z.ZodString;
|
|
1352
1364
|
code: z.ZodEnum<{
|
|
1353
|
-
"undraft-pr": "undraft-pr";
|
|
1354
1365
|
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
1366
|
+
"undraft-pr": "undraft-pr";
|
|
1355
1367
|
}>;
|
|
1356
1368
|
command: z.ZodString;
|
|
1357
1369
|
}, z.core.$strip>>>;
|
|
1358
1370
|
repository: z.ZodOptional<z.ZodString>;
|
|
1359
1371
|
schemaVersion: z.ZodLiteral<3>;
|
|
1360
1372
|
status: z.ZodEnum<{
|
|
1361
|
-
ready: "ready";
|
|
1362
1373
|
blocked: "blocked";
|
|
1374
|
+
ready: "ready";
|
|
1363
1375
|
}>;
|
|
1364
1376
|
waivedDemands: z.ZodOptional<z.ZodArray<z.ZodType<WaivedDemand, unknown, z.core.$ZodTypeInternals<WaivedDemand, unknown>>>>;
|
|
1365
1377
|
}, z.core.$strip>;
|
|
1366
|
-
|
|
1367
|
-
export { BLOCKED_REASONS_MAX, BLOCKED_REASON_DETAIL_MAX, BOUNDARY_CHECK_SCHEMA_VERSION, BOUNDARY_REVIEW_PROOF_KIND, type BlockedReason, BoundaryCheckProofRecord, type BoundaryReviewProof, type CloseoutArtifact, EVIDENCE_ENVELOPE_SCHEMA_VERSION, type EvidenceEnvelope, type GateTimingRecord, PR_READY_SCHEMA_VERSION, PR_REVIEW_SCHEMA_VERSION, type PrReadyProof, type PrReviewProof, type PrVerifyProof, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS, SUPPORTED_PR_READY_SCHEMA_VERSIONS, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, type WaivedDemand, blockedReasonSchema, blockedReasonsSchema, boundaryCheckProofSchema, boundaryReviewProofSchema, closeoutArtifactSchema, evidenceEnvelopeSchema, gateTimingRecordSchema, prReadyProofSchema, prReviewFindingSchema, prReviewProofSchema, prReviewResultSchema, prVerifyProofSchema, reviewPromptSectionSchema, reviewPromptSectionsSchema, waivedDemandSchema };
|
|
1378
|
+
export type { BlockedReason, BoundaryReviewProof, CloseoutArtifact, EvidenceEnvelope, GateTimingRecord, PrReviewProof, PrVerifyProof, ReviewPromptSection, ReviewPromptSectionProvenance, WaivedDemand };
|