@kungfu-tech/buildchain 4.0.1-alpha.2 → 4.0.1-alpha.4

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.
Files changed (78) hide show
  1. package/architecture/decisions/0003-two-phase-delivery-warrant.md +152 -0
  2. package/architecture/internal-capabilities.json +94 -0
  3. package/architecture/maintainability-policy.json +75 -8
  4. package/architecture/v3-core-mechanism-inventory.json +2 -0
  5. package/architecture/v4-delivery-authority-parity.json +250 -0
  6. package/architecture/v4-delivery-warrant-shadow-fixtures.json +41 -9
  7. package/bin/buildchain.mjs +9 -1
  8. package/contracts/dev-delivery-authority-v2.schema.json +662 -0
  9. package/dist/site/agent-index.json +1 -0
  10. package/dist/site/artifact-schemas.json +2 -0
  11. package/dist/site/buildchain-contract.json +91 -8
  12. package/dist/site/buildchain-site.json +169 -18
  13. package/dist/site/capability-registry.json +2 -2
  14. package/dist/site/cli-registry.json +46 -2
  15. package/dist/site/kfd-claims.json +43 -9
  16. package/dist/site/kfd-upstream-aggregate.json +1 -1
  17. package/dist/site/manual-registry.json +3 -3
  18. package/dist/site/node-api-registry.json +1694 -165
  19. package/dist/site/page-registry.json +162 -11
  20. package/dist/site/public-surface-audit.json +367 -7
  21. package/dist/site/publication-registry.json +4 -4
  22. package/dist/site/release-provenance.json +2 -0
  23. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +662 -0
  24. package/dist/site/site-manifest.json +7 -7
  25. package/dist/site/workflow-registry.json +22 -6
  26. package/docs/MAP.md +1 -0
  27. package/docs/cli-reference.md +211 -13
  28. package/docs/dev-delivery-qualification-landing-adr.md +251 -0
  29. package/docs/dev-delivery-warrant.md +330 -38
  30. package/docs/node-api-reference.md +113 -53
  31. package/package.json +5 -1
  32. package/packages/core/buildchain-contract.js +3 -2
  33. package/packages/core/dev-delivery-authority-candidate.js +270 -0
  34. package/packages/core/dev-delivery-authority-evidence.js +146 -0
  35. package/packages/core/dev-delivery-authority-landing.js +461 -0
  36. package/packages/core/dev-delivery-authority-observation.js +48 -0
  37. package/packages/core/dev-delivery-authority-qualification.js +591 -0
  38. package/packages/core/dev-delivery-authority-settlement.js +213 -0
  39. package/packages/core/dev-delivery-authority-state.js +583 -0
  40. package/packages/core/dev-delivery-candidate-identity.js +13 -0
  41. package/packages/core/dev-delivery-contract-surface.js +76 -0
  42. package/packages/core/dev-delivery-execution-failure.js +133 -0
  43. package/packages/core/dev-delivery-execution-transfer.js +572 -0
  44. package/packages/core/dev-delivery-landing-admission-core.js +119 -0
  45. package/packages/core/dev-delivery-landing-readback.js +598 -0
  46. package/packages/core/dev-delivery-landing-terminal-evidence.js +271 -0
  47. package/packages/core/dev-delivery-landing-testing-port.js +6 -0
  48. package/packages/core/dev-delivery-native-execution.js +110 -0
  49. package/packages/core/dev-delivery-native-proof.js +546 -0
  50. package/packages/core/dev-delivery-process-boundary.js +550 -0
  51. package/packages/core/dev-delivery-provider-attempt.js +127 -0
  52. package/packages/core/dev-delivery-provider-heartbeat.js +370 -0
  53. package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
  54. package/packages/core/dev-delivery-warrant-qualification.js +145 -0
  55. package/packages/core/dev-delivery-warrant-settlement.js +237 -36
  56. package/packages/core/dev-delivery-warrant-state.js +564 -0
  57. package/packages/core/dev-delivery-warrant.js +321 -368
  58. package/scripts/buildchain-cli-help.mjs +11 -2
  59. package/scripts/check-v4-floating-consumer-policy-contract.mjs +1 -1
  60. package/scripts/dev-delivery-authority-command-adapters.mjs +206 -0
  61. package/scripts/dev-delivery-authority-provider.mjs +28 -0
  62. package/scripts/dev-delivery-authority.mjs +490 -0
  63. package/scripts/dev-delivery-native-run.mjs +177 -0
  64. package/scripts/dev-delivery-process-boundary.mjs +260 -0
  65. package/scripts/dev-delivery-proof.mjs +67 -2
  66. package/scripts/dev-delivery-provider-heartbeat.mjs +215 -0
  67. package/scripts/dev-delivery-two-phase-resume.mjs +345 -0
  68. package/scripts/dev-delivery-two-phase.mjs +573 -0
  69. package/scripts/dev-delivery-warrant-options.mjs +266 -0
  70. package/scripts/dev-delivery-warrant-store.mjs +227 -0
  71. package/scripts/dev-delivery-warrant.mjs +227 -193
  72. package/scripts/dev-pr-auto-merge.mjs +1 -1
  73. package/scripts/dev-pr-delivery-warrant.mjs +10 -0
  74. package/scripts/generate-site-bundle.mjs +26 -4
  75. package/scripts/npm-publish-transaction.mjs +2 -2
  76. package/scripts/release-train-self-dogfood.mjs +94 -92
  77. package/scripts/site-capability-metadata.mjs +12 -0
  78. package/templates/native-dev-delivery.yml +143 -0
@@ -0,0 +1,152 @@
1
+ ---
2
+ status: accepted
3
+ period: 2026-08-11
4
+ theme: two-phase-delivery-warrant
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-15
12
+ ---
13
+
14
+ # ADR 0003: Delivery Order Is Reserved Before Native Qualification
15
+
16
+ ## Status
17
+
18
+ Accepted. This decision is normative for the v3 Delivery Warrant state machine,
19
+ reusable delivery workflows, and generated native consumer workflows.
20
+
21
+ ## Context
22
+
23
+ A slow native pull request can pass source acceptance, obtain approval, and then
24
+ spend long enough in platform qualification for the protected dev base to move
25
+ many times. Requiring all native shards to finish before the pull request owns
26
+ a delivery turn permits a stream of later fast candidates to overtake it.
27
+ Freezing dev or disabling protection would avoid the race only by stopping
28
+ unrelated work or removing the authority that must be proven.
29
+
30
+ Native evidence also has two identities that must not be conflated. Semantic
31
+ source, affected closure, dependency graph, and toolchain determine whether a
32
+ native result remains valid. The current dev commit and replay tree determine
33
+ the final integration composition. A dev-only documentation change should not
34
+ invalidate semantic native evidence, while a change inside the affected closure
35
+ must never be silently reused.
36
+
37
+ ## Decision
38
+
39
+ Delivery Warrant ownership has two phases:
40
+
41
+ ```text
42
+ queued -> provisional --native proof accepted--> qualified -> GitHub merge queue
43
+ | |
44
+ +--failure--------+--> terminal release -> wake next candidate
45
+ +--expiry------------> recovered queue entry with a new fence
46
+ ```
47
+
48
+ Source acceptance, the ready label, current approval, and required source checks
49
+ are established before selection. Selection issues a `provisional` Warrant with
50
+ one TTL, heartbeat protocol, lease generation, and fencing token. It reserves
51
+ the next protected-dev delivery turn but is not merge-queue authority. Later
52
+ pull requests may run source and CI work and remain visible in the durable FIFO
53
+ plus aging queue; none may enter the protected merge queue while another exact
54
+ candidate owns the active Warrant.
55
+
56
+ Native success upgrades the same fenced generation atomically to `qualified`.
57
+ The transition binds a Native Qualification Proof and a rooted reuse decision.
58
+ Only a qualified Warrant may authorize enqueue. The upgrade does not mint a new
59
+ fence and cannot change the PR head or semantic source roots.
60
+
61
+ Native Qualification Proof v3 binds semantic source identity, semantic patch,
62
+ qualification plan, affected closure, dependency graph, toolchain, execution
63
+ environment contract, covered paths, exact shard evidence roots, the dev base
64
+ used for qualification, and the exact native execution receipt. That receipt
65
+ contains the normalized repository, protected base, source head, qualified
66
+ base, toolchain root, and environment root binding established before the
67
+ native process starts. The proof repeats and roots that binding, and includes
68
+ the receipt root in its shard evidence. Its
69
+ timestamp is observational rather than part of proof identity. Reuse on another
70
+ base requires an attributed base delta. Identical base is accepted directly; a
71
+ descendant base with no overlap against the affected closure reuses the proof;
72
+ overlap requires affected or full native revalidation; unknown ancestry,
73
+ truncated attribution, semantic change, closure change, dependency change, or
74
+ toolchain change requires full revalidation.
75
+
76
+ The reusable controller composes the exact PR head with the observed protected
77
+ base before running native work, heartbeats while the command is active, and
78
+ checks base drift after completion. It may perform one automatic revalidation
79
+ on the latest base. Continued overlapping drift fails closed. Native failure,
80
+ cancel, semantic head movement, unrecoverable composition conflict, or exhausted
81
+ revalidation closes only the current fence. The controller then emits a rooted
82
+ `buildchain-dev-delivery-wake` repository event for the next queued candidate.
83
+ Cancellation that prevents cleanup is covered by TTL recovery; the stale worker
84
+ cannot renew or qualify after a new fence is minted.
85
+
86
+ PR-controlled native execution is a credentialless candidate job on a
87
+ GitHub-hosted runner. Its child process and complete `/proc` ancestry receive no
88
+ controller or provider write credential. The ancestry sentinel treats unreadable
89
+ process state as failure and detects generic auth, credential, key, password,
90
+ secret, and token variable names. Only a dependent credentialed finalizer on a
91
+ provider-readback-proven distinct GitHub-hosted job and runner may independently
92
+ verify the content-addressed proof/state transfer, reread the same live fence,
93
+ PR head, and protected base, and qualify or settle the attempt. A successful
94
+ candidate exit is evidence input, not authority to mutate provider state or a
95
+ completion signal by itself. Persistent self-hosted runners are unsupported
96
+ because job ordering alone cannot prove detached-descendant cleanup.
97
+
98
+ GitHub `merge_group` checks and the protected dev ref remain final integration
99
+ authority. No transition disables a check, changes branch protection, force
100
+ updates the Warrant ref, or freezes dev.
101
+
102
+ Required native delivery validates the environment root before candidate
103
+ submission, Warrant selection, checkout/composition, or native process spawn.
104
+ An empty or malformed root is therefore an admission failure, not a terminal
105
+ failure after native capacity has been spent. `off`, `shadow`, and
106
+ `non-native-fast` compatibility does not turn the reusable workflow input into
107
+ an unconditional requirement.
108
+
109
+ ## Compatibility
110
+
111
+ Existing v1 queue documents remain readable. An historical active Warrant that
112
+ does not contain `phase` is interpreted as the former already-qualified shape
113
+ without rewriting its state root. Newly selected Warrants always contain
114
+ `phase: provisional`. Existing `off` and `shadow` workflow modes remain
115
+ available; `required` now enforces the two-phase upgrade. Native Qualification
116
+ Proof v1 and v2 documents remain verifiable as historical evidence, but their
117
+ execution receipts do not bind the environment root. They cannot gain v3 exact
118
+ reuse authority and must be replaced by an explicit native revalidation.
119
+
120
+ In bounded authority mode, every newly issued Landing Warrant requires the
121
+ complete verified-native qualification shape, including the qualification
122
+ contract, execution binding, execution receipt, command, source proof, and native
123
+ proof roots. A migrated `legacy-compatibility-only` qualification may preserve
124
+ the exact already-active historical Landing fence for safe handoff, but it can
125
+ never mint a new Landing Warrant or acquire native proof authority.
126
+
127
+ Elapsed lease time is not provider-stop evidence. Cleanup of an expired Landing
128
+ fence requires a separate independent provider terminal verifier whose rooted
129
+ readback matches the exact state root, candidate, source head, fencing token,
130
+ generation, provider run, and provider job and is fresh for that Warrant
131
+ generation. Caller-asserted, forged, mismatched, nonterminal, or stale readback
132
+ cannot release the exclusive slot.
133
+
134
+ ## Consequences
135
+
136
+ - Slow approved candidates stop starving without serializing development or CI.
137
+ - A provisional receipt is intentionally insufficient for merge admission.
138
+ - Base-only replay churn can reuse native evidence when closure attribution is
139
+ complete and disjoint.
140
+ - Overlap and uncertainty spend more native compute but cannot create an
141
+ unproven protected-dev landing.
142
+ - Consumers need a promotion token that can advance the Warrant state ref and
143
+ emit the wake event, plus a native command or an exact reusable proof.
144
+ - Invalid required-native environment inputs fail before they can allocate a
145
+ Warrant or native runner time.
146
+ - Legacy unbound native evidence remains readable but intentionally spends a
147
+ new validation run before qualification.
148
+ - Candidate execution remains credentialless; credentialed readback,
149
+ qualification, and settlement happen only in a distinct, live-evidenced fresh
150
+ GitHub-hosted finalizer job after candidate job completion.
151
+ - Expired Landing cleanup is rooted in exact independent provider readback, not
152
+ a timeout or the controller's own assertion.
@@ -59,6 +59,38 @@
59
59
  "packages/core/v4-stage-capsule-qualification.js",
60
60
  "packages/core/v4-stage-capsule-qualification-campaign.js",
61
61
  "scripts/v4-stage-capsule-qualification.mjs",
62
+ "packages/core/dev-delivery-warrant.js",
63
+ "packages/core/dev-delivery-warrant-state.js",
64
+ "packages/core/dev-delivery-warrant-qualification.js",
65
+ "packages/core/dev-delivery-native-proof.js",
66
+ "packages/core/dev-delivery-native-execution.js",
67
+ "packages/core/dev-delivery-execution-failure.js",
68
+ "packages/core/dev-delivery-execution-transfer.js",
69
+ "packages/core/dev-delivery-process-boundary.js",
70
+ "packages/core/dev-delivery-contract-surface.js",
71
+ "packages/core/dev-delivery-authority-candidate.js",
72
+ "packages/core/dev-delivery-authority-evidence.js",
73
+ "packages/core/dev-delivery-authority-state.js",
74
+ "packages/core/dev-delivery-authority-qualification.js",
75
+ "packages/core/dev-delivery-authority-landing.js",
76
+ "packages/core/dev-delivery-landing-admission-core.js",
77
+ "packages/core/dev-delivery-authority-settlement.js",
78
+ "packages/core/dev-delivery-landing-readback.js",
79
+ "packages/core/dev-delivery-landing-terminal-evidence.js",
80
+ "packages/core/dev-delivery-landing-testing-port.js",
81
+ "packages/core/dev-delivery-provider-attempt.js",
82
+ "packages/core/dev-delivery-provider-heartbeat.js",
83
+ "scripts/dev-delivery-warrant.mjs",
84
+ "scripts/dev-delivery-warrant-options.mjs",
85
+ "scripts/dev-delivery-warrant-store.mjs",
86
+ "scripts/dev-delivery-authority.mjs",
87
+ "scripts/dev-delivery-authority-command-adapters.mjs",
88
+ "scripts/dev-delivery-authority-provider.mjs",
89
+ "scripts/dev-delivery-native-run.mjs",
90
+ "scripts/dev-delivery-process-boundary.mjs",
91
+ "scripts/dev-delivery-provider-heartbeat.mjs",
92
+ "scripts/dev-delivery-two-phase-resume.mjs",
93
+ "scripts/dev-delivery-two-phase.mjs",
62
94
  "crates/buildchain-v4-contracts/src/stage_capsule.rs",
63
95
  "crates/buildchain-v4-contracts/src/stage_capsule_store.rs",
64
96
  "crates/buildchain-v4-contracts/src/provider_operation_journal.rs",
@@ -418,6 +450,68 @@
418
450
  "docs/release-tail-provider-plane.md"
419
451
  ]
420
452
  },
453
+ {
454
+ "id": "v4-delivery-authority",
455
+ "owner": "Buildchain protected delivery maintainers",
456
+ "implementation": [
457
+ "packages/core/dev-delivery-warrant.js",
458
+ "packages/core/dev-delivery-warrant-state.js",
459
+ "packages/core/dev-delivery-warrant-qualification.js",
460
+ "packages/core/dev-delivery-native-proof.js",
461
+ "packages/core/dev-delivery-native-execution.js",
462
+ "packages/core/dev-delivery-execution-failure.js",
463
+ "packages/core/dev-delivery-execution-transfer.js",
464
+ "packages/core/dev-delivery-process-boundary.js",
465
+ "packages/core/dev-delivery-contract-surface.js",
466
+ "packages/core/dev-delivery-authority-candidate.js",
467
+ "packages/core/dev-delivery-authority-evidence.js",
468
+ "packages/core/dev-delivery-authority-state.js",
469
+ "packages/core/dev-delivery-authority-qualification.js",
470
+ "packages/core/dev-delivery-authority-landing.js",
471
+ "packages/core/dev-delivery-landing-admission-core.js",
472
+ "packages/core/dev-delivery-authority-settlement.js",
473
+ "packages/core/dev-delivery-landing-readback.js",
474
+ "packages/core/dev-delivery-landing-terminal-evidence.js",
475
+ "packages/core/dev-delivery-landing-testing-port.js",
476
+ "packages/core/dev-delivery-provider-attempt.js",
477
+ "packages/core/dev-delivery-provider-heartbeat.js",
478
+ "scripts/dev-delivery-warrant.mjs",
479
+ "scripts/dev-delivery-warrant-options.mjs",
480
+ "scripts/dev-delivery-warrant-store.mjs",
481
+ "scripts/dev-delivery-authority.mjs",
482
+ "scripts/dev-delivery-authority-command-adapters.mjs",
483
+ "scripts/dev-delivery-authority-provider.mjs",
484
+ "scripts/dev-delivery-native-run.mjs",
485
+ "scripts/dev-delivery-process-boundary.mjs",
486
+ "scripts/dev-delivery-provider-heartbeat.mjs",
487
+ "scripts/dev-delivery-two-phase-resume.mjs",
488
+ "scripts/dev-delivery-two-phase.mjs"
489
+ ],
490
+ "tests": [
491
+ "tests/dev-delivery-warrant.test.mjs",
492
+ "tests/dev-delivery-warrant-command.test.mjs",
493
+ "tests/dev-delivery-two-phase.test.mjs",
494
+ "tests/dev-delivery-two-phase-run.test.mjs",
495
+ "tests/dev-delivery-native-run.test.mjs",
496
+ "tests/dev-delivery-process-boundary.test.mjs",
497
+ "tests/dev-delivery-process-boundary-negative.test.mjs",
498
+ "tests/dev-delivery-provider-heartbeat.test.mjs",
499
+ "tests/dev-delivery-authority.test.mjs",
500
+ "tests/build-surface.test.mjs",
501
+ "tests/v4-delivery-authority-parity.test.mjs"
502
+ ],
503
+ "contracts": [
504
+ "architecture/v4-delivery-authority-parity.json",
505
+ "architecture/decisions/0003-two-phase-delivery-warrant.md",
506
+ "contracts/dev-delivery-authority-v2.schema.json",
507
+ "dist/site/schemas/dev-delivery-authority-v2.schema.json",
508
+ ".github/workflows/dev-pr-auto-merge.yml",
509
+ ".github/workflows/buildchain-dev-delivery.yml",
510
+ "templates/native-dev-delivery.yml",
511
+ "docs/dev-delivery-warrant.md",
512
+ "docs/dev-delivery-qualification-landing-adr.md"
513
+ ]
514
+ },
421
515
  {
422
516
  "id": "v4-architecture-governance",
423
517
  "owner": "Buildchain architecture maintainers",
@@ -5,12 +5,12 @@
5
5
  "enforcementRevision": "5308189b09bcb5a1314195412f2807a40d678838",
6
6
  "repositoryBudgets": {
7
7
  "baselineRevision": "c70e6ac28431888b24fefc218246cc69f8dde85a",
8
- "maxHandMaintainedSourceFiles": 353,
9
- "maxHandMaintainedSourceLines": 136936,
8
+ "maxHandMaintainedSourceFiles": 384,
9
+ "maxHandMaintainedSourceLines": 146550,
10
10
  "maxWorkflowFiles": 71,
11
- "maxWorkflowLines": 24190,
12
- "latestTransition": "The v4 promotion surface now admits one rooted transient exact-runtime authorization, rejects persisted selector authority, and carries fresh-attempt Stage Capsule reuse lineage into the final Release Passport.",
13
- "rationale": "The existing dev queue Warrant admission, adopter compatibility port, and exact source-proof reuse remain included unchanged. Two bounded runtime-resume modules, one provider authorization adapter, rooted schema and fixtures, workflow admission gates, action and Passport plumbing, capability metadata, and negative tests account for this transition's exact growth. Exact SHAs remain transient, failed jobs are never rerun, unaffected sealed platform capsules are reused by identity, and v3 behavior remains unchanged. These exact 353-file, 136936-source-line and 24190-workflow-line ceilings cannot grow implicitly."
11
+ "maxWorkflowLines": 25259,
12
+ "latestTransition": "Delivery authority now migrates a rechecked live v1 ref with the configured v2 policy, rejects GitHub artifact runtime credentials in candidate ancestry, binds containment comparison to the exact protected-base head, and keeps v2 migration promises out of the v1 workflow contract.",
13
+ "rationale": "Bounded modules separate candidate, evidence, native proof and execution, canonical failure verification, closed-set execution transfer, process-boundary verification, Warrant state and qualification, authority state, qualification, Landing acquisition, verified-attempt admission, Landing settlement and fence validation, provider attempt and heartbeat readback, sealed terminal evidence, hosted heartbeat, resume, store, options, command-specific adapters, and CLI orchestration responsibilities. The protected delivery workflow gives candidate and seal jobs no provider write credential, recursively rejects transfer drift, scopes every transfer artifact to the exact provider run attempt, chains every durable heartbeat state and receipt root on a distinct hosted runner domain, and permits qualification or exact failure settlement only after the finalizer verifies live jobs and the latest durable authority state. Public Landing admission and heartbeat always perform non-injectable fresh exact-attempt provider readback, and heartbeat-loss coordination never invokes GitHub's run-scoped cancellation API where a successor rerun could race. V2 mutation cannot initialize a second empty authority beside a legacy ref: migration reads and roots the canonical live v1 ref, rechecks it, applies the explicit configured v2 policy, and atomically replaces its bytes through one expected-old non-force update, so old v1 controllers fail closed while the prior commit remains immutable history. Candidate ancestry classifies the GitHub artifact runtime token as credential authority. Every Landing settlement, including an unexpired fence, requires product-owned terminal readback. Terminal cleanup reads the immutable historical attempt, derives workflow and hosted Landing job identity from live run data, reads the exact protected ref head and compares containment against that immutable SHA, and seals merged only when the admitted merge-group head is contained by that protected base; a later different-head merge settles the old attempt as dequeued. Terminal normalization preserves transfer, finalizer boundary, native and seal job, admitted provider attempt, protected-base head, containment result, and terminal readback coordinates. The public reusable workflow truthfully retains its single-flight v1 authority without advertising v2 migration, while bounded v2 remains a separate opt-in CLI, Node API, and schema contract; the tracked self-caller stays on public v4-alpha with matching stable and alpha locks, and transient train selection is dispatch-only. These exact 384-file, 146550-source-line and 25259-workflow-line ceilings cannot grow implicitly."
14
14
  },
15
15
  "sourceBudgets": {
16
16
  "newFileLines": 600,
@@ -27,6 +27,10 @@
27
27
  "maxLines": 399,
28
28
  "rationale": "The bounded guard keeps latest-base delta attribution, rooted source-proof reuse classification, synthetic merge composition readback, stable pre-enqueue failures, and the final base, head, queue, and Warrant compare-and-swap outside the legacy Dev PR controller; it cannot mutate the frozen source head or authorize landing by itself, and this exact file ceiling cannot grow implicitly."
29
29
  },
30
+ "scripts/dev-delivery-authority.mjs": {
31
+ "maxLines": 635,
32
+ "rationale": "The explicit authority CLI keeps plan-only and execute transitions, provider-attempt coordinates, expected-old durable state writes, terminal provider readback, and machine-readable output in one compatibility entrypoint while the state-machine implementations remain extracted; this exact file ceiling cannot grow implicitly."
33
+ },
30
34
  "scripts/v4-architecture.mjs": {
31
35
  "maxLines": 610,
32
36
  "rationale": "The v4 architecture validator adds only the bounded production-authority, fallback, rollback, writer-runtime, and legacy-retirement checks required for the final release cutover. This exact reviewed ceiling cannot grow implicitly."
@@ -43,6 +47,14 @@
43
47
  "maxLines": 605,
44
48
  "rationale": "The v4 parity port preserves the reviewed v3 release-blocker claim handoff, root-preserving candidate refresh, deterministic queued ranking and receipt propagation while retaining all prior fencing, lease and terminal semantics; this exact reviewed ceiling cannot grow implicitly."
45
49
  },
50
+ "packages/core/dev-delivery-authority-landing.js": {
51
+ "maxLines": 615,
52
+ "rationale": "The bounded Landing authority module keeps exclusive acquisition, fenced heartbeat, exact merge-group provider-attempt admission, independent expired-provider readback, terminal settlement, and deterministic wake transitions in one audited state-machine seam; this exact file ceiling cannot grow implicitly."
53
+ },
54
+ "packages/core/dev-delivery-landing-admission-core.js": {
55
+ "maxLines": 119,
56
+ "rationale": "The internal transition persists only a provider attempt already derived by the public live GitHub readback boundary, keeping caller-supplied evidence outside the package export graph while preserving deterministic duplicate admission; this exact file ceiling cannot grow implicitly."
57
+ },
46
58
  "packages/core/release-blocker-priority.js": {
47
59
  "maxLines": 193,
48
60
  "rationale": "The v4 parity adapter preserves the reviewed v3 exact dual-landing priority claim, repair-contract parsing and unrelated-work rejection outside the durable Warrant state machine; this exact reviewed ceiling cannot grow implicitly."
@@ -97,10 +109,10 @@
97
109
  "rationale": "Responsibility-owned validators preserve issue ordering, byte-stable reports, upstream release evidence, consumer-policy certification, and the new rooted runtime A+B resume lineage. The optional attachment is normalized and independently reverified before inclusion; these exact post-integration ceilings cannot grow implicitly."
98
110
  },
99
111
  "packages/core/buildchain-contract.js": {
100
- "maxLines": 1095,
112
+ "maxLines": 1096,
101
113
  "maxFunctionLines": 681,
102
114
  "maxFunctionComplexity": 30,
103
- "rationale": "The existing v4 contract evaluator invokes the shared shell-runtime-lock binding before every compatibility or early-success path while preserving the prior contract-world, Release Train, and drift behavior. Its public advanced-workflow projection now declares the two optional expected lane inputs consumed by that unchanged evaluator. This exact public-contract wiring ceiling cannot grow implicitly."
115
+ "rationale": "The existing v4 contract evaluator invokes the shared shell-runtime-lock binding before every compatibility or early-success path while preserving the prior contract-world, Release Train, and drift behavior. Its public projection now includes the bounded dev-delivery workflow surface and declares the optional expected lane inputs consumed by the unchanged evaluator. This exact public-contract wiring ceiling cannot grow implicitly."
104
116
  },
105
117
  "packages/core/github-governance-authority.js": {
106
118
  "maxLines": 1368,
@@ -419,22 +431,32 @@
419
431
  "dependency-root",
420
432
  "diagnostic-context",
421
433
  "dry-run",
434
+ "environment-root",
422
435
  "expected-head-sha",
423
436
  "expected-pr-number",
437
+ "handoff-workflow-id",
424
438
  "initiative-root",
425
439
  "landing-mode",
440
+ "legacy-active-owner-binding-json",
426
441
  "max-merges",
427
442
  "merge-method",
443
+ "native-command",
444
+ "native-command-root",
445
+ "native-heartbeat-seconds",
446
+ "native-proof-json",
428
447
  "plan-root",
429
448
  "project-cut-proof-json",
430
449
  "queue-admission-context",
431
450
  "ready-label",
451
+ "release-blocker-priority-json",
432
452
  "require-approval",
433
453
  "required-status-checks",
434
454
  "same-repository-only",
435
455
  "shard-evidence-roots-json",
436
456
  "source-identity-root",
437
457
  "source-patch-root",
458
+ "source-workflow-id",
459
+ "source-workflow-run-id",
438
460
  "target-branch",
439
461
  "toolchain-root",
440
462
  "warrant-lease-seconds"
@@ -448,7 +470,13 @@
448
470
  "evaluated-count",
449
471
  "final-base-sha",
450
472
  "merged-count",
473
+ "native-execution-transfer-root",
474
+ "native-proof-root",
475
+ "native-reuse-decision-root",
451
476
  "project-cut-proof-root",
477
+ "provider-finalizer-boundary-root",
478
+ "provider-heartbeat-receipt-root",
479
+ "qualified-warrant-receipt-root",
452
480
  "skipped-count",
453
481
  "source-proof-root",
454
482
  "warrant-receipt-root",
@@ -456,7 +484,7 @@
456
484
  "warrant-state-root"
457
485
  ]
458
486
  },
459
- "rationale": "Extend targeted exact-head admission with an optional rooted Project Cut replay proof and the exact active-lease status context needed to read back the same fenced Warrant before enqueue, while independent approval, required checks, native queue admission, and exact integration proof remain authoritative."
487
+ "rationale": "Add required-mode two-phase native qualification under one provisional fence, exact environment and heartbeat receipt binding, deterministic proof reuse, qualified-Warrant readback, and bounded successor handoff. The execution-transfer and provider-finalizer boundary outputs expose the exact content root and live distinct-job runner readback without exposing credential bytes. The additive legacy-active-owner binding carries exact phase-less state, fence, and generation without requiring a native command contract. Existing off and shadow modes remain explicit, and GitHub merge_group plus the exact Project Cut remain final landing authority."
460
488
  },
461
489
  "workflow:stable-candidate-patrol": {
462
490
  "fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
@@ -1381,6 +1409,45 @@
1381
1409
  }
1382
1410
  },
1383
1411
  "approvedExtractedDebt": {
1412
+ "packages/core/dev-delivery-authority-candidate.js#normalizeDevDeliveryAuthorityCandidate": {
1413
+ "maxLines": 150,
1414
+ "maxComplexity": 26,
1415
+ "rationale": "The extracted candidate normalizer keeps exact identity, source, proof, Warrant, lease, native-command, priority, and terminal-state validation in one fail-closed audit surface; this exact bounded complexity cannot grow implicitly."
1416
+ },
1417
+ "packages/core/dev-delivery-native-proof.js#validateActiveDevDeliveryWarrant": {
1418
+ "maxLines": 95,
1419
+ "maxComplexity": 29,
1420
+ "rationale": "The extracted active-Warrant validator preserves exact repository, branch, candidate, source, environment, fence, generation, lease, command, and qualification invariants in one auditable proof boundary; this exact bounded complexity cannot grow implicitly."
1421
+ },
1422
+ "packages/core/dev-delivery-execution-transfer.js#verifyNativeExecutionTransfer": {
1423
+ "maxComplexity": 36,
1424
+ "rationale": "The transfer verifier keeps the closed success and failure manifests, normalized job and Warrant bindings, byte digests, proof declarations, and failed-settlement fence in one exact artifact boundary; this reviewed complexity ceiling cannot grow implicitly."
1425
+ },
1426
+ "packages/core/dev-delivery-process-boundary.js#createProviderFinalizerBoundary": {
1427
+ "maxLines": 191,
1428
+ "maxComplexity": 33,
1429
+ "rationale": "The provider boundary verifier keeps distinct job and runner identity, hosted labels, strict timestamps, live PR and protected-ref readback, and the rooted finalizer receipt in one fail-closed audit surface; this reviewed complexity ceiling cannot grow implicitly."
1430
+ },
1431
+ "scripts/dev-delivery-authority.mjs#runDevDeliveryAuthorityCommand": {
1432
+ "maxLines": 151,
1433
+ "maxComplexity": 26,
1434
+ "rationale": "The authority command dispatcher keeps each explicit plan or execute mutation, exact expected-old state write, schema-safe output, and provider terminal-readback verifier injection in one audited command boundary; this exact complexity cannot grow implicitly."
1435
+ },
1436
+ "scripts/dev-delivery-authority.mjs#devDeliveryAuthorityCliOptions": {
1437
+ "maxLines": 220,
1438
+ "maxComplexity": 11,
1439
+ "rationale": "The authority CLI parser keeps the complete explicit flag-to-environment compatibility mapping, including exact provider run and job coordinates for independent expired-Landing readback, in one declarative function while execution remains separately owned; this exact extracted mapping ceiling cannot grow implicitly."
1440
+ },
1441
+ "scripts/dev-delivery-two-phase.mjs#runTwoPhaseDelivery": {
1442
+ "maxLines": 204,
1443
+ "maxComplexity": 35,
1444
+ "rationale": "The two-phase coordinator keeps provisional selection, credentialless native-only execution, post-exit credentialed proof reuse and qualification, heartbeat, landing handoff, and fail-closed cleanup under one fenced transaction; this exact bounded orchestration ceiling cannot grow implicitly."
1445
+ },
1446
+ "scripts/dev-delivery-warrant-options.mjs#devDeliveryCliOptions": {
1447
+ "maxLines": 257,
1448
+ "maxComplexity": 11,
1449
+ "rationale": "The extracted compatibility parser preserves the complete Warrant flag and environment mapping byte-for-byte while storage and command execution remain separately owned; this exact mapping ceiling cannot grow implicitly."
1450
+ },
1384
1451
  "scripts/v4-warrant-shadow-plan.mjs#validatePlan": {
1385
1452
  "maxLines": 182,
1386
1453
  "maxComplexity": 26,
@@ -204,7 +204,9 @@
204
204
  "sourcePaths": [
205
205
  "packages/core/dev-delivery-proof.js",
206
206
  "packages/core/dev-delivery-warrant-cancellation.js",
207
+ "packages/core/dev-delivery-warrant-qualification.js",
207
208
  "packages/core/dev-delivery-warrant-settlement.js",
209
+ "packages/core/dev-delivery-warrant-state.js",
208
210
  "packages/core/dev-delivery-warrant.js",
209
211
  "packages/core/release-blocker-priority.js",
210
212
  "scripts/dev-delivery-proof.mjs",