@patronage/software-factory 1.0.0-alpha.34 → 1.0.0-alpha.35

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/index.d.ts CHANGED
@@ -17,8 +17,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
17
17
  boundary: z.ZodString;
18
18
  closeout: z.ZodOptional<z.ZodObject<{
19
19
  review: z.ZodEnum<{
20
- "independent-model": "independent-model";
21
20
  oracle: "oracle";
21
+ "independent-model": "independent-model";
22
22
  human: "human";
23
23
  }>;
24
24
  }, z.core.$loose>>;
@@ -26,8 +26,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
26
26
  integrationBranch: z.ZodOptional<z.ZodString>;
27
27
  schemaVersion: z.ZodLiteral<1>;
28
28
  topology: z.ZodEnum<{
29
- "each-to-main": "each-to-main";
30
29
  flagged: "flagged";
30
+ "each-to-main": "each-to-main";
31
31
  stacked: "stacked";
32
32
  "each-to-epic": "each-to-epic";
33
33
  }>;
@@ -36,8 +36,8 @@ declare const boundaryManifestBaseSchema: z.ZodObject<{
36
36
  issues: z.ZodArray<z.ZodNumber>;
37
37
  name: z.ZodString;
38
38
  review: z.ZodEnum<{
39
- "independent-model": "independent-model";
40
39
  oracle: "oracle";
40
+ "independent-model": "independent-model";
41
41
  human: "human";
42
42
  }>;
43
43
  }, z.core.$loose>>;
@@ -46,8 +46,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
46
46
  boundary: z.ZodString;
47
47
  closeout: z.ZodOptional<z.ZodObject<{
48
48
  review: z.ZodEnum<{
49
- "independent-model": "independent-model";
50
49
  oracle: "oracle";
50
+ "independent-model": "independent-model";
51
51
  human: "human";
52
52
  }>;
53
53
  }, z.core.$loose>>;
@@ -55,8 +55,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
55
55
  integrationBranch: z.ZodOptional<z.ZodString>;
56
56
  schemaVersion: z.ZodLiteral<1>;
57
57
  topology: z.ZodEnum<{
58
- "each-to-main": "each-to-main";
59
58
  flagged: "flagged";
59
+ "each-to-main": "each-to-main";
60
60
  stacked: "stacked";
61
61
  "each-to-epic": "each-to-epic";
62
62
  }>;
@@ -65,8 +65,8 @@ declare const boundaryManifestSchema: z.ZodObject<{
65
65
  issues: z.ZodArray<z.ZodNumber>;
66
66
  name: z.ZodString;
67
67
  review: z.ZodEnum<{
68
- "independent-model": "independent-model";
69
68
  oracle: "oracle";
69
+ "independent-model": "independent-model";
70
70
  human: "human";
71
71
  }>;
72
72
  }, z.core.$loose>>;
@@ -151,8 +151,8 @@ declare const boundaryReviewProofBaseSchema: z.ZodObject<{
151
151
  }>;
152
152
  producer: z.ZodString;
153
153
  rung: z.ZodEnum<{
154
- "independent-model": "independent-model";
155
154
  oracle: "oracle";
155
+ "independent-model": "independent-model";
156
156
  human: "human";
157
157
  }>;
158
158
  schemaVersion: z.ZodLiteral<1>;
@@ -195,8 +195,8 @@ declare const boundaryReviewProofSchema: z.ZodObject<{
195
195
  }>;
196
196
  producer: z.ZodString;
197
197
  rung: z.ZodEnum<{
198
- "independent-model": "independent-model";
199
198
  oracle: "oracle";
199
+ "independent-model": "independent-model";
200
200
  human: "human";
201
201
  }>;
202
202
  schemaVersion: z.ZodLiteral<1>;
@@ -1303,6 +1303,212 @@ interface FactoryAppAccessDependencies {
1303
1303
  */
1304
1304
  type ResolvedPrVerifyMode = "docs-only" | "trivial" | "full";
1305
1305
  //#endregion
1306
+ //#region src/pr-verify-proof-contract.d.ts
1307
+ /**
1308
+ * The pr:verify proof versions a reader accepts: the current one only (#920
1309
+ * item 1). #917 narrowed the pr:ready reader the same way. A pr:verify proof
1310
+ * is per-candidate and short-lived — it is rewritten on every head — so no
1311
+ * stored v1–v3 proof can outlive the release that drops it. Pre-1.0 posture
1312
+ * applies: one current contract, no compat reader. A consumer on an older
1313
+ * factory must adopt this release before HQ ingests its pr:verify proofs.
1314
+ */
1315
+ declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [4];
1316
+ type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
1317
+ interface PrVerifyCommandResult {
1318
+ command: string;
1319
+ description: string;
1320
+ /**
1321
+ * Epic #550 wave 3 (#430): the profile's declared impact target for this
1322
+ * command, recorded from v4 on. It is the proof's own command→target
1323
+ * mapping: a `notRequiredCommands` entry must name the target recorded HERE
1324
+ * for the same command, so a withholding cannot point at whichever released
1325
+ * target happens to be convenient. Absent for a command the profile does
1326
+ * not scope.
1327
+ */
1328
+ impactTarget?: string;
1329
+ name: string;
1330
+ scope: "docs-only" | "trivial" | "full";
1331
+ }
1332
+ /**
1333
+ * One failing test a verification command reported (#1035).
1334
+ *
1335
+ * The proof keeps the failing test's IDENTITY and its failure CLASS, and
1336
+ * nothing else. That is enough to decide retry-or-fix — a `timeout` under
1337
+ * machine load is a flake, an `assertion` is a real break — without rerunning
1338
+ * the aggregate to read a title off the console.
1339
+ *
1340
+ * It deliberately keeps no raw output tail and no error message body. This
1341
+ * payload is transmitted to HQ ingest, and arbitrary command output can carry
1342
+ * secrets (an echoed environment, a connection string inside a stack frame). A
1343
+ * file path, a test title, and a closed `kind` enum cannot. The cost is the
1344
+ * assertion diff and the stack frames: they help you FIX a failure, and the
1345
+ * operator still reads them from the run's own console output.
1346
+ */
1347
+ interface PrVerifyTestFailure {
1348
+ /** The test file the reporter named, as the reporter wrote it. */
1349
+ file: string;
1350
+ /**
1351
+ * The failure class. `timeout` is the test-timeout error vitest raises at
1352
+ * its own ceiling; `assertion` is a failed expectation; `error` is every
1353
+ * other thrown failure.
1354
+ */
1355
+ kind: "assertion" | "error" | "timeout";
1356
+ /** The full test title, suite names included, as the reporter wrote it. */
1357
+ title: string;
1358
+ }
1359
+ interface PrVerifyExecutedCommand {
1360
+ command: string;
1361
+ counts?: {
1362
+ testFiles?: number;
1363
+ tests?: number;
1364
+ };
1365
+ durationMs: number;
1366
+ exitCode: number;
1367
+ /**
1368
+ * The failing tests this command reported (#1035). Present only when the
1369
+ * command produced parseable failures, so a passing command's record is
1370
+ * byte-identical to the one it wrote before this field existed.
1371
+ */
1372
+ failures?: PrVerifyTestFailure[];
1373
+ name: string;
1374
+ scope: "docs-only" | "trivial" | "full";
1375
+ }
1376
+ /**
1377
+ * Epic #550 wave 3 (#430): a verification command the impact stamp proved this
1378
+ * candidate cannot reach, so the battery did not run it.
1379
+ *
1380
+ * The completeness invariant lives in the pairing: `verificationCommands`
1381
+ * records every command the resolved mode selected, `executedCommands` records
1382
+ * what ran, and this list records the rest WITH the stamp's own basis. A
1383
+ * withheld stack is therefore never silently absent from the proof — it is
1384
+ * present, named, and explained.
1385
+ */
1386
+ interface PrVerifyNotRequiredCommand {
1387
+ basis: string;
1388
+ impactTarget: string;
1389
+ name: string;
1390
+ }
1391
+ /**
1392
+ * Epic #758 (#762): a consumer package a stamp-scoped selection skipped, and
1393
+ * why. Bound to the proof's stamp identity — refused when the proof records no
1394
+ * stamp. The factory does not write this list; consumers do.
1395
+ */
1396
+ interface PrVerifyNotDemandedRecord {
1397
+ basis: string;
1398
+ name: string;
1399
+ }
1400
+ interface PrVerifyProof {
1401
+ schemaVersion: PrVerifySchemaVersion;
1402
+ authoringSession: string;
1403
+ base: string;
1404
+ /**
1405
+ * The commit `base` resolved to when this proof was written (#1132): the
1406
+ * live pull request base tip, or the freshly fetched ref. Optional and
1407
+ * additive; a proof written before it existed parses unchanged.
1408
+ */
1409
+ baseSha?: string;
1410
+ baselineFullProofs?: {
1411
+ base: string;
1412
+ changedFiles: string[];
1413
+ headSha: string;
1414
+ profilePath: string;
1415
+ projectKey: string;
1416
+ repository: string;
1417
+ }[];
1418
+ catchUpRecognition?: CatchUpRecognition;
1419
+ changedFiles: string[];
1420
+ classification: DiffClassification;
1421
+ classificationReasons: string[];
1422
+ command: "patronage-factory pr:verify";
1423
+ durationMs: number;
1424
+ endedAt: string;
1425
+ executedCommands?: PrVerifyExecutedCommand[];
1426
+ headSha: string;
1427
+ impactStamp?: ImpactStamp;
1428
+ mode: ResolvedPrVerifyMode;
1429
+ mergeBaseSha?: string;
1430
+ notDemandedRecords?: PrVerifyNotDemandedRecord[];
1431
+ notRequiredCommands?: PrVerifyNotRequiredCommand[];
1432
+ outcome?: "aborted" | "passed";
1433
+ patchId?: string;
1434
+ /**
1435
+ * The review policy identity this verification run resolved (#922 Slice B).
1436
+ *
1437
+ * Verification demands no review mode of its own. It records the identity so
1438
+ * `pr:ready` can see whether the stage that produced this proof judged the
1439
+ * candidate under the same policy readiness resolves. Optional, and normally
1440
+ * `unresolved` on the first run of a branch: a candidate is verified before
1441
+ * it has a pull request, and there is no authority to read without one.
1442
+ */
1443
+ policyResolution?: PolicyResolution;
1444
+ profilePath: string;
1445
+ projectKey: string;
1446
+ repository: string;
1447
+ startedAt: string;
1448
+ verificationCommands: PrVerifyCommandResult[];
1449
+ }
1450
+ type PrVerifyBaselineFullProof = NonNullable<PrVerifyProof["baselineFullProofs"]>[number];
1451
+ declare function validatePrVerifyProof(value: unknown): PrVerifyProof;
1452
+ //#endregion
1453
+ //#region src/pr-verify-check-payload.d.ts
1454
+ /**
1455
+ * Machine-readable binding carried on the `patronage-factory/pr-verify` check
1456
+ * run (#247), alongside the human-readable prose summary.
1457
+ *
1458
+ * It records *what was verified*, for the head SHA it was written for. It
1459
+ * grants nothing and gates nothing on its own: a consumer still has to verify
1460
+ * the producing App, the conclusion, and its own freshness rule. The payload
1461
+ * is a fenced JSON document in `output.text`.
1462
+ */
1463
+ declare const PR_VERIFY_CHECK_PAYLOAD_KIND: "pr-verify-proof-binding";
1464
+ declare const PR_VERIFY_CHECK_PAYLOAD_SCHEMA_VERSION = 1;
1465
+ /**
1466
+ * `unknown` covers a proof written by a schema version that did not record a
1467
+ * classification. A consumer must treat it as "not stated", never as trivial.
1468
+ */
1469
+ type PrVerifyPayloadClassification = DiffClassification | "unknown";
1470
+ interface PrVerifyCheckPayload {
1471
+ /**
1472
+ * Factory diff classification. Deliberately distinct from `mode`: the
1473
+ * workflow path filter and the factory classifier use different rules, so a
1474
+ * consumer must be able to see both.
1475
+ */
1476
+ classification: PrVerifyPayloadClassification;
1477
+ /** Names of the verification commands that actually ran, in run order. */
1478
+ executedCommands: string[];
1479
+ /** The commit this verification describes. Binding is by tree, not patch. */
1480
+ headSha: string;
1481
+ /**
1482
+ * The proof's own identity-bound impact stamp. Kept opaque here: the hosted
1483
+ * proof-reuse gate validates the complete release tuple before subtracting
1484
+ * any command, and malformed data must remain visible to that fail-closed
1485
+ * reader rather than being normalized away during publication.
1486
+ */
1487
+ impactStamp?: unknown;
1488
+ kind: typeof PR_VERIFY_CHECK_PAYLOAD_KIND;
1489
+ /**
1490
+ * Resolved verification mode. `docs-only` and `trivial` run reduced command
1491
+ * suites and publish the same successful check run as `full`, so this field
1492
+ * is what keeps them from being confusable after the fact.
1493
+ */
1494
+ mode: ResolvedPrVerifyMode;
1495
+ /** Commands the proof withheld, including their claimed target and prose basis. */
1496
+ notRequiredCommands?: unknown;
1497
+ outcome: "aborted" | "passed";
1498
+ /** Stable patch id, when the proof recorded one. Informational only. */
1499
+ patchId?: string;
1500
+ /** `schemaVersion` of the local pr:verify proof this was rendered from. */
1501
+ proofSchemaVersion: number;
1502
+ /** `<owner>/<name>` the proof was produced for. */
1503
+ repository?: string;
1504
+ /** Version of *this* payload shape. */
1505
+ schemaVersion: typeof PR_VERIFY_CHECK_PAYLOAD_SCHEMA_VERSION;
1506
+ /** The proof's command-to-impact-target bindings used to validate releases. */
1507
+ verificationCommands?: unknown;
1508
+ /** Original validated proof. Absence requires normal verification on a fresh runner. */
1509
+ verificationProof?: PrVerifyProof;
1510
+ }
1511
+ //#endregion
1306
1512
  //#region src/pr-verify-status.d.ts
1307
1513
  type CommitStatusState = "failure" | "pending" | "success";
1308
1514
  interface PostCommitStatusInput {
@@ -1408,6 +1614,42 @@ interface CheckRunDependencies extends FactoryAppAccessDependencies {
1408
1614
  declare function ensureFactoryCheckRunPublished(input: PublishFactoryCheckInput, dependencies?: CheckRunDependencies & {
1409
1615
  onDiagnostic?: (message: string) => void;
1410
1616
  }): Promise<boolean>;
1617
+ type GhJsonRunner = <T>(args: string[]) => T;
1618
+ interface FactoryCheckRunProducer {
1619
+ identity: string;
1620
+ mode: "app";
1621
+ }
1622
+ interface PrVerifyProofBinding {
1623
+ completedAtMs: number;
1624
+ conclusion: string;
1625
+ payload: PrVerifyCheckPayload;
1626
+ producer: FactoryCheckRunProducer;
1627
+ }
1628
+ /**
1629
+ * Read the machine-readable `pr:verify` binding for one commit (#247).
1630
+ *
1631
+ * Deliberately narrow: it reads check runs only, and only those whose `app`
1632
+ * identity matches the configured factory App. It never consults commit
1633
+ * statuses. `patronage-factory/pr-verify` is postable as a commit status by any
1634
+ * token with write access, so that surface stays a human-readable mirror and
1635
+ * can never satisfy a consumer that wants proof. Absent, foreign, or
1636
+ * unparseable ⇒ `undefined` (fail closed).
1637
+ */
1638
+ declare function fetchPrVerifyProofBinding({
1639
+ expectedAppId,
1640
+ githubApp,
1641
+ owner,
1642
+ repo,
1643
+ sha,
1644
+ runJson
1645
+ }: {
1646
+ /** Overrides the configured App id — CI has no user config (#247 part 3). */expectedAppId?: string;
1647
+ githubApp?: GithubAppConfig;
1648
+ owner: string;
1649
+ repo: string;
1650
+ sha: string;
1651
+ runJson?: GhJsonRunner;
1652
+ }): PrVerifyProofBinding | undefined;
1411
1653
  //#endregion
1412
1654
  //#region src/merge-freeze.d.ts
1413
1655
  declare const MERGE_FREEZE_CHECK_NAME = "patronage-factory/merge-freeze";
@@ -1479,18 +1721,30 @@ interface RunningMergeFreezeWitness {
1479
1721
  /** The running `patronage-factory/merge-freeze` check-run id. */
1480
1722
  runId: number;
1481
1723
  }
1724
+ /** A push workflow run's status while it still owes a generation. */
1725
+ type PendingWorkflowRunStatus = "in_progress" | "pending" | "queued" | "requested" | "waiting";
1482
1726
  /**
1483
1727
  * The evidence that a generation is settling because it is still owed (#521).
1728
+ *
1729
+ * The witness is the freeze-writing workflow's push run on the tip, identified
1730
+ * through lineage (#1276): the immediate parent's settled generation records
1731
+ * the workflow run that wrote it, that run names its workflow, and the same
1732
+ * workflow's pending push run on the tip owes the tip's generation. It is the
1733
+ * workflow run rather than the `verify` job's check run because GitHub creates
1734
+ * a job's check run only when the job is dispatched, which for the `verify`
1735
+ * summary job is near the end of the push Verify.
1484
1736
  */
1485
1737
  interface AwaitedMergeFreezeWitness {
1486
1738
  /** The base tip whose generation is awaited. */
1487
1739
  headSha: string;
1488
1740
  /** The immediate parent whose settled generation proves the writer runs. */
1489
1741
  parentSha: string;
1490
- /** The source-pinned hosted verify run that owes the generation. */
1491
- verifyRunId: number;
1742
+ /** The workflow whose run wrote the parent's settled generation. */
1743
+ workflowId: number;
1744
+ /** That workflow's push run on the tip, which owes the generation. */
1745
+ workflowRunId: number;
1492
1746
  /** That run's status. A completed run owes nothing, so it is not settling. */
1493
- verifyStatus: "in_progress" | "queued";
1747
+ workflowRunStatus: PendingWorkflowRunStatus;
1494
1748
  }
1495
1749
  /**
1496
1750
  * The two settling phases, each with the witness that proves it (#890).
@@ -1537,6 +1791,14 @@ interface GitHubCheckRunMergeFreezeApi {
1537
1791
  name: string;
1538
1792
  }) => unknown;
1539
1793
  parent?: (input: MergeFreezeStoreInput) => unknown;
1794
+ /** One GitHub Actions workflow run, by id (`headSha` is not consulted). */
1795
+ workflowRun?: (input: MergeFreezeStoreInput & {
1796
+ runId: number;
1797
+ }) => unknown;
1798
+ /** A workflow's push runs on `headSha`, as `{ workflow_runs }`. */
1799
+ workflowRuns?: (input: MergeFreezeStoreInput & {
1800
+ workflowId: number;
1801
+ }) => unknown;
1540
1802
  }
1541
1803
  declare function createGitHubCheckRunMergeFreezeStore(api: GitHubCheckRunMergeFreezeApi): MergeFreezeAuthority;
1542
1804
  //#endregion
@@ -1888,153 +2150,6 @@ interface UpsertFactoryPrStatusCommentResult {
1888
2150
  url: string;
1889
2151
  }
1890
2152
  declare function upsertFactoryPrStatusComment(input: UpsertFactoryPrStatusCommentInput, dependencies?: UpsertFactoryPrStatusCommentDependencies): Promise<UpsertFactoryPrStatusCommentResult>;
1891
- //#endregion
1892
- //#region src/pr-verify-proof-contract.d.ts
1893
- /**
1894
- * The pr:verify proof versions a reader accepts: the current one only (#920
1895
- * item 1). #917 narrowed the pr:ready reader the same way. A pr:verify proof
1896
- * is per-candidate and short-lived — it is rewritten on every head — so no
1897
- * stored v1–v3 proof can outlive the release that drops it. Pre-1.0 posture
1898
- * applies: one current contract, no compat reader. A consumer on an older
1899
- * factory must adopt this release before HQ ingests its pr:verify proofs.
1900
- */
1901
- declare const SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS: readonly [4];
1902
- type PrVerifySchemaVersion = (typeof SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS)[number];
1903
- interface PrVerifyCommandResult {
1904
- command: string;
1905
- description: string;
1906
- /**
1907
- * Epic #550 wave 3 (#430): the profile's declared impact target for this
1908
- * command, recorded from v4 on. It is the proof's own command→target
1909
- * mapping: a `notRequiredCommands` entry must name the target recorded HERE
1910
- * for the same command, so a withholding cannot point at whichever released
1911
- * target happens to be convenient. Absent for a command the profile does
1912
- * not scope.
1913
- */
1914
- impactTarget?: string;
1915
- name: string;
1916
- scope: "docs-only" | "trivial" | "full";
1917
- }
1918
- /**
1919
- * One failing test a verification command reported (#1035).
1920
- *
1921
- * The proof keeps the failing test's IDENTITY and its failure CLASS, and
1922
- * nothing else. That is enough to decide retry-or-fix — a `timeout` under
1923
- * machine load is a flake, an `assertion` is a real break — without rerunning
1924
- * the aggregate to read a title off the console.
1925
- *
1926
- * It deliberately keeps no raw output tail and no error message body. This
1927
- * payload is transmitted to HQ ingest, and arbitrary command output can carry
1928
- * secrets (an echoed environment, a connection string inside a stack frame). A
1929
- * file path, a test title, and a closed `kind` enum cannot. The cost is the
1930
- * assertion diff and the stack frames: they help you FIX a failure, and the
1931
- * operator still reads them from the run's own console output.
1932
- */
1933
- interface PrVerifyTestFailure {
1934
- /** The test file the reporter named, as the reporter wrote it. */
1935
- file: string;
1936
- /**
1937
- * The failure class. `timeout` is the test-timeout error vitest raises at
1938
- * its own ceiling; `assertion` is a failed expectation; `error` is every
1939
- * other thrown failure.
1940
- */
1941
- kind: "assertion" | "error" | "timeout";
1942
- /** The full test title, suite names included, as the reporter wrote it. */
1943
- title: string;
1944
- }
1945
- interface PrVerifyExecutedCommand {
1946
- command: string;
1947
- counts?: {
1948
- testFiles?: number;
1949
- tests?: number;
1950
- };
1951
- durationMs: number;
1952
- exitCode: number;
1953
- /**
1954
- * The failing tests this command reported (#1035). Present only when the
1955
- * command produced parseable failures, so a passing command's record is
1956
- * byte-identical to the one it wrote before this field existed.
1957
- */
1958
- failures?: PrVerifyTestFailure[];
1959
- name: string;
1960
- scope: "docs-only" | "trivial" | "full";
1961
- }
1962
- /**
1963
- * Epic #550 wave 3 (#430): a verification command the impact stamp proved this
1964
- * candidate cannot reach, so the battery did not run it.
1965
- *
1966
- * The completeness invariant lives in the pairing: `verificationCommands`
1967
- * records every command the resolved mode selected, `executedCommands` records
1968
- * what ran, and this list records the rest WITH the stamp's own basis. A
1969
- * withheld stack is therefore never silently absent from the proof — it is
1970
- * present, named, and explained.
1971
- */
1972
- interface PrVerifyNotRequiredCommand {
1973
- basis: string;
1974
- impactTarget: string;
1975
- name: string;
1976
- }
1977
- /**
1978
- * Epic #758 (#762): a consumer package a stamp-scoped selection skipped, and
1979
- * why. Bound to the proof's stamp identity — refused when the proof records no
1980
- * stamp. The factory does not write this list; consumers do.
1981
- */
1982
- interface PrVerifyNotDemandedRecord {
1983
- basis: string;
1984
- name: string;
1985
- }
1986
- interface PrVerifyProof {
1987
- schemaVersion: PrVerifySchemaVersion;
1988
- authoringSession: string;
1989
- base: string;
1990
- /**
1991
- * The commit `base` resolved to when this proof was written (#1132): the
1992
- * live pull request base tip, or the freshly fetched ref. Optional and
1993
- * additive; a proof written before it existed parses unchanged.
1994
- */
1995
- baseSha?: string;
1996
- baselineFullProofs?: {
1997
- base: string;
1998
- changedFiles: string[];
1999
- headSha: string;
2000
- profilePath: string;
2001
- projectKey: string;
2002
- repository: string;
2003
- }[];
2004
- catchUpRecognition?: CatchUpRecognition;
2005
- changedFiles: string[];
2006
- classification: DiffClassification;
2007
- classificationReasons: string[];
2008
- command: "patronage-factory pr:verify";
2009
- durationMs: number;
2010
- endedAt: string;
2011
- executedCommands?: PrVerifyExecutedCommand[];
2012
- headSha: string;
2013
- impactStamp?: ImpactStamp;
2014
- mode: ResolvedPrVerifyMode;
2015
- mergeBaseSha?: string;
2016
- notDemandedRecords?: PrVerifyNotDemandedRecord[];
2017
- notRequiredCommands?: PrVerifyNotRequiredCommand[];
2018
- outcome?: "aborted" | "passed";
2019
- patchId?: string;
2020
- /**
2021
- * The review policy identity this verification run resolved (#922 Slice B).
2022
- *
2023
- * Verification demands no review mode of its own. It records the identity so
2024
- * `pr:ready` can see whether the stage that produced this proof judged the
2025
- * candidate under the same policy readiness resolves. Optional, and normally
2026
- * `unresolved` on the first run of a branch: a candidate is verified before
2027
- * it has a pull request, and there is no authority to read without one.
2028
- */
2029
- policyResolution?: PolicyResolution;
2030
- profilePath: string;
2031
- projectKey: string;
2032
- repository: string;
2033
- startedAt: string;
2034
- verificationCommands: PrVerifyCommandResult[];
2035
- }
2036
- type PrVerifyBaselineFullProof = NonNullable<PrVerifyProof["baselineFullProofs"]>[number];
2037
- declare function validatePrVerifyProof(value: unknown): PrVerifyProof;
2038
2153
  declare namespace verification_proof_d_exports {
2039
2154
  export { PrVerifyBaselineFullProof, PrVerifyCommandResult, PrVerifyExecutedCommand, PrVerifyNotDemandedRecord, PrVerifyNotRequiredCommand, PrVerifyProof, PrVerifySchemaVersion, PrVerifyTestFailure, ResolvedPrVerifyMode, SUPPORTED_PR_VERIFY_SCHEMA_VERSIONS, VerificationHeadShas, VerificationProofState, VerifiedHeadShas, prVerifyFullHeadShasForDiff, prVerifyProofHeadShas, readPrVerifyProof, resolveVerifyProofApplicability, trustedCatchUpRecognition, trustedImpactStamp, validatePrVerifyProof, verificationProofApplicabilityFor, verificationProofBlockingReason, verificationProofForReadiness, verificationProofStateFor, verifyProofIdentityMatches, verifyProofPassed };
2040
2155
  }
@@ -2688,8 +2803,8 @@ declare const evidenceEnvelopeBaseSchema: z.ZodObject<{
2688
2803
  producer: z.ZodString;
2689
2804
  requestId: z.ZodOptional<z.ZodString>;
2690
2805
  rung: z.ZodOptional<z.ZodEnum<{
2691
- "independent-model": "independent-model";
2692
2806
  oracle: "oracle";
2807
+ "independent-model": "independent-model";
2693
2808
  human: "human";
2694
2809
  }>>;
2695
2810
  schemaVersion: z.ZodLiteral<1>;
@@ -2715,8 +2830,8 @@ declare const evidenceEnvelopeSchema: z.ZodObject<{
2715
2830
  producer: z.ZodString;
2716
2831
  requestId: z.ZodOptional<z.ZodString>;
2717
2832
  rung: z.ZodOptional<z.ZodEnum<{
2718
- "independent-model": "independent-model";
2719
2833
  oracle: "oracle";
2834
+ "independent-model": "independent-model";
2720
2835
  human: "human";
2721
2836
  }>>;
2722
2837
  schemaVersion: z.ZodLiteral<1>;
@@ -2936,8 +3051,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
2936
3051
  wave: z.ZodString;
2937
3052
  }, z.core.$strip>>;
2938
3053
  demandedRung: z.ZodOptional<z.ZodEnum<{
2939
- "independent-model": "independent-model";
2940
3054
  oracle: "oracle";
3055
+ "independent-model": "independent-model";
2941
3056
  human: "human";
2942
3057
  }>>;
2943
3058
  epicIssue: z.ZodNumber;
@@ -2952,8 +3067,8 @@ declare const boundaryCheckProofSchema: z.ZodObject<{
2952
3067
  commentUrl: z.ZodOptional<z.ZodString>;
2953
3068
  producer: z.ZodString;
2954
3069
  rung: z.ZodEnum<{
2955
- "independent-model": "independent-model";
2956
3070
  oracle: "oracle";
3071
+ "independent-model": "independent-model";
2957
3072
  human: "human";
2958
3073
  }>;
2959
3074
  sessionId: z.ZodOptional<z.ZodString>;
@@ -3264,6 +3379,8 @@ interface PrVerifyArgs extends LoadProjectProfileInput {
3264
3379
  mode: PrVerifyMode;
3265
3380
  output?: string;
3266
3381
  requireKnownAuthoringSession?: boolean;
3382
+ /** Recover the original proof from the accepted exact-head App binding. */
3383
+ reuseAccepted?: boolean;
3267
3384
  }
3268
3385
  interface PrVerifyGitDependencies {
3269
3386
  changedFiles: (cwd: string, base: string) => string[];
@@ -3282,6 +3399,7 @@ interface PrVerifyGitDependencies {
3282
3399
  stablePatchId: (cwd: string, base: string) => string;
3283
3400
  }
3284
3401
  interface PrVerifyDependencies {
3402
+ fetchVerifyBinding?: typeof fetchPrVerifyProofBinding;
3285
3403
  /**
3286
3404
  * The authoritative base-policy reader (#922). Injectable for the same
3287
3405
  * reason `pr:ready` injects it: an unstated authority must be a refusal a
@@ -4177,18 +4295,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
4177
4295
  }>;
4178
4296
  model: z.ZodString;
4179
4297
  tier: z.ZodEnum<{
4180
- oracle: "oracle";
4181
4298
  review: "review";
4182
4299
  delegate: "delegate";
4300
+ oracle: "oracle";
4183
4301
  workhorse: "workhorse";
4184
4302
  scout: "scout";
4185
4303
  }>;
4186
4304
  }, z.core.$strict>;
4187
4305
  startedAt: z.ZodString;
4188
4306
  tier: z.ZodEnum<{
4189
- oracle: "oracle";
4190
4307
  review: "review";
4191
4308
  delegate: "delegate";
4309
+ oracle: "oracle";
4192
4310
  workhorse: "workhorse";
4193
4311
  scout: "scout";
4194
4312
  }>;
@@ -4256,18 +4374,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
4256
4374
  }>;
4257
4375
  model: z.ZodString;
4258
4376
  tier: z.ZodEnum<{
4259
- oracle: "oracle";
4260
4377
  review: "review";
4261
4378
  delegate: "delegate";
4379
+ oracle: "oracle";
4262
4380
  workhorse: "workhorse";
4263
4381
  scout: "scout";
4264
4382
  }>;
4265
4383
  }, z.core.$strict>;
4266
4384
  startedAt: z.ZodString;
4267
4385
  tier: z.ZodEnum<{
4268
- oracle: "oracle";
4269
4386
  review: "review";
4270
4387
  delegate: "delegate";
4388
+ oracle: "oracle";
4271
4389
  workhorse: "workhorse";
4272
4390
  scout: "scout";
4273
4391
  }>;
@@ -4326,18 +4444,18 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
4326
4444
  }>;
4327
4445
  model: z.ZodString;
4328
4446
  tier: z.ZodEnum<{
4329
- oracle: "oracle";
4330
4447
  review: "review";
4331
4448
  delegate: "delegate";
4449
+ oracle: "oracle";
4332
4450
  workhorse: "workhorse";
4333
4451
  scout: "scout";
4334
4452
  }>;
4335
4453
  }, z.core.$strict>;
4336
4454
  startedAt: z.ZodString;
4337
4455
  tier: z.ZodEnum<{
4338
- oracle: "oracle";
4339
4456
  review: "review";
4340
4457
  delegate: "delegate";
4458
+ oracle: "oracle";
4341
4459
  workhorse: "workhorse";
4342
4460
  scout: "scout";
4343
4461
  }>;
@@ -4386,11 +4504,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
4386
4504
  engine: string;
4387
4505
  layerSource: "committedDefault" | "operatorSession" | "userConfig";
4388
4506
  model: string;
4389
- tier: "oracle" | "review" | "delegate" | "workhorse" | "scout";
4507
+ tier: "review" | "delegate" | "oracle" | "workhorse" | "scout";
4390
4508
  fallbackTier?: "delegate" | undefined;
4391
4509
  };
4392
4510
  startedAt: string;
4393
- tier: "oracle" | "review" | "delegate" | "workhorse" | "scout";
4511
+ tier: "review" | "delegate" | "oracle" | "workhorse" | "scout";
4394
4512
  tokenUsage: {
4395
4513
  source: "cursor-csv" | "codex-json" | "cursor-json" | "claude-json";
4396
4514
  status: "available";