@kungfu-tech/buildchain 4.1.3-alpha.5 → 4.1.3-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/AGENTS.md +41 -75
  2. package/CONTRIBUTING.md +19 -26
  3. package/architecture/agent-change-map.md +7 -12
  4. package/architecture/capability-state-machine-manifest.json +1 -4
  5. package/architecture/ci-lane-change-budget.json +35 -1026
  6. package/architecture/core-mechanisms.json +3 -6
  7. package/architecture/internal-capabilities.json +1 -5
  8. package/architecture/maintainability-debt.json +43 -36
  9. package/architecture/maintainability-policy.json +8 -8
  10. package/architecture/minimal-consumer-migration.json +80 -1977
  11. package/architecture/platform-stage-checkpoints.json +31 -7
  12. package/architecture/release-topology.json +64 -84
  13. package/architecture/stage-capsule-qualification.json +3 -1
  14. package/architecture/universal-workflow-bootstrap.json +3 -1
  15. package/architecture/universal-workflow-capability-policy.json +4 -4
  16. package/architecture/universal-workflow-fault-campaign.json +3 -1
  17. package/architecture/workflow-taxonomy.json +24 -341
  18. package/dist/site/buildchain-contract.json +13 -67
  19. package/dist/site/buildchain-site.json +28 -23
  20. package/dist/site/capability-registry.json +2 -2
  21. package/dist/site/controller-registry.json +1 -47
  22. package/dist/site/kfd-claims.json +78 -448
  23. package/dist/site/kfd-upstream-aggregate.json +1 -1
  24. package/dist/site/manual-registry.json +3 -3
  25. package/dist/site/node-api-registry.json +24 -24
  26. package/dist/site/page-registry.json +21 -16
  27. package/dist/site/public-surface-audit.json +31 -347
  28. package/dist/site/publication-authority-registry.json +51 -511
  29. package/dist/site/publication-registry.json +4 -4
  30. package/dist/site/site-manifest.json +7 -7
  31. package/dist/site/workflow-registry.json +259 -1126
  32. package/docs/code-organization.md +9 -6
  33. package/docs/node-api-reference.md +57 -57
  34. package/docs/release-governance.md +10 -12
  35. package/docs/runtime-entry.md +10 -3
  36. package/docs/runtime-train-validation.md +39 -11
  37. package/docs/stable-candidate-patrol.md +6 -5
  38. package/docs/workflow-catalog.md +3 -32
  39. package/package.json +1 -1
  40. package/packages/core/adoption/buildchain-kfd-claims.js +7 -7
  41. package/packages/core/dev-delivery/dev-delivery-provider-heartbeat.js +18 -15
  42. package/packages/core/dev-delivery/native/actions.js +2 -0
  43. package/packages/core/dev-delivery/native/process-entry.js +19 -0
  44. package/packages/core/dev-delivery/queue/landing-action.js +49 -1
  45. package/packages/core/dev-delivery/warrant/failure-settlement.js +8 -6
  46. package/packages/core/dev-delivery/warrant/service.js +7 -0
  47. package/packages/core/governance/buildchain-publication-authority.js +2 -23
  48. package/packages/core/governance/github-governance-authority.js +1 -0
  49. package/packages/core/observability/controller-evidence.js +0 -8
  50. package/packages/core/providers/github/pipeline-entry-runs.js +8 -1
  51. package/packages/core/providers/github/pipeline-events.js +79 -0
  52. package/packages/core/publication/pipeline/pack.js +31 -8
  53. package/packages/core/workflow/pipeline/actions.js +0 -23
  54. package/packages/core/workflow/pipeline/build-evidence.js +123 -5
  55. package/packages/core/workflow/pipeline/build-result.js +1 -0
  56. package/packages/core/workflow/pipeline/channel-control.js +25 -4
  57. package/packages/core/workflow/pipeline/controller.js +9 -1
  58. package/packages/core/workflow/pipeline/delivery-control.js +54 -9
  59. package/packages/core/workflow/pipeline/delivery-observation.js +16 -10
  60. package/packages/core/workflow/pipeline/group-control.js +1 -0
  61. package/packages/core/workflow/pipeline/guard-build.js +37 -0
  62. package/packages/core/workflow/pipeline/guard.js +4 -2
  63. package/packages/core/workflow/pipeline/host.js +23 -1
  64. package/packages/core/workflow/pipeline/integration-status.js +113 -0
  65. package/packages/core/workflow/pipeline/record-action.js +27 -0
  66. package/packages/core/workflow/pipeline/recorder-status.js +69 -0
  67. package/packages/core/workflow/workflow-taxonomy.mjs +67 -47
  68. package/scripts/check-inventory.mjs +7 -70
  69. package/scripts/check-pipeline-publication-topology.mjs +2 -0
  70. package/scripts/check-public-dogfood-contract.mjs +38 -51
  71. package/scripts/check-release-topology.mjs +8 -7
  72. package/scripts/check-self-consumer-contract.mjs +133 -0
  73. package/scripts/check-universal-workflow-bootstrap.mjs +4 -6
  74. package/scripts/generate-minimal-consumer-contract.mjs +1 -1
  75. package/scripts/inventory/binary.mjs +9 -19
  76. package/scripts/inventory/promotion.mjs +2 -13
  77. package/scripts/prepare-product-toolchain.mjs +10 -0
  78. package/scripts/verify-product-platform.mjs +65 -0
package/AGENTS.md CHANGED
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-11
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-11
15
+ generated_at: 2026-09-14
16
16
  visible_context: Buildchain 4.1 source, architecture registries and local validation.
17
17
  invisible_context_boundary: No unpublished release or external consumer qualification is claimed.
18
18
  ---
@@ -38,52 +38,27 @@ restating them.
38
38
 
39
39
  ## Using this repo as a Buildchain consumer
40
40
 
41
- Ordinary builds read project configuration from `buildchain.toml`. Single-project
42
- consumers call the public workflow with no inputs:
43
-
44
- ```yaml
45
- uses: kungfu-systems/buildchain/.github/workflows/build.yml@v4
46
- ```
47
-
48
- The public workflow is the API entry. It selects the execution runtime from a
49
- trusted non-persistent runtime input (`runtime-ref`), the selected consumer
50
- contract lock, or the entry commit default. `@v4-alpha` selects the alpha entry
51
- and its default lock path. Entry and runtime commits may differ. See
52
- [`Runtime entry`](docs/runtime-entry.md) for selection and recovery.
53
-
54
- Project settings belong in TOML; `config-path` locates a nested project. All
55
- execution jobs prepare the selected runtime through
56
- `actions/runtime/environment/prepare`. Subsequent business actions use that
57
- runtime without Buildchain SHA comparisons or secondary runtime admission.
58
-
59
- For new repositories, prefer the CLI:
60
-
61
- ```sh
62
- npx @kungfu-tech/buildchain init --type package
63
- npx @kungfu-tech/buildchain validate --require-version-state
64
- npx @kungfu-tech/buildchain release --dry-run --target-ref alpha/v4/v4.1
65
- ```
66
-
67
- For governed Paper repositories, scaffold or migrate the repository once, then
68
- follow the generated `AGENTS.md` entry contract. Work begins and ends through
69
- the pinned pnpm scripts:
70
-
71
- ```sh
72
- pnpm paper:agent:verify
73
- pnpm paper:work:start -- <topic> --execute --json
74
- pnpm paper:work:submit -- --execute --json
75
- ```
76
-
77
- The reusable required check independently enforces the same contract and PR
78
- lineage, so local command use is never treated as remote acceptance evidence.
79
-
80
- See [`docs/cli.md`](docs/cli.md), [`docs/lifecycle-protocol.md`](docs/lifecycle-protocol.md),
81
- and [`docs/reusable-build-surface.md`](docs/reusable-build-surface.md) for the
82
- consumer contract.
83
-
84
- All public entries share the same runtime contract. A runtime bug is recovered
85
- through a new execution with a repaired train and original source evidence.
86
- An entry bug requires an upgraded published entry and a complete new run.
41
+ The consumer-facing self boundary is `.buildchain/buildchain.toml`, two generated
42
+ callers (`.github/workflows/buildchain.yml` and `buildchain-recover.yml`),
43
+ tool-maintained contract locks, and necessary provider permissions. The normal
44
+ caller invokes the published `public-ops-pipeline.yml`; recovery accepts only an
45
+ exact attempt and an optional repaired runtime through `public-ops-recover.yml`.
46
+ No repository-specific runtime selection or recovery exception is allowed.
47
+
48
+ During the protected migration, both callers use `@v4-alpha` and the prepared
49
+ `.buildchain/minimal-consumer.toml` path, kept byte-identical to the canonical
50
+ TOML. The pipeline reads policy at the same path on its protected target branch,
51
+ so each target must contain the schema-2 policy before its first pipeline PR.
52
+ The TOML declares `feature/*`, `fix/*`, `chore/*`, `docs/*`, `ci/*`, and
53
+ `refactor/*` development routes before the first new-pipeline Alpha qualification.
54
+ After the canonical path is protected and the stable entry is qualified,
55
+ regenerate the same pair using the default path and `@v4`.
56
+ Do not claim the transition complete while that final cleanup is outstanding.
57
+
58
+ Products declare their own install, build, and verification commands in TOML.
59
+ Publication, source qualification, reviews, merge queues, provider readback and
60
+ recovery belong to the published runtime. Internal workflow libraries may be
61
+ retained, but self callers must use the same public reusable-workflow contract as every other consumer.
87
62
 
88
63
  ## Building this repo
89
64
 
@@ -119,33 +94,24 @@ Stage Capsule resume planning is governed by
119
94
  TypeScript projection pure and byte-identical; explicit provider/release-tail
120
95
  effects always require readback and never become Capsule reuse.
121
96
 
122
- Stage Capsule qualification and Wave 2 reconciliation are governed by
123
- `architecture/stage-capsule-qualification.json`. Buildchain v4 dogfood is a
124
- repository invariant, not an implementation convenience: this repository must
125
- consume `kungfu-systems/buildchain/.github/workflows/public-build-stage-capsule-canary.yml`
126
- through the same public reusable-workflow contract as every other consumer.
127
- The caller must remain a thin workflow with no steps or local orchestration,
128
- and `.buildchain/buildchain.toml` must declare the same real `install`, `build`,
129
- and `verify` lifecycle. The public workflow records the entry and selected runtime and binds
130
- consumer source SHA, platform, commands, manifests, summaries, dependencies,
131
- and output roots on Linux, macOS, and Windows.
132
-
133
- Dogfood callers use the same public entry and runtime preparation as external
134
- consumers. No repository-specific runtime selection or recovery exception is
135
- allowed. Stage Capsule internals are invoked by public workflows and tests;
136
- provider effects remain subject to their own source, artifact and readback rules.
137
-
138
- External Buildchain v4 workflow calls persisted in tracked source use only `@v4` or
139
- `@v4-alpha` and retain matching stable and alpha contract locks. A
140
- source-persisted exact commit SHA or train is not a durable entry selector.
141
- Exact resolved SHAs belong in lock data and provenance. Normal self workflows
142
- call `@v4`; dedicated post-publication alpha entry qualification calls `@v4-alpha`.
143
-
144
- Train validation passes `train/v4/v4.1/<capability>` only through the trusted
145
- non-persistent runtime input. The central entry resolves it once, and every
146
- business job executes the selected runtime. Protected merge and requested alpha
147
- publication follow successful validation. Changes to dogfood policy or its
148
- gates require independent `@kungfu-origin` review.
97
+ Stage Capsule qualification and Wave 2 reconciliation remain governed by
98
+ `architecture/stage-capsule-qualification.json`. Its prior standalone public
99
+ Canary caller is explicitly historical; its shadow-only authority and retained
100
+ evidence do not grant publication or production reuse. Current product verification
101
+ runs the committed WASM checks, clean-process checkpoint restoration, and resume
102
+ planning on Linux, macOS and Windows, with the same pinned Linux container
103
+ backbone checks. These are product tests, not consumer-side delivery controllers.
104
+
105
+ Normal self workflows and recovery share central runtime selection. The
106
+ central entry resolves it once, and every business job uses that selected runtime.
107
+ Persist only `@v4` or `@v4-alpha` in caller source, with matching stable and alpha contract locks
108
+ maintained by the tooling. A source-persisted exact commit SHA or train is not a durable entry selector;
109
+ exact SHAs belong in locks and provenance. A repaired train is a trusted,
110
+ non-persistent recovery input and must retain the original attempt evidence.
111
+ The optional repair selector is a trusted non-persistent runtime input.
112
+
113
+ Changes to this consumer wiring, its required product checks, or publication
114
+ gates require `@kungfu-origin` approval through the protected PR workflow.
149
115
 
150
116
  `pnpm run check` validates inventory data, generated public references and site
151
117
  bundle drift, lints root workflows, runs unit tests, and rebuilds every action
package/CONTRIBUTING.md CHANGED
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-12
11
+ last_reviewed: 2026-09-14
12
12
  ai_provenance:
13
13
  model_family: GPT-6
14
14
  product: Codex
15
- generated_at: 2026-09-12
15
+ generated_at: 2026-09-14
16
16
  visible_context: Repository contribution rules and implementation naming and release transition changes.
17
17
  invisible_context_boundary: No private credentials or unpublished external release state.
18
18
  ---
@@ -39,7 +39,7 @@ sensitive material in issues or pull requests.
39
39
 
40
40
  - Node.js 24
41
41
  - Corepack with pnpm 11
42
- - Go 1.25 for workflow validation paths that exercise Go setup
42
+ - Go 1.25 or newer in major 1 for product verification
43
43
 
44
44
  Buildchain's reusable workflow consumers may build with npm, yarn, pnpm, CMake,
45
45
  Conan, Python, Docker, or other tools through lifecycle commands. This
@@ -91,17 +91,16 @@ category vocabulary is enforced by `architecture/workflow-taxonomy.json`:
91
91
  | --- | --- | --- |
92
92
  | Public | `public-<category>-<purpose>.yml` | Consumer entry |
93
93
  | Component | `.<category>-<purpose>.yml` | Advanced reusable component |
94
- | Self | `self-<category>-<purpose>.yml` | Buildchain repository automation |
94
+ | Self | `buildchain.yml`, `buildchain-recover.yml` | Generated normal and recovery callers |
95
95
 
96
96
  Categories are only `build`, `release`, and `ops`. Register the identity, role,
97
97
  category, purpose, owner, lifecycle status, invocation, and rationale before
98
98
  adding its derived filename. The [Workflow Catalog](docs/workflow-catalog.md)
99
- lists every canonical API and component path; self workflows have one
100
- event entry. Retired paths have no generated aliases. A matching prefix alone does not admit an unregistered workflow.
99
+ lists every canonical API and component path; self automation has only the generated normal and recovery entries. Retired paths have no generated aliases. A matching prefix alone does not admit an unregistered workflow.
101
100
 
102
101
  Run `pnpm run generate:workflows`, `pnpm run check:workflows`, then the full
103
- `pnpm run check`. The required Verify lifecycle runs this gate on PRs, merge
104
- queue candidates, and pushes. Policy, enforcement, and ownership changes require
102
+ `pnpm run check`. The product verification commands run this gate through the shared pipeline on PRs, merge
103
+ queue candidates, and protected source qualification. Policy, enforcement, and ownership changes require
105
104
  independent `@kungfu-origin` review. A development merge does not publish a floating channel. Consumers adopt the
106
105
  new API only after that channel publishes it and their contract locks are refreshed.
107
106
 
@@ -145,24 +144,18 @@ release/vX/vX.Y -> publish-gate/major
145
144
  them for direct ad-hoc commits. Work from `feature/*`, `fix/*`, `chore/*`,
146
145
  `docs/*`, `ci/*`, or `refactor/*` branches and open a PR into the target dev
147
146
  line.
148
- - Repositories may call
149
- `.github/workflows/public-ops-dev-auto-merge.yml` from their own scheduled or manual
150
- wrapper to merge ready, conflict-free dev PRs. The wrapper is policy-gated:
151
- required checks, ready/block labels, same-repository heads, approvals,
152
- branch prefixes, max merges, and dry-run are all declared inputs.
153
- - Ordinary build callers use `build.yml@v4` or `build.yml@v4-alpha` with
154
- project settings in `buildchain.toml`. Every public workflow uses the central
155
- runtime entry: transient `runtime-ref`, contract lock, then entry default.
156
- Validate the implementation before protected Dev, publish Alpha, and qualify
157
- the published consumer entry. See `docs/runtime-entry.md`.
158
- - Merging into `alpha/*`, `release/*`, or `publish-gate/major` expresses a
159
- release intent. Buildchain promotion then creates version-state commits,
160
- exact tags, floating tags, npm publish evidence, and next-alpha state.
161
- - Manual alpha publication requires an explicit protected source SHA and passes
162
- the same source qualification and fresh hosted admission as automatic publication.
163
- Use `runtime-ref` to select the execution runtime. Set recovery inputs only when
164
- resuming an existing transaction; a first publication leaves them empty. Stable
165
- publication continues through the protected automatic channel path.
147
+ - The generated `buildchain.yml` caller invokes `public-ops-pipeline.yml` using
148
+ a published floating entry. Product build, verification, artifacts, channels
149
+ and review policy are declared in the schema-2 TOML.
150
+ - The published runtime owns source qualification, protected review and merge,
151
+ version materialization, publication, provider readback and next-development.
152
+ - Recover an interrupted operation through `buildchain-recover.yml` using its
153
+ exact attempt and, when required, one transient repaired runtime. Recovery
154
+ does not accept replacement source, artifact or provider-effect parameters.
155
+ - During this repository's protected cutover, both generated callers use
156
+ `@v4-alpha` and the protected `.buildchain/minimal-consumer.toml` policy path;
157
+ see `AGENTS.md` for target-policy admission, stable qualification and final
158
+ default-path cleanup requirements.
166
159
 
167
160
  See [`docs/release-governance.md`](docs/release-governance.md),
168
161
  [`docs/release-flow.md`](docs/release-flow.md), and
@@ -108,7 +108,6 @@ Safe change route: Reduce one declared responsibility in its owning module, run
108
108
  - tests: `tests/release-propagation.test.mjs`
109
109
  - tests: `tests/web-surface.test.mjs`
110
110
  - workflows: `.github/workflows/public-release-web.yml`
111
- - workflows: `.github/workflows/self-ops-bootstrap-dogfood.yml`
112
111
 
113
112
  ### Current top twenty maintenance hotspots
114
113
 
@@ -121,7 +120,6 @@ Safe change route: Reduce one declared responsibility in its owning module, run
121
120
  - `tests/dev-delivery-minimal-request.test.mjs`
122
121
  - `tests/build-configuration.test.mjs`
123
122
  - `.github/workflows/build.yml`
124
- - `.github/workflows/self-build-fixture.yml`
125
123
  - `scripts/generate-channel-promotion-workflow.mjs`
126
124
  - `tests/github-governance-authority.test.mjs`
127
125
  - `tests/maintainability.test.mjs`
@@ -132,18 +130,19 @@ Safe change route: Reduce one declared responsibility in its owning module, run
132
130
  - `.github/workflows/public-build-stage-capsule-canary.yml`
133
131
  - `.github/workflows/public-release-oci-compose-preview.yml`
134
132
  - `.github/workflows/public-release-promote.yml`
135
- - `.github/workflows/self-build-verify.yml`
136
- - `.github/workflows/self-release-promote.yml`
137
133
  - `.github/workflows/.release-binary-assets.yml`
138
134
  - `.github/workflows/public-ops-dev-auto-merge.yml`
139
135
  - `tests/release-topology.test.mjs`
140
136
  - `scripts/check-release-topology.mjs`
137
+ - `packages/core/governance/buildchain-publication-authority.js`
141
138
  - `scripts/check-universal-workflow-bootstrap.mjs`
142
139
  - `packages/core/providers/github/discussions/materials.js`
143
- - `.github/workflows/self-build-alpha-dogfood.yml`
144
- - `.github/workflows/self-build-binary-distribution.yml`
145
- - `.github/workflows/self-ops-bootstrap-dogfood.yml`
146
- - `packages/core/governance/buildchain-publication-authority.js`
140
+ - `tests/controller-evidence.test.mjs`
141
+ - `tests/floating-consumer-policy-contract.test.mjs`
142
+ - `tests/macos-credential-island.test.mjs`
143
+ - `tests/minimal-consumer-contract.test.mjs`
144
+ - `tests/native-artifact-signing-authority.test.mjs`
145
+ - `tests/workflow-taxonomy.test.mjs`
147
146
 
148
147
  ## action-process-runtime
149
148
 
@@ -2539,7 +2538,6 @@ Owner: Buildchain adopter delivery maintainers
2539
2538
  - `contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json`
2540
2539
  - `contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json`
2541
2540
  - `.github/workflows/public-build-adopter-qualification.yml`
2542
- - `.github/workflows/self-build-adopter-dogfood.yml`
2543
2541
  - `docs/v4-adopter-delivery.md`
2544
2542
 
2545
2543
  ### Tests
@@ -2762,7 +2760,6 @@ Owner: Buildchain protected delivery maintainers
2762
2760
  - `contracts/dev-delivery-authority-v2.schema.json`
2763
2761
  - `dist/site/schemas/dev-delivery-authority-v2.schema.json`
2764
2762
  - `.github/workflows/public-ops-dev-auto-merge.yml`
2765
- - `.github/workflows/self-ops-dev-delivery.yml`
2766
2763
  - `templates/native-dev-delivery.yml`
2767
2764
  - `docs/dev-delivery-warrant.md`
2768
2765
  - `docs/dev-delivery-qualification-landing-adr.md`
@@ -2803,7 +2800,6 @@ Owner: Buildchain publication rehearsal maintainers
2803
2800
 
2804
2801
  - `architecture/publication-rehearsal-parity.json`
2805
2802
  - `contracts/v4-publication-rehearsal-capsule-v1.schema.json`
2806
- - `.github/workflows/self-release-rehearsal-dogfood.yml`
2807
2803
  - `docs/v4-publication-rehearsal.md`
2808
2804
 
2809
2805
  ### Tests
@@ -2834,7 +2830,6 @@ Owner: Buildchain workflow maintainers
2834
2830
  - `architecture/universal-workflow-fault-campaign.json`
2835
2831
  - `architecture/universal-workflow-capability-policy.json`
2836
2832
  - `.github/workflows/public-ops-bootstrap.yml`
2837
- - `.github/workflows/self-ops-bootstrap-dogfood.yml`
2838
2833
 
2839
2834
  ### Tests
2840
2835
 
@@ -120,10 +120,7 @@
120
120
  "id": "release-candidate-recovery",
121
121
  "owner": "Buildchain promotion recovery plane",
122
122
  "sourceInventoryId": "release-candidate-recovery",
123
- "surfaces": [
124
- "export:./release-candidate-recovery",
125
- "workflow:self-ops-promotion-recovery"
126
- ],
123
+ "surfaces": ["export:./release-candidate-recovery"],
127
124
  "migrationPhase": "legacy-retired"
128
125
  },
129
126
  {