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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/architecture/action-taxonomy.json +8 -0
  2. package/architecture/agent-change-map.md +23 -0
  3. package/architecture/ci-lane-change-budget.json +85 -0
  4. package/architecture/decisions/0009-pipeline-version-preparation.md +186 -0
  5. package/architecture/internal-capabilities.json +32 -2
  6. package/architecture/maintainability-debt.json +10 -4
  7. package/architecture/maintainability-policy.json +7 -7
  8. package/architecture/minimal-consumer-migration.json +9 -0
  9. package/architecture/product-upstreams.json +20 -0
  10. package/architecture/release-topology.json +63 -25
  11. package/architecture/universal-workflow-bootstrap.json +2 -0
  12. package/architecture/universal-workflow-capability-policy.json +1 -1
  13. package/architecture/workflow-taxonomy.json +11 -0
  14. package/dist/readers/business-attempt.cjs +6 -2
  15. package/dist/site/buildchain-contract.json +4 -4
  16. package/dist/site/buildchain-site.json +9 -9
  17. package/dist/site/capability-registry.json +2 -2
  18. package/dist/site/kfd-claims.json +82 -8
  19. package/dist/site/kfd-upstream-aggregate.json +1 -1
  20. package/dist/site/manual-registry.json +1 -1
  21. package/dist/site/node-api-registry.json +18 -18
  22. package/dist/site/page-registry.json +4 -4
  23. package/dist/site/public-surface-audit.json +64 -7
  24. package/dist/site/publication-authority-registry.json +21 -1
  25. package/dist/site/publication-registry.json +4 -4
  26. package/dist/site/site-manifest.json +5 -5
  27. package/dist/site/workflow-registry.json +113 -7
  28. package/docs/node-api-reference.md +34 -34
  29. package/docs/workflow-catalog.md +1 -0
  30. package/package.json +1 -1
  31. package/packages/core/build/standalone/build.js +7 -1
  32. package/packages/core/consumer/buildchain-config.js +2 -21
  33. package/packages/core/consumer/contract/plan.js +53 -3
  34. package/packages/core/consumer/contract/products.js +20 -2
  35. package/packages/core/consumer/contract/reader.js +47 -0
  36. package/packages/core/dev-delivery/commands/project-cut-merge-queue-admission.mjs +47 -20
  37. package/packages/core/governance/buildchain-publication-authority.js +1 -0
  38. package/packages/core/providers/github/discussions/materials.js +12 -4
  39. package/packages/core/providers/github/pipeline-entry-runs.js +203 -0
  40. package/packages/core/providers/github/pipeline-policy.js +44 -17
  41. package/packages/core/providers/github/pipeline-release-evidence.js +111 -0
  42. package/packages/core/providers/github/pipeline-stable-source.js +354 -0
  43. package/packages/core/providers/github/pipeline-version-artifacts.js +91 -0
  44. package/packages/core/providers/github/pipeline-version-readback.js +117 -0
  45. package/packages/core/providers/github/pipeline-version.js +10 -12
  46. package/packages/core/publication/pipeline/actions.js +17 -1
  47. package/packages/core/publication/pipeline/apply.js +23 -17
  48. package/packages/core/publication/pipeline/development-pr.js +28 -1
  49. package/packages/core/publication/pipeline/documents.js +37 -1
  50. package/packages/core/publication/pipeline/next-development.js +1 -0
  51. package/packages/core/publication/pipeline/pack.js +7 -1
  52. package/packages/core/publication/pipeline/plan.js +22 -0
  53. package/packages/core/publication/pipeline/prepare.js +44 -56
  54. package/packages/core/publication/pipeline/qualification.js +5 -0
  55. package/packages/core/publication/pipeline/stable-entry.js +215 -0
  56. package/packages/core/publication/pipeline/stable-products.js +317 -0
  57. package/packages/core/publication/pipeline/stable-wait.js +170 -0
  58. package/packages/core/publication/pipeline/stable.js +82 -0
  59. package/packages/core/publication/pipeline/version-actions.js +93 -0
  60. package/packages/core/publication/pipeline/version-build.js +130 -0
  61. package/packages/core/publication/pipeline/version-context.js +143 -0
  62. package/packages/core/publication/pipeline/version-material.js +36 -0
  63. package/packages/core/publication/pipeline/version-preparation.js +69 -0
  64. package/packages/core/publication/pipeline/version-regeneration.js +162 -0
  65. package/packages/core/publication/pipeline/version-source-guard.js +69 -0
  66. package/packages/core/publication/pipeline/worker.js +72 -0
  67. package/packages/core/release/stable-release-gate.js +11 -0
  68. package/packages/core/workflow/attempt/identity.js +7 -2
  69. package/packages/core/workflow/pipeline/actions.js +14 -1
  70. package/packages/core/workflow/pipeline/build-result.js +8 -0
  71. package/packages/core/workflow/pipeline/build.js +49 -2
  72. package/packages/core/workflow/pipeline/channel-control.js +10 -1
  73. package/packages/core/workflow/pipeline/channel-source.js +53 -0
  74. package/packages/core/workflow/pipeline/group-control.js +2 -0
  75. package/packages/core/workflow/pipeline/host.js +24 -16
  76. package/packages/core/workflow/pipeline/selection.js +9 -4
  77. package/scripts/check-pipeline-publication-topology.mjs +12 -0
  78. package/scripts/check-release-topology.mjs +1 -0
  79. package/scripts/generate-site-bundle.mjs +1 -1
  80. package/scripts/verify-standalone-product.mjs +42 -0
@@ -353,6 +353,14 @@
353
353
  "apply",
354
354
  "settle"
355
355
  ]
356
+ },
357
+ "version": {
358
+ "responsibility": "Regenerate declared version data in credentialless product jobs and materialize independently qualified publication or development sources.",
359
+ "operations": [
360
+ "build",
361
+ "materialize-publication",
362
+ "materialize-development"
363
+ ]
356
364
  }
357
365
  }
358
366
  },
@@ -137,6 +137,12 @@ Safe change route: Reduce one declared responsibility in its owning module, run
137
137
  - `.github/workflows/.release-binary-assets.yml`
138
138
  - `.github/workflows/public-ops-dev-auto-merge.yml`
139
139
  - `tests/release-topology.test.mjs`
140
+ - `scripts/check-release-topology.mjs`
141
+ - `packages/core/providers/github/discussions/materials.js`
142
+ - `.github/workflows/self-build-alpha-dogfood.yml`
143
+ - `.github/workflows/self-build-binary-distribution.yml`
144
+ - `.github/workflows/self-ops-bootstrap-dogfood.yml`
145
+ - `packages/core/governance/buildchain-publication-authority.js`
140
146
 
141
147
  ## action-process-runtime
142
148
 
@@ -1052,6 +1058,7 @@ Owner: Buildchain consumer contract maintainers
1052
1058
  - `packages/core/consumer/contract/inspection.js`
1053
1059
  - `packages/core/consumer/contract/plan.js`
1054
1060
  - `packages/core/consumer/contract/products.js`
1061
+ - `packages/core/consumer/contract/reader.js`
1055
1062
  - `packages/core/consumer/contract/shape.js`
1056
1063
  - `scripts/generate-minimal-consumer-contract.mjs`
1057
1064
 
@@ -1062,6 +1069,7 @@ Owner: Buildchain consumer contract maintainers
1062
1069
  ### Tests
1063
1070
 
1064
1071
  - `tests/minimal-consumer-contract.test.mjs`
1072
+ - `tests/consumer-product-config.test.mjs`
1065
1073
 
1066
1074
  ### Generated outputs
1067
1075
 
@@ -1088,6 +1096,8 @@ Owner: Buildchain pipeline maintainers
1088
1096
  - `packages/core/providers/github/pipeline-run-entry.js`
1089
1097
  - `packages/core/providers/github/pipeline-runs.js`
1090
1098
  - `packages/core/providers/github/pipeline-source.js`
1099
+ - `packages/core/providers/github/pipeline-version-artifacts.js`
1100
+ - `packages/core/providers/github/pipeline-version-readback.js`
1091
1101
  - `packages/core/providers/github/pipeline-worker.js`
1092
1102
  - `packages/core/publication/pipeline/actions.js`
1093
1103
  - `packages/core/publication/pipeline/apply.js`
@@ -1129,7 +1139,15 @@ Owner: Buildchain pipeline maintainers
1129
1139
  - `packages/core/publication/pipeline/settle.js`
1130
1140
  - `packages/core/publication/pipeline/signing.js`
1131
1141
  - `packages/core/publication/pipeline/source-plan.js`
1142
+ - `packages/core/publication/pipeline/version-actions.js`
1143
+ - `packages/core/publication/pipeline/version-build.js`
1144
+ - `packages/core/publication/pipeline/version-context.js`
1145
+ - `packages/core/publication/pipeline/version-material.js`
1146
+ - `packages/core/publication/pipeline/version-preparation.js`
1147
+ - `packages/core/publication/pipeline/version-regeneration.js`
1148
+ - `packages/core/publication/pipeline/version-source-guard.js`
1132
1149
  - `packages/core/publication/pipeline/version.js`
1150
+ - `packages/core/publication/pipeline/worker.js`
1133
1151
  - `packages/core/workflow/attempt/journal.js`
1134
1152
  - `packages/core/workflow/commands/pipeline-build.mjs`
1135
1153
  - `packages/core/workflow/pipeline/action-output.js`
@@ -1183,6 +1201,7 @@ Owner: Buildchain pipeline maintainers
1183
1201
  ### Contracts
1184
1202
 
1185
1203
  - `architecture/decisions/0007-hosted-pipeline-controller.md`
1204
+ - `architecture/decisions/0009-pipeline-version-preparation.md`
1186
1205
 
1187
1206
  ### Tests
1188
1207
 
@@ -1229,6 +1248,10 @@ Owner: Buildchain pipeline maintainers
1229
1248
  - `tests/pipeline-runtime.test.mjs`
1230
1249
  - `tests/pipeline-settlement.test.mjs`
1231
1250
  - `tests/pipeline-source.test.mjs`
1251
+ - `tests/pipeline-version-artifacts.test.mjs`
1252
+ - `tests/pipeline-version-build.test.mjs`
1253
+ - `tests/pipeline-version-context.test.mjs`
1254
+ - `tests/pipeline-version-regeneration.test.mjs`
1232
1255
  - `tests/pipeline-web-status.test.mjs`
1233
1256
  - `tests/pipeline-worker.test.mjs`
1234
1257
 
@@ -2852,6 +2852,91 @@
2852
2852
  "expectedContributionSeconds": 49500,
2853
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
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
+ }
2855
2940
  }
2856
2941
  ],
2857
2942
  "declarationFamilies": [
@@ -0,0 +1,186 @@
1
+ ---
2
+ status: draft
3
+ period: 2026-09-13
4
+ theme: minimal-consumer-version-preparation
5
+ doc_type: architecture-decision-record
6
+ source_level: local-files
7
+ confidence: medium
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-13
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-13
16
+ visible_context: Consumer compiler, prepared self product contract, product execution, version materialization, provider adapters and local adversarial tests.
17
+ invisible_context_boundary: Local tests do not establish published entry qualification, hosted provider authorization or completed self migration.
18
+ ---
19
+
20
+ # ADR 0009: Regenerate version data before qualifying the final product source
21
+
22
+ Changing a package version can invalidate generated documents that embed that
23
+ version or hashes of other documents. Both publication and next-development
24
+ preparation must regenerate those declared documents before creating the final
25
+ Git source. Leaving the old documents in place would fail the ordinary clean
26
+ source build, or publish facts that disagree with the product version.
27
+
28
+ The runtime retains an exact preparation in the current attempt. It binds the
29
+ source and TOML, selected runtime, target version, parent plan, purpose and
30
+ declared platforms. An internal component checks out that source on separate
31
+ product runners, patches only declared primary version fields, and executes the
32
+ existing product install/build/verify commands without publication credentials.
33
+ No new consumer command or workflow input is needed.
34
+
35
+ The product result contains every declared version document and derived file.
36
+ The source guard compares all original tracked bytes, types, executable modes,
37
+ HEAD and tree directly; index flags cannot hide modifications. Only declared
38
+ material bytes may change. Primary documents must exactly equal the pure version
39
+ field patch. Changed derived documents from different platforms must agree.
40
+ The source TOML, managed runtime locks and workflow authority cannot be generated
41
+ as version material. Paths are literal, regular UTF-8 files with bounded size;
42
+ symlink and submodule sources are not qualified by this preparation implementation.
43
+
44
+ The ordinary product build also compares every tracked file directly with its
45
+ admitted Git blob before and after executing commands. Index flags, local clean
46
+ filters and ignored executable-mode changes cannot make altered bytes qualify.
47
+ Tracked symbolic links retain their exact target bytes; parent directories
48
+ cannot become links. Source checkout transformations must preserve the admitted
49
+ bytes (Buildchain declares LF checkout in `.gitattributes`); unresolved submodules
50
+ are rejected. This strengthens both the initial version-preparation source check
51
+ and ordinary build qualification without granting product commands credentials.
52
+
53
+ Project Cut replay transfers generated source patches through private temporary
54
+ files instead of buffering them as command metadata. Git still applies the exact
55
+ binary patch to an isolated index and compares stable patch identity and changed
56
+ paths against the source. This permits large committed action bundles without
57
+ changing the source composition, family receipt, conflict rejection or metadata
58
+ output bound. Temporary descriptors and files are closed on success and failure.
59
+
60
+ A separate job checks the original published caller, exact reusable definitions,
61
+ provider run and retry, every successful platform job, and immutable artifact
62
+ digests before reading results. The retained preparation and actual source
63
+ contract are checked again before the qualified material enters the journal.
64
+ Git materialization verifies the resulting tree, exact document bytes and ref.
65
+ The final product build then runs against that exact materialized source and is
66
+ qualified and signed through the existing publication boundary.
67
+
68
+ For next-development, the same preparation starts from the retained current
69
+ protected development source. It creates an ordinary PR and preserves the
70
+ completed publication while waiting for protected review and integration.
71
+ Recovery can reuse retained material only for the same parent and runtime;
72
+ conflicting qualified results fail closed. Published payloads and provider
73
+ receipts remain immutable under the existing recovery contract.
74
+
75
+ This adds actual product execution when derived version files are declared.
76
+ The publication component calls one shared internal version component for its
77
+ two purposes. Each component stays within the existing job, step and module
78
+ budgets. Local tests cover real child processes and Git byte guards, artifact
79
+ transport rejection, retained request admission, materialization and existing
80
+ recovery regressions. Hosted platform and provider qualification remain separate
81
+ delivery requirements.
82
+
83
+ An npm artifact may declare `path = "."` to pack the product directory through
84
+ the standard runtime packer with lifecycle hooks disabled. Optional artifact
85
+ `filename` data preserves established download names. Names are single bounded
86
+ filenames with the declared format, unique across the full publication plan,
87
+ and independently verified against the packed file. These fields do not expose
88
+ publication commands or provider control to the consumer.
89
+
90
+ The prepared `.buildchain/minimal-consumer.toml` declares Buildchain's npm
91
+ package and the three existing binary downloads using those ordinary product
92
+ fields. It retains all seven primary version documents and three derived
93
+ documents. The contract is inactive: the current callers still select
94
+ `.buildchain/buildchain.toml`. Publishing this preparation does not activate a
95
+ second publisher or prove the self migration. The protected transition must
96
+ qualify the published entry and selected runtime, preserve the existing stable
97
+ qualification gates, retire the old consumer callers with a single writer,
98
+ and finally use the shared normal/recovery pair and canonical TOML path.
99
+
100
+ Each declared native checkpoint platform retains a full candidate action build,
101
+ site generation and repository check through ordinary product commands. Linux
102
+ runs this with the npm product; macOS and Windows run it with their standalone
103
+ product. The full check includes the product's checkpoint clean-process and
104
+ recovery tests; a binary version/help smoke test alone cannot replace source
105
+ qualification. Rust formatting, lint and WASM toolchain components are explicit
106
+ install commands on each platform. Local configuration checks establish this
107
+ wiring only; the protected hosted executions and any remaining container-specific
108
+ qualification must still pass before retiring the existing verification caller.
109
+
110
+ Site generation reads its KFD upstream declarations from the product-owned
111
+ `architecture/product-upstreams.json`. The existing collector receives this
112
+ data explicitly, so changing the consumer TOML to the minimal schema preserves
113
+ the product's seven upstream evidence assets and their digests. The legacy
114
+ configuration retains its declarations until the protected caller cutover;
115
+ the new data contains no build, publication or recovery orchestration.
116
+
117
+ The prepared contract also declares stable eligibility as a closed `stable`
118
+ table: minimum publication interval and canary soak in seconds, literal product
119
+ paths, a product impact document, and whether published-entry qualification is
120
+ required. It carries no workflow names, provider commands or evidence selectors.
121
+ The publication plan retains an independent copy under its immutable root.
122
+ The self preparation preserves the existing 86,400-second interval and
123
+ 3,600-second soak. The shared stable evaluator now rejects impact from another
124
+ candidate version and duplicate canary observations instead of selecting the
125
+ last observation. These declarations and local checks do not activate the new
126
+ publisher: independent provider collection and enforcement in the pipeline
127
+ remain required before the protected self cutover.
128
+ Stable preparation and application now collect source facts after verifying
129
+ the authoritative attempt. The collector resolves the exact public Alpha tag,
130
+ requires the same channel PR source and compiled contract, and verifies every
131
+ declared version document. It reads product impact from a bounded regular Git
132
+ blob in that exact tree, independently checking its bytes and version. Product
133
+ differences include added, removed and mode-changed files from complete Git
134
+ trees; a short comparison listing cannot silently hide product changes.
135
+
136
+ Complete bounded release pagination identifies the previous published product
137
+ and the most recent earlier stable publication, including backports for the
138
+ cooldown. The comparison must match the plan's retained previous channel.
139
+ Fresh tag, release and predecessor observations reject concurrent changes.
140
+ Same-version recovery does not count its own completed publication as an older
141
+ release. These facts carry their own root and the exact publication plan root.
142
+
143
+ New publication plans declare evidence version 1 and publish their full plan
144
+ alongside qualification, capsules, invocation, attestation and Passport. The
145
+ plan root is already bound by the signed product predicate. Recovery of an older
146
+ retained transaction preserves its original evidence inventory and provider
147
+ receipts; it does not retroactively add a plan or replace public bytes.
148
+
149
+ Stable product qualification reads those fixed evidence assets from the exact
150
+ Alpha release, with complete bounded pagination, unique identities, byte digests
151
+ and a second asset readback. It checks the original signature through the
152
+ central publisher workflow and exact provider source, reconstructs the Passport
153
+ and invocation, and requires every declared product/platform output. Original
154
+ build jobs and the signing job must still match provider readback, including
155
+ their attempt, source, publisher definition and completion times. Historical
156
+ qualification is checked at its issue time; it does not renew that receipt or
157
+ authorize the current Stable publisher. Successful product evidence also causes
158
+ another source observation before the eligibility decision.
159
+
160
+ Published-entry qualification independently inventories completed normal PR
161
+ runs after the exact Alpha release. It verifies the generated thin caller,
162
+ published entry definition, managed source lock and selected candidate runtime,
163
+ then reads the original native Attempt and retained product-build receipt.
164
+ The normal consumer commit can differ from the released runtime commit; its
165
+ compiled product contract must be identical. Every declared platform and the
166
+ exact recorder job must agree with fresh provider readback. A newer failed or
167
+ unrecorded matching build blocks fallback to older successful evidence. Recovery
168
+ runs, foreign entries and an old runtime behind a new entry do not qualify.
169
+
170
+ When only the publication interval or canary soak remains unsatisfied, preparation
171
+ retains the eligibility and a source-bound waiting receipt in the same Attempt.
172
+ An internal job outside the repository publication lock waits at most fifteen
173
+ minutes, checks native ownership every thirty seconds, and wakes the same normal
174
+ entry. The next execution recollects qualification; the waiting receipt grants
175
+ no publication authority. Publication checks again before provider effects and
176
+ can return to this waiting path if new evidence moves the soak deadline.
177
+
178
+ The timer stops if its retained receipt is superseded, the Attempt changes or
179
+ the phase advances. A successor can claim the exact waiting native head while
180
+ the old outer run finishes its wake job; the existing worker fence then rejects
181
+ the old publisher. Missing qualification and non-time failures remain errors.
182
+ Local tests exercise real native records with deterministic provider facts and
183
+ an injected clock, including bounded waits and stale-worker races. They do not
184
+ establish live published qualification or activate the prepared self contract.
185
+ Alpha preparation remains available for the protected transition; the legacy
186
+ stable publisher retains its existing policy until the protected self cutover.
@@ -231,6 +231,7 @@
231
231
  "packages/core/consumer/contract/inspection.js",
232
232
  "packages/core/consumer/contract/plan.js",
233
233
  "packages/core/consumer/contract/products.js",
234
+ "packages/core/consumer/contract/reader.js",
234
235
  "packages/core/consumer/contract/shape.js",
235
236
  "packages/core/consumer/policy-admission.js",
236
237
  "packages/core/consumer/policy-scan.js",
@@ -478,6 +479,8 @@
478
479
  "packages/core/providers/github/pipeline-run-entry.js",
479
480
  "packages/core/providers/github/pipeline-runs.js",
480
481
  "packages/core/providers/github/pipeline-source.js",
482
+ "packages/core/providers/github/pipeline-version-artifacts.js",
483
+ "packages/core/providers/github/pipeline-version-readback.js",
481
484
  "packages/core/providers/github/pipeline-worker.js",
482
485
  "packages/core/providers/github/product-publication.js",
483
486
  "packages/core/providers/github/publication-control-plane.js",
@@ -599,7 +602,15 @@
599
602
  "packages/core/publication/pipeline/settle.js",
600
603
  "packages/core/publication/pipeline/signing.js",
601
604
  "packages/core/publication/pipeline/source-plan.js",
605
+ "packages/core/publication/pipeline/version-actions.js",
606
+ "packages/core/publication/pipeline/version-build.js",
607
+ "packages/core/publication/pipeline/version-context.js",
608
+ "packages/core/publication/pipeline/version-material.js",
609
+ "packages/core/publication/pipeline/version-preparation.js",
610
+ "packages/core/publication/pipeline/version-regeneration.js",
611
+ "packages/core/publication/pipeline/version-source-guard.js",
602
612
  "packages/core/publication/pipeline/version.js",
613
+ "packages/core/publication/pipeline/worker.js",
603
614
  "packages/core/publication/publication-rehearsal-capsule.js",
604
615
  "packages/core/publication/publication-rehearsal-provider-bindings.js",
605
616
  "packages/core/publication/publication-rehearsal.js",
@@ -3070,10 +3081,14 @@
3070
3081
  "packages/core/consumer/contract/inspection.js",
3071
3082
  "packages/core/consumer/contract/plan.js",
3072
3083
  "packages/core/consumer/contract/products.js",
3084
+ "packages/core/consumer/contract/reader.js",
3073
3085
  "packages/core/consumer/contract/shape.js",
3074
3086
  "scripts/generate-minimal-consumer-contract.mjs"
3075
3087
  ],
3076
- "tests": ["tests/minimal-consumer-contract.test.mjs"],
3088
+ "tests": [
3089
+ "tests/minimal-consumer-contract.test.mjs",
3090
+ "tests/consumer-product-config.test.mjs"
3091
+ ],
3077
3092
  "contracts": ["architecture/decisions/0005-minimal-consumer-contract.md"],
3078
3093
  "generatedOutputs": [
3079
3094
  "architecture/minimal-consumer-migration.json",
@@ -3120,6 +3135,8 @@
3120
3135
  "packages/core/providers/github/pipeline-run-entry.js",
3121
3136
  "packages/core/providers/github/pipeline-runs.js",
3122
3137
  "packages/core/providers/github/pipeline-source.js",
3138
+ "packages/core/providers/github/pipeline-version-artifacts.js",
3139
+ "packages/core/providers/github/pipeline-version-readback.js",
3123
3140
  "packages/core/providers/github/pipeline-worker.js",
3124
3141
  "packages/core/publication/pipeline/actions.js",
3125
3142
  "packages/core/publication/pipeline/apply.js",
@@ -3161,7 +3178,15 @@
3161
3178
  "packages/core/publication/pipeline/settle.js",
3162
3179
  "packages/core/publication/pipeline/signing.js",
3163
3180
  "packages/core/publication/pipeline/source-plan.js",
3181
+ "packages/core/publication/pipeline/version-actions.js",
3182
+ "packages/core/publication/pipeline/version-build.js",
3183
+ "packages/core/publication/pipeline/version-context.js",
3184
+ "packages/core/publication/pipeline/version-material.js",
3185
+ "packages/core/publication/pipeline/version-preparation.js",
3186
+ "packages/core/publication/pipeline/version-regeneration.js",
3187
+ "packages/core/publication/pipeline/version-source-guard.js",
3164
3188
  "packages/core/publication/pipeline/version.js",
3189
+ "packages/core/publication/pipeline/worker.js",
3165
3190
  "packages/core/workflow/attempt/journal.js",
3166
3191
  "packages/core/workflow/commands/pipeline-build.mjs",
3167
3192
  "packages/core/workflow/pipeline/action-output.js",
@@ -3256,11 +3281,16 @@
3256
3281
  "tests/pipeline-runtime.test.mjs",
3257
3282
  "tests/pipeline-settlement.test.mjs",
3258
3283
  "tests/pipeline-source.test.mjs",
3284
+ "tests/pipeline-version-artifacts.test.mjs",
3285
+ "tests/pipeline-version-build.test.mjs",
3286
+ "tests/pipeline-version-context.test.mjs",
3287
+ "tests/pipeline-version-regeneration.test.mjs",
3259
3288
  "tests/pipeline-web-status.test.mjs",
3260
3289
  "tests/pipeline-worker.test.mjs"
3261
3290
  ],
3262
3291
  "contracts": [
3263
- "architecture/decisions/0007-hosted-pipeline-controller.md"
3292
+ "architecture/decisions/0007-hosted-pipeline-controller.md",
3293
+ "architecture/decisions/0009-pipeline-version-preparation.md"
3264
3294
  ],
3265
3295
  "generatedOutputs": [],
3266
3296
  "validationCommands": [
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "totalExcessLedger": {
9
9
  "metric": "calibrated-full-dimensional-excess-v1",
10
- "measuredExcess": 38852,
11
- "current": 30791
10
+ "measuredExcess": 38833,
11
+ "current": 30772
12
12
  },
13
13
  "defaults": {
14
14
  "owner": "Buildchain architecture maintainers",
@@ -321,7 +321,7 @@
321
321
  "lines": 1887
322
322
  },
323
323
  "current": {
324
- "lines": 1825
324
+ "lines": 1806
325
325
  },
326
326
  "target": {
327
327
  "lines": 600
@@ -2247,7 +2247,13 @@
2247
2247
  ".github/workflows/self-release-promote.yml",
2248
2248
  ".github/workflows/.release-binary-assets.yml",
2249
2249
  ".github/workflows/public-ops-dev-auto-merge.yml",
2250
- "tests/release-topology.test.mjs"
2250
+ "tests/release-topology.test.mjs",
2251
+ "scripts/check-release-topology.mjs",
2252
+ "packages/core/providers/github/discussions/materials.js",
2253
+ ".github/workflows/self-build-alpha-dogfood.yml",
2254
+ ".github/workflows/self-build-binary-distribution.yml",
2255
+ ".github/workflows/self-ops-bootstrap-dogfood.yml",
2256
+ "packages/core/governance/buildchain-publication-authority.js"
2251
2257
  ],
2252
2258
  "burnDownSlices": [
2253
2259
  {
@@ -26,17 +26,17 @@
26
26
  },
27
27
  "repositoryBudgets": {
28
28
  "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
- "maxHandMaintainedSourceFiles": 1449,
30
- "maxHandMaintainedSourceLines": 214973,
31
- "maxWorkflowFiles": 72,
32
- "maxWorkflowLines": 10289,
33
- "latestTransition": "Exact-attempt source, native ownership and product publication recovery through a shared public execution component.",
34
- "latestTransitionRationale": "Charge the measured recovery implementation and two hosted workflow additions: immutable predecessor admission, original per-platform source/artifact requalification, retained native cleanup before CAS, repaired runtime continuation, atomic publication material import, fresh signed-transaction recovery authority and preserved completed effects. Shared normal/recovery execution retains separate credentialless product, signing, publisher and follow-up jobs. No per-file, function, complexity, debt or exception ceiling changes; independent governance review covers the exact aggregate and CI lane declarations.",
29
+ "maxHandMaintainedSourceFiles": 1472,
30
+ "maxHandMaintainedSourceLines": 217902,
31
+ "maxWorkflowFiles": 73,
32
+ "maxWorkflowLines": 10457,
33
+ "latestTransition": "Permission-safe pipeline policy and premerge channel source qualification.",
34
+ "latestTransitionRationale": "Charge one module and 123 measured implementation lines for exact version-blob and Rust-owned channel qualification before required checks and queue admission, viewer-enforced policy readback with check App identity, partitioned material retention, and the six documented task branch prefixes. Existing self workflows remain in place until the repaired runtime is published. Per-file, function, complexity, debt and exception ceilings remain unchanged. This aggregate budget change remains proposed until independent protected review.",
35
35
  "rationale": "Bounded modules separate candidate, evidence, native proof and execution, canonical failure verification, closed-set execution transfer, process-boundary verification, Warrant state and qualification, authority state, qualification, Landing acquisition, verified-attempt admission, Landing settlement and fence validation, provider attempt and heartbeat readback, sealed terminal evidence, hosted heartbeat, resume, store, options, command-specific adapters, and CLI orchestration responsibilities. The protected delivery workflow gives candidate and seal jobs no provider write credential, recursively rejects transfer drift, scopes every transfer artifact to the exact provider run attempt, chains every durable heartbeat state and receipt root on a distinct hosted runner domain, and permits qualification or exact failure settlement only after the finalizer verifies live jobs and the latest durable authority state. Public Landing admission and heartbeat always perform non-injectable fresh exact-attempt provider readback, tolerate only a not-yet-materialized seal job while retaining exact native and duplicate-job rejection, and heartbeat-loss coordination never invokes GitHub's run-scoped cancellation API where a successor rerun could race. The hosted process boundary anchors trust in the kernel-resolved versioned Runner.Worker path while accepting an equivalent argv-zero spelling with the same basename; its public boundary marker is allowed only at the one exact non-secret value, so a forged value under the same credential-like name still fails closed. The credentialless transfer seal validates the rooted native reuse decision against the Warrant-bound source, closure, dependency, toolchain, environment and command inputs; qualifiedBase stays in the proof and decision where it is rooted and later independently rechecked, rather than being assumed on the Warrant schema. V2 mutation cannot initialize a second empty authority beside a legacy ref: migration reads and roots the canonical live v1 ref, rechecks it, applies the explicit configured v2 policy, and atomically replaces its bytes through one expected-old non-force update, so old v1 controllers fail closed while the prior commit remains immutable history. Candidate ancestry classifies the GitHub artifact runtime token as credential authority. Every Landing settlement, including an unexpired fence, requires product-owned terminal readback. Terminal cleanup reads the immutable historical attempt, derives workflow and hosted Landing job identity from live run data, reads the exact protected ref head and compares containment against that immutable SHA, and seals merged only when the admitted merge-group head is contained by that protected base; a later different-head merge settles the old attempt as dequeued. Terminal normalization preserves transfer, finalizer boundary, native and seal job, admitted provider attempt, protected-base head, containment result, and terminal readback coordinates. The public reusable workflow truthfully retains its single-flight v1 authority without advertising v2 migration, while bounded v2 remains a separate opt-in CLI, Node API, and schema contract; the tracked self-caller stays on public v4-alpha with matching stable and alpha locks, and transient train selection is dispatch-only. Next-development parity adds one versioned transition authority, one durable controller, one bounded reservation adapter, and pure public-contract recovery evidence while retaining the existing thin floating-channel callers byte-for-byte. The floating-consumer gate reuses the existing contract-world evaluator so SHA drift passes only under the selected lock's compatibility policy, breaking surface drift still fails closed, and external certification reconstructs the receipt from the observed workflow SHA rather than the lock's historical evidence SHA. Tail reseal adds no Stage Capsule effect or general rebuild authority: it verifies the exact retained four-platform bytes, admits one known macOS tail failure through live provider readback, fences signing and finalization to explicit credentials and Warrant identity, and requires standard candidate Passport plus provider and protected readback. Compatibility Facts parity isolates canonical encoding, temporal verification, lifecycle validation, fixture projection, public authority projection, and CLI adaptation into bounded modules; legacy digest and proof arrays are derived only from exact current Fact lineage. Publication Rehearsal adds no production release authority: the content-addressed capsule contract binds source, candidate, manifest, config, canonical data-only provider bindings, provider policy, observations and core version separately from filesystem, runtime and rehearsal-only provider authority; simulate, replay and explicitly authorized provider rehearsal all reuse the release-tail planner, while same-commit local dogfood resolves the new reusable contract and exact current runtime before external callers remain on floating v4-alpha. Cross-runtime candidate recovery preserves original runtime and provider roots and creates resume lineage only after exact public ref, tag, ancestry, npm version and integrity readback. Adopter Delivery restores the reviewed public v3 gate, drivers, Passport binding, N-1 bootstrap and exact archive loader through one public v4 surface while keeping provider and release authority explicit non-claims. Floating Alpha bootstrap uses only the existing exact resolver and protected Alpha private shell to move an otherwise stale floating shell, retains public v4 stable promotion, and removes itself after protected readback. CI lane change-budget enforcement adds a bounded parser, evaluator, guard, and tests without creating another merge authority. Minimal consumer contract adds exactly seven bounded contract modules, one generated-contract gate and six product build/test example sources; the source-file ceiling increases by fourteen for this reviewed feature slice. Existing per-file, function, complexity and debt limits are unchanged. The final readable template sources require exact source-line and total-automation ceilings of 203394 and 224451 respectively; this charges all generated example sources rather than hiding them from measurement.",
36
36
  "governance": "legacy-debt-sunset-2026q4",
37
37
  "maxActionDefinitions": 283,
38
38
  "maxActionDefinitionLines": 12399,
39
- "maxAutomationImplementationLines": 236737
39
+ "maxAutomationImplementationLines": 239900
40
40
  },
41
41
  "sourceBudgets": {
42
42
  "newFileLines": 600,
@@ -7036,6 +7036,15 @@
7036
7036
  "destination": "retain-product-source; move-orchestration-into-runtime",
7037
7037
  "commandReferences": []
7038
7038
  },
7039
+ {
7040
+ "path": ".buildchain/minimal-consumer.toml",
7041
+ "kind": "config",
7042
+ "destination": "closed-toml-plan",
7043
+ "commandReferences": [
7044
+ "scripts/build-standalone-binary.mjs",
7045
+ "scripts/verify-standalone-product.mjs"
7046
+ ]
7047
+ },
7039
7048
  {
7040
7049
  "path": ".buildchain/release-impact.json",
7041
7050
  "kind": "consumer-source",
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "id": "kfd",
4
+ "package": "@kungfu-tech/kfd",
5
+ "repository": "kungfu-systems/kfd",
6
+ "kfd_1": "exported-witness",
7
+ "kfd_2": "exported-claim",
8
+ "kfd_3": "exported-collaboration-interface",
9
+ "kfd_4": "schema-metadata",
10
+ "evidence": [
11
+ "package:kfd.release.json",
12
+ "package:.buildchain/kfd-1/contract-world.witness.json",
13
+ "package:.buildchain/kfd-2/public-release-trust.claim.json",
14
+ "package:.buildchain/kfd-2/kfd-foundation.trust-claims.json",
15
+ "package:.buildchain/kfd-2/kfd-foundation.trust-assessment.json",
16
+ "package:.buildchain/kfd-3/collaboration-interface.json",
17
+ "package:standards.json"
18
+ ]
19
+ }
20
+ ]