@patronage/software-factory 0.30.0-alpha.1 → 0.30.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DrSxFLj_.js → chunk-pbuEa-1d.js} +0 -1
- package/dist/index.d.ts +47 -405
- package/dist/index.js +3302 -5165
- package/dist/schemas.d.ts +426 -107
- package/dist/schemas.js +97 -89
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -371,8 +371,8 @@ interface DemandWaiver {
|
|
|
371
371
|
operator: string;
|
|
372
372
|
rationale: string;
|
|
373
373
|
recordedAt: string;
|
|
374
|
-
/**
|
|
375
|
-
session
|
|
374
|
+
/** Optional audit metadata; never waiver authority. */
|
|
375
|
+
session?: string;
|
|
376
376
|
}
|
|
377
377
|
interface DemandWaiverStore {
|
|
378
378
|
command: "patronage-factory demand:waive";
|
|
@@ -392,7 +392,7 @@ interface WaivedDemand {
|
|
|
392
392
|
operator: string;
|
|
393
393
|
rationale: string;
|
|
394
394
|
recordedAt: string;
|
|
395
|
-
session
|
|
395
|
+
session?: string;
|
|
396
396
|
/** The demand's refusals at evaluation time, preserved verbatim. */
|
|
397
397
|
unmetReasons: string[];
|
|
398
398
|
}
|
|
@@ -431,7 +431,7 @@ declare const applyDemandWaiver: ({
|
|
|
431
431
|
declare const waivedDemandNotice: (waived: WaivedDemand) => string;
|
|
432
432
|
interface DemandWaiverAuthorization {
|
|
433
433
|
operator: string;
|
|
434
|
-
session
|
|
434
|
+
session?: string;
|
|
435
435
|
}
|
|
436
436
|
type AuthorizeDemandWaiverResult = {
|
|
437
437
|
authorization: DemandWaiverAuthorization;
|
|
@@ -442,16 +442,15 @@ type AuthorizeDemandWaiverResult = {
|
|
|
442
442
|
};
|
|
443
443
|
/**
|
|
444
444
|
* Operator identity, `declaredBy`-style: a named human account, recorded on
|
|
445
|
-
* the waiver and enforced here
|
|
446
|
-
*
|
|
445
|
+
* the waiver and enforced here. Session is optional audit metadata only: it is
|
|
446
|
+
* not credential-backed, so its absence or equality never authorizes or
|
|
447
|
+
* refuses an operator act.
|
|
447
448
|
*/
|
|
448
449
|
declare const authorizeDemandWaiver: ({
|
|
449
450
|
authenticatedLogin,
|
|
450
|
-
authoringSession,
|
|
451
451
|
session
|
|
452
452
|
}: {
|
|
453
453
|
authenticatedLogin: string | undefined;
|
|
454
|
-
authoringSession: string | undefined;
|
|
455
454
|
session: string | undefined;
|
|
456
455
|
}) => AuthorizeDemandWaiverResult;
|
|
457
456
|
//#endregion
|
|
@@ -519,27 +518,6 @@ declare const followUpFromArgv: (argv: string[]) => FollowUpAction;
|
|
|
519
518
|
/** Canonical zod schema for the optional follow-up field on JSON outputs. */
|
|
520
519
|
declare const FollowUpActionSchema: z.ZodType<FollowUpAction>;
|
|
521
520
|
//#endregion
|
|
522
|
-
//#region src/pr-readiness/handled-human-comments.d.ts
|
|
523
|
-
declare const HANDLED_COMMENTS_PAYLOAD_KIND: "handled-human-comments";
|
|
524
|
-
/**
|
|
525
|
-
* Authenticated producer of the durable handled set. Recorded on the readiness
|
|
526
|
-
* ledger; unverifiable producers are ignored on read (fail closed).
|
|
527
|
-
*/
|
|
528
|
-
type HandledCommentsProducerMode = "app" | "commit-status";
|
|
529
|
-
interface HandledCommentsProducer {
|
|
530
|
-
/** App id (stringified) or GitHub login, depending on mode. */
|
|
531
|
-
identity: string;
|
|
532
|
-
mode: HandledCommentsProducerMode;
|
|
533
|
-
}
|
|
534
|
-
interface HandledCommentsCheckPayload {
|
|
535
|
-
clearedAt?: string;
|
|
536
|
-
handledCommentUrls: string[];
|
|
537
|
-
kind: typeof HANDLED_COMMENTS_PAYLOAD_KIND;
|
|
538
|
-
pr: number;
|
|
539
|
-
schemaVersion: 1;
|
|
540
|
-
sessionId?: string;
|
|
541
|
-
}
|
|
542
|
-
//#endregion
|
|
543
521
|
//#region src/diff-classification.d.ts
|
|
544
522
|
declare const DIFF_CLASSIFICATIONS: readonly ["docs/process-only", "trivial", "non-trivial"];
|
|
545
523
|
type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
|
|
@@ -547,20 +525,14 @@ type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
|
|
|
547
525
|
//#region src/profile.d.ts
|
|
548
526
|
declare const DEFAULT_FACTORY_REPOSITORY = "unknown/unknown";
|
|
549
527
|
/** The one profile shape this build accepts (ADR 0023, #318, #351). */
|
|
550
|
-
declare const PROFILE_SCHEMA_VERSION =
|
|
528
|
+
declare const PROFILE_SCHEMA_VERSION = 5;
|
|
551
529
|
declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
552
530
|
$schema: z.ZodOptional<z.ZodString>;
|
|
553
|
-
env: z.ZodOptional<z.ZodObject<{
|
|
554
|
-
required: z.ZodArray<z.ZodString>;
|
|
555
|
-
}, z.core.$strict>>;
|
|
556
531
|
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
557
532
|
hq: z.ZodOptional<z.ZodObject<{
|
|
558
533
|
enabled: z.ZodBoolean;
|
|
559
534
|
endpoint: z.ZodIntersection<z.ZodString, z.ZodString>;
|
|
560
535
|
}, z.core.$strict>>;
|
|
561
|
-
project: z.ZodObject<{
|
|
562
|
-
key: z.ZodString;
|
|
563
|
-
}, z.core.$strict>;
|
|
564
536
|
proof: z.ZodObject<{
|
|
565
537
|
classificationPolicy: z.ZodObject<{
|
|
566
538
|
docsOnly: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -568,15 +540,10 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
568
540
|
}, z.core.$strict>;
|
|
569
541
|
}, z.core.$strict>;
|
|
570
542
|
repository: z.ZodObject<{
|
|
571
|
-
defaultBranch: z.ZodString;
|
|
572
543
|
name: z.ZodString;
|
|
573
544
|
owner: z.ZodString;
|
|
574
545
|
}, z.core.$strict>;
|
|
575
546
|
requiredChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
576
|
-
checkType: z.ZodEnum<{
|
|
577
|
-
review: "review";
|
|
578
|
-
verify: "verify";
|
|
579
|
-
}>;
|
|
580
547
|
name: z.ZodString;
|
|
581
548
|
scope: z.ZodOptional<z.ZodObject<{
|
|
582
549
|
classifications: z.ZodArray<z.ZodEnum<{
|
|
@@ -586,27 +553,12 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
|
|
|
586
553
|
}>>;
|
|
587
554
|
}, z.core.$strict>>;
|
|
588
555
|
}, z.core.$strict>>>;
|
|
589
|
-
review: z.ZodObject<{
|
|
590
|
-
conditional: z.
|
|
591
|
-
modes: z.ZodArray<z.ZodEnum<{
|
|
592
|
-
correctness: "correctness";
|
|
593
|
-
security: "security";
|
|
594
|
-
}>>;
|
|
556
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
conditional: z.ZodArray<z.ZodObject<{
|
|
595
558
|
paths: z.ZodArray<z.ZodString>;
|
|
596
|
-
}, z.core.$strict>>>;
|
|
597
|
-
defaultMaxCycles: z.ZodNumber;
|
|
598
|
-
ladder: z.ZodOptional<z.ZodObject<{
|
|
599
|
-
gate: z.ZodOptional<z.ZodObject<{
|
|
600
|
-
cap: z.ZodNumber;
|
|
601
|
-
}, z.core.$strict>>;
|
|
602
559
|
}, z.core.$strict>>;
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
security: "security";
|
|
606
|
-
}>>;
|
|
607
|
-
standingChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
608
|
-
}, z.core.$strict>;
|
|
609
|
-
schemaVersion: z.ZodLiteral<4>;
|
|
560
|
+
}, z.core.$strict>>;
|
|
561
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
610
562
|
verification: z.ZodObject<{
|
|
611
563
|
commands: z.ZodArray<z.ZodObject<{
|
|
612
564
|
command: z.ZodString;
|
|
@@ -784,14 +736,6 @@ interface CheckRunDependencies {
|
|
|
784
736
|
declare function ensureFactoryCheckRunPublished(input: PublishFactoryCheckInput, dependencies?: CheckRunDependencies & {
|
|
785
737
|
onDiagnostic?: (message: string) => void;
|
|
786
738
|
}): Promise<boolean>;
|
|
787
|
-
interface PublishHandledCommentsCheckInput {
|
|
788
|
-
cwd: string;
|
|
789
|
-
owner: string;
|
|
790
|
-
payload: HandledCommentsCheckPayload;
|
|
791
|
-
pr: number;
|
|
792
|
-
repo: string;
|
|
793
|
-
sha: string;
|
|
794
|
-
}
|
|
795
739
|
//#endregion
|
|
796
740
|
//#region src/merge-freeze.d.ts
|
|
797
741
|
declare const MERGE_FREEZE_CHECK_NAME = "patronage-factory/merge-freeze";
|
|
@@ -835,10 +779,10 @@ interface MergeFreezeStore {
|
|
|
835
779
|
read: (input: MergeFreezeStoreInput) => unknown;
|
|
836
780
|
}
|
|
837
781
|
/**
|
|
838
|
-
* The freeze generation as
|
|
782
|
+
* The freeze generation as a readiness decision needs to see it (#477).
|
|
839
783
|
*
|
|
840
784
|
* `read` above collapses three different situations into one refusal, because
|
|
841
|
-
* merge time treated all of them as "do not merge".
|
|
785
|
+
* merge time treated all of them as "do not merge". Readiness distinguishes
|
|
842
786
|
* them: a settled generation is the writer's verdict, a **settling** one is the
|
|
843
787
|
* window between a merge landing and its main-push verify completing (a
|
|
844
788
|
* running generation, or a missing generation proven by the immediately prior
|
|
@@ -878,7 +822,6 @@ interface ProofDescriptor<T> {
|
|
|
878
822
|
declare const reviewPromptSectionSchema: z.ZodObject<{
|
|
879
823
|
provenance: z.ZodEnum<{
|
|
880
824
|
"prior-review-ledger": "prior-review-ledger";
|
|
881
|
-
"profile-standing-checklist": "profile-standing-checklist";
|
|
882
825
|
"issue-review-focus": "issue-review-focus";
|
|
883
826
|
}>;
|
|
884
827
|
source: z.ZodString;
|
|
@@ -889,7 +832,6 @@ type ReviewPromptSectionProvenance = ReviewPromptSection["provenance"];
|
|
|
889
832
|
declare const reviewPromptSectionsSchema: z.ZodArray<z.ZodObject<{
|
|
890
833
|
provenance: z.ZodEnum<{
|
|
891
834
|
"prior-review-ledger": "prior-review-ledger";
|
|
892
|
-
"profile-standing-checklist": "profile-standing-checklist";
|
|
893
835
|
"issue-review-focus": "issue-review-focus";
|
|
894
836
|
}>;
|
|
895
837
|
source: z.ZodString;
|
|
@@ -927,7 +869,7 @@ interface ReviewLadderPolicy {
|
|
|
927
869
|
cap: number;
|
|
928
870
|
};
|
|
929
871
|
}
|
|
930
|
-
declare const resolveReviewLadderPolicy: (
|
|
872
|
+
declare const resolveReviewLadderPolicy: () => ReviewLadderPolicy;
|
|
931
873
|
//#endregion
|
|
932
874
|
//#region src/review-rungs.d.ts
|
|
933
875
|
declare const EVIDENCE_REVIEW_RUNGS: readonly ["independent-model", "oracle", "human"];
|
|
@@ -1171,33 +1113,11 @@ interface PrReviewProof {
|
|
|
1171
1113
|
//#endregion
|
|
1172
1114
|
//#region src/pr-readiness/readiness-ledger.d.ts
|
|
1173
1115
|
declare const SCHEMA_VERSION = 1;
|
|
1174
|
-
declare const
|
|
1175
|
-
adminUrl: z.ZodOptional<z.ZodString>;
|
|
1176
|
-
apiHealthUrl: z.ZodOptional<z.ZodString>;
|
|
1177
|
-
headSha: z.ZodOptional<z.ZodString>;
|
|
1178
|
-
localPreviewProof: z.ZodOptional<z.ZodUnknown>;
|
|
1179
|
-
localProofPath: z.ZodOptional<z.ZodString>;
|
|
1180
|
-
proofSource: z.ZodOptional<z.ZodEnum<{
|
|
1181
|
-
"github-actions": "github-actions";
|
|
1182
|
-
"local-self-certified": "local-self-certified";
|
|
1183
|
-
}>>;
|
|
1184
|
-
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1185
|
-
seedStatus: z.ZodEnum<{
|
|
1186
|
-
unknown: "unknown";
|
|
1187
|
-
skipped: "skipped";
|
|
1188
|
-
passed: "passed";
|
|
1189
|
-
failed: "failed";
|
|
1190
|
-
}>;
|
|
1191
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
1192
|
-
timingsMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNumber>>>;
|
|
1193
|
-
workflowRunUrl: z.ZodOptional<z.ZodString>;
|
|
1194
|
-
}, z.core.$strip>;
|
|
1195
|
-
declare const READINESS_REPAIR_CODES: readonly ["undraft-pr", "render-pr-body-sections", "await-post-undraft-checks"];
|
|
1116
|
+
declare const READINESS_REPAIR_CODES: readonly ["undraft-pr", "await-post-undraft-checks"];
|
|
1196
1117
|
declare const readinessRepairSchema: z.ZodObject<{
|
|
1197
1118
|
action: z.ZodString;
|
|
1198
1119
|
code: z.ZodEnum<{
|
|
1199
1120
|
"undraft-pr": "undraft-pr";
|
|
1200
|
-
"render-pr-body-sections": "render-pr-body-sections";
|
|
1201
1121
|
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
1202
1122
|
}>;
|
|
1203
1123
|
command: z.ZodString;
|
|
@@ -1232,80 +1152,28 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1232
1152
|
"out-of-scope": "out-of-scope";
|
|
1233
1153
|
}>;
|
|
1234
1154
|
}, z.core.$strip>>>;
|
|
1235
|
-
finalReviewPoint: z.ZodBoolean;
|
|
1236
1155
|
github: z.ZodObject<{
|
|
1237
|
-
currentWithBase: z.ZodBoolean;
|
|
1238
1156
|
draft: z.ZodBoolean;
|
|
1239
1157
|
mergeStateStatus: z.ZodString;
|
|
1240
1158
|
mergeable: z.ZodString;
|
|
1241
1159
|
requiredChecks: z.ZodEnum<{
|
|
1242
1160
|
unknown: "unknown";
|
|
1243
|
-
pending: "pending";
|
|
1244
1161
|
passed: "passed";
|
|
1245
1162
|
failed: "failed";
|
|
1163
|
+
pending: "pending";
|
|
1246
1164
|
none: "none";
|
|
1247
1165
|
}>;
|
|
1166
|
+
reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1248
1167
|
unresolvedReviewThreads: z.ZodNumber;
|
|
1249
1168
|
}, z.core.$strip>;
|
|
1250
|
-
handledCommentsProducer: z.ZodOptional<z.ZodObject<{
|
|
1251
|
-
identity: z.ZodString;
|
|
1252
|
-
mode: z.ZodEnum<{
|
|
1253
|
-
app: "app";
|
|
1254
|
-
"commit-status": "commit-status";
|
|
1255
|
-
}>;
|
|
1256
|
-
}, z.core.$strip>>;
|
|
1257
|
-
handledHumanComments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1258
|
-
clearedAt: z.ZodOptional<z.ZodString>;
|
|
1259
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
1260
|
-
source: z.ZodEnum<{
|
|
1261
|
-
"check-run": "check-run";
|
|
1262
|
-
cli: "cli";
|
|
1263
|
-
}>;
|
|
1264
|
-
url: z.ZodString;
|
|
1265
|
-
}, z.core.$strip>>>;
|
|
1266
1169
|
headSha: z.ZodString;
|
|
1267
1170
|
mergeBaseSha: z.ZodOptional<z.ZodString>;
|
|
1268
1171
|
patchId: z.ZodString;
|
|
1269
|
-
postReadinessHumanComments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1270
|
-
author: z.ZodString;
|
|
1271
|
-
createdAt: z.ZodString;
|
|
1272
|
-
summary: z.ZodString;
|
|
1273
|
-
url: z.ZodString;
|
|
1274
|
-
}, z.core.$strip>>>;
|
|
1275
|
-
postReadinessHumanReviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1276
|
-
author: z.ZodString;
|
|
1277
|
-
createdAt: z.ZodString;
|
|
1278
|
-
summary: z.ZodString;
|
|
1279
|
-
url: z.ZodString;
|
|
1280
|
-
}, z.core.$strip>>>;
|
|
1281
1172
|
pr: z.ZodNumber;
|
|
1282
|
-
previewDeploy: z.ZodOptional<z.ZodObject<{
|
|
1283
|
-
adminUrl: z.ZodOptional<z.ZodString>;
|
|
1284
|
-
apiHealthUrl: z.ZodOptional<z.ZodString>;
|
|
1285
|
-
headSha: z.ZodOptional<z.ZodString>;
|
|
1286
|
-
localPreviewProof: z.ZodOptional<z.ZodUnknown>;
|
|
1287
|
-
localProofPath: z.ZodOptional<z.ZodString>;
|
|
1288
|
-
proofSource: z.ZodOptional<z.ZodEnum<{
|
|
1289
|
-
"github-actions": "github-actions";
|
|
1290
|
-
"local-self-certified": "local-self-certified";
|
|
1291
|
-
}>>;
|
|
1292
|
-
publicUrl: z.ZodOptional<z.ZodString>;
|
|
1293
|
-
seedStatus: z.ZodEnum<{
|
|
1294
|
-
unknown: "unknown";
|
|
1295
|
-
skipped: "skipped";
|
|
1296
|
-
passed: "passed";
|
|
1297
|
-
failed: "failed";
|
|
1298
|
-
}>;
|
|
1299
|
-
stage: z.ZodOptional<z.ZodString>;
|
|
1300
|
-
timingsMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNumber>>>;
|
|
1301
|
-
workflowRunUrl: z.ZodOptional<z.ZodString>;
|
|
1302
|
-
}, z.core.$strip>>;
|
|
1303
|
-
previewDeployRequired: z.ZodBoolean;
|
|
1304
1173
|
repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1305
1174
|
action: z.ZodString;
|
|
1306
1175
|
code: z.ZodEnum<{
|
|
1307
1176
|
"undraft-pr": "undraft-pr";
|
|
1308
|
-
"render-pr-body-sections": "render-pr-body-sections";
|
|
1309
1177
|
"await-post-undraft-checks": "await-post-undraft-checks";
|
|
1310
1178
|
}>;
|
|
1311
1179
|
command: z.ZodString;
|
|
@@ -1371,39 +1239,31 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1371
1239
|
}>>;
|
|
1372
1240
|
reviews: z.ZodObject<{
|
|
1373
1241
|
correctness: z.ZodObject<{
|
|
1374
|
-
docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
1375
1242
|
required: z.ZodBoolean;
|
|
1376
1243
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1377
1244
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1378
1245
|
status: z.ZodEnum<{
|
|
1379
1246
|
blocked: "blocked";
|
|
1380
|
-
"not-required": "not-required";
|
|
1381
1247
|
stale: "stale";
|
|
1248
|
+
"not-required": "not-required";
|
|
1382
1249
|
current: "current";
|
|
1383
1250
|
missing: "missing";
|
|
1384
1251
|
}>;
|
|
1385
1252
|
}, z.core.$strip>;
|
|
1386
1253
|
security: z.ZodOptional<z.ZodObject<{
|
|
1387
|
-
docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
1388
1254
|
required: z.ZodBoolean;
|
|
1389
1255
|
reviewedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1390
1256
|
reviewedPatchId: z.ZodOptional<z.ZodString>;
|
|
1391
1257
|
status: z.ZodEnum<{
|
|
1392
1258
|
blocked: "blocked";
|
|
1393
|
-
"not-required": "not-required";
|
|
1394
1259
|
stale: "stale";
|
|
1260
|
+
"not-required": "not-required";
|
|
1395
1261
|
current: "current";
|
|
1396
1262
|
missing: "missing";
|
|
1397
1263
|
}>;
|
|
1398
1264
|
}, z.core.$strip>>;
|
|
1399
1265
|
}, z.core.$strip>;
|
|
1400
1266
|
schemaVersion: z.ZodLiteral<1>;
|
|
1401
|
-
stackRole: z.ZodEnum<{
|
|
1402
|
-
slice: "slice";
|
|
1403
|
-
single: "single";
|
|
1404
|
-
rollup: "rollup";
|
|
1405
|
-
"merge-gate prerequisite": "merge-gate prerequisite";
|
|
1406
|
-
}>;
|
|
1407
1267
|
verification: z.ZodObject<{
|
|
1408
1268
|
command: z.ZodLiteral<"patronage-factory pr:verify">;
|
|
1409
1269
|
docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1418,10 +1278,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
|
|
|
1418
1278
|
verifiedHeadSha: z.ZodOptional<z.ZodString>;
|
|
1419
1279
|
}, z.core.$strip>;
|
|
1420
1280
|
}, z.core.$strip>;
|
|
1421
|
-
type PreviewDeployProof = z.infer<typeof previewDeploySchema>;
|
|
1422
|
-
type PreviewSeedStatus = PreviewDeployProof["seedStatus"];
|
|
1423
1281
|
type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
|
|
1424
|
-
type ReadinessStatus = "ready" | "blocked"
|
|
1282
|
+
type ReadinessStatus = "ready" | "blocked";
|
|
1425
1283
|
type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
|
|
1426
1284
|
declare function validateManagedReadinessLedger(value: unknown): ManagedReadinessLedger;
|
|
1427
1285
|
declare namespace status_check_rollup_d_exports {
|
|
@@ -1478,9 +1336,7 @@ declare const statusCheckState: (rollup: StatusCheckRollup[] | undefined, exclud
|
|
|
1478
1336
|
interface PrReadyArgs extends LoadProjectProfileInput {
|
|
1479
1337
|
authoringSessionIds?: string[];
|
|
1480
1338
|
base: string;
|
|
1481
|
-
bodyForEvaluation?: string;
|
|
1482
1339
|
epic?: number;
|
|
1483
|
-
handledCommentUrls?: string[];
|
|
1484
1340
|
json?: boolean;
|
|
1485
1341
|
output?: string;
|
|
1486
1342
|
report?: boolean;
|
|
@@ -1508,31 +1364,12 @@ interface GitHubPullRequest {
|
|
|
1508
1364
|
baseRefName: string;
|
|
1509
1365
|
baseRefOid: string;
|
|
1510
1366
|
body: string;
|
|
1511
|
-
comments: {
|
|
1512
|
-
author?: {
|
|
1513
|
-
login?: string;
|
|
1514
|
-
};
|
|
1515
|
-
body: string;
|
|
1516
|
-
createdAt?: string;
|
|
1517
|
-
id?: string | number;
|
|
1518
|
-
updatedAt?: string;
|
|
1519
|
-
url?: string;
|
|
1520
|
-
}[];
|
|
1521
1367
|
headRefOid: string;
|
|
1522
1368
|
isDraft: boolean;
|
|
1523
1369
|
mergeStateStatus: string;
|
|
1524
1370
|
mergeable: string;
|
|
1525
1371
|
number: number;
|
|
1526
|
-
|
|
1527
|
-
author?: {
|
|
1528
|
-
login?: string;
|
|
1529
|
-
};
|
|
1530
|
-
body?: string;
|
|
1531
|
-
lastEditedAt?: string;
|
|
1532
|
-
state: string;
|
|
1533
|
-
submittedAt?: string;
|
|
1534
|
-
url?: string;
|
|
1535
|
-
}[];
|
|
1372
|
+
reviewDecision: string | null;
|
|
1536
1373
|
statusCheckRollup?: StatusCheckRollup[];
|
|
1537
1374
|
title: string;
|
|
1538
1375
|
unresolvedReviewThreads: number;
|
|
@@ -1542,8 +1379,8 @@ interface PrReadyProof {
|
|
|
1542
1379
|
schemaVersion: 3;
|
|
1543
1380
|
/**
|
|
1544
1381
|
* What GitHub actually did when this run armed native auto-merge (#477).
|
|
1545
|
-
* Present exactly when
|
|
1546
|
-
* the PR rather than inferred from the invocation, because `gh pr merge
|
|
1382
|
+
* Present exactly when a ready wave authorizes machine merge and arming ran;
|
|
1383
|
+
* read back from the PR rather than inferred from the invocation, because `gh pr merge
|
|
1547
1384
|
* --auto` arms, merges, or does nothing with the same exit code and the same
|
|
1548
1385
|
* empty output. `not-armed` means the candidate is admitted but nothing will
|
|
1549
1386
|
* merge it, and `followUp` carries the re-dispatch.
|
|
@@ -1582,8 +1419,9 @@ interface PrReadyProof {
|
|
|
1582
1419
|
ledger: ManagedReadinessLedger;
|
|
1583
1420
|
/**
|
|
1584
1421
|
* Actionable facts that did not block (#477): a settling merge-freeze
|
|
1585
|
-
* generation that
|
|
1586
|
-
*
|
|
1422
|
+
* generation that permitted readiness and any authorized arming with a
|
|
1423
|
+
* notice, an admitted-but-unscheduled false boundary wave, and how each
|
|
1424
|
+
* waived demand reads to a human. Absent when there are none.
|
|
1587
1425
|
*/
|
|
1588
1426
|
notices?: string[];
|
|
1589
1427
|
/** Committed profile blob evaluated by readiness. Required for merge. */
|
|
@@ -1598,16 +1436,15 @@ interface PrReadyProof {
|
|
|
1598
1436
|
* Demands that were in force, were NOT met, and were waived by the operator
|
|
1599
1437
|
* (#354, moved here from the merge-time proof by #477). Each entry carries
|
|
1600
1438
|
* the demand's refusals verbatim, so a waived demand can never read as a met
|
|
1601
|
-
* one;
|
|
1439
|
+
* one; readiness proceeds on the recorded operator act, not on evidence.
|
|
1602
1440
|
*/
|
|
1603
1441
|
waivedDemands?: WaivedDemand[];
|
|
1604
1442
|
}
|
|
1605
|
-
type PublishHandledCommentsResult = HandledCommentsProducer | Promise<HandledCommentsProducer | undefined> | undefined;
|
|
1606
1443
|
interface PrReadyDependencies {
|
|
1607
1444
|
/**
|
|
1608
|
-
* Arms GitHub native auto-merge for a passing
|
|
1609
|
-
* the real `gh pr merge --auto`
|
|
1610
|
-
* actually happened.
|
|
1445
|
+
* Arms GitHub native auto-merge only for a passing boundary wave that
|
|
1446
|
+
* authorizes machine merge (#477). Defaults to the real `gh pr merge --auto`
|
|
1447
|
+
* call plus the read-back that says what actually happened.
|
|
1611
1448
|
*/
|
|
1612
1449
|
armAutoMerge?: (input: ArmAutoMergeInput) => ArmAutoMergeOutcome;
|
|
1613
1450
|
github?: {
|
|
@@ -1623,25 +1460,11 @@ interface PrReadyDependencies {
|
|
|
1623
1460
|
owner: string;
|
|
1624
1461
|
repo: string;
|
|
1625
1462
|
}) => string;
|
|
1626
|
-
fetchHandledComments?: (input: {
|
|
1627
|
-
owner: string;
|
|
1628
|
-
pr: number;
|
|
1629
|
-
repo: string;
|
|
1630
|
-
}) => {
|
|
1631
|
-
producer?: HandledCommentsProducer;
|
|
1632
|
-
urls: string[];
|
|
1633
|
-
}; /** @deprecated Prefer fetchHandledComments (includes producer identity). */
|
|
1634
|
-
fetchHandledCommentUrls?: (input: {
|
|
1635
|
-
owner: string;
|
|
1636
|
-
pr: number;
|
|
1637
|
-
repo: string;
|
|
1638
|
-
}) => string[];
|
|
1639
1463
|
fetchPullRequest: (input: {
|
|
1640
1464
|
owner: string;
|
|
1641
1465
|
repo: string;
|
|
1642
1466
|
pr: number;
|
|
1643
1467
|
}) => GitHubPullRequest;
|
|
1644
|
-
publishHandledCommentsCheck?: (input: PublishHandledCommentsCheckInput) => PublishHandledCommentsResult;
|
|
1645
1468
|
};
|
|
1646
1469
|
git?: PrReadyGitDependencies;
|
|
1647
1470
|
hq?: HqIngestDependencies;
|
|
@@ -1667,8 +1490,6 @@ interface PrReadyDependencies {
|
|
|
1667
1490
|
}) => Promise<boolean> | boolean;
|
|
1668
1491
|
/** Injectable delay for the UNKNOWN-mergeable brief poll (tests). */
|
|
1669
1492
|
sleep?: (ms: number) => Promise<void>;
|
|
1670
|
-
/** Injectable clock for CLI handled-comment provenance (tests). */
|
|
1671
|
-
now?: () => Date;
|
|
1672
1493
|
}
|
|
1673
1494
|
interface PrReadyGitDependencies {
|
|
1674
1495
|
canResolveCommit: (cwd: string, sha: string) => boolean;
|
|
@@ -1859,8 +1680,8 @@ declare const loadEvidenceEnvelopes: (cwd: string) => LoadedEvidenceEnvelope[];
|
|
|
1859
1680
|
declare const REVIEW_STATUS_VALUES: readonly ["not-required", "current", "stale", "missing", "blocked"];
|
|
1860
1681
|
declare const reviewStatusSchema: z.ZodEnum<{
|
|
1861
1682
|
blocked: "blocked";
|
|
1862
|
-
"not-required": "not-required";
|
|
1863
1683
|
stale: "stale";
|
|
1684
|
+
"not-required": "not-required";
|
|
1864
1685
|
current: "current";
|
|
1865
1686
|
missing: "missing";
|
|
1866
1687
|
}>;
|
|
@@ -2218,11 +2039,6 @@ declare const retroEnvelopeV1Schema: z.ZodObject<{
|
|
|
2218
2039
|
}, z.core.$strict>;
|
|
2219
2040
|
kind: z.ZodLiteral<"retro-envelope">;
|
|
2220
2041
|
outcome: z.ZodOptional<z.ZodObject<{
|
|
2221
|
-
mergeCheck: z.ZodOptional<z.ZodEnum<{
|
|
2222
|
-
pass: "pass";
|
|
2223
|
-
fail: "fail";
|
|
2224
|
-
"not-run": "not-run";
|
|
2225
|
-
}>>;
|
|
2226
2042
|
status: z.ZodEnum<{
|
|
2227
2043
|
success: "success";
|
|
2228
2044
|
fail: "fail";
|
|
@@ -2503,7 +2319,6 @@ interface PrReviewArgs extends LoadProjectProfileInput {
|
|
|
2503
2319
|
dispositions?: string;
|
|
2504
2320
|
findings?: string;
|
|
2505
2321
|
issue?: number;
|
|
2506
|
-
maxCycles?: number;
|
|
2507
2322
|
mode: PrReviewMode;
|
|
2508
2323
|
output?: string;
|
|
2509
2324
|
verifyProof?: string;
|
|
@@ -2581,7 +2396,8 @@ interface PrPublishHandoff {
|
|
|
2581
2396
|
* An admitted candidate is not a handed-off one: `pr:ready` arms only when a
|
|
2582
2397
|
* boundary wave authorized it, and the arming can fail to take effect. A
|
|
2583
2398
|
* readiness status of `ready` says the candidate passed, never that anything
|
|
2584
|
-
* will merge it —
|
|
2399
|
+
* will merge it — only an auto-merge-authorized boundary wave can schedule
|
|
2400
|
+
* one — so publish reads this before claiming nothing is owed.
|
|
2585
2401
|
*/
|
|
2586
2402
|
scheduled: boolean;
|
|
2587
2403
|
status: PrReadyProof["status"];
|
|
@@ -2811,11 +2627,11 @@ declare const LegacyWorkerCloseoutStatusTraceEventSchema: z.ZodObject<{
|
|
|
2811
2627
|
threadId: z.ZodOptional<z.ZodString>;
|
|
2812
2628
|
workerId: z.ZodOptional<z.ZodString>;
|
|
2813
2629
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
2630
|
+
pending: "pending";
|
|
2814
2631
|
unavailable: "unavailable";
|
|
2815
2632
|
archived: "archived";
|
|
2816
2633
|
skipped: "skipped";
|
|
2817
2634
|
"not-applicable": "not-applicable";
|
|
2818
|
-
pending: "pending";
|
|
2819
2635
|
}>>;
|
|
2820
2636
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
2821
2637
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -3206,11 +3022,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3206
3022
|
threadId: z.ZodOptional<z.ZodString>;
|
|
3207
3023
|
workerId: z.ZodOptional<z.ZodString>;
|
|
3208
3024
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3025
|
+
pending: "pending";
|
|
3209
3026
|
unavailable: "unavailable";
|
|
3210
3027
|
archived: "archived";
|
|
3211
3028
|
skipped: "skipped";
|
|
3212
3029
|
"not-applicable": "not-applicable";
|
|
3213
|
-
pending: "pending";
|
|
3214
3030
|
}>>;
|
|
3215
3031
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3216
3032
|
eventType: z.ZodLiteral<"worker-closeout-lessons">;
|
|
@@ -3247,11 +3063,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
|
|
|
3247
3063
|
}, z.core.$strict>], "lessonStatus">;
|
|
3248
3064
|
readonly 2: z.ZodObject<{
|
|
3249
3065
|
archiveStatus: z.ZodOptional<z.ZodEnum<{
|
|
3066
|
+
pending: "pending";
|
|
3250
3067
|
unavailable: "unavailable";
|
|
3251
3068
|
archived: "archived";
|
|
3252
3069
|
skipped: "skipped";
|
|
3253
3070
|
"not-applicable": "not-applicable";
|
|
3254
|
-
pending: "pending";
|
|
3255
3071
|
}>>;
|
|
3256
3072
|
closeoutReason: z.ZodOptional<z.ZodString>;
|
|
3257
3073
|
lessonStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -3849,7 +3665,6 @@ interface DoctorReport {
|
|
|
3849
3665
|
profilePath: string;
|
|
3850
3666
|
projectKey: string;
|
|
3851
3667
|
repository: {
|
|
3852
|
-
defaultBranch: string;
|
|
3853
3668
|
name: string;
|
|
3854
3669
|
owner: string;
|
|
3855
3670
|
};
|
|
@@ -3927,115 +3742,6 @@ declare function checkWorktreeScratchFiles(worktreePath?: string, listRootEntrie
|
|
|
3927
3742
|
* apart.
|
|
3928
3743
|
*/
|
|
3929
3744
|
declare function formatScratchFileCheckSummary(check: WorktreeScratchFileCheck): string;
|
|
3930
|
-
declare namespace pr_body_metadata_d_exports {
|
|
3931
|
-
export { PrBodyMetadata, StackRole, readPrBodyMetadata };
|
|
3932
|
-
}
|
|
3933
|
-
type StackRole = "single" | "slice" | "rollup" | "merge-gate prerequisite";
|
|
3934
|
-
interface PrBodyMetadata {
|
|
3935
|
-
requiredSectionsPresent: boolean;
|
|
3936
|
-
stackRole: StackRole;
|
|
3937
|
-
finalReviewPoint: boolean;
|
|
3938
|
-
trivialWaiverAccepted: boolean;
|
|
3939
|
-
}
|
|
3940
|
-
declare const readPrBodyMetadata: (body: string) => PrBodyMetadata;
|
|
3941
|
-
declare namespace post_readiness_comments_d_exports {
|
|
3942
|
-
export { BLOCKING_REVIEW_STATE, HandledCommentEntry, PostReadinessHumanComment, PrReadinessComment, PrReadinessReview, activePostReadinessHumanComments, activePostReadinessHumanReviews, isBotLogin, postReadinessHumanCommentReason, postReadinessHumanReviewReason, selectPostReadinessHumanComments };
|
|
3943
|
-
}
|
|
3944
|
-
interface PrReadinessComment {
|
|
3945
|
-
author?: {
|
|
3946
|
-
login?: string;
|
|
3947
|
-
};
|
|
3948
|
-
body: string;
|
|
3949
|
-
createdAt?: string;
|
|
3950
|
-
id?: string | number;
|
|
3951
|
-
updatedAt?: string;
|
|
3952
|
-
url?: string;
|
|
3953
|
-
}
|
|
3954
|
-
interface PrReadinessReview {
|
|
3955
|
-
author?: {
|
|
3956
|
-
login?: string;
|
|
3957
|
-
};
|
|
3958
|
-
body?: string;
|
|
3959
|
-
/** GraphQL `PullRequestReview.lastEditedAt` — the body-edit signal used to re-arm a cleared review (#843). */
|
|
3960
|
-
lastEditedAt?: string;
|
|
3961
|
-
state: string;
|
|
3962
|
-
submittedAt?: string;
|
|
3963
|
-
url?: string;
|
|
3964
|
-
}
|
|
3965
|
-
interface PostReadinessHumanComment {
|
|
3966
|
-
author: string;
|
|
3967
|
-
createdAt: string;
|
|
3968
|
-
summary: string;
|
|
3969
|
-
url: string;
|
|
3970
|
-
}
|
|
3971
|
-
declare const BLOCKING_REVIEW_STATE = "CHANGES_REQUESTED";
|
|
3972
|
-
interface HandledCommentEntry {
|
|
3973
|
-
clearedAt?: string;
|
|
3974
|
-
url: string;
|
|
3975
|
-
}
|
|
3976
|
-
/**
|
|
3977
|
-
* Active human blocking comments: all non-bot human PR comments minus the
|
|
3978
|
-
* explicitly-handled URL set. No review-timestamp recency gate — an unhandled
|
|
3979
|
-
* blocker blocks regardless of later review runs (#819 cycle 3). A handled
|
|
3980
|
-
* comment that is EDITED after it was cleared re-arms (#825a).
|
|
3981
|
-
*/
|
|
3982
|
-
declare const selectPostReadinessHumanComments: ({
|
|
3983
|
-
comments,
|
|
3984
|
-
handledComments
|
|
3985
|
-
}: {
|
|
3986
|
-
comments: PrReadinessComment[];
|
|
3987
|
-
handledComments?: HandledCommentEntry[];
|
|
3988
|
-
}) => PostReadinessHumanComment[];
|
|
3989
|
-
/**
|
|
3990
|
-
* Active human blockers are recomputed from live GitHub comments each run
|
|
3991
|
-
* (#819). The prior local readiness proof is not a carry source —
|
|
3992
|
-
* `.factory-memory/` is gitignored and vanishes on clean checkout. Clearing
|
|
3993
|
-
* persists only via the durable handled set (factory check-run
|
|
3994
|
-
* `patronage-factory/handled-comments`) plus explicit `--handled-comment`.
|
|
3995
|
-
*/
|
|
3996
|
-
declare const activePostReadinessHumanComments: ({
|
|
3997
|
-
comments,
|
|
3998
|
-
handledComments
|
|
3999
|
-
}: {
|
|
4000
|
-
comments: PrReadinessComment[];
|
|
4001
|
-
handledComments?: HandledCommentEntry[];
|
|
4002
|
-
}) => PostReadinessHumanComment[];
|
|
4003
|
-
/**
|
|
4004
|
-
* Active CHANGES_REQUESTED PR review submissions (#825b): a top-level review
|
|
4005
|
-
* body carries no inline thread, so without this scan it is the only human
|
|
4006
|
-
* channel auto-merge would sail over — unwatched by both the issue-comment
|
|
4007
|
-
* scan and the unresolved-review-thread count. Shares the handled-set /
|
|
4008
|
-
* re-arm rules with comments so an operator can clear a stale request the
|
|
4009
|
-
* same way (`--handled-comment <review-url>`). The clear-comparison uses
|
|
4010
|
-
* `lastEditedAt` when present so a body edit after a clear re-arms the
|
|
4011
|
-
* blocker the same way an edited comment does — resubmission is not the
|
|
4012
|
-
* only edit signal GitHub exposes (#843).
|
|
4013
|
-
*/
|
|
4014
|
-
declare const activePostReadinessHumanReviews: ({
|
|
4015
|
-
handledComments,
|
|
4016
|
-
reviews
|
|
4017
|
-
}: {
|
|
4018
|
-
handledComments?: HandledCommentEntry[];
|
|
4019
|
-
reviews: PrReadinessReview[];
|
|
4020
|
-
}) => PostReadinessHumanComment[];
|
|
4021
|
-
declare const postReadinessHumanCommentReason: ({
|
|
4022
|
-
comment,
|
|
4023
|
-
pr,
|
|
4024
|
-
prTitle
|
|
4025
|
-
}: {
|
|
4026
|
-
comment: PostReadinessHumanComment;
|
|
4027
|
-
pr: number;
|
|
4028
|
-
prTitle?: string;
|
|
4029
|
-
}) => string;
|
|
4030
|
-
declare const postReadinessHumanReviewReason: ({
|
|
4031
|
-
pr,
|
|
4032
|
-
prTitle,
|
|
4033
|
-
review
|
|
4034
|
-
}: {
|
|
4035
|
-
pr: number;
|
|
4036
|
-
prTitle?: string;
|
|
4037
|
-
review: PostReadinessHumanComment;
|
|
4038
|
-
}) => string;
|
|
4039
3745
|
//#endregion
|
|
4040
3746
|
//#region src/pr-readiness/pr-body-sections.d.ts
|
|
4041
3747
|
declare const MANAGED_SECTION_NAMES: readonly ["Verification", "Review proof", "How to review"];
|
|
@@ -4152,31 +3858,27 @@ interface WaveReviewDemand {
|
|
|
4152
3858
|
wave: string;
|
|
4153
3859
|
}
|
|
4154
3860
|
declare namespace readiness_evaluation_d_exports {
|
|
4155
|
-
export { CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON, DRAFT_BLOCKER_REASON, EvaluationInput, ManagedReadinessLedger, PENDING_CHECKS_BLOCKER_REASON_PREFIX,
|
|
3861
|
+
export { CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON, DRAFT_BLOCKER_REASON, EvaluationInput, ManagedReadinessLedger, PENDING_CHECKS_BLOCKER_REASON_PREFIX, READINESS_REPAIR_CODES, ReadinessRepair, ReadinessStatus, SCHEMA_VERSION, SECURITY_UNTYPED_REVIEW_BLOCKER_REASON, evaluateReadiness, managedReadinessLedgerSchema, readinessExitCode, readinessRepairSchema, validateManagedReadinessLedger };
|
|
4156
3862
|
}
|
|
4157
3863
|
declare const CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON = "Correctness review proof is not a head-bound typed findings verdict; re-run pr:review with a valid findings file.";
|
|
4158
3864
|
declare const SECURITY_UNTYPED_REVIEW_BLOCKER_REASON = "Security review proof is not a head-bound typed findings verdict; re-run pr:review with a valid findings file.";
|
|
4159
3865
|
declare const DRAFT_BLOCKER_REASON = "PR is still marked draft.";
|
|
4160
|
-
declare const RENDER_PR_BODY_SECTIONS_BLOCKER_REASON = "PR body must include Verification, Review proof, and How to review sections.";
|
|
4161
3866
|
declare const PENDING_CHECKS_BLOCKER_REASON_PREFIX = "Required/current checks are";
|
|
4162
3867
|
declare const readinessExitCode: (status: ReadinessStatus) => 1 | 0;
|
|
4163
3868
|
interface EvaluationInput {
|
|
4164
3869
|
pr: number;
|
|
4165
3870
|
prTitle?: string;
|
|
4166
|
-
body: string;
|
|
4167
3871
|
headSha: string;
|
|
4168
3872
|
localHeadSha?: string;
|
|
4169
3873
|
baseSha: string;
|
|
4170
3874
|
patchId: string;
|
|
4171
3875
|
classification: DiffClassification;
|
|
4172
|
-
|
|
4173
|
-
reviews?: PrReadinessReview[];
|
|
3876
|
+
reviewDecision: string | null;
|
|
4174
3877
|
unresolvedReviewThreads: number;
|
|
4175
3878
|
requiredChecks: CheckState;
|
|
4176
3879
|
hostedVerifyCheck?: CheckState;
|
|
4177
3880
|
autoMergeEnabled?: boolean;
|
|
4178
3881
|
draft: boolean;
|
|
4179
|
-
currentWithBase: boolean;
|
|
4180
3882
|
mergeable: string;
|
|
4181
3883
|
mergeStateStatus: string;
|
|
4182
3884
|
ladderPolicy?: ReviewLadderPolicy;
|
|
@@ -4184,20 +3886,11 @@ interface EvaluationInput {
|
|
|
4184
3886
|
reviewProof?: PrReviewProof;
|
|
4185
3887
|
verificationProof?: VerificationProofState;
|
|
4186
3888
|
docsOnlyVerifyBaselineHeadShas?: string[];
|
|
4187
|
-
docsOnlySinceReviewProof?: boolean;
|
|
4188
3889
|
externalRequiredChecks?: RequiredCheck[];
|
|
4189
3890
|
evidenceEnvelopes?: LoadedEvidenceEnvelope[];
|
|
4190
3891
|
mergeBaseSha?: string;
|
|
4191
3892
|
authoringSessionIds?: string[];
|
|
4192
3893
|
priorLedger?: Pick<ManagedReadinessLedger, "reviewRuns">;
|
|
4193
|
-
handledCommentUrls?: string[];
|
|
4194
|
-
checkRunHandledCommentUrls?: string[];
|
|
4195
|
-
handledCommentsProducer?: {
|
|
4196
|
-
identity: string;
|
|
4197
|
-
mode: "app" | "commit-status";
|
|
4198
|
-
};
|
|
4199
|
-
handledCommentSessionId?: string;
|
|
4200
|
-
handledCommentClearedAt?: string;
|
|
4201
3894
|
waveReviewDemand?: Pick<WaveReviewDemand, "autoMerge" | "review" | "wave">;
|
|
4202
3895
|
mergeFreeze?: {
|
|
4203
3896
|
blockingReasons: string[];
|
|
@@ -4216,42 +3909,37 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4216
3909
|
baseSha: string;
|
|
4217
3910
|
blockingReasons: string[];
|
|
4218
3911
|
classification: "trivial" | "docs/process-only" | "non-trivial";
|
|
4219
|
-
finalReviewPoint: boolean;
|
|
4220
3912
|
github: {
|
|
4221
|
-
currentWithBase: boolean;
|
|
4222
3913
|
draft: boolean;
|
|
4223
3914
|
mergeStateStatus: string;
|
|
4224
3915
|
mergeable: string;
|
|
4225
|
-
requiredChecks: "unknown" | "
|
|
3916
|
+
requiredChecks: "unknown" | "passed" | "failed" | "pending" | "none";
|
|
4226
3917
|
unresolvedReviewThreads: number;
|
|
3918
|
+
reviewDecision?: string | null | undefined;
|
|
4227
3919
|
};
|
|
4228
3920
|
headSha: string;
|
|
4229
3921
|
patchId: string;
|
|
4230
3922
|
pr: number;
|
|
4231
|
-
previewDeployRequired: boolean;
|
|
4232
3923
|
repairs: {
|
|
4233
3924
|
action: string;
|
|
4234
|
-
code: "undraft-pr" | "
|
|
3925
|
+
code: "undraft-pr" | "await-post-undraft-checks";
|
|
4235
3926
|
command: string;
|
|
4236
3927
|
}[];
|
|
4237
3928
|
reviews: {
|
|
4238
3929
|
correctness: {
|
|
4239
3930
|
required: boolean;
|
|
4240
|
-
status: "blocked" | "
|
|
4241
|
-
docsOnlyDeltaAccepted?: boolean | undefined;
|
|
3931
|
+
status: "blocked" | "stale" | "not-required" | "current" | "missing";
|
|
4242
3932
|
reviewedHeadSha?: string | undefined;
|
|
4243
3933
|
reviewedPatchId?: string | undefined;
|
|
4244
3934
|
};
|
|
4245
3935
|
security?: {
|
|
4246
3936
|
required: boolean;
|
|
4247
|
-
status: "blocked" | "
|
|
4248
|
-
docsOnlyDeltaAccepted?: boolean | undefined;
|
|
3937
|
+
status: "blocked" | "stale" | "not-required" | "current" | "missing";
|
|
4249
3938
|
reviewedHeadSha?: string | undefined;
|
|
4250
3939
|
reviewedPatchId?: string | undefined;
|
|
4251
3940
|
} | undefined;
|
|
4252
3941
|
};
|
|
4253
3942
|
schemaVersion: 1;
|
|
4254
|
-
stackRole: "slice" | "single" | "rollup" | "merge-gate prerequisite";
|
|
4255
3943
|
verification: {
|
|
4256
3944
|
command: "patronage-factory pr:verify";
|
|
4257
3945
|
prVerify: "stale" | "passed" | "missing";
|
|
@@ -4272,42 +3960,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4272
3960
|
classifications: ("trivial" | "docs/process-only" | "non-trivial")[];
|
|
4273
3961
|
} | undefined;
|
|
4274
3962
|
}[] | undefined;
|
|
4275
|
-
handledCommentsProducer?: {
|
|
4276
|
-
identity: string;
|
|
4277
|
-
mode: "app" | "commit-status";
|
|
4278
|
-
} | undefined;
|
|
4279
|
-
handledHumanComments?: {
|
|
4280
|
-
source: "check-run" | "cli";
|
|
4281
|
-
url: string;
|
|
4282
|
-
clearedAt?: string | undefined;
|
|
4283
|
-
sessionId?: string | undefined;
|
|
4284
|
-
}[] | undefined;
|
|
4285
3963
|
mergeBaseSha?: string | undefined;
|
|
4286
|
-
postReadinessHumanComments?: {
|
|
4287
|
-
author: string;
|
|
4288
|
-
createdAt: string;
|
|
4289
|
-
summary: string;
|
|
4290
|
-
url: string;
|
|
4291
|
-
}[] | undefined;
|
|
4292
|
-
postReadinessHumanReviews?: {
|
|
4293
|
-
author: string;
|
|
4294
|
-
createdAt: string;
|
|
4295
|
-
summary: string;
|
|
4296
|
-
url: string;
|
|
4297
|
-
}[] | undefined;
|
|
4298
|
-
previewDeploy?: {
|
|
4299
|
-
seedStatus: "unknown" | "skipped" | "passed" | "failed";
|
|
4300
|
-
adminUrl?: string | undefined;
|
|
4301
|
-
apiHealthUrl?: string | undefined;
|
|
4302
|
-
headSha?: string | undefined;
|
|
4303
|
-
localPreviewProof?: unknown;
|
|
4304
|
-
localProofPath?: string | undefined;
|
|
4305
|
-
proofSource?: "github-actions" | "local-self-certified" | undefined;
|
|
4306
|
-
publicUrl?: string | undefined;
|
|
4307
|
-
stage?: string | undefined;
|
|
4308
|
-
timingsMs?: Record<string, number | undefined> | undefined;
|
|
4309
|
-
workflowRunUrl?: string | undefined;
|
|
4310
|
-
} | undefined;
|
|
4311
3964
|
reviewCycleState?: {
|
|
4312
3965
|
autoBlockingFindings: number;
|
|
4313
3966
|
countsBySeverity: {
|
|
@@ -4346,7 +3999,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4346
3999
|
notices: string[];
|
|
4347
4000
|
repairs: {
|
|
4348
4001
|
action: string;
|
|
4349
|
-
code: "undraft-pr" | "
|
|
4002
|
+
code: "undraft-pr" | "await-post-undraft-checks";
|
|
4350
4003
|
command: string;
|
|
4351
4004
|
}[];
|
|
4352
4005
|
status: ReadinessStatus; /** Demands that were in force, were NOT met, and the operator waived. */
|
|
@@ -4357,18 +4010,15 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
|
|
|
4357
4010
|
interface EvidenceEmitArgs {
|
|
4358
4011
|
base: string;
|
|
4359
4012
|
check: string;
|
|
4360
|
-
checkType: EvidenceCheckType;
|
|
4361
4013
|
cwd: string;
|
|
4362
4014
|
findingsPointer?: string;
|
|
4363
4015
|
json?: boolean;
|
|
4364
|
-
model?: string;
|
|
4365
4016
|
outcome: "pass" | "fail";
|
|
4366
4017
|
output?: string;
|
|
4367
4018
|
policyVersion?: string;
|
|
4368
4019
|
profilePath?: string;
|
|
4369
4020
|
producer: string;
|
|
4370
4021
|
requestId?: string;
|
|
4371
|
-
rung?: EvidenceReviewRung;
|
|
4372
4022
|
sessionId?: string;
|
|
4373
4023
|
}
|
|
4374
4024
|
interface EvidenceEmitDependencies {
|
|
@@ -4482,12 +4132,6 @@ interface EpicStructureEvent {
|
|
|
4482
4132
|
interface BuildEpicStructureEventInput {
|
|
4483
4133
|
/** Parsed dag.yml (or JSON) document. */
|
|
4484
4134
|
document: DagDocument;
|
|
4485
|
-
/** Boundary slug override (else `dag.boundary`, else `epic-<id>`). */
|
|
4486
|
-
boundary?: string;
|
|
4487
|
-
/** Epic display name override (else `dag.name`, else `Epic <id>`). */
|
|
4488
|
-
name?: string;
|
|
4489
|
-
/** Repo name override (else `dag.repo`). Required by one of the two. */
|
|
4490
|
-
repo?: string;
|
|
4491
4135
|
/** Event observedAt; NOT part of the eventId hash. Defaults to now. */
|
|
4492
4136
|
observedAt?: string;
|
|
4493
4137
|
}
|
|
@@ -4604,7 +4248,6 @@ interface AssembleReviewPromptInput {
|
|
|
4604
4248
|
patchId: string;
|
|
4605
4249
|
priorLedgerEntries?: FindingLedgerEntry[];
|
|
4606
4250
|
profile: FactoryProjectProfile;
|
|
4607
|
-
standingChecklist?: readonly string[];
|
|
4608
4251
|
}
|
|
4609
4252
|
interface AssembledReviewPrompt {
|
|
4610
4253
|
prompt: string;
|
|
@@ -4618,8 +4261,7 @@ declare const assembleReviewPrompt: ({
|
|
|
4618
4261
|
kind,
|
|
4619
4262
|
patchId,
|
|
4620
4263
|
priorLedgerEntries,
|
|
4621
|
-
profile
|
|
4622
|
-
standingChecklist
|
|
4264
|
+
profile
|
|
4623
4265
|
}: AssembleReviewPromptInput) => AssembledReviewPrompt;
|
|
4624
4266
|
//#endregion
|
|
4625
4267
|
//#region src/review-ladder-trace.d.ts
|
|
@@ -4701,4 +4343,4 @@ interface CreateProgramOptions {
|
|
|
4701
4343
|
declare function createProgram(options?: CreateProgramOptions): Command;
|
|
4702
4344
|
declare function run(argv?: string[]): Promise<void>;
|
|
4703
4345
|
//#endregion
|
|
4704
|
-
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPublishFollowUp,
|
|
4346
|
+
export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPublishFollowUp, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, retroEnvelopeSchemaVersionOf, retroEnvelopeV1Schema, retroEpicReference, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
|