@patronage/software-factory 1.0.0-alpha.46 → 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 +25 -0
- 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 +1827 -1816
- package/dist/index.js +30 -67
- package/dist/schemas.d.ts +488 -480
- package/dist/schemas.js +8 -8
- package/package.json +8 -3
package/dist/schemas.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import "@patronage/factory-ci";
|
|
3
2
|
export declare const reviewPromptSectionSchema: z.ZodObject<{
|
|
4
3
|
provenance: z.ZodEnum<{
|
|
5
4
|
"coding-standards": "coding-standards";
|
|
@@ -195,23 +194,6 @@ interface PrReviewProof {
|
|
|
195
194
|
};
|
|
196
195
|
reviews: PrReviewResult[];
|
|
197
196
|
}
|
|
198
|
-
/**
|
|
199
|
-
* A demand that was in force, was NOT met, and was waived by the operator.
|
|
200
|
-
*
|
|
201
|
-
* `unmetReasons` is required and non-empty: every reason the demand refused is
|
|
202
|
-
* carried through verbatim. There is no field on this record that could say
|
|
203
|
-
* "satisfied", and no code path constructs one without a refusal to carry.
|
|
204
|
-
*/
|
|
205
|
-
interface WaivedDemand {
|
|
206
|
-
demand: string;
|
|
207
|
-
operator: string;
|
|
208
|
-
rationale: string;
|
|
209
|
-
recordedAt: string;
|
|
210
|
-
session?: string;
|
|
211
|
-
/** The demand's refusals at evaluation time, preserved verbatim. */
|
|
212
|
-
unmetReasons: string[];
|
|
213
|
-
}
|
|
214
|
-
export declare const waivedDemandSchema: z.ZodType<WaivedDemand>;
|
|
215
197
|
/**
|
|
216
198
|
* The wire bound on one `detail`. A blocked proof carries one short sentence
|
|
217
199
|
* per demand, never a transcript: HQ's ingest cap is 256 KB and this field
|
|
@@ -236,6 +218,213 @@ export declare const blockedReasonsSchema: z.ZodArray<z.ZodObject<{
|
|
|
236
218
|
detail: z.ZodString;
|
|
237
219
|
}, z.core.$strip>>;
|
|
238
220
|
type BlockedReason = z.infer<typeof blockedReasonSchema>;
|
|
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>;
|
|
239
428
|
declare const boundaryReviewProofBaseSchema: z.ZodObject<{
|
|
240
429
|
boundary: z.ZodString;
|
|
241
430
|
coveredSet: z.ZodArray<z.ZodObject<{
|
|
@@ -324,38 +513,55 @@ declare const impactStampSchema: z.ZodObject<{
|
|
|
324
513
|
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
325
514
|
}, z.core.$strip>;
|
|
326
515
|
type ImpactStamp = z.infer<typeof impactStampSchema>;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
export declare const
|
|
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.
|
|
554
|
+
*/
|
|
555
|
+
type ResolvedPrVerifyMode = "docs-only" | "trivial" | "full";
|
|
556
|
+
/**
|
|
557
|
+
* The pr:verify proof versions a reader accepts: the current one only (#920
|
|
558
|
+
* item 1). #917 narrowed the pr:ready reader the same way. A pr:verify proof
|
|
559
|
+
* is per-candidate and short-lived — it is rewritten on every head — so no
|
|
560
|
+
* stored v1–v3 proof can outlive the release that drops it. Pre-1.0 posture
|
|
561
|
+
* applies: one current contract, no compat reader. A consumer on an older
|
|
562
|
+
* factory must adopt this release before HQ ingests its pr:verify proofs.
|
|
563
|
+
*/
|
|
564
|
+
export declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [4];
|
|
359
565
|
type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
|
|
360
566
|
interface PrVerifyCommandResult {
|
|
361
567
|
command: string;
|
|
@@ -516,441 +722,151 @@ interface PrVerifyProof {
|
|
|
516
722
|
projectKey: string;
|
|
517
723
|
repository: string;
|
|
518
724
|
/**
|
|
519
|
-
* The machine the battery ran on (#1570). Optional and additive: a proof
|
|
520
|
-
* written before it existed parses unchanged, and the schema version does
|
|
521
|
-
* not move.
|
|
522
|
-
*/
|
|
523
|
-
runner?: PrVerifyRunner;
|
|
524
|
-
startedAt: string;
|
|
525
|
-
verificationCommands: PrVerifyCommandResult[];
|
|
526
|
-
}
|
|
527
|
-
export declare const prVerifyProofSchema: z.ZodObject<{
|
|
528
|
-
authoringSession: z.ZodString;
|
|
529
|
-
base: z.ZodString;
|
|
530
|
-
baseSha: z.ZodOptional<z.ZodString>;
|
|
531
|
-
baselineFullProofs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
532
|
-
base: z.ZodString;
|
|
533
|
-
changedFiles: z.ZodArray<z.ZodString>;
|
|
534
|
-
headSha: z.ZodString;
|
|
535
|
-
profilePath: z.ZodString;
|
|
536
|
-
projectKey: z.ZodString;
|
|
537
|
-
repository: z.ZodString;
|
|
538
|
-
}, z.core.$strip>>>;
|
|
539
|
-
catchUpRecognition: z.ZodOptional<z.ZodType<CatchUpRecognition, unknown, z.core.$ZodTypeInternals<CatchUpRecognition, unknown>>>;
|
|
540
|
-
changedFiles: z.ZodArray<z.ZodString>;
|
|
541
|
-
classification: z.ZodEnum<{
|
|
542
|
-
"docs/process-only": "docs/process-only";
|
|
543
|
-
"non-trivial": "non-trivial";
|
|
544
|
-
trivial: "trivial";
|
|
545
|
-
}>;
|
|
546
|
-
classificationReasons: z.ZodArray<z.ZodString>;
|
|
547
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
548
|
-
durationMs: z.ZodNumber;
|
|
549
|
-
endedAt: z.ZodISODateTime;
|
|
550
|
-
executedCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
551
|
-
command: z.ZodString;
|
|
552
|
-
counts: z.ZodOptional<z.ZodObject<{
|
|
553
|
-
testFiles: z.ZodOptional<z.ZodNumber>;
|
|
554
|
-
tests: z.ZodOptional<z.ZodNumber>;
|
|
555
|
-
}, z.core.$strip>>;
|
|
556
|
-
durationMs: z.ZodNumber;
|
|
557
|
-
exitCode: z.ZodNumber;
|
|
558
|
-
failures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
559
|
-
file: z.ZodString;
|
|
560
|
-
kind: z.ZodEnum<{
|
|
561
|
-
assertion: "assertion";
|
|
562
|
-
error: "error";
|
|
563
|
-
timeout: "timeout";
|
|
564
|
-
}>;
|
|
565
|
-
title: z.ZodString;
|
|
566
|
-
}, z.core.$strip>>>;
|
|
567
|
-
name: z.ZodString;
|
|
568
|
-
scope: z.ZodEnum<{
|
|
569
|
-
"docs-only": "docs-only";
|
|
570
|
-
full: "full";
|
|
571
|
-
trivial: "trivial";
|
|
572
|
-
}>;
|
|
573
|
-
}, z.core.$strip>>>;
|
|
574
|
-
headSha: z.ZodString;
|
|
575
|
-
impactStamp: z.ZodOptional<z.ZodObject<{
|
|
576
|
-
basis: z.ZodEnum<{
|
|
577
|
-
conservative: "conservative";
|
|
578
|
-
"target-scoped": "target-scoped";
|
|
579
|
-
}>;
|
|
580
|
-
inertPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
581
|
-
reasons: z.ZodArray<z.ZodString>;
|
|
582
|
-
stampVersion: z.ZodLiteral<4>;
|
|
583
|
-
targets: z.ZodArray<z.ZodObject<{
|
|
584
|
-
basis: z.ZodString;
|
|
585
|
-
impact: z.ZodEnum<{
|
|
586
|
-
affected: "affected";
|
|
587
|
-
"not-affected": "not-affected";
|
|
588
|
-
}>;
|
|
589
|
-
name: z.ZodString;
|
|
590
|
-
subscribedPaths: z.ZodArray<z.ZodString>;
|
|
591
|
-
}, z.core.$strip>>;
|
|
592
|
-
unsubscribedPaths: z.ZodArray<z.ZodString>;
|
|
593
|
-
}, z.core.$strip>>;
|
|
594
|
-
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
595
|
-
mode: z.ZodEnum<{
|
|
596
|
-
"docs-only": "docs-only";
|
|
597
|
-
full: "full";
|
|
598
|
-
trivial: "trivial";
|
|
599
|
-
}>;
|
|
600
|
-
notDemandedRecords: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
601
|
-
basis: z.ZodString;
|
|
602
|
-
name: z.ZodString;
|
|
603
|
-
}, z.core.$strip>>>;
|
|
604
|
-
notRequiredCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
605
|
-
basis: z.ZodString;
|
|
606
|
-
impactTarget: z.ZodString;
|
|
607
|
-
name: z.ZodString;
|
|
608
|
-
}, z.core.$strip>>>;
|
|
609
|
-
outcome: z.ZodOptional<z.ZodEnum<{
|
|
610
|
-
aborted: "aborted";
|
|
611
|
-
passed: "passed";
|
|
612
|
-
}>>;
|
|
613
|
-
patchId: z.ZodOptional<z.ZodString>;
|
|
614
|
-
policyResolution: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
615
|
-
basePolicyDigest: z.ZodString;
|
|
616
|
-
baseRefName: z.ZodString;
|
|
617
|
-
candidatePolicyDigest: z.ZodString;
|
|
618
|
-
effectiveDigest: z.ZodString;
|
|
619
|
-
policyBaseSha: z.ZodString;
|
|
620
|
-
reviewPolicyChanged: z.ZodBoolean;
|
|
621
|
-
status: z.ZodLiteral<"authoritative">;
|
|
622
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
623
|
-
baseRefName: z.ZodString;
|
|
624
|
-
cause: z.ZodOptional<z.ZodEnum<{
|
|
625
|
-
"lookup-failed": "lookup-failed";
|
|
626
|
-
"no-pull-request": "no-pull-request";
|
|
627
|
-
"policy-unreadable": "policy-unreadable";
|
|
628
|
-
}>>;
|
|
629
|
-
reason: z.ZodString;
|
|
630
|
-
status: z.ZodLiteral<"unresolved">;
|
|
631
|
-
}, z.core.$strict>], "status">>;
|
|
632
|
-
profilePath: z.ZodString;
|
|
633
|
-
projectKey: z.ZodString;
|
|
634
|
-
repository: z.ZodString;
|
|
635
|
-
runner: z.ZodOptional<z.ZodObject<{
|
|
636
|
-
arch: z.ZodString;
|
|
637
|
-
cpuCount: z.ZodNumber;
|
|
638
|
-
kind: z.ZodEnum<{
|
|
639
|
-
ci: "ci";
|
|
640
|
-
cloud: "cloud";
|
|
641
|
-
local: "local";
|
|
642
|
-
}>;
|
|
643
|
-
os: z.ZodString;
|
|
644
|
-
provider: z.ZodOptional<z.ZodEnum<{
|
|
645
|
-
"claude-code": "claude-code";
|
|
646
|
-
cursor: "cursor";
|
|
647
|
-
"github-actions": "github-actions";
|
|
648
|
-
}>>;
|
|
649
|
-
}, z.core.$strip>>;
|
|
650
|
-
schemaVersion: z.ZodLiteral<4>;
|
|
651
|
-
startedAt: z.ZodISODateTime;
|
|
652
|
-
verificationCommands: z.ZodArray<z.ZodObject<{
|
|
653
|
-
command: z.ZodString;
|
|
654
|
-
description: z.ZodString;
|
|
655
|
-
impactTarget: z.ZodOptional<z.ZodString>;
|
|
656
|
-
name: z.ZodString;
|
|
657
|
-
scope: z.ZodEnum<{
|
|
658
|
-
"docs-only": "docs-only";
|
|
659
|
-
full: "full";
|
|
660
|
-
trivial: "trivial";
|
|
661
|
-
}>;
|
|
662
|
-
}, z.core.$strip>>;
|
|
663
|
-
}, z.core.$strip>;
|
|
664
|
-
declare const readinessRepairSchema: z.ZodObject<{
|
|
665
|
-
action: z.ZodString;
|
|
666
|
-
code: z.ZodEnum<{
|
|
667
|
-
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
668
|
-
"undraft-pr": "undraft-pr";
|
|
669
|
-
}>;
|
|
670
|
-
command: z.ZodString;
|
|
671
|
-
}, z.core.$strip>;
|
|
672
|
-
declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
673
|
-
baseSha: z.ZodString;
|
|
674
|
-
blockingReasons: z.ZodArray<z.ZodString>;
|
|
675
|
-
classification: z.ZodEnum<{
|
|
676
|
-
"docs/process-only": "docs/process-only";
|
|
677
|
-
"non-trivial": "non-trivial";
|
|
678
|
-
trivial: "trivial";
|
|
679
|
-
}>;
|
|
680
|
-
externalChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
681
|
-
checkType: z.ZodEnum<{
|
|
682
|
-
review: "review";
|
|
683
|
-
verify: "verify";
|
|
684
|
-
}>;
|
|
685
|
-
name: z.ZodString;
|
|
686
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
687
|
-
scope: z.ZodOptional<z.ZodObject<{
|
|
688
|
-
classifications: z.ZodArray<z.ZodEnum<{
|
|
689
|
-
"docs/process-only": "docs/process-only";
|
|
690
|
-
"non-trivial": "non-trivial";
|
|
691
|
-
trivial: "trivial";
|
|
692
|
-
}>>;
|
|
693
|
-
}, z.core.$strict>>;
|
|
694
|
-
scopeReason: z.ZodString;
|
|
695
|
-
status: z.ZodEnum<{
|
|
696
|
-
"out-of-scope": "out-of-scope";
|
|
697
|
-
satisfied: "satisfied";
|
|
698
|
-
unmet: "unmet";
|
|
699
|
-
}>;
|
|
700
|
-
}, z.core.$strip>>>;
|
|
701
|
-
github: z.ZodObject<{
|
|
702
|
-
draft: z.ZodBoolean;
|
|
703
|
-
mergeStateStatus: z.ZodString;
|
|
704
|
-
mergeable: z.ZodString;
|
|
705
|
-
requiredChecks: z.ZodEnum<{
|
|
706
|
-
failed: "failed";
|
|
707
|
-
none: "none";
|
|
708
|
-
passed: "passed";
|
|
709
|
-
pending: "pending";
|
|
710
|
-
unknown: "unknown";
|
|
711
|
-
}>;
|
|
712
|
-
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
|
-
unresolvedReviewThreads: z.ZodNumber;
|
|
714
|
-
}, z.core.$strip>;
|
|
715
|
-
headSha: z.ZodString;
|
|
716
|
-
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
717
|
-
patchId: z.ZodString;
|
|
718
|
-
pr: z.ZodNumber;
|
|
719
|
-
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
720
|
-
action: z.ZodString;
|
|
721
|
-
code: z.ZodEnum<{
|
|
722
|
-
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
723
|
-
"undraft-pr": "undraft-pr";
|
|
724
|
-
}>;
|
|
725
|
-
command: z.ZodString;
|
|
726
|
-
}, z.core.$strip>>>;
|
|
727
|
-
reviewCycleState: z.ZodOptional<z.ZodObject<{
|
|
728
|
-
autoBlockingFindings: z.ZodNumber;
|
|
729
|
-
countsBySeverity: z.ZodObject<{
|
|
730
|
-
critical: z.ZodNumber;
|
|
731
|
-
high: z.ZodNumber;
|
|
732
|
-
low: z.ZodNumber;
|
|
733
|
-
medium: z.ZodNumber;
|
|
734
|
-
unknown: z.ZodNumber;
|
|
735
|
-
}, z.core.$strip>;
|
|
736
|
-
highestBlockingSeverity: z.ZodOptional<z.ZodEnum<{
|
|
737
|
-
critical: "critical";
|
|
738
|
-
high: "high";
|
|
739
|
-
low: "low";
|
|
740
|
-
medium: "medium";
|
|
741
|
-
unknown: "unknown";
|
|
742
|
-
}>>;
|
|
743
|
-
highestOpenSeverity: z.ZodOptional<z.ZodEnum<{
|
|
744
|
-
critical: "critical";
|
|
745
|
-
high: "high";
|
|
746
|
-
low: "low";
|
|
747
|
-
medium: "medium";
|
|
748
|
-
unknown: "unknown";
|
|
749
|
-
}>>;
|
|
750
|
-
maxReviewCycles: z.ZodOptional<z.ZodNumber>;
|
|
751
|
-
nonBlockingFindings: z.ZodNumber;
|
|
752
|
-
openFindings: z.ZodNumber;
|
|
753
|
-
reviewCycle: z.ZodOptional<z.ZodNumber>;
|
|
754
|
-
staleRepeatFindings: z.ZodOptional<z.ZodNumber>;
|
|
755
|
-
windowExhausted: z.ZodBoolean;
|
|
756
|
-
}, z.core.$strip>>;
|
|
757
|
-
reviewLadder: z.ZodOptional<z.ZodObject<{
|
|
758
|
-
cycleCounts: z.ZodObject<{
|
|
759
|
-
gate: z.ZodNumber;
|
|
760
|
-
interior: z.ZodNumber;
|
|
761
|
-
}, z.core.$strip>;
|
|
762
|
-
forcedTransition: z.ZodOptional<z.ZodEnum<{
|
|
763
|
-
"gate-cap-exhausted": "gate-cap-exhausted";
|
|
764
|
-
"interior-cap-reached": "interior-cap-reached";
|
|
765
|
-
}>>;
|
|
766
|
-
nextAction: z.ZodEnum<{
|
|
767
|
-
"accept-nonblocking-findings": "accept-nonblocking-findings";
|
|
768
|
-
"advance-to-gate": "advance-to-gate";
|
|
769
|
-
"escalate-to-triage": "escalate-to-triage";
|
|
770
|
-
"ready-for-human": "ready-for-human";
|
|
771
|
-
"run-gate-cycle": "run-gate-cycle";
|
|
772
|
-
"run-interior-cycle": "run-interior-cycle";
|
|
773
|
-
}>;
|
|
774
|
-
stage: z.ZodEnum<{
|
|
775
|
-
gate: "gate";
|
|
776
|
-
interior: "interior";
|
|
777
|
-
"interior-complete": "interior-complete";
|
|
778
|
-
}>;
|
|
779
|
-
}, z.core.$strip>>;
|
|
780
|
-
reviewRuns: z.ZodOptional<z.ZodArray<z.ZodType<PrReviewResult, unknown, z.core.$ZodTypeInternals<PrReviewResult, unknown>>>>;
|
|
781
|
-
reviewTerminalState: z.ZodOptional<z.ZodEnum<{
|
|
782
|
-
"accepted-with-findings": "accepted-with-findings";
|
|
783
|
-
blocked: "blocked";
|
|
784
|
-
clean: "clean";
|
|
785
|
-
}>>;
|
|
786
|
-
reviews: z.ZodObject<{
|
|
787
|
-
correctness: z.ZodObject<{
|
|
788
|
-
required: z.ZodBoolean;
|
|
789
|
-
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
790
|
-
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
791
|
-
status: z.ZodEnum<{
|
|
792
|
-
blocked: "blocked";
|
|
793
|
-
current: "current";
|
|
794
|
-
missing: "missing";
|
|
795
|
-
"not-required": "not-required";
|
|
796
|
-
stale: "stale";
|
|
797
|
-
}>;
|
|
798
|
-
}, z.core.$strip>;
|
|
799
|
-
security: z.ZodOptional<z.ZodObject<{
|
|
800
|
-
required: z.ZodBoolean;
|
|
801
|
-
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
802
|
-
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
803
|
-
status: z.ZodEnum<{
|
|
804
|
-
blocked: "blocked";
|
|
805
|
-
current: "current";
|
|
806
|
-
missing: "missing";
|
|
807
|
-
"not-required": "not-required";
|
|
808
|
-
stale: "stale";
|
|
809
|
-
}>;
|
|
810
|
-
}, z.core.$strip>>;
|
|
811
|
-
}, z.core.$strip>;
|
|
812
|
-
schemaVersion: z.ZodLiteral<2>;
|
|
813
|
-
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
814
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
815
|
-
prVerify: z.ZodLiteral<"missing">;
|
|
816
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
817
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
818
|
-
prVerify: z.ZodLiteral<"stale">;
|
|
819
|
-
verifiedHeadSha: z.ZodString;
|
|
820
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
821
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
822
|
-
prVerify: z.ZodLiteral<"passed-via-head">;
|
|
823
|
-
verifiedHeadSha: z.ZodString;
|
|
824
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
825
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
826
|
-
docsOnlyVerifiedHeadSha: z.ZodString;
|
|
827
|
-
prVerify: z.ZodLiteral<"docs-only-delta">;
|
|
828
|
-
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
829
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
830
|
-
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
831
|
-
prVerify: z.ZodLiteral<"trivial-delta">;
|
|
832
|
-
trivialVerifiedHeadSha: z.ZodString;
|
|
833
|
-
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
834
|
-
}, z.core.$strict>], "prVerify">;
|
|
835
|
-
}, z.core.$strip>;
|
|
836
|
-
type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
|
|
837
|
-
type ReadinessStatus = "ready" | "blocked";
|
|
838
|
-
type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
|
|
839
|
-
interface PrReadyProof {
|
|
840
|
-
schemaVersion: 3;
|
|
841
|
-
/**
|
|
842
|
-
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
843
|
-
* Also reports an already-merged no-op (#1456). Otherwise present exactly
|
|
844
|
-
* when a ready run called the arming module (#1299): not
|
|
845
|
-
* for an `autoMerge: false` wave, and not when a notice names why the run
|
|
846
|
-
* did not arm. Read back from the PR rather than inferred from the
|
|
847
|
-
* invocation, because `gh pr merge --auto` arms, merges, or does nothing
|
|
848
|
-
* with the same exit code and the same empty output. `not-armed` means the
|
|
849
|
-
* candidate is admitted but nothing will merge it, and `followUp` carries
|
|
850
|
-
* the re-dispatch.
|
|
851
|
-
*/
|
|
852
|
-
arming?: {
|
|
853
|
-
detail?: string;
|
|
854
|
-
headSha: string;
|
|
855
|
-
outcome: "armed" | "merged" | "not-armed";
|
|
856
|
-
};
|
|
857
|
-
/**
|
|
858
|
-
* The authoring session readiness resolved for the review-independence
|
|
859
|
-
* cross-check (#1037). Recorded so the branded check can print it beside the
|
|
860
|
-
* review session, model, and producer the ledger already carries — the four
|
|
861
|
-
* identities a human weighs at merge time. Additive and optional: proofs
|
|
862
|
-
* written before it carry no field, so no schema version moves.
|
|
863
|
-
*/
|
|
864
|
-
authoringSession?: string;
|
|
865
|
-
/**
|
|
866
|
-
* Why this run blocked, one entry per refusing demand (#391): `code` is the
|
|
867
|
-
* demand key from the resolver's vocabulary, `detail` the one-sentence
|
|
868
|
-
* refusal. Same refusals as `blockingReasons`, in the same order — the
|
|
869
|
-
* analyzable projection of a flat string list, so a wall of blocked proofs
|
|
870
|
-
* on one PR can be counted by cause. Absent when nothing blocked.
|
|
871
|
-
*/
|
|
872
|
-
blockedReasons?: BlockedReason[];
|
|
873
|
-
blockingReasons: string[];
|
|
874
|
-
humanBlockingReasons: string[];
|
|
875
|
-
command: "patronage-factory pr:ready";
|
|
876
|
-
/**
|
|
877
|
-
* Machine-safe arg array for the obvious next action (#523): when `ready`
|
|
878
|
-
* but arming did not take effect, a `pr:ready` re-dispatch (idempotent on
|
|
879
|
-
* an unchanged head); otherwise the `gh pr ready` undraft repair or the
|
|
880
|
-
* `pr:verify` re-run that the blocking reasons name (re-verify the head,
|
|
881
|
-
* then re-run pr:ready). Same `argv` shape `factory:delegate --print`
|
|
882
|
-
* emits. Optional and purely additive.
|
|
883
|
-
*/
|
|
884
|
-
followUp?: FollowUpAction;
|
|
885
|
-
/**
|
|
886
|
-
* `ledger.headSha` is the evaluated head SHA: the GitHub `pr.headRefOid`
|
|
887
|
-
* captured at evaluation time (not a local git read), recorded explicitly
|
|
888
|
-
* so merge-time identity checks are a pure comparison against the live
|
|
889
|
-
* pushed HEAD, not a re-derivation. See the ledger schema.
|
|
890
|
-
*/
|
|
891
|
-
ledger: ManagedReadinessLedger;
|
|
892
|
-
/**
|
|
893
|
-
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
894
|
-
* generation that permitted readiness and any authorized arming with a
|
|
895
|
-
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
896
|
-
* waived demand reads to a human. Absent when there are none.
|
|
897
|
-
*/
|
|
898
|
-
notices?: string[];
|
|
899
|
-
/**
|
|
900
|
-
* The policy identity readiness resolved review demand under (#922): the
|
|
901
|
-
* base ref, its live tip, and the digests of the base, candidate, and merged
|
|
902
|
-
* review policies. Optional on the wire and additive — this is a new record
|
|
903
|
-
* on an unchanged contract, so no schema version moves.
|
|
904
|
-
*/
|
|
905
|
-
policyResolution?: PolicyResolution;
|
|
906
|
-
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
907
|
-
profileBlobSha?: string;
|
|
908
|
-
/** Checkout-relative committed profile path evaluated by readiness. */
|
|
909
|
-
profilePath?: string;
|
|
910
|
-
repairs: ReadinessRepair[];
|
|
911
|
-
/** Trusted checkout repository used for all GitHub reads and writes. */
|
|
912
|
-
repository?: string;
|
|
913
|
-
status: ReadinessStatus;
|
|
914
|
-
/**
|
|
915
|
-
* Demands that were in force, were NOT met, and were waived by the operator
|
|
916
|
-
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
917
|
-
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
918
|
-
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
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.
|
|
919
728
|
*/
|
|
920
|
-
|
|
729
|
+
runner?: PrVerifyRunner;
|
|
730
|
+
startedAt: string;
|
|
731
|
+
verificationCommands: PrVerifyCommandResult[];
|
|
921
732
|
}
|
|
922
|
-
declare const
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
733
|
+
export declare const prVerifyProofSchema: z.ZodObject<{
|
|
734
|
+
authoringSession: z.ZodString;
|
|
735
|
+
base: z.ZodString;
|
|
736
|
+
baseSha: z.ZodOptional<z.ZodString>;
|
|
737
|
+
baselineFullProofs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
738
|
+
base: z.ZodString;
|
|
739
|
+
changedFiles: z.ZodArray<z.ZodString>;
|
|
740
|
+
headSha: z.ZodString;
|
|
741
|
+
profilePath: z.ZodString;
|
|
742
|
+
projectKey: z.ZodString;
|
|
743
|
+
repository: z.ZodString;
|
|
744
|
+
}, z.core.$strip>>>;
|
|
745
|
+
catchUpRecognition: z.ZodOptional<z.ZodType<CatchUpRecognition, unknown, z.core.$ZodTypeInternals<CatchUpRecognition, unknown>>>;
|
|
746
|
+
changedFiles: z.ZodArray<z.ZodString>;
|
|
747
|
+
classification: z.ZodEnum<{
|
|
748
|
+
"docs/process-only": "docs/process-only";
|
|
749
|
+
"non-trivial": "non-trivial";
|
|
750
|
+
trivial: "trivial";
|
|
927
751
|
}>;
|
|
928
|
-
|
|
752
|
+
classificationReasons: z.ZodArray<z.ZodString>;
|
|
753
|
+
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
754
|
+
durationMs: z.ZodNumber;
|
|
755
|
+
endedAt: z.ZodISODateTime;
|
|
756
|
+
executedCommands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
757
|
+
command: z.ZodString;
|
|
758
|
+
counts: z.ZodOptional<z.ZodObject<{
|
|
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>>>;
|
|
929
780
|
headSha: z.ZodString;
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
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";
|
|
935
805
|
}>;
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
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";
|
|
944
818
|
}>>;
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
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>;
|
|
954
870
|
/** Artifact versions accepted at ingest. */
|
|
955
871
|
export declare const SUPPORTED_CLOSEOUT_SCHEMA_VERSIONS: readonly [5];
|
|
956
872
|
/** Strict, bounded runtime transport contract emitted by factory:closeout. */
|
|
@@ -1134,6 +1050,98 @@ export declare const boundaryCheckProofSchema: z.ZodObject<{
|
|
|
1134
1050
|
}, z.core.$strip>;
|
|
1135
1051
|
export type BoundaryCheckProofRecord = z.infer<typeof boundaryCheckProofSchema>;
|
|
1136
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
|
+
}
|
|
1137
1145
|
/**
|
|
1138
1146
|
* The pr:ready proof versions a reader accepts: the current one only (#917
|
|
1139
1147
|
* item 1). #894 narrowed the nested readiness ledger to `schemaVersion: 2` and
|
|
@@ -1367,4 +1375,4 @@ export declare const prReadyProofSchema: z.ZodObject<{
|
|
|
1367
1375
|
}>;
|
|
1368
1376
|
waivedDemands: z.ZodOptional<z.ZodArray<z.ZodType<WaivedDemand, unknown, z.core.$ZodTypeInternals<WaivedDemand, unknown>>>>;
|
|
1369
1377
|
}, z.core.$strip>;
|
|
1370
|
-
export type { BlockedReason, BoundaryReviewProof, CloseoutArtifact, EvidenceEnvelope, GateTimingRecord,
|
|
1378
|
+
export type { BlockedReason, BoundaryReviewProof, CloseoutArtifact, EvidenceEnvelope, GateTimingRecord, PrReviewProof, PrVerifyProof, ReviewPromptSection, ReviewPromptSectionProvenance, WaivedDemand };
|