@kungfu-tech/buildchain 4.1.3-alpha.0 → 4.1.3-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 (278) hide show
  1. package/AGENTS.md +41 -75
  2. package/CONTRIBUTING.md +19 -26
  3. package/architecture/action-taxonomy.json +24 -0
  4. package/architecture/agent-change-map.md +272 -12
  5. package/architecture/capability-state-machine-manifest.json +1 -4
  6. package/architecture/ci-lane-change-budget.json +190 -807
  7. package/architecture/core-mechanisms.json +3 -6
  8. package/architecture/decisions/0005-minimal-consumer-contract.md +122 -0
  9. package/architecture/decisions/0006-business-attempt-journal.md +89 -0
  10. package/architecture/decisions/0007-hosted-pipeline-controller.md +106 -0
  11. package/architecture/decisions/0008-pipeline-product-publication.md +120 -0
  12. package/architecture/decisions/0009-pipeline-version-preparation.md +186 -0
  13. package/architecture/internal-capabilities.json +371 -9
  14. package/architecture/maintainability-debt.json +50 -34
  15. package/architecture/maintainability-policy.json +8 -8
  16. package/architecture/minimal-consumer-migration.json +5670 -0
  17. package/architecture/platform-stage-checkpoints.json +31 -7
  18. package/architecture/product-upstreams.json +20 -0
  19. package/architecture/release-topology.json +331 -74
  20. package/architecture/stage-capsule-qualification.json +3 -1
  21. package/architecture/universal-workflow-bootstrap.json +15 -1
  22. package/architecture/universal-workflow-capability-policy.json +9 -9
  23. package/architecture/universal-workflow-fault-campaign.json +3 -1
  24. package/architecture/workflow-taxonomy.json +77 -328
  25. package/contracts/release-discussion-v1.schema.json +3 -0
  26. package/dist/readers/business-attempt.cjs +809 -0
  27. package/dist/readers/release-discussion.cjs +4 -0
  28. package/dist/site/buildchain-contract.json +16 -68
  29. package/dist/site/buildchain-site.json +47 -27
  30. package/dist/site/capability-registry.json +4 -4
  31. package/dist/site/controller-registry.json +1 -47
  32. package/dist/site/kfd-claims.json +499 -494
  33. package/dist/site/kfd-upstream-aggregate.json +1 -1
  34. package/dist/site/manual-registry.json +3 -3
  35. package/dist/site/node-api-registry.json +56 -56
  36. package/dist/site/page-registry.json +40 -20
  37. package/dist/site/public-surface-audit.json +286 -349
  38. package/dist/site/publication-authority-registry.json +203 -523
  39. package/dist/site/publication-registry.json +4 -4
  40. package/dist/site/site-manifest.json +7 -7
  41. package/dist/site/workflow-registry.json +590 -940
  42. package/docs/code-organization.md +9 -6
  43. package/docs/node-api-reference.md +103 -103
  44. package/docs/release-discussions.md +44 -5
  45. package/docs/release-governance.md +10 -12
  46. package/docs/runtime-entry.md +73 -5
  47. package/docs/runtime-train-validation.md +39 -11
  48. package/docs/stable-candidate-patrol.md +6 -5
  49. package/docs/workflow-catalog.md +9 -32
  50. package/package.json +4 -3
  51. package/packages/core/adoption/buildchain-kfd-claims.js +7 -7
  52. package/packages/core/build/standalone/build.js +7 -1
  53. package/packages/core/consumer/buildchain-config.js +2 -21
  54. package/packages/core/consumer/contract/entries.js +85 -0
  55. package/packages/core/consumer/contract/examples.js +96 -0
  56. package/packages/core/consumer/contract/identity.js +65 -0
  57. package/packages/core/consumer/contract/inspection.js +45 -0
  58. package/packages/core/consumer/contract/plan.js +149 -0
  59. package/packages/core/consumer/contract/products.js +119 -0
  60. package/packages/core/consumer/contract/reader.js +47 -0
  61. package/packages/core/consumer/contract/shape.js +46 -0
  62. package/packages/core/dev-delivery/candidate/admission.js +9 -5
  63. package/packages/core/dev-delivery/candidate/reservation.js +11 -0
  64. package/packages/core/dev-delivery/candidate/source-paths.js +12 -4
  65. package/packages/core/dev-delivery/commands/project-cut-merge-queue-admission.mjs +47 -20
  66. package/packages/core/dev-delivery/dev-delivery-provider-heartbeat.js +18 -15
  67. package/packages/core/dev-delivery/native/actions.js +9 -1
  68. package/packages/core/dev-delivery/native/heartbeat-action.js +16 -0
  69. package/packages/core/dev-delivery/native/heartbeat.js +6 -4
  70. package/packages/core/dev-delivery/native/process-entry.js +19 -0
  71. package/packages/core/dev-delivery/queue/landing-action.js +53 -0
  72. package/packages/core/dev-delivery/warrant/failure-settlement.js +8 -6
  73. package/packages/core/dev-delivery/warrant/service.js +7 -0
  74. package/packages/core/governance/buildchain-publication-authority.js +8 -23
  75. package/packages/core/governance/github-governance-authority.js +1 -0
  76. package/packages/core/observability/controller-evidence.js +0 -8
  77. package/packages/core/paper/operations/bootstrap.js +2 -0
  78. package/packages/core/paper/paper-npm-bootstrap.js +2 -2
  79. package/packages/core/providers/github/attempt-index.js +60 -0
  80. package/packages/core/providers/github/attempt-journal.js +154 -0
  81. package/packages/core/providers/github/discussions/materials.js +35 -11
  82. package/packages/core/providers/github/discussions/transport.js +16 -5
  83. package/packages/core/providers/github/pipeline-checkout.js +49 -0
  84. package/packages/core/providers/github/pipeline-entry-runs.js +210 -0
  85. package/packages/core/providers/github/pipeline-events.js +131 -0
  86. package/packages/core/providers/github/pipeline-integration.js +95 -0
  87. package/packages/core/providers/github/pipeline-policy.js +240 -0
  88. package/packages/core/providers/github/pipeline-product-payload.js +50 -0
  89. package/packages/core/providers/github/pipeline-product-release.js +198 -0
  90. package/packages/core/providers/github/pipeline-publication-artifacts.js +153 -0
  91. package/packages/core/providers/github/pipeline-release-evidence.js +30 -0
  92. package/packages/core/providers/github/pipeline-run-entry.js +86 -0
  93. package/packages/core/providers/github/pipeline-runs.js +132 -0
  94. package/packages/core/providers/github/pipeline-source.js +195 -0
  95. package/packages/core/providers/github/pipeline-stable-baseline.js +86 -0
  96. package/packages/core/providers/github/pipeline-stable-source.js +372 -0
  97. package/packages/core/providers/github/pipeline-version-artifacts.js +91 -0
  98. package/packages/core/providers/github/pipeline-version-readback.js +117 -0
  99. package/packages/core/providers/github/pipeline-version.js +199 -0
  100. package/packages/core/providers/github/pipeline-worker.js +108 -0
  101. package/packages/core/providers/github/release-evidence-assets.js +97 -0
  102. package/packages/core/publication/candidate/registry-hydration.js +2 -2
  103. package/packages/core/publication/npm/pack-preview.js +2 -2
  104. package/packages/core/publication/npm/pack-result.js +31 -0
  105. package/packages/core/publication/npm/package.js +3 -6
  106. package/packages/core/publication/npm/pipeline-channel.js +36 -0
  107. package/packages/core/publication/npm/pipeline-provider.js +137 -0
  108. package/packages/core/publication/npm/registry.js +12 -9
  109. package/packages/core/publication/pipeline/actions.js +116 -0
  110. package/packages/core/publication/pipeline/apply.js +189 -0
  111. package/packages/core/publication/pipeline/build-segments.js +107 -0
  112. package/packages/core/publication/pipeline/capsules.js +92 -0
  113. package/packages/core/publication/pipeline/context.js +39 -0
  114. package/packages/core/publication/pipeline/development-anchor.js +91 -0
  115. package/packages/core/publication/pipeline/development-current.js +63 -0
  116. package/packages/core/publication/pipeline/development-pr.js +112 -0
  117. package/packages/core/publication/pipeline/development-proof.js +76 -0
  118. package/packages/core/publication/pipeline/development-transition.js +112 -0
  119. package/packages/core/publication/pipeline/distribution.js +130 -0
  120. package/packages/core/publication/pipeline/documents.js +192 -0
  121. package/packages/core/publication/pipeline/effects.js +192 -0
  122. package/packages/core/publication/pipeline/files.js +66 -0
  123. package/packages/core/publication/pipeline/imported-materials.js +32 -0
  124. package/packages/core/publication/pipeline/journal.js +122 -0
  125. package/packages/core/publication/pipeline/next-development.js +117 -0
  126. package/packages/core/publication/pipeline/pack.js +180 -0
  127. package/packages/core/publication/pipeline/package-policy.js +22 -0
  128. package/packages/core/publication/pipeline/plan.js +136 -0
  129. package/packages/core/publication/pipeline/prepare.js +139 -0
  130. package/packages/core/publication/pipeline/qualification.js +175 -0
  131. package/packages/core/publication/pipeline/qualify.js +104 -0
  132. package/packages/core/publication/pipeline/recovery-admission.js +122 -0
  133. package/packages/core/publication/pipeline/recovery-build-download.js +80 -0
  134. package/packages/core/publication/pipeline/recovery-build-plan.js +122 -0
  135. package/packages/core/publication/pipeline/recovery-build-readback.js +68 -0
  136. package/packages/core/publication/pipeline/recovery-capsules.js +54 -0
  137. package/packages/core/publication/pipeline/recovery-import.js +80 -0
  138. package/packages/core/publication/pipeline/recovery-inspection.js +218 -0
  139. package/packages/core/publication/pipeline/recovery-materials.js +104 -0
  140. package/packages/core/publication/pipeline/recovery-plan.js +46 -0
  141. package/packages/core/publication/pipeline/recovery-prepare.js +73 -0
  142. package/packages/core/publication/pipeline/recovery-qualification.js +128 -0
  143. package/packages/core/publication/pipeline/recovery-readback.js +56 -0
  144. package/packages/core/publication/pipeline/recovery-signing.js +58 -0
  145. package/packages/core/publication/pipeline/sealed-products.js +79 -0
  146. package/packages/core/publication/pipeline/settle.js +42 -0
  147. package/packages/core/publication/pipeline/signing.js +140 -0
  148. package/packages/core/publication/pipeline/source-plan.js +83 -0
  149. package/packages/core/publication/pipeline/stable-entry.js +219 -0
  150. package/packages/core/publication/pipeline/stable-products.js +317 -0
  151. package/packages/core/publication/pipeline/stable-wait.js +170 -0
  152. package/packages/core/publication/pipeline/stable.js +82 -0
  153. package/packages/core/publication/pipeline/version-actions.js +93 -0
  154. package/packages/core/publication/pipeline/version-build.js +130 -0
  155. package/packages/core/publication/pipeline/version-context.js +143 -0
  156. package/packages/core/publication/pipeline/version-material.js +36 -0
  157. package/packages/core/publication/pipeline/version-preparation.js +69 -0
  158. package/packages/core/publication/pipeline/version-regeneration.js +162 -0
  159. package/packages/core/publication/pipeline/version-source-guard.js +69 -0
  160. package/packages/core/publication/pipeline/version.js +81 -0
  161. package/packages/core/publication/pipeline/worker.js +72 -0
  162. package/packages/core/publication/publication-reproducibility.js +2 -2
  163. package/packages/core/release/discussion/binary.js +11 -0
  164. package/packages/core/release/discussion/checkpoints.js +45 -4
  165. package/packages/core/release/discussion/envelope.js +1 -0
  166. package/packages/core/release/discussion/evidence.js +51 -0
  167. package/packages/core/release/discussion/presentation.js +92 -0
  168. package/packages/core/release/discussion/publication.js +3 -1
  169. package/packages/core/release/discussion/qualification.js +1 -0
  170. package/packages/core/release/discussion/reader.js +9 -0
  171. package/packages/core/release/discussion/session.js +2 -0
  172. package/packages/core/release/discussion/store.js +28 -31
  173. package/packages/core/release/discussion/threads.js +83 -0
  174. package/packages/core/release/next-development-transition.js +15 -15
  175. package/packages/core/release/promote-candidate/product-provider-adapters.js +4 -3
  176. package/packages/core/release/promote-ref/internal/npm-existing-evidence.js +2 -1
  177. package/packages/core/release/promote-ref/internal/publish-command.js +16 -5
  178. package/packages/core/release/stable-release-gate.js +11 -0
  179. package/packages/core/runtime/buildchain-domain.wasm +0 -0
  180. package/packages/core/runtime/domain-wasm-artifact.js +2 -2
  181. package/packages/core/runtime/entry/actions.js +27 -25
  182. package/packages/core/runtime/entry/attempt.js +25 -0
  183. package/packages/core/runtime/entry/selection.js +14 -0
  184. package/packages/core/runtime/entry/source.js +62 -0
  185. package/packages/core/workflow/attempt/identity.js +170 -0
  186. package/packages/core/workflow/attempt/journal.js +89 -0
  187. package/packages/core/workflow/attempt/materials.js +72 -0
  188. package/packages/core/workflow/attempt/reader-entry.js +12 -0
  189. package/packages/core/workflow/attempt/reader.js +149 -0
  190. package/packages/core/workflow/attempt/records.js +153 -0
  191. package/packages/core/workflow/attempt/store.js +75 -0
  192. package/packages/core/workflow/commands/pipeline-build.mjs +23 -0
  193. package/packages/core/workflow/pipeline/action-output.js +11 -0
  194. package/packages/core/workflow/pipeline/actions.js +52 -0
  195. package/packages/core/workflow/pipeline/build-control.js +140 -0
  196. package/packages/core/workflow/pipeline/build-evidence.js +210 -0
  197. package/packages/core/workflow/pipeline/build-qualification.js +145 -0
  198. package/packages/core/workflow/pipeline/build-result.js +78 -0
  199. package/packages/core/workflow/pipeline/build.js +142 -0
  200. package/packages/core/workflow/pipeline/cancellation.js +169 -0
  201. package/packages/core/workflow/pipeline/channel-control.js +157 -0
  202. package/packages/core/workflow/pipeline/channel-source.js +53 -0
  203. package/packages/core/workflow/pipeline/controller.js +141 -0
  204. package/packages/core/workflow/pipeline/delivery-control.js +249 -0
  205. package/packages/core/workflow/pipeline/delivery-observation.js +124 -0
  206. package/packages/core/workflow/pipeline/delivery-request.js +198 -0
  207. package/packages/core/workflow/pipeline/events.js +84 -0
  208. package/packages/core/workflow/pipeline/fence.js +42 -0
  209. package/packages/core/workflow/pipeline/group-control.js +59 -0
  210. package/packages/core/workflow/pipeline/guard-build.js +74 -0
  211. package/packages/core/workflow/pipeline/guard.js +158 -0
  212. package/packages/core/workflow/pipeline/host.js +144 -0
  213. package/packages/core/workflow/pipeline/integration-status.js +113 -0
  214. package/packages/core/workflow/pipeline/materials.js +58 -0
  215. package/packages/core/workflow/pipeline/notifications.js +36 -0
  216. package/packages/core/workflow/pipeline/parent-notification.js +27 -0
  217. package/packages/core/workflow/pipeline/platforms.js +21 -0
  218. package/packages/core/workflow/pipeline/progress.js +108 -0
  219. package/packages/core/workflow/pipeline/projection.js +20 -0
  220. package/packages/core/workflow/pipeline/reconcile.js +194 -0
  221. package/packages/core/workflow/pipeline/record-action.js +27 -0
  222. package/packages/core/workflow/pipeline/recorder-status.js +69 -0
  223. package/packages/core/workflow/pipeline/recovery-action.js +30 -0
  224. package/packages/core/workflow/pipeline/recovery-admission.js +122 -0
  225. package/packages/core/workflow/pipeline/recovery-build-control.js +95 -0
  226. package/packages/core/workflow/pipeline/recovery-build-evidence.js +71 -0
  227. package/packages/core/workflow/pipeline/recovery-build.js +121 -0
  228. package/packages/core/workflow/pipeline/recovery-controller.js +91 -0
  229. package/packages/core/workflow/pipeline/recovery-integration.js +79 -0
  230. package/packages/core/workflow/pipeline/recovery-merge-proof.js +90 -0
  231. package/packages/core/workflow/pipeline/recovery-ownership-settlement.js +150 -0
  232. package/packages/core/workflow/pipeline/recovery-ownership.js +91 -0
  233. package/packages/core/workflow/pipeline/recovery-plan.js +126 -0
  234. package/packages/core/workflow/pipeline/recovery-runtime.js +68 -0
  235. package/packages/core/workflow/pipeline/recovery-session.js +129 -0
  236. package/packages/core/workflow/pipeline/recovery-transition.js +135 -0
  237. package/packages/core/workflow/pipeline/recovery-unrecorded-build.js +74 -0
  238. package/packages/core/workflow/pipeline/runtime-source.js +111 -0
  239. package/packages/core/workflow/pipeline/selection.js +111 -0
  240. package/packages/core/workflow/pipeline/session.js +72 -0
  241. package/packages/core/workflow/pipeline/settlement.js +137 -0
  242. package/packages/core/workflow/pipeline/wake.js +38 -0
  243. package/packages/core/workflow/pipeline/web-status.js +108 -0
  244. package/packages/core/workflow/workflow-taxonomy.mjs +67 -47
  245. package/scripts/build-release-discussion-reader.mjs +11 -7
  246. package/scripts/check-inventory.mjs +7 -70
  247. package/scripts/check-pipeline-publication-topology.mjs +50 -0
  248. package/scripts/check-public-dogfood-contract.mjs +38 -51
  249. package/scripts/check-release-topology.mjs +15 -8
  250. package/scripts/check-self-consumer-contract.mjs +133 -0
  251. package/scripts/check-universal-workflow-bootstrap.mjs +4 -6
  252. package/scripts/generate-minimal-consumer-contract.mjs +155 -0
  253. package/scripts/generate-site-bundle.mjs +1 -1
  254. package/scripts/inventory/binary.mjs +9 -19
  255. package/scripts/inventory/promotion.mjs +2 -13
  256. package/scripts/prepare-product-toolchain.mjs +10 -0
  257. package/scripts/verify-golden-path.mjs +5 -1
  258. package/scripts/verify-product-platform.mjs +65 -0
  259. package/scripts/verify-standalone-product.mjs +42 -0
  260. package/templates/minimal-consumer/binary/.buildchain/buildchain.toml +45 -0
  261. package/templates/minimal-consumer/binary/.github/workflows/buildchain-recover.yml +30 -0
  262. package/templates/minimal-consumer/binary/.github/workflows/buildchain.yml +28 -0
  263. package/templates/minimal-consumer/binary/package.json +6 -0
  264. package/templates/minimal-consumer/binary/src/build.mjs +5 -0
  265. package/templates/minimal-consumer/binary/src/hello.c +2 -0
  266. package/templates/minimal-consumer/binary/src/verify.mjs +3 -0
  267. package/templates/minimal-consumer/npm/.buildchain/buildchain.toml +46 -0
  268. package/templates/minimal-consumer/npm/.github/workflows/buildchain-recover.yml +30 -0
  269. package/templates/minimal-consumer/npm/.github/workflows/buildchain.yml +28 -0
  270. package/templates/minimal-consumer/npm/package.json +6 -0
  271. package/templates/minimal-consumer/npm/src/build.mjs +5 -0
  272. package/templates/minimal-consumer/npm/src/verify.mjs +3 -0
  273. package/templates/minimal-consumer/paper/.buildchain/buildchain.toml +45 -0
  274. package/templates/minimal-consumer/paper/.github/workflows/buildchain-recover.yml +30 -0
  275. package/templates/minimal-consumer/paper/.github/workflows/buildchain.yml +28 -0
  276. package/templates/minimal-consumer/paper/package.json +6 -0
  277. package/templates/minimal-consumer/paper/src/build.mjs +12 -0
  278. package/templates/minimal-consumer/paper/src/verify.mjs +3 -0
@@ -52,14 +52,16 @@ and [Discussions API guide](https://docs.github.com/en/graphql/guides/using-the-
52
52
 
53
53
  ## Records and concurrency
54
54
 
55
- The body is not a mutable global status document. Workflows append bounded JSON
56
- envelopes in comments. Each record contains an intent ID, workflow attempt,
55
+ The body is not a mutable global status document. New intents declare `organization: attempt-threads/v1`. Each attempt owns exactly
56
+ one top-level root comment; node events, checkpoints and diagnostics are appended
57
+ as replies using that root comment ID. Workflows append bounded JSON envelopes
58
+ with readable context and evidence links. Each record contains an intent ID, workflow attempt,
57
59
  predecessor, semantic node, sequence, status, payload schema, and the selected
58
60
  runtime's exact repository and revision. These are provenance; downstream nodes
59
61
  do not compare the runtime revision with the workflow entry revision.
60
62
 
61
63
  Node owners serialize their own sequences. Different node owners append
62
- independent comments. Recovery explicitly selects the predecessor in the same
64
+ independent replies under the same attempt root. Recovery explicitly selects the predecessor in the same
63
65
  Discussion. A late result from an older attempt remains history; it cannot
64
66
  complete or overwrite the recovering attempt. Success requires every declared
65
67
  node, including nodes whose records have not appeared. Reusing completed work
@@ -71,12 +73,47 @@ Initialization scans complete repository category pages, reuses the matching
71
73
  intent, and refuses duplicate owners. A mutation whose response was lost is read
72
74
  back before another write. If its outcome remains unknown, execution stops with
73
75
  an explicit diagnosis. `clientMutationId` is not used as an idempotency guarantee.
76
+ The attempt owner creates the root before dispatching independent node writers.
77
+ Root creation is serialized and response-loss recovery reads it back. Different
78
+ roots for one attempt, nested roots and events attached to the wrong attempt are
79
+ rejected. Root and reply connections are both completely paginated; individual
80
+ page and total byte bounds fail closed. Community conversation is ignored.
81
+
74
82
  Exact IDs carry the transaction through execution; search indexing is not an
75
83
  execution dependency. Pagination limits fail closed instead of silently hiding
76
84
  records. Only records from the original workflow writer are authoritative;
77
85
  ordinary community replies are excluded and edited transaction records are
78
86
  reported as integrity failures.
79
87
 
88
+ ## Human-readable information hub
89
+
90
+ The Discussion body declares the release intent and expected nodes. Each root
91
+ links its workflow execution, selected runtime and predecessor attempt. Replies
92
+ name the semantic node, distinguish checkpoint sequence from execution status,
93
+ and expose bounded details. An independent binary workflow links its own run but
94
+ replies to the release attempt it observed before starting; a late completion
95
+ cannot migrate into a successor attempt.
96
+
97
+ Checkpoint replies include downloadable JSON attachments with file names, media
98
+ types, byte counts and SHA-256 digests. On node failures, the same thread receives
99
+ JSON diagnostics and a text `.log` containing the recorded event timeline and
100
+ bounded failure classification. Raw exceptions, environment variables and HTTP
101
+ credentials are not copied into diagnostics. Complete execution logs remain
102
+ linked through their Actions runs. Qualification also exercises JSON/log downloads.
103
+
104
+ Automation uploads these files through the documented GitHub Release asset API
105
+ and embeds the provider's download links in the owning comment. This does not
106
+ use GitHub's browser-only drag-and-drop upload implementation. The existing draft
107
+ material archive is private to users with the required repository access; a
108
+ public Discussion does not make draft attachments publicly downloadable. Download
109
+ links require that permission and files remain outside the source Git database.
110
+
111
+ Root comments and event replies are immutable execution facts. The latest state
112
+ is computed from records, not from an overwritten status summary. Historical flat
113
+ intents remain readable as historical data; all new writes use an attempt root
114
+ and replies, and new intents enforce that organization. No historical Discussion
115
+ body or comment is rewritten to change its layout.
116
+
80
117
  ## Recovery bytes and historical readers
81
118
 
82
119
  Large sealed inputs and provider checkpoints are retained as immutable,
@@ -111,8 +148,10 @@ same Discussion. It neither rewrites X's records nor changes the release intent.
111
148
  ## Ownership
112
149
 
113
150
  `actions/release/transaction/{open,record,inspect}` are reusable Node adapters.
114
- `packages/core/release/discussion` owns envelopes, projections, sessions and
115
- recovery contracts. `packages/core/providers/github/discussions` owns GitHub
151
+ `packages/core/release/discussion` owns envelopes, pure state projections, sessions, thread organization,
152
+ presentation, declared evidence and recovery contracts. `threads.js` checks
153
+ provider placement; `presentation.js` renders contextual Markdown; `evidence.js`
154
+ builds bounded attachment descriptors and diagnostic reports. `packages/core/providers/github/discussions` owns GitHub
116
155
  transport and immutable material IO. The existing public promotion workflow
117
156
  owns job boundaries; the Rust publication state machine still owns publication
118
157
  decisions and provider-effect ordering.
@@ -8,12 +8,12 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-12
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-12
16
- visible_context: Stable canary policy, symmetric zero-input self-build callers, artifact validation and regression tests.
15
+ generated_at: 2026-09-14
16
+ visible_context: User-directed zero-delay self release policy, required provider evidence and regression tests.
17
17
  invisible_context_boundary: No external consumer changes or completed stable publication is claimed.
18
18
  ---
19
19
 
@@ -358,7 +358,7 @@ The production channel and the test channel therefore intentionally diverge
358
358
  after release: production stays on the release commit, while alpha/dev continue
359
359
  at the next prerelease commit.
360
360
 
361
- ### Stable Release Throttle And Canary Gate
361
+ ### Stable Release Evidence Gate
362
362
 
363
363
  Buildchain's own stable channel has an additional pre-publication gate. It is
364
364
  evaluated after the PR-stage release candidate has been resolved and before the
@@ -379,8 +379,6 @@ candidate is allowed only when all of these facts are true:
379
379
 
380
380
  - the candidate resolves to an immutable exact alpha tag and its GitHub
381
381
  prerelease timestamp;
382
- - at least 24 hours have passed since the preceding stable patch on the same
383
- minor line;
384
382
  - the preceding stable-to-alpha comparison contains a product or public
385
383
  contract path, not only version, test, evidence, or retrospective changes;
386
384
  - the version-bound impact record has a non-empty summary and at least one
@@ -392,8 +390,7 @@ candidate is allowed only when all of these facts are true:
392
390
  - the status target is the repository-owned alpha dogfood workflow, its summary
393
391
  archive matches the provider digest, and the summary binds the source run,
394
392
  attempt, exact candidate runtime and all install/build/verify stages; overrides,
395
- another candidate and incomplete artifacts are rejected;
396
- - at least one hour has elapsed after the last required canary completed.
393
+ another candidate and incomplete artifacts are rejected.
397
394
 
398
395
  The machine report is written to
399
396
  `.buildchain/release-passport/stable-release-gate.json`. A passing report is
@@ -407,10 +404,11 @@ Generic `commit-status` consumer canaries remain supported for repositories that
407
404
  explicitly declare them; their runtime input or workflow-owned run-name binding
408
405
  continues to apply.
409
406
 
410
- The cooldown is a minimum interval, not an instruction to release every day.
411
- Compatible work should still be batched until a stable release has a concrete
412
- consumer need. Changing the interval, canary set, attestors, product path
413
- boundary, or soak time is a reviewed policy change.
407
+ Buildchain sets both the minimum stable interval and canary soak duration to
408
+ zero. A candidate can proceed as soon as its required evidence is valid; no
409
+ fixed cooldown, soak window or scheduled release time delays this delivery.
410
+ Changing the canary set, attestors or product path boundary remains a reviewed
411
+ policy change.
414
412
 
415
413
  Repositories that want a predictable scheduled stable window can use
416
414
  [`Stable Candidate Patrol`](stable-candidate-patrol.md). It persists each exact
@@ -8,12 +8,12 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-11
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-11
16
- visible_context: Explicit user-approved runtime selection, recovery and alpha publication requirements.
15
+ generated_at: 2026-09-14
16
+ visible_context: Source-bound recovery, nested delivery credential transport, published entry contract and local failure-path tests.
17
17
  invisible_context_boundary: This contract does not claim implementation or hosted qualification is complete.
18
18
  ---
19
19
 
@@ -40,7 +40,9 @@ Switching runtimes does not automatically qualify all previous results for reuse
40
40
  Neither the persisted caller nor its contract lock needs a train rewrite.
41
41
 
42
42
  An entry failure is repaired by publishing and adopting a corrected entry and
43
- starting a complete run. Recovering an invalid entry is not a runtime feature.
43
+ starting a new provider run through the corrected floating entry. The caller files
44
+ remain unchanged. A usable recovery entry can still recover the exact existing
45
+ attempt; an entry failure before admission has no attempt to recover.
44
46
  Buildchain self-dogfood uses exactly the same consumer contract and has no
45
47
  repository-specific execution or recovery route.
46
48
 
@@ -54,7 +56,73 @@ single preparation ownership, different entry/runtime execution, train recovery,
54
56
  platform and multi-job qualification, and validation of the published consumer
55
57
  entry. A source test or a successful package import alone is insufficient.
56
58
 
57
- ## Consumer build and recovery
59
+ ## Minimal pipeline provider credentials
60
+
61
+ Configure `BUILDCHAIN_AUTOMATION_TOKEN` once as a repository Actions secret when
62
+ protected delivery requires permissions unavailable to `GITHUB_TOKEN`. Both
63
+ generated callers already inherit secrets. No token value, additional input or
64
+ provider orchestration belongs in the consumer TOML or workflow source.
65
+
66
+ Scope this credential to the consumer repository. Delivery needs Administration
67
+ read access to inspect classic branch locks, Checks read, and Actions, Contents,
68
+ Pull requests and Commit statuses write access for its existing provider steps.
69
+ It does not need permission to change branch protection or bypass review. Development
70
+ admission can fall back to `GITHUB_TOKEN`; unreadable protection still fails
71
+ closed before candidate reservation instead of assuming an unlocked branch.
72
+ Channel enqueue requires an explicit automation credential or an App installation
73
+ credential because `GITHUB_TOKEN` suppresses the required `merge_group` workflow.
74
+ Both central entries select that credential through the shared token provider;
75
+ queue reads and journal writes retain their existing workflow credential. An App
76
+ uses `BUILDCHAIN_APP_CLIENT_ID` and `BUILDCHAIN_APP_PRIVATE_KEY`, scoped to the
77
+ consumer repository with Pull requests write access. Missing or incomplete queue
78
+ credentials fail closed before enqueue.
79
+
80
+ The internal delivery edge forwards only this named secret to the credentialed
81
+ source, reservation, heartbeat and landing steps. Product builds, native
82
+ execution and native evidence sealing retain their separate read-only jobs and
83
+ receive no automation credential. Publication settlement uses the same canonical
84
+ secret as its existing fallback credential. Repairing a missing workflow secret
85
+ edge requires a corrected published entry and a new provider run.
86
+
87
+ ## Minimal pipeline recovery
88
+
89
+ The minimal contract has one normal event caller and one manual recovery caller,
90
+ plus `.buildchain/buildchain.toml`. Both callers are maintained by Buildchain's
91
+ consumer setup; product differences do not require additional recovery workflows.
92
+ The repository implementation alone does not prove the entry has been published
93
+ or qualified in a clean consumer.
94
+
95
+ The workflow summary identifies the current attempt, its source PR, completed
96
+ steps and remaining work. Follow **Recover this attempt**, choose **Run workflow**,
97
+ and paste the exact attempt. Leave `runtime-ref` empty for an ordinary retry;
98
+ supply a repaired runtime only when needed. The public recovery entry accepts no
99
+ other recovery selectors. It derives configuration, producer runs, artifacts and
100
+ transaction coordinates from the canonical attempt history.
101
+
102
+ Recovery opens a new attempt with an explicit predecessor. Successful platform
103
+ jobs and their actual retained artifacts are independently requalified; only
104
+ missing platforms or explicitly incompatible stage implementations are rebuilt.
105
+ A signing failure can requalify the original sealed bytes under the repaired
106
+ publisher. Partial publication preserves its original signed transaction and
107
+ completed effects, reads providers again, and authorizes only remaining effects.
108
+ Missing, expired or conflicting evidence stops with a diagnosis; it does not
109
+ silently trigger a complete rebuild or replace published bytes.
110
+
111
+ A repeated request for the same predecessor and repair selects the same successor.
112
+ If that recovery was interrupted, select the successor shown in the summary for
113
+ the next recovery. An active predecessor must first finish or be cancelled using
114
+ its ordinary GitHub execution link. A changed or superseded source cannot reuse
115
+ an old attempt as authority for the current PR. Completed publication remains
116
+ recorded even when distribution or the next development version still needs work.
117
+ Cancellation stops remaining work and cannot undo published results.
118
+
119
+ Once admitted, ordinary wake events continue with the recovered attempt's exact
120
+ runtime, even when the consumer lock still names the original runtime. A further
121
+ runtime change requires another explicit recovery. An entry repair is distributed
122
+ through the existing `@v4` or `@v4-alpha` entry; consumers do not maintain backup
123
+ scripts, patch a job definition, or add a different recovery workflow family.
124
+
125
+ ## Advanced build component recovery
58
126
 
59
127
  ```yaml
60
128
  on:
@@ -8,27 +8,30 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-08
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-08
16
- invisible_context: not asserted
15
+ generated_at: 2026-09-14
16
+ visible_context: Source-bound caller installation, pipeline wake implementation and GitHub event documentation.
17
+ invisible_context_boundary: No unobserved provider execution or publication authority is claimed.
17
18
  ---
18
19
 
19
20
  # Runtime Train Validation
20
21
 
21
22
  A train repairs the execution runtime without changing the consumer's durable
22
23
  public entry. All public workflows, including ordinary builds, use the same
23
- [Runtime entry contract](runtime-entry.md). The transient runtime parameter
24
- wins over the consumer lock. Buildchain dogfood follows this same path.
24
+ [Runtime entry contract](runtime-entry.md). The recovery entry accepts a transient runtime parameter, which wins over the
25
+ consumer lock. The normal minimal pipeline accepts only an optional config path.
26
+ Buildchain dogfood follows the same two-entry contract.
25
27
 
26
28
  ## Validate a runtime change
27
29
 
28
30
  1. Commit the candidate with its action bundles, WASM and runtime contract.
29
31
  2. Publish the candidate at `train/v4/v4.1/<capability>`.
30
- 3. Dispatch the consumer's existing public entry with `runtime-ref` set to that
31
- train. Record the selected runtime, consumer source and resulting evidence.
32
+ 3. Recover the exact retained attempt through `buildchain-recover.yml`, with
33
+ `runtime-ref` set to that train. Record the attempt, selected runtime, consumer
34
+ source and resulting evidence.
32
35
  4. After checks and independent review, merge into protected Dev and publish
33
36
  the requested Alpha. Qualify the published entry before Stable promotion.
34
37
 
@@ -38,13 +41,38 @@ provider credentials, capability constraints and readback requirements.
38
41
 
39
42
  ## Recover a runtime failure
40
43
 
41
- Start a new dispatch through the same public entry with the repaired train.
42
- For builds, supply `resume-run-id`; for release promotion, preserve the original
43
- candidate run and transaction in the typed request. The entry prepares runtime
44
- Y while the task keeps its original source and valid completed evidence.
44
+ Start a new dispatch through `buildchain-recover.yml` with the exact attempt
45
+ and the repaired train. The runtime selects the retained source and completed
46
+ evidence; the consumer does not provide candidate, run or transaction selectors.
45
47
  A GitHub failed-job rerun does not change its inputs and cannot select a new
46
48
  runtime. Do not persist the train into the caller workflow or contract lock.
47
49
 
48
50
  If the public entry itself is defective, publish and adopt the corrected entry
49
51
  and start a full run. Copied consumer recovery packages and alternate recovery
50
52
  workflows are not part of the runtime contract.
53
+
54
+ ## Protected minimal-entry installation
55
+
56
+ Install both generated callers, `buildchain.yml` and `buildchain-recover.yml`,
57
+ on the protected default branch before retiring the previous delivery controller.
58
+ Read back both files at the exact protected commit and verify their provider
59
+ workflow registrations. A workflow registered from a task branch does not prove
60
+ that its event receiver is installed on the default branch. GitHub requires that
61
+ location for [repository dispatch events](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#repository_dispatch).
62
+
63
+ Recovery preserves source and completed artifacts, then emits a repository
64
+ wake for the remaining pipeline work. That wake requires the normal caller on
65
+ the default branch; installing only the manual recovery caller leaves this
66
+ continuation receiver absent. Verify the complete pair before the first recovery.
67
+
68
+ During this bounded migration, pause the normal pipeline before enabling the
69
+ previous protected delivery controller. After the installation merge, wait for
70
+ its runs and Warrant to become terminal, then pause that controller and enable
71
+ the normal pipeline before recovering a current admitted attempt. An installation
72
+ merge advances the protected base, so an older unmerged source attempt must be
73
+ re-admitted on the current base before recovery.
74
+
75
+ Both callers are byte-identical to the generated consumer entries and call the
76
+ published `@v4-alpha` public workflows. Recovery accepts only `attempt` and
77
+ optional `runtime-ref`; the normal caller retains its protected config path.
78
+ This installation order does not qualify the full self cutover or Stable release.
@@ -8,12 +8,12 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-12
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-12
16
- visible_context: Repository stable policy, public build qualification producer, artifact reader and regression tests.
15
+ generated_at: 2026-09-14
16
+ visible_context: User-directed zero-delay self release policy, required provider evidence and regression tests.
17
17
  invisible_context_boundary: No credentials, private logs, or unpublished consumer content were used.
18
18
  ---
19
19
 
@@ -52,7 +52,8 @@ It writes `buildchain-canary/buildchain-zero-input` on the qualified runtime SHA
52
52
  as `github-actions[bot]`. The consumer source SHA may differ from that runtime.
53
53
 
54
54
  The repository Patrol policy requires the alpha Release and this qualification
55
- status. It retains the one-hour soak. The publication transaction still requires
55
+ status. Its minimum soak and stable publication interval are both zero.
56
+ The publication transaction still requires
56
57
  its sealed release candidate and protected branch checks. Qualification produces
57
58
  evidence; it does not publish or merge a candidate.
58
59
 
@@ -78,7 +79,7 @@ Declare the default once in `.buildchain/buildchain.toml`:
78
79
  strategy = "latest-qualified-alpha"
79
80
  timezone = "Asia/Shanghai"
80
81
  publish_at = "03:00"
81
- minimum_soak_seconds = 3600
82
+ minimum_soak_seconds = 0
82
83
  required_checks = [
83
84
  "alpha-release",
84
85
  "workflow:Build",
@@ -23,7 +23,7 @@ Generated from `architecture/workflow-taxonomy.json`. Every workflow has one can
23
23
 
24
24
  Public workflows own the consumer API. Component workflows own reusable multi-job topology. Self workflows own Buildchain repository automation. Actions own execution steps; JS adapters and Rust/WASM own implementation.
25
25
 
26
- Names use `public-<category>-<purpose>.yml`, `.<category>-<purpose>.yml`, and `self-<category>-<purpose>.yml`, with categories `build`, `release`, and `ops`. The primary build API and backbone use `build.yml` and `.build.yml`.
26
+ Names use `public-<category>-<purpose>.yml`, `.<category>-<purpose>.yml`, and the generated self callers `buildchain.yml` and `buildchain-recover.yml`, with categories `build`, `release`, and `ops`. The primary build API and backbone use `build.yml` and `.build.yml`.
27
27
 
28
28
  Register ownership before adding a workflow. `pnpm run check:workflows` validates source, calls, required CI integration and independent review ownership. `pnpm run generate:workflows` regenerates this catalog.
29
29
 
@@ -47,6 +47,8 @@ Register ownership before adding a workflow. `pnpm run check:workflows` validate
47
47
  | [public-ops-patrol-monthly.yml](../.github/workflows/public-ops-patrol-monthly.yml) | ops | reusable | active | Buildchain Patrol Monthly |
48
48
  | [public-ops-patrol-weekly.yml](../.github/workflows/public-ops-patrol-weekly.yml) | ops | reusable | active | Buildchain Patrol Weekly |
49
49
  | [public-ops-patrol.yml](../.github/workflows/public-ops-patrol.yml) | ops | reusable | active | Buildchain Patrol |
50
+ | [public-ops-pipeline.yml](../.github/workflows/public-ops-pipeline.yml) | ops | reusable | active | Buildchain pipeline |
51
+ | [public-ops-recover.yml](../.github/workflows/public-ops-recover.yml) | ops | reusable | active | Buildchain recovery |
50
52
  | [public-ops-release-governance.yml](../.github/workflows/public-ops-release-governance.yml) | ops | reusable | active | Release Governance Reconcile |
51
53
  | [public-ops-stable-candidate-patrol.yml](../.github/workflows/public-ops-stable-candidate-patrol.yml) | ops | reusable | active | Buildchain Stable Candidate Patrol |
52
54
  | [public-ops-tail-reseal.yml](../.github/workflows/public-ops-tail-reseal.yml) | ops | reusable | active | V4 Retained Candidate Tail Reseal |
@@ -69,42 +71,17 @@ Register ownership before adding a workflow. `pnpm run check:workflows` validate
69
71
  | [.build-gate-profile.yml](../.github/workflows/.build-gate-profile.yml) | build | reusable | active | Buildchain Shifu Gate Profile |
70
72
  | [.build.yml](../.github/workflows/.build.yml) | build | reusable | active | Buildchain Build |
71
73
  | [.ops-git-sync.yml](../.github/workflows/.ops-git-sync.yml) | ops | reusable | active | sync remote git |
74
+ | [.ops-pipeline-delivery.yml](../.github/workflows/.ops-pipeline-delivery.yml) | ops | reusable | active | Internal pipeline delivery |
75
+ | [.ops-pipeline-execute.yml](../.github/workflows/.ops-pipeline-execute.yml) | ops | reusable | active | Internal pipeline execution |
72
76
  | [.release-authority.yml](../.github/workflows/.release-authority.yml) | release | reusable | active | Buildchain Sealed Publication Authority |
73
77
  | [.release-binary-assets.yml](../.github/workflows/.release-binary-assets.yml) | release | reusable | active | Buildchain Binary Release Assets |
78
+ | [.release-pipeline-products.yml](../.github/workflows/.release-pipeline-products.yml) | release | reusable | active | Internal pipeline product publication |
79
+ | [.release-pipeline-version.yml](../.github/workflows/.release-pipeline-version.yml) | release | reusable | active | Internal pipeline version preparation |
74
80
  | [.release-promote.yml](../.github/workflows/.release-promote.yml) | release | reusable | active | Release Candidate Promote Advanced |
75
81
 
76
82
  ## self
77
83
 
78
84
  | Workflow | Category | Invocation | Status | Purpose |
79
85
  | --- | --- | --- | --- | --- |
80
- | [self-build-adopter-dogfood.yml](../.github/workflows/self-build-adopter-dogfood.yml) | build | repository | active | V4 Adopter Delivery Dogfood |
81
- | [self-build-alpha-dogfood.yml](../.github/workflows/self-build-alpha-dogfood.yml) | build | repository | active | Buildchain Alpha Self-Dogfood |
82
- | [self-build-binary-distribution.yml](../.github/workflows/self-build-binary-distribution.yml) | build | repository | active | Binary Distribution |
83
- | [self-build-channel-verify.yml](../.github/workflows/self-build-channel-verify.yml) | build | repository | active | Release - Verify |
84
- | [self-build-demo-dogfood.yml](../.github/workflows/self-build-demo-dogfood.yml) | build | repository | active | Buildchain Declarative Demo Dogfood |
85
- | [self-build-demo-media-qualification.yml](../.github/workflows/self-build-demo-media-qualification.yml) | build | repository | active | Auditable Demo Media Profile Qualification |
86
- | [self-build-fixture.yml](../.github/workflows/self-build-fixture.yml) | build | repository | active | Build Surface Fixture |
87
- | [self-build-public-consumer-dogfood.yml](../.github/workflows/self-build-public-consumer-dogfood.yml) | build | repository | active | V4 Public Consumer Dogfood |
88
- | [self-build-stable-candidate-qualification.yml](../.github/workflows/self-build-stable-candidate-qualification.yml) | build | repository | active | Buildchain Stable Candidate Qualification |
89
- | [self-build-stable-dogfood.yml](../.github/workflows/self-build-stable-dogfood.yml) | build | repository | active | Buildchain Stable Self-Dogfood |
90
- | [self-build-verify.yml](../.github/workflows/self-build-verify.yml) | build | repository | active | Verify |
91
- | [self-ops-bootstrap-dogfood.yml](../.github/workflows/self-ops-bootstrap-dogfood.yml) | ops | repository | active | Universal Bootstrap Train-First Self-Dogfood |
92
- | [self-ops-dev-delivery.yml](../.github/workflows/self-ops-dev-delivery.yml) | ops | repository | active | Buildchain Dev Delivery |
93
- | [self-ops-governance-audit.yml](../.github/workflows/self-ops-governance-audit.yml) | ops | repository | active | GitHub Governance Authority Audit |
94
- | [self-ops-housekeeping-daily.yml](../.github/workflows/self-ops-housekeeping-daily.yml) | ops | repository | active | Engineering Housekeeper Daily |
95
- | [self-ops-housekeeping-monthly.yml](../.github/workflows/self-ops-housekeeping-monthly.yml) | ops | repository | active | Engineering Housekeeper Monthly |
96
- | [self-ops-housekeeping-weekly.yml](../.github/workflows/self-ops-housekeeping-weekly.yml) | ops | repository | active | Engineering Housekeeper Weekly |
97
- | [self-ops-merge-queue.yml](../.github/workflows/self-ops-merge-queue.yml) | ops | repository | active | Dev Merge Queue Governance |
98
- | [self-ops-patrol-daily.yml](../.github/workflows/self-ops-patrol-daily.yml) | ops | repository | active | Buildchain Dogfood Patrol Daily |
99
- | [self-ops-patrol-monthly.yml](../.github/workflows/self-ops-patrol-monthly.yml) | ops | repository | active | Buildchain Dogfood Patrol Monthly |
100
- | [self-ops-patrol-weekly.yml](../.github/workflows/self-ops-patrol-weekly.yml) | ops | repository | active | Buildchain Dogfood Patrol Weekly |
101
- | [self-ops-promotion-recovery.yml](../.github/workflows/self-ops-promotion-recovery.yml) | ops | repository | active | Buildchain Ref Promotion Recovery |
102
- | [self-ops-runner-smoke.yml](../.github/workflows/self-ops-runner-smoke.yml) | ops | repository | active | Self-hosted Runner Smoke |
103
- | [self-ops-stable-candidate-patrol.yml](../.github/workflows/self-ops-stable-candidate-patrol.yml) | ops | repository | active | Buildchain Dogfood Stable Candidate Patrol |
104
- | [self-release-binary-assets.yml](../.github/workflows/self-release-binary-assets.yml) | release | repository | active | Binary Release Assets |
105
- | [self-release-line-open.yml](../.github/workflows/self-release-line-open.yml) | release | repository | active | Release Line Bootstrap |
106
- | [self-release-next-development.yml](../.github/workflows/self-release-next-development.yml) | release | repository | active | Next Development Review |
107
- | [self-release-npm-dry-run.yml](../.github/workflows/self-release-npm-dry-run.yml) | release | repository | active | Publish npm package |
108
- | [self-release-promote.yml](../.github/workflows/self-release-promote.yml) | release | repository | active | Buildchain Ref Promotion |
109
- | [self-release-rehearsal-dogfood.yml](../.github/workflows/self-release-rehearsal-dogfood.yml) | release | repository | active | V4 Publication Rehearsal Dogfood |
110
- | [self-release-tail-dogfood.yml](../.github/workflows/self-release-tail-dogfood.yml) | release | repository | active | V4 Declarative Release Tail Dogfood |
86
+ | [buildchain-recover.yml](../.github/workflows/buildchain-recover.yml) | ops | repository | active | Buildchain recovery |
87
+ | [buildchain.yml](../.github/workflows/buildchain.yml) | ops | repository | active | Buildchain pipeline |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.1.3-alpha.0",
3
+ "version": "4.1.3-alpha.10",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -157,7 +157,7 @@
157
157
  "scripts": {
158
158
  "precheck:static": "prettier --check architecture/decisions/0003-two-phase-delivery-warrant.md architecture/delivery-authority-parity.json contracts/dev-delivery-authority-v2.schema.json dist/site/schemas/dev-delivery-authority-v2.schema.json docs/dev-delivery-qualification-landing-adr.md packages/core/dev-delivery/dev-delivery-authority-candidate.js packages/core/dev-delivery/dev-delivery-authority-evidence.js packages/core/dev-delivery/dev-delivery-authority-landing.js packages/core/dev-delivery/dev-delivery-authority-observation.js packages/core/dev-delivery/dev-delivery-authority-qualification.js packages/core/dev-delivery/dev-delivery-authority-settlement.js packages/core/dev-delivery/dev-delivery-authority-state.js packages/core/dev-delivery/dev-delivery-execution-failure.js packages/core/dev-delivery/dev-delivery-execution-transfer.js packages/core/dev-delivery/dev-delivery-landing-readback.js packages/core/dev-delivery/dev-delivery-landing-terminal-evidence.js packages/core/dev-delivery/dev-delivery-landing-testing-port.js packages/core/dev-delivery/dev-delivery-native-execution.js packages/core/dev-delivery/dev-delivery-native-proof.js packages/core/dev-delivery/dev-delivery-process-boundary.js packages/core/dev-delivery/dev-delivery-warrant-qualification.js packages/core/dev-delivery/dev-delivery-warrant-state.js packages/core/dev-delivery/commands/dev-delivery-authority-command-adapters.mjs packages/core/dev-delivery/commands/dev-delivery-authority-provider.mjs packages/core/dev-delivery/commands/dev-delivery-authority.mjs packages/core/dev-delivery/native/execution.js packages/core/dev-delivery/commands/dev-delivery-process-boundary.mjs packages/core/dev-delivery/native/transactions.js packages/core/dev-delivery/commands/dev-delivery-two-phase.mjs packages/core/dev-delivery/commands/dev-delivery-warrant-options.mjs packages/core/dev-delivery/warrant/persistence.js templates/native-dev-delivery.yml",
159
159
  "operator:windows-jit": "bash packages/core/providers/commands/aws-windows-jit-operator.sh",
160
- "check": "pnpm run check:discussion-reader && pnpm run check:layout && node scripts/check-runtime-entry.mjs && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
160
+ "check": "pnpm run check:consumer-contract && pnpm run check:discussion-reader && pnpm run check:layout && node scripts/check-runtime-entry.mjs && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
161
161
  "check:static": "node scripts/check-javascript-syntax.mjs && node scripts/check-source-bindings.mjs && prettier --check architecture/*.json contracts/release-tail-provider-bindings-v1.schema.json contracts/v4-canonical-contracts-v1.schema.json contracts/v4-compatibility-facts-v1.schema.json contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json contracts/v4-delivery-warrant-trace-v1.schema.json contracts/v4-floating-consumer-policy-receipt-v1.schema.json contracts/runtime-resume-lineage-v2.schema.json contracts/v4-tail-reseal-v1.schema.json contracts/v4-host-contract-v1.schema.json contracts/v4-provider-operation-journal-v1.schema.json contracts/v4-release-activation-shadow-v1.schema.json contracts/v4-stable-publication-fence-v1.schema.json contracts/v4-partial-mutation-recovery-v1.schema.json contracts/v4-stage-capsule-v1.schema.json contracts/v4-stage-capsule-store-v1.schema.json contracts/v4-stage-capsule-resume-v1.schema.json contracts/release-tail-capabilities-v1.schema.json contracts/fixtures/release-tail-capabilities-v1/*.json contracts/fixtures/v4-delivery-warrant-trace-v1/*.json contracts/fixtures/v4-floating-consumer-policy-v1/*.json contracts/fixtures/runtime-resume-lineage-v2/*.json contracts/fixtures/v4-tail-reseal-v1/*.json contracts/fixtures/v4-compatibility-facts-v1/*.json contracts/fixtures/v4-provider-operation-journal-v1/*.json contracts/fixtures/v4-provider-readback-idempotency-v1/*.json contracts/fixtures/v4-release-activation-shadow-v1/*.json contracts/fixtures/v4-stable-publication-fence-v1/*.json contracts/fixtures/v4-partial-mutation-recovery-v1/*.json contracts/fixtures/v4-stage-capsule-v1/*.json contracts/fixtures/v4-stage-capsule-store-v1/*.json contracts/fixtures/v4-stage-capsule-resume-v1/*.json packages/core/contracts/command-registry.mjs packages/core/governance/cli/compatibility-facts.mjs packages/core/contracts/canonical-contracts.js packages/core/contracts/kungfu-temporal-fact.js packages/core/governance/buildchain-compatibility-fact.js packages/core/governance/buildchain-compatibility-authority.js packages/core/governance/buildchain-compatibility-proof.js packages/core/consumer/floating-consumer-evidence.js packages/core/consumer/floating-consumer-policy.js packages/core/consumer/floating-consumer-release-passport.js packages/core/release/recovery/lineage.js packages/core/release/tail-reseal-contract.js packages/core/release/tail-reseal-github.js packages/core/release/tail-reseal-receipt.js packages/core/release/tail-reseal.js packages/core/consumer/runtime-selector-persistence.js packages/core/release/provider-operation-journal.js packages/core/release/provider-readback-idempotency.js packages/core/release/release-activation-shadow.js packages/core/release/stable-publication-fence.js packages/core/release/partial-mutation-recovery-qualification.js packages/core/build/stage-capsule.js packages/core/build/stage-capsule-store.js packages/core/build/stage-capsule-local-store.js packages/core/build/platform-stage-checkpoints.js packages/core/build/stage-capsule-resume-planner.js packages/core/build/stage-capsule-qualification.js packages/core/build/stage-capsule-qualification-campaign.js packages/core/dev-delivery/delivery-warrant-fixture-runner.js packages/core/dev-delivery/delivery-warrant-read-candidate.js packages/core/dev-delivery/delivery-warrant-semantic-diff-gate.js packages/core/dev-delivery/delivery-warrant-shadow-adapter.js scripts/check-core-mechanism-inventory.mjs scripts/check-runtime-semantic-closure.mjs scripts/check-release-tail-contract.mjs scripts/check-javascript-syntax.mjs scripts/check-maintainability.mjs packages/core/dev-delivery/commands/dev-pr-prequeue-guard.mjs scripts/check-public-dogfood-contract.mjs scripts/maintainability-metrics.mjs scripts/maintainability-domain-metrics.mjs scripts/maintainability-governance.mjs scripts/generate-agent-change-map.mjs scripts/public-reference.mjs scripts/site-reference-registry.mjs scripts/generate-public-reference.mjs packages/core/governance/commands/architecture.mjs packages/core/runtime/commands/bridge-bootstrap.mjs scripts/bridge-evidence.mjs packages/core/consumer/commands/consumer-policy.mjs packages/core/runtime/commands/host-adapter.mjs scripts/platform-stage-checkpoint-rehearsal.mjs scripts/stage-capsule-resume-rehearsal.mjs packages/core/build/commands/stage-capsule-qualification.mjs scripts/tail-reseal-macos-rehearsal.mjs packages/core/release/commands/tail-reseal.mjs scripts/warrant-shadow-plan.mjs scripts/verify-golden-path.mjs tests/runtime-entry-provider.test.mjs tests/command-registry.test.mjs tests/core-mechanism-inventory.test.mjs tests/release-tail-contract.test.mjs tests/maintainability.test.mjs tests/maintainability-governance.test.mjs tests/promotion-responsibilities.test.mjs tests/public-reference.test.mjs tests/architecture.test.mjs tests/bridge.test.mjs tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/runtime-semantic-closure.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs tests/warrant-shadow-plan.test.mjs",
162
162
  "check:bridge": "cargo fmt --manifest-path crates/buildchain-host-bridge/Cargo.toml -- --check && cargo clippy --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml -- -D warnings && cargo test --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml",
163
163
  "check:contracts": "pnpm run check:contracts:rust && node --test tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/domain-wasm.test.mjs tests/floating-consumer-policy-contract.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/publication-rehearsal.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs",
@@ -184,7 +184,8 @@
184
184
  "check:implementation-naming": "node scripts/check-implementation-naming.mjs",
185
185
  "check:layout": "node scripts/check-code-layout.mjs",
186
186
  "build:discussion-reader": "node scripts/build-release-discussion-reader.mjs",
187
- "check:discussion-reader": "node scripts/build-release-discussion-reader.mjs --check"
187
+ "check:discussion-reader": "node scripts/build-release-discussion-reader.mjs --check",
188
+ "check:consumer-contract": "node scripts/generate-minimal-consumer-contract.mjs --check"
188
189
  },
189
190
  "devDependencies": {
190
191
  "@actions/expressions": "0.3.61",
@@ -58,7 +58,10 @@ const WORKFLOW_AND_ACTION_FILES = Object.freeze([
58
58
  ".github/workflows/.build.yml",
59
59
  ".github/workflows/.release-promote.yml",
60
60
  ".github/workflows/public-release-promote.yml",
61
- ".github/workflows/self-release-promote.yml",
61
+ ".github/workflows/buildchain.yml",
62
+ ".github/workflows/buildchain-recover.yml",
63
+ ".github/workflows/public-ops-pipeline.yml",
64
+ ".github/workflows/public-ops-recover.yml",
62
65
  ".github/workflows/public-release-artifact-attestation.yml",
63
66
  "actions/build/artifact/prepare-attestation/action.yml",
64
67
  "actions/build/artifact/prepare-attestation/index.js",
@@ -75,7 +78,6 @@ const EXTRA_KFD1_FILES = Object.freeze([
75
78
  "packages/core/index.js",
76
79
  "packages/core/build/homebrew.js",
77
80
  "packages/core/build/build-facts.js",
78
- "packages/core/adoption/kfd3-surface-register.js",
79
81
  "packages/core/release/release-propagation.js",
80
82
  "scripts/generate-site-bundle.mjs",
81
83
  "packages/core/release/commands/ensure-github-release.mjs",
@@ -446,7 +448,7 @@ export function createBuildchainKfdSurfaceRegistry({ root = process.cwd() } = {}
446
448
  {
447
449
  name: "Buildchain standalone binary distribution",
448
450
  artifactPath: "dist/binary",
449
- evidencePath: ".github/workflows/self-build-binary-distribution.yml",
451
+ evidencePath: ".github/workflows/.release-pipeline-products.yml",
450
452
  distribution: normalizeKfd3DistributionDeclaration({
451
453
  registrar: "shifu",
452
454
  tasks: ["binary:build"],
@@ -529,7 +531,6 @@ export function createBuildchainKfdClaimRegistry({ root = process.cwd(), sourceS
529
531
 
530
532
  export function createBuildchainKfd1Witness({ root = process.cwd(), sourceSha = "" } = {}) {
531
533
  const registry = createBuildchainKfdClaimRegistry({ root, sourceSha });
532
- const registrySha256 = sha256Json(registry);
533
534
  const paths = uniquePaths([
534
535
  ...publicDocumentationFiles(root),
535
536
  ...SCHEMA_AND_STANDARD_FILES,
@@ -545,7 +546,7 @@ export function createBuildchainKfd1Witness({ root = process.cwd(), sourceSha =
545
546
  contractWorld: {
546
547
  id: "buildchain-runtime-contract-world",
547
548
  schemaId: "kungfu-buildchain-runtime-contract-world",
548
- digest: `sha256:${registrySha256}`,
549
+ digest: `sha256:${sha256Json(registry)}`,
549
550
  owner: "Buildchain maintainers",
550
551
  selfHosted: true,
551
552
  },
@@ -584,7 +585,6 @@ export function createBuildchainKfd3PrebuildWitness({ root = process.cwd(), sour
584
585
  const registry = createBuildchainKfdClaimRegistry({ root, sourceSha });
585
586
  const surfaces = createBuildchainKfdSurfaceRegistry({ root });
586
587
  const reverseAudit = publicSurfaceAuditEvidence(root);
587
- const digest = `sha256:${sha256Json(registry)}`;
588
588
  return {
589
589
  schemaVersion: 1,
590
590
  id: "buildchain-collaboration-interface",
@@ -596,7 +596,7 @@ export function createBuildchainKfd3PrebuildWitness({ root = process.cwd(), sour
596
596
  path: "dist/site/kfd-claims.json",
597
597
  sha256: fileExists(root, "dist/site/kfd-claims.json") ? sha256File(root, "dist/site/kfd-claims.json") : "",
598
598
  },
599
- collaborationInterfaceDigest: digest,
599
+ collaborationInterfaceDigest: `sha256:${sha256Json(registry)}`,
600
600
  collaborationInterface: {
601
601
  schemaVersion: 1,
602
602
  contract: BUILDCHAIN_KFD_COLLABORATION_INTERFACE_CONTRACT,
@@ -11,7 +11,12 @@ import {
11
11
  readLogPath,
12
12
  noopLogger,
13
13
  } from "./logging.js";
14
- import { platformTriple, copyNodeBinary, sourceSha } from "./identity.js";
14
+ import {
15
+ platformTriple,
16
+ copyNodeBinary,
17
+ sourceSha,
18
+ packageVersion,
19
+ } from "./identity.js";
15
20
  import { bundleCli, postjectArgs } from "./bundle.js";
16
21
  import { run } from "./process.js";
17
22
  function prepareStandaloneExecutable({
@@ -124,6 +129,7 @@ export function buildStandaloneBinary({
124
129
  nodePath = process.execPath,
125
130
  nodeVersion = process.version,
126
131
  } = {}) {
132
+ version ||= packageVersion(cwd);
127
133
  const resolvedOutputDir = path.resolve(cwd, outputDir);
128
134
  const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "buildchain-sea-"));
129
135
  try {
@@ -5,8 +5,8 @@ import { isDeepStrictEqual } from "node:util";
5
5
  import { parse } from "smol-toml";
6
6
  import {
7
7
  BUILDCHAIN_CONFIG_PATH,
8
- resolveBuildchainConfigPath,
9
8
  } from "../contracts/buildchain-layout.js";
9
+ import { readProductConfiguration } from "./contract/reader.js";
10
10
  import { runShellCommandSync } from "../runtime/spawn-command.js";
11
11
  import { normalizeBuildConfiguration } from "../build/build-configuration.js";
12
12
 
@@ -181,26 +181,7 @@ function updateTomlStringValuePreservingSource({ source, content, key, value, fi
181
181
  }
182
182
 
183
183
  export function loadBuildchainConfig(cwd = process.cwd()) {
184
- const configPath = resolveBuildchainConfigPath(cwd);
185
- const filePath = path.join(cwd, configPath);
186
- if (!fs.existsSync(filePath)) {
187
- return undefined;
188
- }
189
- const source = fs.readFileSync(filePath, "utf8");
190
- let config;
191
- try {
192
- config = parse(source);
193
- } catch (error) {
194
- throw new Error(`${configPath} parse failed: ${error.message}`);
195
- }
196
- if (config.schema !== 1) {
197
- throw new Error(`${configPath} schema must be 1`);
198
- }
199
- return {
200
- path: configPath,
201
- filePath,
202
- config: normalizeBuildchainConfig(config),
203
- };
184
+ return readProductConfiguration(cwd, normalizeBuildchainConfig);
204
185
  }
205
186
 
206
187
  export function normalizeBuildchainConfig(config) {