@kungfu-tech/buildchain 4.1.3-alpha.1 → 4.1.3-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/architecture/action-taxonomy.json +24 -0
  2. package/architecture/agent-change-map.md +256 -2
  3. package/architecture/ci-lane-change-budget.json +374 -0
  4. package/architecture/decisions/0005-minimal-consumer-contract.md +122 -0
  5. package/architecture/decisions/0006-business-attempt-journal.md +89 -0
  6. package/architecture/decisions/0007-hosted-pipeline-controller.md +106 -0
  7. package/architecture/decisions/0008-pipeline-product-publication.md +99 -0
  8. package/architecture/decisions/0009-pipeline-version-preparation.md +186 -0
  9. package/architecture/internal-capabilities.json +361 -2
  10. package/architecture/maintainability-debt.json +6 -4
  11. package/architecture/maintainability-policy.json +8 -8
  12. package/architecture/minimal-consumer-migration.json +7567 -0
  13. package/architecture/product-upstreams.json +20 -0
  14. package/architecture/release-topology.json +282 -11
  15. package/architecture/universal-workflow-bootstrap.json +12 -0
  16. package/architecture/universal-workflow-capability-policy.json +1 -1
  17. package/architecture/workflow-taxonomy.json +66 -0
  18. package/dist/readers/business-attempt.cjs +809 -0
  19. package/dist/site/buildchain-contract.json +7 -5
  20. package/dist/site/buildchain-site.json +18 -13
  21. package/dist/site/capability-registry.json +3 -3
  22. package/dist/site/kfd-claims.json +385 -10
  23. package/dist/site/kfd-upstream-aggregate.json +1 -1
  24. package/dist/site/manual-registry.json +1 -1
  25. package/dist/site/node-api-registry.json +21 -21
  26. package/dist/site/page-registry.json +13 -8
  27. package/dist/site/public-surface-audit.json +258 -7
  28. package/dist/site/publication-authority-registry.json +141 -1
  29. package/dist/site/publication-registry.json +4 -4
  30. package/dist/site/site-manifest.json +5 -5
  31. package/dist/site/workflow-registry.json +522 -7
  32. package/docs/node-api-reference.md +39 -39
  33. package/docs/runtime-entry.md +45 -5
  34. package/docs/workflow-catalog.md +6 -0
  35. package/package.json +4 -3
  36. package/packages/core/build/standalone/build.js +7 -1
  37. package/packages/core/consumer/buildchain-config.js +2 -21
  38. package/packages/core/consumer/contract/entries.js +85 -0
  39. package/packages/core/consumer/contract/examples.js +96 -0
  40. package/packages/core/consumer/contract/identity.js +65 -0
  41. package/packages/core/consumer/contract/inspection.js +45 -0
  42. package/packages/core/consumer/contract/plan.js +146 -0
  43. package/packages/core/consumer/contract/products.js +119 -0
  44. package/packages/core/consumer/contract/reader.js +47 -0
  45. package/packages/core/consumer/contract/shape.js +46 -0
  46. package/packages/core/dev-delivery/candidate/admission.js +9 -5
  47. package/packages/core/dev-delivery/candidate/reservation.js +11 -0
  48. package/packages/core/dev-delivery/candidate/source-paths.js +12 -4
  49. package/packages/core/dev-delivery/commands/project-cut-merge-queue-admission.mjs +47 -20
  50. package/packages/core/dev-delivery/native/actions.js +7 -1
  51. package/packages/core/dev-delivery/native/heartbeat-action.js +16 -0
  52. package/packages/core/dev-delivery/native/heartbeat.js +6 -4
  53. package/packages/core/dev-delivery/queue/landing-action.js +5 -0
  54. package/packages/core/governance/buildchain-publication-authority.js +6 -0
  55. package/packages/core/paper/operations/bootstrap.js +2 -0
  56. package/packages/core/paper/paper-npm-bootstrap.js +2 -2
  57. package/packages/core/providers/github/attempt-index.js +60 -0
  58. package/packages/core/providers/github/attempt-journal.js +154 -0
  59. package/packages/core/providers/github/discussions/materials.js +7 -2
  60. package/packages/core/providers/github/pipeline-checkout.js +49 -0
  61. package/packages/core/providers/github/pipeline-entry-runs.js +203 -0
  62. package/packages/core/providers/github/pipeline-events.js +52 -0
  63. package/packages/core/providers/github/pipeline-integration.js +95 -0
  64. package/packages/core/providers/github/pipeline-policy.js +213 -0
  65. package/packages/core/providers/github/pipeline-product-payload.js +50 -0
  66. package/packages/core/providers/github/pipeline-product-release.js +191 -0
  67. package/packages/core/providers/github/pipeline-publication-artifacts.js +153 -0
  68. package/packages/core/providers/github/pipeline-release-evidence.js +111 -0
  69. package/packages/core/providers/github/pipeline-run-entry.js +86 -0
  70. package/packages/core/providers/github/pipeline-runs.js +132 -0
  71. package/packages/core/providers/github/pipeline-source.js +178 -0
  72. package/packages/core/providers/github/pipeline-stable-source.js +354 -0
  73. package/packages/core/providers/github/pipeline-version-artifacts.js +91 -0
  74. package/packages/core/providers/github/pipeline-version-readback.js +117 -0
  75. package/packages/core/providers/github/pipeline-version.js +199 -0
  76. package/packages/core/providers/github/pipeline-worker.js +108 -0
  77. package/packages/core/publication/candidate/registry-hydration.js +2 -2
  78. package/packages/core/publication/npm/pack-preview.js +2 -2
  79. package/packages/core/publication/npm/pack-result.js +31 -0
  80. package/packages/core/publication/npm/package.js +3 -6
  81. package/packages/core/publication/npm/pipeline-channel.js +87 -0
  82. package/packages/core/publication/npm/pipeline-provider.js +109 -0
  83. package/packages/core/publication/npm/registry.js +12 -9
  84. package/packages/core/publication/pipeline/actions.js +116 -0
  85. package/packages/core/publication/pipeline/apply.js +188 -0
  86. package/packages/core/publication/pipeline/build-segments.js +107 -0
  87. package/packages/core/publication/pipeline/capsules.js +89 -0
  88. package/packages/core/publication/pipeline/context.js +39 -0
  89. package/packages/core/publication/pipeline/development-anchor.js +91 -0
  90. package/packages/core/publication/pipeline/development-current.js +63 -0
  91. package/packages/core/publication/pipeline/development-pr.js +112 -0
  92. package/packages/core/publication/pipeline/development-proof.js +76 -0
  93. package/packages/core/publication/pipeline/development-transition.js +112 -0
  94. package/packages/core/publication/pipeline/distribution.js +124 -0
  95. package/packages/core/publication/pipeline/documents.js +192 -0
  96. package/packages/core/publication/pipeline/effects.js +162 -0
  97. package/packages/core/publication/pipeline/files.js +66 -0
  98. package/packages/core/publication/pipeline/imported-materials.js +32 -0
  99. package/packages/core/publication/pipeline/journal.js +110 -0
  100. package/packages/core/publication/pipeline/next-development.js +117 -0
  101. package/packages/core/publication/pipeline/pack.js +157 -0
  102. package/packages/core/publication/pipeline/package-policy.js +22 -0
  103. package/packages/core/publication/pipeline/plan.js +136 -0
  104. package/packages/core/publication/pipeline/prepare.js +139 -0
  105. package/packages/core/publication/pipeline/qualification.js +175 -0
  106. package/packages/core/publication/pipeline/qualify.js +104 -0
  107. package/packages/core/publication/pipeline/recovery-admission.js +122 -0
  108. package/packages/core/publication/pipeline/recovery-build-download.js +80 -0
  109. package/packages/core/publication/pipeline/recovery-build-plan.js +122 -0
  110. package/packages/core/publication/pipeline/recovery-build-readback.js +68 -0
  111. package/packages/core/publication/pipeline/recovery-capsules.js +54 -0
  112. package/packages/core/publication/pipeline/recovery-import.js +80 -0
  113. package/packages/core/publication/pipeline/recovery-inspection.js +218 -0
  114. package/packages/core/publication/pipeline/recovery-materials.js +104 -0
  115. package/packages/core/publication/pipeline/recovery-plan.js +46 -0
  116. package/packages/core/publication/pipeline/recovery-prepare.js +73 -0
  117. package/packages/core/publication/pipeline/recovery-qualification.js +128 -0
  118. package/packages/core/publication/pipeline/recovery-readback.js +56 -0
  119. package/packages/core/publication/pipeline/recovery-signing.js +58 -0
  120. package/packages/core/publication/pipeline/sealed-products.js +79 -0
  121. package/packages/core/publication/pipeline/settle.js +43 -0
  122. package/packages/core/publication/pipeline/signing.js +140 -0
  123. package/packages/core/publication/pipeline/source-plan.js +83 -0
  124. package/packages/core/publication/pipeline/stable-entry.js +215 -0
  125. package/packages/core/publication/pipeline/stable-products.js +317 -0
  126. package/packages/core/publication/pipeline/stable-wait.js +170 -0
  127. package/packages/core/publication/pipeline/stable.js +82 -0
  128. package/packages/core/publication/pipeline/version-actions.js +93 -0
  129. package/packages/core/publication/pipeline/version-build.js +130 -0
  130. package/packages/core/publication/pipeline/version-context.js +143 -0
  131. package/packages/core/publication/pipeline/version-material.js +36 -0
  132. package/packages/core/publication/pipeline/version-preparation.js +69 -0
  133. package/packages/core/publication/pipeline/version-regeneration.js +162 -0
  134. package/packages/core/publication/pipeline/version-source-guard.js +69 -0
  135. package/packages/core/publication/pipeline/version.js +81 -0
  136. package/packages/core/publication/pipeline/worker.js +72 -0
  137. package/packages/core/publication/publication-reproducibility.js +2 -2
  138. package/packages/core/release/promote-candidate/product-provider-adapters.js +4 -3
  139. package/packages/core/release/promote-ref/internal/npm-existing-evidence.js +2 -1
  140. package/packages/core/release/promote-ref/internal/publish-command.js +16 -5
  141. package/packages/core/release/stable-release-gate.js +11 -0
  142. package/packages/core/runtime/buildchain-domain.wasm +0 -0
  143. package/packages/core/runtime/domain-wasm-artifact.js +2 -2
  144. package/packages/core/runtime/entry/actions.js +27 -25
  145. package/packages/core/runtime/entry/attempt.js +25 -0
  146. package/packages/core/runtime/entry/selection.js +14 -0
  147. package/packages/core/runtime/entry/source.js +62 -0
  148. package/packages/core/workflow/attempt/identity.js +170 -0
  149. package/packages/core/workflow/attempt/journal.js +87 -0
  150. package/packages/core/workflow/attempt/materials.js +72 -0
  151. package/packages/core/workflow/attempt/reader-entry.js +12 -0
  152. package/packages/core/workflow/attempt/reader.js +149 -0
  153. package/packages/core/workflow/attempt/records.js +153 -0
  154. package/packages/core/workflow/attempt/store.js +75 -0
  155. package/packages/core/workflow/commands/pipeline-build.mjs +23 -0
  156. package/packages/core/workflow/pipeline/action-output.js +11 -0
  157. package/packages/core/workflow/pipeline/actions.js +75 -0
  158. package/packages/core/workflow/pipeline/build-control.js +140 -0
  159. package/packages/core/workflow/pipeline/build-evidence.js +92 -0
  160. package/packages/core/workflow/pipeline/build-qualification.js +145 -0
  161. package/packages/core/workflow/pipeline/build-result.js +69 -0
  162. package/packages/core/workflow/pipeline/build.js +142 -0
  163. package/packages/core/workflow/pipeline/cancellation.js +169 -0
  164. package/packages/core/workflow/pipeline/channel-control.js +127 -0
  165. package/packages/core/workflow/pipeline/controller.js +133 -0
  166. package/packages/core/workflow/pipeline/delivery-control.js +204 -0
  167. package/packages/core/workflow/pipeline/delivery-observation.js +118 -0
  168. package/packages/core/workflow/pipeline/delivery-request.js +198 -0
  169. package/packages/core/workflow/pipeline/events.js +84 -0
  170. package/packages/core/workflow/pipeline/fence.js +42 -0
  171. package/packages/core/workflow/pipeline/group-control.js +56 -0
  172. package/packages/core/workflow/pipeline/guard-build.js +37 -0
  173. package/packages/core/workflow/pipeline/guard.js +156 -0
  174. package/packages/core/workflow/pipeline/host.js +114 -0
  175. package/packages/core/workflow/pipeline/materials.js +58 -0
  176. package/packages/core/workflow/pipeline/notifications.js +36 -0
  177. package/packages/core/workflow/pipeline/parent-notification.js +27 -0
  178. package/packages/core/workflow/pipeline/platforms.js +21 -0
  179. package/packages/core/workflow/pipeline/progress.js +108 -0
  180. package/packages/core/workflow/pipeline/projection.js +20 -0
  181. package/packages/core/workflow/pipeline/reconcile.js +194 -0
  182. package/packages/core/workflow/pipeline/recovery-action.js +30 -0
  183. package/packages/core/workflow/pipeline/recovery-admission.js +122 -0
  184. package/packages/core/workflow/pipeline/recovery-build-control.js +95 -0
  185. package/packages/core/workflow/pipeline/recovery-build-evidence.js +71 -0
  186. package/packages/core/workflow/pipeline/recovery-build.js +121 -0
  187. package/packages/core/workflow/pipeline/recovery-controller.js +91 -0
  188. package/packages/core/workflow/pipeline/recovery-integration.js +66 -0
  189. package/packages/core/workflow/pipeline/recovery-merge-proof.js +90 -0
  190. package/packages/core/workflow/pipeline/recovery-ownership-settlement.js +150 -0
  191. package/packages/core/workflow/pipeline/recovery-ownership.js +91 -0
  192. package/packages/core/workflow/pipeline/recovery-plan.js +126 -0
  193. package/packages/core/workflow/pipeline/recovery-runtime.js +68 -0
  194. package/packages/core/workflow/pipeline/recovery-session.js +129 -0
  195. package/packages/core/workflow/pipeline/recovery-transition.js +135 -0
  196. package/packages/core/workflow/pipeline/recovery-unrecorded-build.js +74 -0
  197. package/packages/core/workflow/pipeline/runtime-source.js +111 -0
  198. package/packages/core/workflow/pipeline/selection.js +106 -0
  199. package/packages/core/workflow/pipeline/session.js +72 -0
  200. package/packages/core/workflow/pipeline/settlement.js +137 -0
  201. package/packages/core/workflow/pipeline/wake.js +38 -0
  202. package/packages/core/workflow/pipeline/web-status.js +108 -0
  203. package/scripts/build-release-discussion-reader.mjs +11 -7
  204. package/scripts/check-pipeline-publication-topology.mjs +48 -0
  205. package/scripts/check-release-topology.mjs +7 -1
  206. package/scripts/generate-minimal-consumer-contract.mjs +155 -0
  207. package/scripts/generate-site-bundle.mjs +1 -1
  208. package/scripts/verify-golden-path.mjs +5 -1
  209. package/scripts/verify-standalone-product.mjs +42 -0
  210. package/templates/minimal-consumer/binary/.buildchain/buildchain.toml +45 -0
  211. package/templates/minimal-consumer/binary/.github/workflows/buildchain-recover.yml +30 -0
  212. package/templates/minimal-consumer/binary/.github/workflows/buildchain.yml +28 -0
  213. package/templates/minimal-consumer/binary/package.json +6 -0
  214. package/templates/minimal-consumer/binary/src/build.mjs +5 -0
  215. package/templates/minimal-consumer/binary/src/hello.c +2 -0
  216. package/templates/minimal-consumer/binary/src/verify.mjs +3 -0
  217. package/templates/minimal-consumer/npm/.buildchain/buildchain.toml +46 -0
  218. package/templates/minimal-consumer/npm/.github/workflows/buildchain-recover.yml +30 -0
  219. package/templates/minimal-consumer/npm/.github/workflows/buildchain.yml +28 -0
  220. package/templates/minimal-consumer/npm/package.json +6 -0
  221. package/templates/minimal-consumer/npm/src/build.mjs +5 -0
  222. package/templates/minimal-consumer/npm/src/verify.mjs +3 -0
  223. package/templates/minimal-consumer/paper/.buildchain/buildchain.toml +45 -0
  224. package/templates/minimal-consumer/paper/.github/workflows/buildchain-recover.yml +30 -0
  225. package/templates/minimal-consumer/paper/.github/workflows/buildchain.yml +28 -0
  226. package/templates/minimal-consumer/paper/package.json +6 -0
  227. package/templates/minimal-consumer/paper/src/build.mjs +12 -0
  228. package/templates/minimal-consumer/paper/src/verify.mjs +3 -0
@@ -2563,6 +2563,380 @@
2563
2563
  "expectedContributionSeconds": 0,
2564
2564
  "rationale": "Current 4.1 capability node. Budget uses the declared job timeout or the conservative six-hour provider ceiling; it is not a measured latency or a new claim of required-check authority."
2565
2565
  }
2566
+ },
2567
+ {
2568
+ "laneId": ".github/workflows/.ops-pipeline-delivery.yml#delivery",
2569
+ "authorityClass": "merge-critical-admission",
2570
+ "triggerClass": "reusable",
2571
+ "concurrencyPolicy": {
2572
+ "mode": "none",
2573
+ "cancelInProgress": false
2574
+ },
2575
+ "expectedRunnerMinutes": 360,
2576
+ "cancellationBehavior": "finish-started",
2577
+ "sloImpact": {
2578
+ "mergeCritical": true,
2579
+ "metric": "minimal pipeline bounded hosted execution",
2580
+ "expectedContributionSeconds": 21600,
2581
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2582
+ }
2583
+ },
2584
+ {
2585
+ "laneId": ".github/workflows/public-ops-pipeline.yml#runtime",
2586
+ "authorityClass": "evidence",
2587
+ "triggerClass": "reusable",
2588
+ "concurrencyPolicy": {
2589
+ "mode": "none",
2590
+ "cancelInProgress": false
2591
+ },
2592
+ "expectedRunnerMinutes": 5,
2593
+ "cancellationBehavior": "finish-started",
2594
+ "sloImpact": {
2595
+ "mergeCritical": false,
2596
+ "metric": "minimal pipeline bounded hosted execution",
2597
+ "expectedContributionSeconds": 300,
2598
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2599
+ }
2600
+ },
2601
+ {
2602
+ "laneId": ".github/workflows/public-ops-pipeline.yml#control",
2603
+ "authorityClass": "merge-critical-admission",
2604
+ "triggerClass": "reusable",
2605
+ "concurrencyPolicy": {
2606
+ "mode": "none",
2607
+ "cancelInProgress": false
2608
+ },
2609
+ "expectedRunnerMinutes": 20,
2610
+ "cancellationBehavior": "finish-started",
2611
+ "sloImpact": {
2612
+ "mergeCritical": true,
2613
+ "metric": "minimal pipeline bounded hosted execution",
2614
+ "expectedContributionSeconds": 1200,
2615
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2616
+ }
2617
+ },
2618
+ {
2619
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#build",
2620
+ "authorityClass": "merge-critical-required",
2621
+ "triggerClass": "reusable",
2622
+ "concurrencyPolicy": {
2623
+ "mode": "none",
2624
+ "cancelInProgress": false
2625
+ },
2626
+ "expectedRunnerMinutes": 60,
2627
+ "cancellationBehavior": "finish-started",
2628
+ "sloImpact": {
2629
+ "mergeCritical": true,
2630
+ "metric": "minimal pipeline bounded hosted execution",
2631
+ "expectedContributionSeconds": 3600,
2632
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2633
+ }
2634
+ },
2635
+ {
2636
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#record-build",
2637
+ "authorityClass": "merge-critical-required",
2638
+ "triggerClass": "reusable",
2639
+ "concurrencyPolicy": {
2640
+ "mode": "none",
2641
+ "cancelInProgress": false
2642
+ },
2643
+ "expectedRunnerMinutes": 15,
2644
+ "cancellationBehavior": "finish-started",
2645
+ "sloImpact": {
2646
+ "mergeCritical": true,
2647
+ "metric": "minimal pipeline bounded hosted execution",
2648
+ "expectedContributionSeconds": 900,
2649
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2650
+ }
2651
+ },
2652
+ {
2653
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#delivery",
2654
+ "authorityClass": "merge-critical-admission",
2655
+ "triggerClass": "reusable",
2656
+ "concurrencyPolicy": {
2657
+ "mode": "none",
2658
+ "cancelInProgress": false
2659
+ },
2660
+ "expectedRunnerMinutes": 360,
2661
+ "cancellationBehavior": "finish-started",
2662
+ "sloImpact": {
2663
+ "mergeCritical": true,
2664
+ "metric": "minimal pipeline bounded hosted execution",
2665
+ "expectedContributionSeconds": 21600,
2666
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2667
+ }
2668
+ },
2669
+ {
2670
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#record-delivery",
2671
+ "authorityClass": "evidence",
2672
+ "triggerClass": "reusable",
2673
+ "concurrencyPolicy": {
2674
+ "mode": "none",
2675
+ "cancelInProgress": false
2676
+ },
2677
+ "expectedRunnerMinutes": 5,
2678
+ "cancellationBehavior": "finish-started",
2679
+ "sloImpact": {
2680
+ "mergeCritical": false,
2681
+ "metric": "minimal pipeline bounded hosted execution",
2682
+ "expectedContributionSeconds": 300,
2683
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2684
+ }
2685
+ },
2686
+ {
2687
+ "laneId": ".github/workflows/.release-pipeline-products.yml#prepare",
2688
+ "authorityClass": "evidence",
2689
+ "triggerClass": "reusable",
2690
+ "concurrencyPolicy": {
2691
+ "mode": "ref-scoped",
2692
+ "cancelInProgress": false
2693
+ },
2694
+ "expectedRunnerMinutes": 15,
2695
+ "cancellationBehavior": "finish-started",
2696
+ "sloImpact": {
2697
+ "mergeCritical": false,
2698
+ "metric": "declared product publication and retained follow-ups",
2699
+ "expectedContributionSeconds": 900,
2700
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2701
+ }
2702
+ },
2703
+ {
2704
+ "laneId": ".github/workflows/.release-pipeline-products.yml#build",
2705
+ "authorityClass": "evidence",
2706
+ "triggerClass": "reusable",
2707
+ "concurrencyPolicy": {
2708
+ "mode": "ref-scoped",
2709
+ "cancelInProgress": false
2710
+ },
2711
+ "expectedRunnerMinutes": 300,
2712
+ "cancellationBehavior": "finish-started",
2713
+ "sloImpact": {
2714
+ "mergeCritical": false,
2715
+ "metric": "declared product publication and retained follow-ups",
2716
+ "expectedContributionSeconds": 18000,
2717
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2718
+ }
2719
+ },
2720
+ {
2721
+ "laneId": ".github/workflows/.release-pipeline-products.yml#qualify",
2722
+ "authorityClass": "evidence",
2723
+ "triggerClass": "reusable",
2724
+ "concurrencyPolicy": {
2725
+ "mode": "ref-scoped",
2726
+ "cancelInProgress": false
2727
+ },
2728
+ "expectedRunnerMinutes": 20,
2729
+ "cancellationBehavior": "finish-started",
2730
+ "sloImpact": {
2731
+ "mergeCritical": false,
2732
+ "metric": "declared product publication and retained follow-ups",
2733
+ "expectedContributionSeconds": 1200,
2734
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2735
+ }
2736
+ },
2737
+ {
2738
+ "laneId": ".github/workflows/.release-pipeline-products.yml#apply",
2739
+ "authorityClass": "governed-delegation",
2740
+ "triggerClass": "reusable",
2741
+ "concurrencyPolicy": {
2742
+ "mode": "ref-scoped",
2743
+ "cancelInProgress": false
2744
+ },
2745
+ "expectedRunnerMinutes": 30,
2746
+ "cancellationBehavior": "finish-started",
2747
+ "sloImpact": {
2748
+ "mergeCritical": false,
2749
+ "metric": "declared product publication and retained follow-ups",
2750
+ "expectedContributionSeconds": 1800,
2751
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2752
+ }
2753
+ },
2754
+ {
2755
+ "laneId": ".github/workflows/.release-pipeline-products.yml#settle",
2756
+ "authorityClass": "governed-delegation",
2757
+ "triggerClass": "reusable",
2758
+ "concurrencyPolicy": {
2759
+ "mode": "ref-scoped",
2760
+ "cancelInProgress": false
2761
+ },
2762
+ "expectedRunnerMinutes": 20,
2763
+ "cancellationBehavior": "finish-started",
2764
+ "sloImpact": {
2765
+ "mergeCritical": false,
2766
+ "metric": "declared product publication and retained follow-ups",
2767
+ "expectedContributionSeconds": 1200,
2768
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2769
+ }
2770
+ },
2771
+ {
2772
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#publication",
2773
+ "authorityClass": "governed-delegation",
2774
+ "triggerClass": "reusable",
2775
+ "concurrencyPolicy": {
2776
+ "mode": "none",
2777
+ "cancelInProgress": false
2778
+ },
2779
+ "expectedRunnerMinutes": 385,
2780
+ "cancellationBehavior": "finish-started",
2781
+ "sloImpact": {
2782
+ "mergeCritical": false,
2783
+ "metric": "declared product publication and retained follow-ups",
2784
+ "expectedContributionSeconds": 23100,
2785
+ "rationale": "Post-merge product publication serializes provider writers per repository. At most five declared hosted platforms each have a sixty-minute build limit; independent signing and publisher jobs have explicit timeouts. These are conservative bounds, not measured latency."
2786
+ }
2787
+ },
2788
+ {
2789
+ "laneId": ".github/workflows/public-ops-recover.yml#runtime",
2790
+ "authorityClass": "evidence",
2791
+ "triggerClass": "reusable",
2792
+ "concurrencyPolicy": {
2793
+ "mode": "none",
2794
+ "cancelInProgress": false
2795
+ },
2796
+ "expectedRunnerMinutes": 5,
2797
+ "cancellationBehavior": "finish-started",
2798
+ "sloImpact": {
2799
+ "mergeCritical": false,
2800
+ "metric": "minimal pipeline bounded hosted execution",
2801
+ "expectedContributionSeconds": 300,
2802
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2803
+ }
2804
+ },
2805
+ {
2806
+ "laneId": ".github/workflows/public-ops-recover.yml#control",
2807
+ "authorityClass": "merge-critical-admission",
2808
+ "triggerClass": "reusable",
2809
+ "concurrencyPolicy": {
2810
+ "mode": "none",
2811
+ "cancelInProgress": false
2812
+ },
2813
+ "expectedRunnerMinutes": 20,
2814
+ "cancellationBehavior": "finish-started",
2815
+ "sloImpact": {
2816
+ "mergeCritical": true,
2817
+ "metric": "minimal pipeline bounded hosted execution",
2818
+ "expectedContributionSeconds": 1200,
2819
+ "rationale": "Owned runtime, metadata or product job boundary. Product matrix uses only declared platforms; native Warrant transfer waits for exact provider terminality. This is a conservative timeout budget, not measured latency."
2820
+ }
2821
+ },
2822
+ {
2823
+ "laneId": ".github/workflows/public-ops-pipeline.yml#execute",
2824
+ "authorityClass": "governed-delegation",
2825
+ "triggerClass": "reusable",
2826
+ "concurrencyPolicy": {
2827
+ "mode": "none",
2828
+ "cancelInProgress": false
2829
+ },
2830
+ "expectedRunnerMinutes": 825,
2831
+ "cancellationBehavior": "finish-started",
2832
+ "sloImpact": {
2833
+ "mergeCritical": false,
2834
+ "metric": "shared normal or recovery execution timeout bound",
2835
+ "expectedContributionSeconds": 49500,
2836
+ "rationale": "Delegates to the same isolated product, native delivery and publication jobs. Recovery schedules only qualified missing work; this inherited conservative timeout sum is not measured latency or a new parallel lane family."
2837
+ }
2838
+ },
2839
+ {
2840
+ "laneId": ".github/workflows/public-ops-recover.yml#execute",
2841
+ "authorityClass": "governed-delegation",
2842
+ "triggerClass": "reusable",
2843
+ "concurrencyPolicy": {
2844
+ "mode": "none",
2845
+ "cancelInProgress": false
2846
+ },
2847
+ "expectedRunnerMinutes": 825,
2848
+ "cancellationBehavior": "finish-started",
2849
+ "sloImpact": {
2850
+ "mergeCritical": false,
2851
+ "metric": "shared normal or recovery execution timeout bound",
2852
+ "expectedContributionSeconds": 49500,
2853
+ "rationale": "Delegates to the same isolated product, native delivery and publication jobs. Recovery schedules only qualified missing work; this inherited conservative timeout sum is not measured latency or a new parallel lane family."
2854
+ }
2855
+ },
2856
+ {
2857
+ "laneId": ".github/workflows/.release-pipeline-products.yml#materialize",
2858
+ "authorityClass": "governed-delegation",
2859
+ "triggerClass": "reusable",
2860
+ "concurrencyPolicy": {
2861
+ "mode": "ref-scoped",
2862
+ "cancelInProgress": false
2863
+ },
2864
+ "expectedRunnerMinutes": 5,
2865
+ "cancellationBehavior": "finish-started",
2866
+ "sloImpact": {
2867
+ "mergeCritical": false,
2868
+ "metric": "declared version regeneration before publication or next-development materialization",
2869
+ "expectedContributionSeconds": 300,
2870
+ "rationale": "One shared internal component executes each declared product platform for version-derived files, then independently verifies actual job completion and archive digests before Git writes. Up to five product runners each have a sixty-minute ceiling, and materialization has twenty minutes; the component can run once for publication and once for next development. Parent reusable jobs delegate without a separate product runner. Bounds are declared capacity, not measured latency; per-repository publication concurrency retains a single provider writer."
2871
+ }
2872
+ },
2873
+ {
2874
+ "laneId": ".github/workflows/.release-pipeline-products.yml#development",
2875
+ "authorityClass": "governed-delegation",
2876
+ "triggerClass": "reusable",
2877
+ "concurrencyPolicy": {
2878
+ "mode": "ref-scoped",
2879
+ "cancelInProgress": false
2880
+ },
2881
+ "expectedRunnerMinutes": 5,
2882
+ "cancellationBehavior": "finish-started",
2883
+ "sloImpact": {
2884
+ "mergeCritical": false,
2885
+ "metric": "declared version regeneration before publication or next-development materialization",
2886
+ "expectedContributionSeconds": 300,
2887
+ "rationale": "One shared internal component executes each declared product platform for version-derived files, then independently verifies actual job completion and archive digests before Git writes. Up to five product runners each have a sixty-minute ceiling, and materialization has twenty minutes; the component can run once for publication and once for next development. Parent reusable jobs delegate without a separate product runner. Bounds are declared capacity, not measured latency; per-repository publication concurrency retains a single provider writer."
2888
+ }
2889
+ },
2890
+ {
2891
+ "laneId": ".github/workflows/.release-pipeline-version.yml#build",
2892
+ "authorityClass": "evidence",
2893
+ "triggerClass": "reusable",
2894
+ "concurrencyPolicy": {
2895
+ "mode": "ref-scoped",
2896
+ "cancelInProgress": false
2897
+ },
2898
+ "expectedRunnerMinutes": 300,
2899
+ "cancellationBehavior": "finish-started",
2900
+ "sloImpact": {
2901
+ "mergeCritical": false,
2902
+ "metric": "declared version regeneration before publication or next-development materialization",
2903
+ "expectedContributionSeconds": 18000,
2904
+ "rationale": "One shared internal component executes each declared product platform for version-derived files, then independently verifies actual job completion and archive digests before Git writes. Up to five product runners each have a sixty-minute ceiling, and materialization has twenty minutes; the component can run once for publication and once for next development. Parent reusable jobs delegate without a separate product runner. Bounds are declared capacity, not measured latency; per-repository publication concurrency retains a single provider writer."
2905
+ }
2906
+ },
2907
+ {
2908
+ "laneId": ".github/workflows/.release-pipeline-version.yml#materialize",
2909
+ "authorityClass": "governed-delegation",
2910
+ "triggerClass": "reusable",
2911
+ "concurrencyPolicy": {
2912
+ "mode": "ref-scoped",
2913
+ "cancelInProgress": false
2914
+ },
2915
+ "expectedRunnerMinutes": 20,
2916
+ "cancellationBehavior": "finish-started",
2917
+ "sloImpact": {
2918
+ "mergeCritical": false,
2919
+ "metric": "declared version regeneration before publication or next-development materialization",
2920
+ "expectedContributionSeconds": 1200,
2921
+ "rationale": "One shared internal component executes each declared product platform for version-derived files, then independently verifies actual job completion and archive digests before Git writes. Up to five product runners each have a sixty-minute ceiling, and materialization has twenty minutes; the component can run once for publication and once for next development. Parent reusable jobs delegate without a separate product runner. Bounds are declared capacity, not measured latency; per-repository publication concurrency retains a single provider writer."
2922
+ }
2923
+ },
2924
+ {
2925
+ "laneId": ".github/workflows/.ops-pipeline-execute.yml#stable-recheck",
2926
+ "authorityClass": "evidence",
2927
+ "triggerClass": "reusable",
2928
+ "concurrencyPolicy": {
2929
+ "mode": "ref-scoped",
2930
+ "cancelInProgress": false
2931
+ },
2932
+ "expectedRunnerMinutes": 20,
2933
+ "cancellationBehavior": "finish-started",
2934
+ "sloImpact": {
2935
+ "mergeCritical": false,
2936
+ "metric": "bounded stable qualification recheck",
2937
+ "expectedContributionSeconds": 1200,
2938
+ "rationale": "Wait at most fifteen minutes outside the publication lock, then wake the same native Attempt through the normal entry to collect fresh qualification. Twenty minutes includes runtime preparation; this is a conservative timeout budget, not measured latency."
2939
+ }
2566
2940
  }
2567
2941
  ],
2568
2942
  "declarationFamilies": [
@@ -0,0 +1,122 @@
1
+ ---
2
+ status: draft
3
+ period: ongoing
4
+ theme: minimal-consumer-contract
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-12
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-12
16
+ visible_context: Immutable seven-child Assignment and current Buildchain source and tests.
17
+ invisible_context_boundary: The new pipeline and recovery entries are not yet implemented or published.
18
+ ---
19
+
20
+ # ADR 0005: The consumer owns product intent, Buildchain owns execution
21
+
22
+ ## Contract and rollout boundary
23
+
24
+ Schema 2 is a closed TOML contract compiled by
25
+ `packages/core/consumer/contract/plan.js`. The compiler receives bytes and has no
26
+ filesystem, process or provider interface. It never runs a configured command.
27
+ Unknown fields fail, including arbitrary request envelopes and publication
28
+ commands. Build and verification commands remain product code, executed later
29
+ in an isolated job with no delivery, signing or publication credentials.
30
+
31
+ Consumers maintain `.buildchain/buildchain.toml` and two generated callers.
32
+ The normal entry receives the platform event and an optional `config-path`.
33
+ Recovery receives one exact `attempt` and an optional transient `runtime-ref`.
34
+ `entries.js` owns both interfaces and product-independent caller bytes.
35
+ No consumer assembles candidate, Warrant, fence, proof, nonce, run, transaction
36
+ or Discussion selectors. An attempt is a Buildchain business identity, not a
37
+ GitHub run ID, run-attempt number or Discussion number.
38
+
39
+ This first slice defines and tests that contract. Its generated examples are
40
+ qualification fixtures, not a claim that the new public entries already exist.
41
+ The normal controller is delivered in child 3; recovery in child 5; Buildchain
42
+ self migration and published alpha/stable qualification in child 6; old public
43
+ surface retirement in child 7. Schema 1 is not translated by the new compiler.
44
+ Existing consumers remain on the old implementation until the reviewed
45
+ migration replaces their configuration and entry together. There is no final
46
+ compatibility wrapper, hidden script, or product-specific entry.
47
+
48
+ ## Product plan
49
+
50
+ Each product declares an ID, type (`npm`, `binary`, `paper`), exact supported
51
+ platforms, optional install commands, build and verify commands, output
52
+ artifacts and publication targets. Artifact IDs are unique and targets must
53
+ cover exactly the declared output set. npm publishing is a typed npm target;
54
+ archive and PDF publication use GitHub Release. Provider credentials are
55
+ one-time setup, never TOML values or command arguments.
56
+
57
+ Version files, strategy, legal channel PR routes and required independent
58
+ review/merge queue are explicit. Existing dependency locks remain ordinary
59
+ product source and are retained by initialization/migration. The internal
60
+ executor must install dependencies under their lock and current supply-chain
61
+ policy. TOML cannot weaken branch protection or substitute a local check for
62
+ independent source, receipt or provider readback.
63
+
64
+ ## Events, identities and authority
65
+
66
+ The normal event vocabulary covers PR lifecycle, review, merge group and push.
67
+ Buildchain-owned `repository_dispatch` wake events are internal notifications;
68
+ their payload is untrusted until the controller verifies its retained attempt
69
+ and provider evidence. There is no manual JSON dispatch interface. Wake events
70
+ never create authorization and duplicate or old events cannot authorize a new
71
+ source. The controller owns deduplication, writer fencing and terminal wakeup.
72
+ Consumer YAML contains no event routing logic or internal workflow names.
73
+
74
+ The trusted `pull_request_target: closed` notification also covers closing a
75
+ conflicted PR, for which GitHub does not run `pull_request`. This is a
76
+ cancellation/settlement observation only and must never execute PR code.
77
+ Merge-group removal is reconciled from PR dequeue and live queue readback;
78
+ `merge_group` subscribes only to GitHub's supported `checks_requested` type.
79
+ See the [GitHub event contract](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows).
80
+
81
+ The platform-provided event is only an observation. Admission resolves the
82
+ repository, PR head/base and tree through trusted provider readback. Config
83
+ bytes bind to the exact Git blob, config path and source commit. The compiler
84
+ returns data; its digest is not merge or publication authority. PR-controlled
85
+ config and artifacts are not consumed in a job holding privileged credentials.
86
+ Caller permission declarations are upper bounds; internal jobs must narrow
87
+ them and keep untrusted builds separate from qualification and provider writes.
88
+ Fork events must never receive repository write credentials or inherited secrets.
89
+
90
+ The generated contract lock binds the contract version, entry SHA, selected
91
+ runtime SHA and configuration byte digest. It does not bind the consuming Git
92
+ commit: committing a tracked lock must not invalidate that same lock. Exact
93
+ source commit/tree identity is bound separately for each execution attempt.
94
+ Entry and runtime may differ. A normal run
95
+ uses its admitted lock; recovery may select a repaired runtime once through
96
+ the central entry. Downstream nodes do not compare Buildchain SHAs. A changed
97
+ contract requires an explicit reviewed config/lock upgrade; schema mismatch
98
+ fails rather than silently interpreting old data. An entry bug requires an
99
+ upgraded published entry and a full new execution.
100
+
101
+ ## Evidence and enforcement
102
+
103
+ `generate-minimal-consumer-contract.mjs --check` verifies all three generated
104
+ examples and the complete migration inventory of current public/self inputs,
105
+ caller edges, template/fixture configuration and consumer scripts. Inventory
106
+ destinations distinguish provider setup, plan-derived internal arguments and
107
+ attempt-owned material/authority. They are migration obligations, not deleted
108
+ functionality or already-migrated state.
109
+
110
+ `inspectConsumerContract` requires the exact two generated workflows and scans
111
+ the supplied complete consumer tree for known internal orchestration. The
112
+ caller comparison closes YAML wiring; the TOML validator closes configuration
113
+ keys. Source scanning detects known bypasses but is not a proof of arbitrary
114
+ program behavior. Credential isolation and provider authorization remain
115
+ mandatory even when this static gate passes. Child 7 must validate the final
116
+ reachable source/generator closure and adversarial cases after migration.
117
+
118
+ Tests compile all three plans, reject invalid input/state/route/target/review
119
+ changes, verify exact Git blob binding with different entry/runtime commits,
120
+ and build actual package contents, a native archive and a valid PDF in isolated
121
+ directories. These are local contract/product tests; they do not constitute
122
+ hosted execution, release, provider authorization or recovery qualification.
@@ -0,0 +1,89 @@
1
+ ---
2
+ status: draft
3
+ period: ongoing
4
+ theme: minimal-consumer-attempt-journal
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-12
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-12
16
+ visible_context: Captured second-child Assignment, Discussion implementation and local fault tests.
17
+ invisible_context_boundary: Hosted pipeline integration and published consumer qualification belong to later slices.
18
+ ---
19
+
20
+ # ADR 0006: One PR intent, immutable generations and recoverable attempts
21
+
22
+ The internal `workflow/attempt` modules extend the existing Release Discussion
23
+ journal. PR number, repository identity and target branch identify the intent.
24
+ Exact source commit, tree, TOML blob/digest/path and observed protected base
25
+ identify a generation. A request key plus generation and predecessor identifies
26
+ a business attempt. Provider run, run-attempt and job identify each writer;
27
+ several provider runs may contribute to one business attempt.
28
+
29
+ The admitted ordered phase set covers admission, build, review, Warrant, merge,
30
+ publication, distribution and next-development. A channel-specific plan may
31
+ omit inapplicable phases. Every phase requires successful predecessors. Waiting,
32
+ failure, cancellation and supersession retain a reason. Terminal phase results
33
+ cannot be rewritten: recovery opens a successor with no inherited success.
34
+ Published historical results remain readable even when a new source or base
35
+ requires a new generation. Projection completion does not grant delivery,
36
+ publication or material-reuse authority.
37
+
38
+ Each event includes its content digest, previous event digest, exact attempt
39
+ and generation, sequence, bounded idempotency key, writer and runtime reader
40
+ identity. Replay rejects gaps, forks, conflicting duplicate keys, undeclared
41
+ or out-of-order phases, missing predecessors, identity drift and history bounds.
42
+ Identical repeated records have one meaning. A reader may receive pages out of
43
+ order; sequence and content links reconstruct the original history.
44
+
45
+ `businessAttemptStore` uses the existing provider-authenticated Discussion
46
+ transport, immutable attempt roots and reply pagination. Only the expected
47
+ writer's unedited records contribute. Initialization verifies the repository
48
+ node identity. Unknown mutation responses are reconciled by reading back the
49
+ same immutable identity before retry. No attempt state is written into the
50
+ consumer source tree and no independent index or second authoritative store
51
+ is introduced.
52
+
53
+ The store has no default lock. Its internal `exclusive.run` adapter must own
54
+ the repository/intent writer scope across hosted processes and retain that
55
+ exclusion through the final provider mutation. `assertOwner` is rechecked at
56
+ scope admission and immediately before create/append. Expected-head comparison
57
+ and current-attempt checks fence stale results. The adapter must not transfer
58
+ ownership while an in-flight provider mutation can still commit: a local mutex
59
+ or a check followed by an unfenced lease expiry is insufficient. Child 3 owns
60
+ the hosted controller adapter; this library slice does not claim hosted writer
61
+ exclusion from the injected test fixture. The provider remains the persistence
62
+ authority; a fork makes the reader fail closed rather than selecting a winner.
63
+
64
+ Material references distinguish artifacts, checkpoints, receipts, Passports
65
+ and provider readbacks. Each binds byte count, digest, producing attempt,
66
+ generation and a permanent consumer-repository URL. Signed URLs and credentials
67
+ are rejected. A reused material ID cannot acquire different bytes. The internal
68
+ material verifier checks retrieved bytes; storing a reference alone does not
69
+ prove retrieval, provider authorization or qualification for another attempt.
70
+ Existing receipt, Passport and provider journal rules continue to own those
71
+ facts. Recovery must qualify retained material under the successor's current
72
+ rules before emitting fresh evidence.
73
+
74
+ The retained `dist/readers/business-attempt.cjs` is self-contained and accepts
75
+ captured authenticated JSON on stdin. Its CLI outputs status, reason, attempt,
76
+ generation, missing phases and the one recovery selector. The bundle is
77
+ reproducibility-checked alongside the historical release reader and tested in
78
+ a fresh process with filesystem access restricted to the bundle. It has no
79
+ provider write or effect-recovery entry. A runtime's recorded reader digest
80
+ must be verified by the existing archive-loading boundary before execution;
81
+ the pure reader does not authenticate caller-supplied records itself.
82
+
83
+ The fault tests cover identity drift, incomplete and corrupted chains, duplicate
84
+ and out-of-order delivery, concurrent/stale writers, cancellation/failure state,
85
+ response loss after provider commit, restart, untrusted/edited records, material
86
+ integrity and published-history preservation. Hosted control, user-facing
87
+ attempt selection, actual provider recovery and self publication remain the
88
+ explicit responsibilities of children 3 through 7. This slice adds no public
89
+ workflow or consumer input.