@kungfu-tech/buildchain 3.0.6-alpha.0 → 3.0.6-alpha.10

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 (83) hide show
  1. package/README.md +4 -4
  2. package/actions/promote-buildchain-ref/README.md +13 -1
  3. package/bin/buildchain.mjs +13 -1
  4. package/contracts/auditable-demo-scenario-v1.schema.json +52 -0
  5. package/contracts/release-candidate-recovery-v1.schema.json +104 -0
  6. package/dist/site/buildchain-contract.json +134 -34
  7. package/dist/site/buildchain-site.json +178 -47
  8. package/dist/site/capability-registry.json +5 -5
  9. package/dist/site/cli-registry.json +40 -4
  10. package/dist/site/controller-registry.json +60 -4
  11. package/dist/site/kfd-claims.json +190 -20
  12. package/dist/site/kfd-upstream-aggregate.json +9 -9
  13. package/dist/site/manual-registry.json +10 -10
  14. package/dist/site/node-api-registry.json +1295 -80
  15. package/dist/site/page-registry.json +164 -33
  16. package/dist/site/public-surface-audit.json +428 -21
  17. package/dist/site/publication-authority-registry.json +66 -1
  18. package/dist/site/publication-registry.json +4 -4
  19. package/dist/site/release-provenance.json +2 -0
  20. package/dist/site/site-manifest.json +14 -14
  21. package/dist/site/workflow-registry.json +203 -15
  22. package/docs/MAP.md +2 -0
  23. package/docs/auditable-demo.md +58 -11
  24. package/docs/aws-us-elastic-runner-burst-plane.md +114 -80
  25. package/docs/cli-reference.md +154 -0
  26. package/docs/dev-alpha-candidate-patrol.md +13 -5
  27. package/docs/dev-delivery-warrant.md +158 -0
  28. package/docs/node-api-reference.md +105 -44
  29. package/docs/publication-authority.md +11 -0
  30. package/docs/publish-transaction.md +10 -1
  31. package/docs/release-candidate.md +140 -12
  32. package/docs/release-governance.md +66 -1
  33. package/docs/reusable-build-surface.md +11 -1
  34. package/docs/shifu-gate-profiles.md +12 -1
  35. package/docs/versioning.md +2 -0
  36. package/package.json +5 -2
  37. package/packages/core/buildchain-contract.js +30 -2
  38. package/packages/core/buildchain-publication-authority.js +3 -1
  39. package/packages/core/channel-candidate.js +2 -21
  40. package/packages/core/channel-promotion-baseline.js +199 -0
  41. package/packages/core/dev-delivery-candidate-identity.js +94 -0
  42. package/packages/core/dev-delivery-common.js +73 -0
  43. package/packages/core/dev-delivery-proof.js +252 -0
  44. package/packages/core/dev-delivery-warrant-cancellation.js +94 -0
  45. package/packages/core/dev-delivery-warrant-settlement.js +73 -0
  46. package/packages/core/dev-delivery-warrant.js +591 -0
  47. package/packages/core/index.js +7 -0
  48. package/packages/core/publication-sealed-bundle.js +10 -1
  49. package/packages/core/release-candidate-recovery.js +539 -0
  50. package/scripts/audit-publication-control-plane.mjs +12 -4
  51. package/scripts/auditable-demo-bundle-verification.mjs +148 -0
  52. package/scripts/auditable-demo-platform.mjs +86 -50
  53. package/scripts/auditable-demo-presentation.mjs +83 -0
  54. package/scripts/auditable-demo-renditions.mjs +264 -0
  55. package/scripts/auditable-demo.mjs +24 -30
  56. package/scripts/aws-windows-jit-campaign-core.mjs +7 -8
  57. package/scripts/aws-windows-jit-controller.mjs +1 -0
  58. package/scripts/aws-windows-jit-core.mjs +1 -1
  59. package/scripts/build-contract-core.mjs +58 -3
  60. package/scripts/buildchain-cli-help.mjs +8 -0
  61. package/scripts/buildchain-patrol.mjs +9 -0
  62. package/scripts/check-inventory.mjs +25 -3
  63. package/scripts/dev-alpha-candidate-patrol.mjs +45 -48
  64. package/scripts/dev-delivery-proof.mjs +193 -0
  65. package/scripts/dev-delivery-warrant.mjs +426 -0
  66. package/scripts/dev-pr-auto-merge.mjs +497 -55
  67. package/scripts/dev-pr-delivery-warrant.mjs +209 -0
  68. package/scripts/dispatch-artifact-signing-authority.mjs +2 -4
  69. package/scripts/gate-profile-core.mjs +24 -0
  70. package/scripts/generate-channel-promotion-workflow.mjs +30 -14
  71. package/scripts/generate-site-bundle.mjs +2 -2
  72. package/scripts/git-fetch-process-tree.mjs +142 -0
  73. package/scripts/lifecycle-substage-evidence.mjs +274 -0
  74. package/scripts/locked-source-checkout.mjs +6 -3
  75. package/scripts/publication-candidate-sealer.mjs +104 -0
  76. package/scripts/release-candidate-resolver.mjs +91 -5
  77. package/scripts/resolve-artifact-transfer-mode.mjs +9 -0
  78. package/scripts/resolve-build-contract.mjs +7 -0
  79. package/scripts/resume-from-candidate-run.mjs +598 -0
  80. package/scripts/route-offline-runners.mjs +1 -0
  81. package/scripts/run-lifecycle-core.mjs +9 -9
  82. package/scripts/shifu-gate-profile.mjs +10 -16
  83. package/scripts/site-capability-metadata.mjs +15 -0
@@ -0,0 +1,158 @@
1
+ ---
2
+ status: draft
3
+ period: ongoing
4
+ theme: dev-delivery-warrant
5
+ doc_type: technical-reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-08-05
12
+ ai_provenance:
13
+ model_family: GPT-5
14
+ product: Codex
15
+ generated_at: 2026-08-04
16
+ invisible_context: not asserted
17
+ ---
18
+
19
+ # Dev Delivery Warrant Queue
20
+
21
+ Buildchain's Dev Delivery Warrant Queue gives a qualified slow pull request a
22
+ durable, non-preemptive delivery turn without replacing GitHub Merge Queue as
23
+ the final protected-ref authority.
24
+
25
+ The queue is stored on a dedicated Git ref below
26
+ `buildchain/dev-delivery-warrant/`. Every update creates a child Git commit and
27
+ advances the ref without force. The transition receipt binds the expected old
28
+ state root; a competing controller receives a visible non-fast-forward failure
29
+ instead of a second authority claim.
30
+
31
+ ## Contract
32
+
33
+ A submission binds the repository, protected dev line, pull request, semantic
34
+ source identity, exact source head, native Assignment and Initiative roots,
35
+ source patch or tree intent, reusable Source Qualification Proof, plan,
36
+ affected closure, dependencies, toolchain, delivery class, priority, attempts,
37
+ and retained enqueue time.
38
+
39
+ Selection is deterministic FIFO plus aging with bounded priority. Priority may
40
+ reorder queued work, but it cannot preempt the active Warrant. Exactly one
41
+ candidate receives a leased Warrant containing a fencing token, lease
42
+ generation, expected-old state root, expiry, and the complete exact source
43
+ binding. Heartbeat extends only that generation. Expiry recovery rejects the
44
+ old token, retains queue age, and returns the candidate to selection.
45
+
46
+ A terminal event may cancel a candidate before selection without minting a
47
+ Warrant. This transition is limited to an exact non-active queued candidate and
48
+ binds its candidate root, pull request, recorded source head, event-observed
49
+ source head, terminal event action, evidence root, and expected-old queue root.
50
+ An active candidate still requires its current fencing token and lease
51
+ generation. Exact duplicate cancellation evidence is a visible no-op; identity,
52
+ state, event, or evidence drift fails closed.
53
+
54
+ The reusable terminal controller uses one `settle` operation for active,
55
+ queued, already-terminal, and never-admitted pull requests. An active Warrant
56
+ still requires its exact fence and evidence. A matching queued cancellation is
57
+ persisted normally. A duplicate terminal event or a pull request that never
58
+ entered Warrant authority returns a rooted explicit no-op instead of failing
59
+ the workflow or inventing queue state.
60
+
61
+ The supported priority classes are `ordinary`, `expedited`, and `emergency`.
62
+ The queue does not infer an emergency: callers must choose it explicitly under
63
+ their reviewed policy. Delivery classes are `non-native-fast`,
64
+ `native-proof-required`, `cross-platform`, and `release`.
65
+
66
+ ## Split proof authority
67
+
68
+ Source Qualification Proof is independent of the moving dev base. It binds the
69
+ semantic source, exact source head and patch/tree intent, plan, affected
70
+ closure, dependencies, toolchain, covered paths, and shard evidence.
71
+
72
+ Before reuse, the consumer classifies the dev delta:
73
+
74
+ - unchanged roots plus an unrelated attributed delta reuse source
75
+ qualification and run only a cheap Project Cut replay. GitHub's `behind`
76
+ state is accepted only when a rooted replay proof binds the exact current
77
+ protected base, unchanged PR head and source patch, replay tree, required
78
+ context roots, and a qualified `project.cut.merge-queue-admission/v1`
79
+ receipt;
80
+ - an overlapping delta reruns the affected source shards;
81
+ - an unknown graph or changed source, plan, closure, dependency, or toolchain
82
+ root fails closed to full source qualification.
83
+
84
+ Integration Delivery Proof is separate and cannot be cached across candidates.
85
+ It binds the exact current dev base, replay tree, GitHub `merge_group` head and
86
+ tree, active Warrant fencing generation, Source Qualification Proof root, and
87
+ final required-context roots. GitHub's exact merge-group checks remain the
88
+ final integration authority.
89
+
90
+ ## CLI
91
+
92
+ Queue commands are dry-run by default:
93
+
94
+ ```sh
95
+ buildchain dev warrant submit --repository owner/repository \
96
+ --branch dev/v4/v4.0 --pull-request 123 --source-head <sha> \
97
+ --assignment-root <root> --initiative-root <root> \
98
+ --source-identity-root <root> --source-patch-root <root> \
99
+ --source-proof-root <root> --plan-root <root> --closure-root <root> \
100
+ --dependency-root <root> --toolchain-root <root> \
101
+ --delivery-class native-proof-required
102
+
103
+ buildchain dev warrant select --repository owner/repository \
104
+ --branch dev/v4/v4.0 --execute
105
+
106
+ buildchain dev warrant cancel-queued --repository owner/repository \
107
+ --branch dev/v4/v4.0 --candidate-id <root> --pull-request 123 \
108
+ --expected-source-head <queued-sha> --observed-source-head <event-sha> \
109
+ --expected-old <queue-root> --event-action closed --outcome cancelled \
110
+ --evidence-root <terminal-event-root> --execute
111
+ ```
112
+
113
+ `heartbeat`, `recover`, `close`, `settle`, `cancel-queued`, and `observe` use the same durable authority.
114
+ Warrant-scoped mutations require the exact fencing token and lease generation.
115
+ `close` also requires a rooted terminal evidence object.
116
+
117
+ Proof commands create, verify, classify, and compose the two proof layers:
118
+
119
+ ```sh
120
+ buildchain dev proof source ...
121
+ buildchain dev proof classify --source-proof source-proof.json ...
122
+ buildchain dev proof replay ...
123
+ buildchain dev proof replay-proof \
124
+ --qualification-receipt project-cut-admission.json ...
125
+ buildchain dev proof integration --warrant-result warrant.json ...
126
+ ```
127
+
128
+ ## Workflow rollout and rollback
129
+
130
+ The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
131
+
132
+ - `off` preserves the previous exact-head admission controller;
133
+ - `shadow` qualifies the source and emits a read-only queue submission plan;
134
+ - `required` persists the submission, selects the Warrant, and refuses GitHub
135
+ enqueue unless the immutable queue commit, state root, active Warrant, and
136
+ selected candidate all pass exact readback validation.
137
+
138
+ Consumers should deploy `shadow` first, inspect receipts, then change their
139
+ protected caller to `required`. Rollback is a reviewed caller change back to
140
+ `off`; it does not delete queue history or reinterpret old receipts. The
141
+ terminal reusable workflow creates the exact Integration Delivery Proof for a
142
+ merged candidate (or accepts explicit evidence for another terminal outcome),
143
+ then closes only the current fencing generation. The separate queued
144
+ cancellation reusable workflow cannot close an active generation; it advances
145
+ the state ref only when the caller's complete terminal binding and expected-old
146
+ root still match.
147
+
148
+ Buildchain uses the same contract for its own protected dev line through
149
+ `buildchain-dev-delivery.yml`. The manual caller requires the exact PR head and
150
+ all native/source proof roots, pins the runtime to the caller commit, selects
151
+ `delivery-warrant-mode: required`, and targets GitHub Merge Queue. It does not
152
+ offer an `off` switch: rollback is a reviewed change to this caller, not an
153
+ operator-time weakening of a specific delivery attempt.
154
+
155
+ This mechanism schedules protected delivery only. It does not serialize local
156
+ development, source-only checks, unrelated channels, release publication, or
157
+ runner provisioning. It never grants authority to enable cloud runner
158
+ campaigns.