@kungfu-tech/buildchain 4.1.3 → 4.1.4-alpha.0
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.
- package/AGENTS.md +11 -13
- package/CONTRIBUTING.md +32 -9
- package/README.md +56 -140
- package/actions/release/promotion/ref/README.md +1 -1
- package/architecture/action-taxonomy.json +1 -1
- package/architecture/agent-change-map.md +32 -45
- package/architecture/build-orchestration.json +1 -1
- package/architecture/capability-state-machine-manifest.json +5 -5
- package/architecture/ci-lane-change-budget.json +92 -92
- package/architecture/code-layout.json +2 -12
- package/architecture/core-mechanisms.json +38 -39
- package/architecture/cross-platform-adopter-qualification.json +1 -1
- package/architecture/dev-delivery-orchestration.json +2 -2
- package/architecture/floating-consumer-policy.json +3 -3
- package/architecture/internal-capabilities.json +27 -28
- package/architecture/maintainability-debt.json +60 -94
- package/architecture/maintainability-policy.json +7 -13
- package/architecture/minimal-consumer-migration.json +43 -5014
- package/architecture/platform-stage-checkpoints.json +1 -1
- package/architecture/release-tail-contract.json +2 -2
- package/architecture/release-topology.json +31 -25
- package/architecture/stage-capsule-qualification.json +1 -1
- package/architecture/universal-workflow-bootstrap.json +60 -60
- package/architecture/universal-workflow-capability-policy.json +3 -3
- package/architecture/universal-workflow-fault-campaign.json +7 -7
- package/architecture/workflow-taxonomy.json +59 -60
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
- package/dist/site/buildchain-contract.json +138 -66
- package/dist/site/buildchain-site.json +257 -331
- package/dist/site/capability-registry.json +4 -4
- package/dist/site/cli-registry.json +6 -142
- package/dist/site/controller-registry.json +19 -19
- package/dist/site/kfd-claims.json +481 -529
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +22 -22
- package/dist/site/node-api-registry.json +82 -339
- package/dist/site/page-registry.json +229 -304
- package/dist/site/public-surface-audit.json +544 -754
- package/dist/site/publication-authority-registry.json +316 -316
- package/dist/site/publication-registry.json +1 -1
- package/dist/site/site-manifest.json +23 -23
- package/dist/site/workflow-registry.json +1071 -1027
- package/docs/MAP.md +28 -20
- package/docs/auditable-demo.md +17 -49
- package/docs/bootstrap-recovery.md +46 -37
- package/docs/cli-reference.md +2 -46
- package/docs/cli.md +97 -186
- package/docs/code-organization.md +7 -5
- package/docs/dev-alpha-candidate-patrol.md +19 -42
- package/docs/dev-delivery-orchestration.md +15 -11
- package/docs/dev-delivery-qualification-landing-adr.md +10 -9
- package/docs/dev-delivery-warrant.md +17 -16
- package/docs/dev-qualification-patrol.md +25 -20
- package/docs/getting-started.md +80 -139
- package/docs/github-artifact-attestation.md +31 -81
- package/docs/install.md +66 -30
- package/docs/lifecycle-protocol.md +19 -57
- package/docs/migration-inventory.md +17 -45
- package/docs/next-development-transition.md +13 -13
- package/docs/node-api-reference.md +122 -138
- package/docs/oci-publication.md +13 -10
- package/docs/publication-artifacts.md +128 -486
- package/docs/publication-authority.md +15 -45
- package/docs/publish-transaction.md +13 -11
- package/docs/release-candidate.md +126 -355
- package/docs/release-discussions.md +36 -67
- package/docs/release-flow.md +80 -339
- package/docs/release-governance.md +114 -962
- package/docs/release-promotion-request.md +45 -43
- package/docs/release-propagation.md +13 -27
- package/docs/release-tail-provider-plane.md +38 -65
- package/docs/reusable-build-surface.md +78 -196
- package/docs/runtime-train-validation.md +8 -6
- package/docs/stable-candidate-patrol.md +13 -66
- package/docs/v4-adopter-delivery.md +15 -15
- package/docs/v4-declarative-release-tail-migration.md +19 -17
- package/docs/v4-production-release.md +11 -6
- package/docs/v4-publication-rehearsal.md +12 -27
- package/docs/v4-stage-capsule.md +14 -20
- package/docs/v4-tail-reseal.md +34 -20
- package/docs/web-surface-deployments.md +26 -264
- package/docs/workflow-catalog.md +31 -31
- package/docs/workflow-path-migration.md +10 -4
- package/package.json +5 -4
- package/packages/core/adoption/buildchain-kfd-claims.js +7 -7
- package/packages/core/adoption/cli/output.mjs +1 -9
- package/packages/core/adoption/cli/product-gate.mjs +1 -15
- package/packages/core/adoption/cli/project.mjs +9 -10
- package/packages/core/adoption/cli/standards.mjs +1 -14
- package/packages/core/adoption/cli/support.mjs +0 -2
- package/packages/core/adoption/cli/surface-register.mjs +0 -2
- package/packages/core/adoption/commands/init-repo.mjs +77 -485
- package/packages/core/adoption/consumer-init.js +279 -0
- package/packages/core/adoption/qualification/admission.js +1 -1
- package/packages/core/build/cli/cache.mjs +0 -2
- package/packages/core/build/cli/facts.mjs +0 -3
- package/packages/core/build/cli/homebrew.mjs +0 -4
- package/packages/core/build/cli/lifecycle.mjs +0 -3
- package/packages/core/build/github-artifact-attestation.js +2 -2
- package/packages/core/build/platform-stage-checkpoints.js +1 -1
- package/packages/core/build/signing/dispatch.js +1 -1
- package/packages/core/consumer/buildchain-config.js +9 -0
- package/packages/core/consumer/contract/inspection.js +351 -9
- package/packages/core/consumer/contract/javascript-syntax.js +439 -0
- package/packages/core/consumer/contract/javascript-values.js +61 -0
- package/packages/core/consumer/contract/javascript.js +555 -0
- package/packages/core/consumer/contract/local-validation.js +84 -0
- package/packages/core/contracts/buildchain-contract.js +39 -8
- package/packages/core/contracts/cli/introspection.mjs +1 -9
- package/packages/core/contracts/public-surface-cli.js +0 -1
- package/packages/core/dev-delivery/dev-delivery-contract-surface.js +2 -2
- package/packages/core/governance/buildchain-publication-authority.js +24 -24
- package/packages/core/governance/cli/doctor.mjs +58 -42
- package/packages/core/governance/commands/architecture.mjs +6 -1
- package/packages/core/governance/commands/audit-publication-control-plane.mjs +1 -1
- package/packages/core/governance/commands/workflow-friction-report.mjs +1 -1
- package/packages/core/governance/github-governance-authority.js +2 -2
- package/packages/core/governance/publication/collection.js +1 -1
- package/packages/core/index.js +1 -3
- package/packages/core/observability/cli/candidate.mjs +0 -2
- package/packages/core/observability/cli/context.mjs +0 -5
- package/packages/core/observability/cli/diagnostics.mjs +0 -7
- package/packages/core/observability/cli/events.mjs +2 -10
- package/packages/core/paper/commands/paper-work-fleet-cli.mjs +1 -1
- package/packages/core/paper/commands/paper.mjs +33 -422
- package/packages/core/paper/consumer-status.js +72 -0
- package/packages/core/paper/operations/identity.js +0 -3
- package/packages/core/paper/operations/migration.js +460 -0
- package/packages/core/paper/operations/preflight-checks.js +8 -68
- package/packages/core/paper/operations/scaffold.js +16 -326
- package/packages/core/paper/operations/status.js +27 -53
- package/packages/core/paper/paper-agent-entry.js +36 -147
- package/packages/core/paper/paper-fleet.js +24 -39
- package/packages/core/paper/paper-repository.js +16 -0
- package/packages/core/paper/paper-runtime-channels.js +1 -1
- package/packages/core/paper/paper-scaffold-content.js +153 -162
- package/packages/core/paper/paper-work.js +3 -10
- package/packages/core/paper/paper.js +43 -5
- package/packages/core/providers/github/artifact-attestation.js +1 -1
- package/packages/core/providers/github/pipeline-context-artifacts.js +172 -0
- package/packages/core/publication/authority/control-plane.js +2 -2
- package/packages/core/publication/authority/seal.js +1 -1
- package/packages/core/publication/cli/dispatch.mjs +1 -12
- package/packages/core/publication/pipeline/actions.js +16 -9
- package/packages/core/publication/pipeline/apply.js +17 -9
- package/packages/core/publication/pipeline/context.js +29 -0
- package/packages/core/publication/pipeline/prepare.js +15 -6
- package/packages/core/publication/pipeline/recovery-materials.js +63 -1
- package/packages/core/publication/pipeline/recovery-prepare.js +21 -9
- package/packages/core/publication/pipeline/stable-entry.js +12 -7
- package/packages/core/publication/pipeline/stable-products.js +21 -19
- package/packages/core/publication/pipeline/version-actions.js +15 -6
- package/packages/core/publication/publication-rehearsal-projection.js +0 -9
- package/packages/core/release/cli/dispatch.mjs +1 -4
- package/packages/core/release/cli/inspection-handlers.mjs +1 -33
- package/packages/core/release/cli/release-handlers.mjs +2 -19
- package/packages/core/release/cli/verification-handlers.mjs +4 -25
- package/packages/core/release/next-development-projection.js +13 -13
- package/packages/core/release/passport/locations.js +13 -8
- package/packages/core/release/release-passport.js +70 -5
- package/packages/core/web/cli/badges.mjs +0 -4
- package/packages/core/web/publication-admission.js +1 -1
- package/packages/core/web/publication-capability.js +1 -1
- package/packages/core/web/readme-badges.js +1 -1
- package/packages/core/workflow/cli/main.mjs +1 -4
- package/packages/core/workflow/cli/process.mjs +1 -1
- package/packages/core/workflow/commands/buildchain-cli-help.mjs +2 -8
- package/packages/core/workflow/engine/conformance.js +1 -1
- package/packages/core/workflow/pipeline/build.js +21 -1
- package/packages/core/workflow/pipeline/delivery-observation.js +6 -2
- package/packages/core/workflow/workflow-taxonomy.mjs +61 -17
- package/scripts/check-code-layout.mjs +2 -0
- package/scripts/check-core-mechanism-inventory.mjs +29 -13
- package/scripts/check-floating-consumer-policy-contract.mjs +3 -3
- package/scripts/check-inventory.mjs +27 -27
- package/scripts/check-maintainability.mjs +28 -5
- package/scripts/check-public-dogfood-contract.mjs +3 -3
- package/scripts/check-release-topology.mjs +1 -1
- package/scripts/check-self-consumer-contract.mjs +7 -7
- package/scripts/check-universal-workflow-bootstrap.mjs +1 -1
- package/scripts/generate-channel-promotion-workflow.mjs +1 -1
- package/scripts/generate-minimal-consumer-contract.mjs +21 -1
- package/scripts/generate-site-bundle.mjs +2 -1
- package/scripts/generate-tail-reseal-fixture.mjs +3 -3
- package/scripts/inventory/promotion.mjs +1 -1
- package/scripts/next-development-self-dogfood-harness.mjs +1 -1
- package/scripts/next-development-self-dogfood.mjs +4 -4
- package/scripts/site-capability-metadata.mjs +2 -6
- package/scripts/source-metric-lineage.mjs +62 -7
- package/scripts/verify-golden-path.mjs +31 -35
- package/templates/native-dev-delivery.yml +1 -1
- package/templates/universal-buildchain-bootstrap.yml +1 -1
- package/packages/core/paper/operations/bootstrap.js +0 -75
- package/packages/core/paper/operations/plans.js +0 -213
- package/packages/core/paper/operations/provisioning.js +0 -113
- package/packages/core/paper/operations/scaffold-config.js +0 -77
- package/packages/core/paper/operations/scaffold-workflows.js +0 -116
- package/packages/core/paper/operations/workspace.js +0 -60
- package/packages/core/paper/paper-npm-bootstrap.js +0 -492
package/docs/cli.md
CHANGED
|
@@ -8,12 +8,13 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-09-
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-09-
|
|
16
|
-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Schema-2 consumer initialization, CLI validation, and internal pipeline npm publication implementation.
|
|
17
|
+
invisible_context_boundary: Local validation does not prove provider authorization or hosted publication.
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Buildchain CLI, npm Package, and Toolkit API
|
|
@@ -49,10 +50,10 @@ Consumers should pin the exact Buildchain version that was validated in their
|
|
|
49
50
|
repository. When dogfooding a fresh Buildchain release immediately after it is
|
|
50
51
|
published, pnpm may block the install through a minimum release-age policy. In
|
|
51
52
|
that case, add a temporary package/version-specific `minimumReleaseAgeExclude`
|
|
52
|
-
entry, such as `@kungfu-tech/buildchain@4.
|
|
53
|
+
entry, such as `@kungfu-tech/buildchain@4.1.3`, and remove it once the package
|
|
53
54
|
has aged past the normal policy window. Do not replace that with a broad
|
|
54
|
-
registry or scope-wide exclude.
|
|
55
|
-
|
|
55
|
+
registry or scope-wide exclude. For an existing `pnpm-workspace.yaml`, Paper
|
|
56
|
+
migration maintains an exclusion for the selected exact Buildchain version.
|
|
56
57
|
|
|
57
58
|
Use the package API directly inside JavaScript build scripts:
|
|
58
59
|
|
|
@@ -135,121 +136,45 @@ with the exact signer/source policy and then verifies the retained bundle,
|
|
|
135
136
|
predicate, platform manifest, Passport, and Buildchain evidence locally. See
|
|
136
137
|
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
137
138
|
|
|
138
|
-
###
|
|
139
|
+
### Paper product source
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
Paper uses the same schema-2 policy and two caller files as npm and binary
|
|
142
|
+
products. For an existing source tree, use `buildchain init --type paper`.
|
|
143
|
+
To create a new LaTeX source tree:
|
|
143
144
|
|
|
144
145
|
```bash
|
|
145
|
-
buildchain paper scaffold --
|
|
146
|
-
--repository
|
|
147
|
-
buildchain paper
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
buildchain
|
|
152
|
-
buildchain paper
|
|
153
|
-
buildchain paper preflight --offline --json
|
|
154
|
-
buildchain paper bootstrap npm --json
|
|
155
|
-
buildchain paper build --json
|
|
156
|
-
buildchain paper alpha --json
|
|
146
|
+
buildchain paper scaffold --name paper-example --title "Example Paper" \
|
|
147
|
+
--repository example/paper-example --json
|
|
148
|
+
buildchain paper scaffold --name paper-example --title "Example Paper" \
|
|
149
|
+
--repository example/paper-example --write --json
|
|
150
|
+
make pdf
|
|
151
|
+
make check
|
|
152
|
+
buildchain validate --require-lifecycle-stages build,verify
|
|
153
|
+
buildchain paper preflight --json
|
|
157
154
|
buildchain paper status --json
|
|
158
|
-
buildchain paper resume --json
|
|
159
155
|
```
|
|
160
156
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
verifies the digest-bound `.buildchain/paper/agent-entry.json`, the single
|
|
183
|
-
managed `AGENTS.md` section, exact package scripts and runtime dependency, runtime
|
|
184
|
-
source SHA, development target, and current branch lineage. `--ci` derives
|
|
185
|
-
the pull-request source and target from GitHub context and fails closed on a
|
|
186
|
-
non-work source branch or a target other than the configured development
|
|
187
|
-
line.
|
|
188
|
-
- Installed npm runtimes resolve their source from registry `gitHead`, or from
|
|
189
|
-
the official exact version tag when that field is absent. Missing, malformed,
|
|
190
|
-
duplicate, or unexpected tag results fail closed; floating tags are never
|
|
191
|
-
used as the installed package's source identity.
|
|
192
|
-
- `work start` derives the protected development branch from the configured
|
|
193
|
-
publication semver line and creates a safe local work branch only when the
|
|
194
|
-
worktree is clean, the sole `origin` is the canonical `kungfu-systems`
|
|
195
|
-
repository, and local HEAD equals the exact remotely observed development
|
|
196
|
-
SHA. It never fetches or merges silently.
|
|
197
|
-
- `work submit` accepts only an allowed non-protected work branch that contains
|
|
198
|
-
the exact remote development commit. It rejects divergent remote work,
|
|
199
|
-
wrong-base pull requests, dirty trees, forks, and ambiguous remotes; execution
|
|
200
|
-
uses a normal non-force push and opens or reuses a PR to the derived
|
|
201
|
-
development branch.
|
|
202
|
-
- `fleet audit` discovers `paper-*` repositories from a root and emits one
|
|
203
|
-
deterministic audit root over exact runtime, dependency, lockfile, workflow,
|
|
204
|
-
authority, and repository observations. `fleet update` reuses the migration
|
|
205
|
-
contract for every discovered repository, remains dry-run by default, and
|
|
206
|
-
refuses protected or non-work branches.
|
|
207
|
-
- The scaffolded `.buildchain/paper/provisioning-authority.json` binds both
|
|
208
|
-
build/release caller workflow byte digests, the required verify caller, the
|
|
209
|
-
agent-entry policy and instructions, their exact reusable-workflow SHA, the
|
|
210
|
-
runtime SHA, contract-lock bytes, npm registry and trusted-publisher
|
|
211
|
-
coordinates, and the repository Actions/generated-write policy under one
|
|
212
|
-
digest. A floating Buildchain ref cannot change release policy after that
|
|
213
|
-
authority is accepted.
|
|
214
|
-
- The reusable `public-build-check.yml` detects publication-artifact repositories and runs
|
|
215
|
-
`paper preflight --offline --ci` inside the existing required check context.
|
|
216
|
-
Skipping the local CLI therefore cannot admit a missing entry contract,
|
|
217
|
-
drifted Buildchain-owned surface, unsafe source branch, or wrong PR target.
|
|
218
|
-
- `preflight` separates local readiness from readiness for external mutation.
|
|
219
|
-
`--offline` skips live GitHub and npm observations without treating them as
|
|
220
|
-
local failures. Live readiness requires default workflow permissions `read`,
|
|
221
|
-
Actions pull-request approval disabled, and GitHub App or equivalent narrow
|
|
222
|
-
generated-write credential metadata.
|
|
223
|
-
- `bootstrap npm` always performs npm pack and publish dry-runs first. A real
|
|
224
|
-
public bootstrap requires both `--execute` and
|
|
225
|
-
`--confirm-public-package <exact-name>`, uses only the official npm registry,
|
|
226
|
-
fixes the bootstrap version at `0.0.0-bootstrap.0`, and returns only npm URLs
|
|
227
|
-
observed from command output. Success requires public package readback and
|
|
228
|
-
the exact repository/workflow/environment trusted-publisher binding. For
|
|
229
|
-
GitHub, the npm coordinate is the workflow filename (`public-release-paper.yml`),
|
|
230
|
-
not its `.github/workflows/` repository path.
|
|
231
|
-
- `build` plans the two-clean-build reproducibility proof. Add `--execute` to
|
|
232
|
-
create and verify the sealed publication bundle.
|
|
233
|
-
- `alpha` plans or opens the protected Alpha pull request; it never merges,
|
|
234
|
-
publishes, or advances a floating ref.
|
|
235
|
-
- `status` reports only evidence found in the repository or external
|
|
236
|
-
observations. It never infers a later lifecycle state from an earlier one.
|
|
237
|
-
- `resume` plans or dispatches the repository's thin release workflow; the
|
|
238
|
-
protected workflow remains the release authority.
|
|
239
|
-
|
|
240
|
-
The ordered evidence states are `scaffolded`, `governed`, `admitted`,
|
|
241
|
-
`bootstrapped`, `trust-bound`, `content-ready`, `artifact-sealed`,
|
|
242
|
-
`package-published`, `alpha-complete`, `staging-visible`, and
|
|
243
|
-
`production-visible`. A state can be `satisfied`, `not-reached`, `blocked`, or
|
|
244
|
-
`unknown`; consumers must not collapse those distinctions.
|
|
245
|
-
|
|
246
|
-
The corresponding Node surface is
|
|
247
|
-
`@kungfu-tech/buildchain/paper`. Planning and status functions are read-only;
|
|
248
|
-
`writePaperScaffold()`, `writePaperMigration()`, and
|
|
249
|
-
`writePaperFleetUpdate()` are the bounded local writers. Work plans expose
|
|
250
|
-
separate rechecking executors for local branch creation and normal push, and
|
|
251
|
-
`executePaperNpmBootstrap()` preserves the same confirmation boundary used by
|
|
252
|
-
the CLI.
|
|
157
|
+
Scaffold plans all files before writing. `--write` creates missing files only;
|
|
158
|
+
conflicting content, extra workflows and symlinked write parents stop the whole
|
|
159
|
+
write. Repeating an unchanged scaffold is idempotent. `--package` optionally
|
|
160
|
+
names the private source package; its version is the product version authority.
|
|
161
|
+
Title and homepage stay in that product manifest.
|
|
162
|
+
|
|
163
|
+
The generated TOML declares the PDF and a GitHub Release target. The generated
|
|
164
|
+
`buildchain.yml` and `buildchain-recover.yml` are byte-identical to the other
|
|
165
|
+
product templates. Open the appropriate protected channel PR to request
|
|
166
|
+
publication. Recovery uses the common exact-attempt entry.
|
|
167
|
+
|
|
168
|
+
For schema-2 Paper repositories, preflight and status inspect local configuration
|
|
169
|
+
and caller bytes. Their `localOnly` result and `publication.status=not-observed`
|
|
170
|
+
do not claim a successful hosted build, admission or release. They perform no
|
|
171
|
+
npm login, bootstrap, trust setup or GitHub account operation. Provider permissions
|
|
172
|
+
and any tool-maintained runtime locks belong to the common setup/runtime contract.
|
|
173
|
+
|
|
174
|
+
The previous schema-1 npm-paper contract, three-workflow scaffold and repository
|
|
175
|
+
provisioning authority are retired from new scaffolds. Existing paper repositories
|
|
176
|
+
need a reviewed migration; historical publication receipts remain historical
|
|
177
|
+
facts and do not become new runtime configuration.
|
|
253
178
|
|
|
254
179
|
`buildchain layout` is the stable machine question for repository layout. Tools
|
|
255
180
|
such as Shifu should call it instead of copying `.buildchain/` path constants:
|
|
@@ -267,8 +192,11 @@ not sufficient. The same contract is available through
|
|
|
267
192
|
`createBuildchainLayoutDiscovery()` from
|
|
268
193
|
`@kungfu-tech/buildchain/buildchain-layout`.
|
|
269
194
|
|
|
270
|
-
`buildchain init` writes a
|
|
271
|
-
|
|
195
|
+
`buildchain init` writes a schema-2 `.buildchain/buildchain.toml` and the shared
|
|
196
|
+
`.github/workflows/buildchain.yml` / `buildchain-recover.yml` caller pair.
|
|
197
|
+
Product build and verification belong in TOML. Publication and recovery stay in
|
|
198
|
+
the published runtime; consumers do not call the internal commands below as
|
|
199
|
+
release lifecycle hooks. See the [Golden Path](getting-started.md).
|
|
272
200
|
|
|
273
201
|
`buildchain portable-cache plan` turns a consumer-owned, secret-free manifest
|
|
274
202
|
into GitHub Actions cache inputs without letting each consumer invent key or
|
|
@@ -306,32 +234,21 @@ consumer's current build or tests. Roots must be workspace-relative or under
|
|
|
306
234
|
segments. `cold-fallback-status=passed` qualifies a miss only after the current
|
|
307
235
|
source has completed its normal build and test path.
|
|
308
236
|
|
|
309
|
-
Supported
|
|
310
|
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
- `--type distribution-index` for Homebrew taps and other index repositories
|
|
325
|
-
whose files are projections of upstream release passport evidence.
|
|
326
|
-
- `--type anchored-package` for packages whose version is anchored to an
|
|
327
|
-
explicit upstream release manifest.
|
|
328
|
-
|
|
329
|
-
The native preset includes an opt-in `[diagnostics.native]` profile with common
|
|
330
|
-
tool/cache/artifact probes. Consumers can keep it enabled, adjust the tool and
|
|
331
|
-
directory lists, or disable it if a repository does not need native diagnostics.
|
|
332
|
-
|
|
333
|
-
`buildchain validate` parses `.buildchain/buildchain.toml`, checks configured version-state
|
|
334
|
-
files, and can require named lifecycle stages:
|
|
237
|
+
Supported initialization types:
|
|
238
|
+
|
|
239
|
+
- `npm` or `package`: an npm product with an existing versioned `package.json`.
|
|
240
|
+
- `binary` or `native`: a CMake product producing an archive.
|
|
241
|
+
- `paper` or `publication-artifact`: a product producing a PDF.
|
|
242
|
+
- `anchored-package`: an npm product with reviewed, manually maintained version authority.
|
|
243
|
+
|
|
244
|
+
These choices change TOML product declarations, never the two YAML templates.
|
|
245
|
+
The old `web-surface`, `infra-contract` and distribution initialization modes
|
|
246
|
+
are outside the current schema-2 product set and are rejected before writing.
|
|
247
|
+
Internal libraries for those capabilities are separate from consumer initialization.
|
|
248
|
+
|
|
249
|
+
`buildchain validate` parses `.buildchain/buildchain.toml`, checks configured
|
|
250
|
+
version files and the exact shared caller bytes, and can require named commands
|
|
251
|
+
on every declared product:
|
|
335
252
|
|
|
336
253
|
```bash
|
|
337
254
|
buildchain validate \
|
|
@@ -646,14 +563,15 @@ spend long stretches in low-concurrency compile, archive, link, or cache steps.
|
|
|
646
563
|
buildchain doctor --json
|
|
647
564
|
```
|
|
648
565
|
|
|
649
|
-
|
|
650
|
-
and
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
566
|
+
For schema-2 consumers it validates TOML, Git repository state, the exact normal
|
|
567
|
+
and recovery caller pair, and package-manager discovery when an npm product is
|
|
568
|
+
present. A mixed channel pair or a consumer-edited YAML fails validation.
|
|
569
|
+
Binary and Paper products do not need an npm package manager merely to use
|
|
570
|
+
Buildchain. The report grants no publication authority.
|
|
571
|
+
|
|
572
|
+
The remaining source-lock and schema-1 checks below describe internal runtime
|
|
573
|
+
and historical product tooling. They are not extra steps in the current
|
|
574
|
+
consumer release path.
|
|
657
575
|
|
|
658
576
|
Anchored/manual package publish jobs can run the narrower source-lock gate
|
|
659
577
|
directly:
|
|
@@ -712,8 +630,10 @@ buildchain publication-artifact npm-package --json
|
|
|
712
630
|
This command reads `project.type = "publication-artifact"`,
|
|
713
631
|
`publication.version`, and `[publish] kind = "npm-paper-package"` plus
|
|
714
632
|
`publish.package`; it writes `.buildchain/publication/npm-package` by default.
|
|
715
|
-
|
|
716
|
-
|
|
633
|
+
These are retained schema-1 package-generation fields. Current schema-2 Paper
|
|
634
|
+
consumers declare PDF artifacts and a GitHub Release target in TOML; they do
|
|
635
|
+
not add an npm publication workflow. Use the Paper migration command before
|
|
636
|
+
using a legacy repository with the shared caller pair.
|
|
717
637
|
|
|
718
638
|
The command writes `.buildchain/publication/publication-artifact.json`,
|
|
719
639
|
`.buildchain/publication/publication-artifact-passport.json`, a source bundle,
|
|
@@ -1056,36 +976,27 @@ and package identity. See [`v4-adopter-delivery.md`](v4-adopter-delivery.md).
|
|
|
1056
976
|
|
|
1057
977
|
## npm Publish Gate
|
|
1058
978
|
|
|
1059
|
-
Buildchain
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
- package: `@kungfu-tech/buildchain`
|
|
1085
|
-
- repository: `kungfu-systems/buildchain`
|
|
1086
|
-
- workflow: `.github/workflows/self-release-promote.yml`
|
|
1087
|
-
|
|
1088
|
-
No npm package is published by manual dispatch or ordinary branch builds.
|
|
1089
|
-
Manual dispatch on `.github/workflows/self-release-npm-dry-run.yml` remains dry-run only, so
|
|
1090
|
-
maintainers can verify package contents and npm publish shape before opening or
|
|
1091
|
-
merging the release PR.
|
|
979
|
+
Buildchain consumes its own generated `buildchain.yml` entry, which invokes
|
|
980
|
+
`public-ops-pipeline.yml@v4`. Its schema-2 TOML declares the npm package product,
|
|
981
|
+
build/verification commands and npm target. A legal channel PR expresses the
|
|
982
|
+
release intent; the runtime manages qualification, version materialization,
|
|
983
|
+
publication, provider readback and follow-up development work.
|
|
984
|
+
|
|
985
|
+
The internal
|
|
986
|
+
[`.release-pipeline-products.yml`](../.github/workflows/.release-pipeline-products.yml)
|
|
987
|
+
workflow owns the separate product build, qualification, publication and
|
|
988
|
+
settlement jobs. Its publication job runs on a GitHub-hosted runner with
|
|
989
|
+
`id-token: write`. For the configured npm Trusted Publisher, the publish client
|
|
990
|
+
uses GitHub Actions OIDC. Routine releases require no interactive npm login,
|
|
991
|
+
bootstrap publication or manually supplied npm token.
|
|
992
|
+
|
|
993
|
+
The runtime publishes the admitted sealed package version and retains exact
|
|
994
|
+
registry integrity and GitHub Release evidence. Prereleases use the `alpha`
|
|
995
|
+
dist-tag; stable releases use `latest`. An ordinary source build or floating
|
|
996
|
+
ref update alone is not publication authority.
|
|
997
|
+
|
|
998
|
+
Consumers do not call the npm transaction CLI, select candidate run IDs, pass
|
|
999
|
+
request JSON, or add a separate npm release workflow. If an existing attempt
|
|
1000
|
+
needs recovery, use `buildchain-recover.yml` with its exact attempt and an
|
|
1001
|
+
optional repaired runtime. If a failed alpha is abandoned, keep its historical
|
|
1002
|
+
state intact and publish a new admitted candidate/version.
|
|
@@ -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
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-09-
|
|
15
|
+
generated_at: 2026-09-20
|
|
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
|
---
|
|
@@ -20,12 +20,14 @@ ai_provenance:
|
|
|
20
20
|
# Code organization
|
|
21
21
|
|
|
22
22
|
Buildchain 4.1 uses responsibility layers, then capability directories. The
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
normal pipeline and exact-attempt recovery workflows are the consumer API.
|
|
24
|
+
Product choices belong in schema-2 TOML; other workflows and every action are
|
|
25
|
+
internal implementation. Source changes require separate published qualification.
|
|
25
26
|
|
|
26
27
|
```text
|
|
27
28
|
.github/workflows/ Consumer APIs and hosted job topology
|
|
28
|
-
public
|
|
29
|
+
public-ops-pipeline.yml, public-ops-recover.yml
|
|
30
|
+
The two public reusable contracts
|
|
29
31
|
.*.yml Internal reusable job components
|
|
30
32
|
buildchain.yml, buildchain-recover.yml
|
|
31
33
|
Generated self normal and recovery callers
|
|
@@ -7,18 +7,23 @@ source_level: local-files
|
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
|
-
review_state:
|
|
11
|
-
last_reviewed: 2026-09-
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
|
-
model_family: GPT-
|
|
13
|
+
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
16
|
visible_context: Buildchain v4 parity of the proven v3 Release Train and Release Cut contracts, existing source locks, exact-source Alpha preflight, Dev Patrol, cancelled duplicate runs, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
17
17
|
invisible_context_boundary: No credentials, private logs, or private configuration were used.
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
# Dev to Alpha Candidate Patrol
|
|
21
21
|
|
|
22
|
+
This is the internal `.ops-alpha-candidate-patrol.yml` mechanism. Current
|
|
23
|
+
consumers use a legal channel PR and the shared normal pipeline; they do not add
|
|
24
|
+
a patrol caller, renderer or controller-state inputs. The retained controller
|
|
25
|
+
contract below describes implementation and historical qualification.
|
|
26
|
+
|
|
22
27
|
Buildchain provides a reusable observation and single-flight PR controller for
|
|
23
28
|
repositories that promote a development branch into a protected Alpha branch.
|
|
24
29
|
It does not publish Alpha. The read-only observer reads the exact heads of both
|
|
@@ -95,38 +100,13 @@ not an allowed supersession cause. Legacy markers remain readable by the core
|
|
|
95
100
|
contract, but the active-train workflow refuses to manufacture missing Release
|
|
96
101
|
Cut authority for an already-open legacy PR.
|
|
97
102
|
|
|
98
|
-
##
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
`dry-run: false`. The older `create-pull-request` input remains a compatibility
|
|
106
|
-
alias for settlement authorization.
|
|
107
|
-
|
|
108
|
-
Repositories whose promotion policy requires a machine-readable PR declaration
|
|
109
|
-
can pass static text through `pull-request-body-prefix`. When the declaration
|
|
110
|
-
depends on the exact qualified delta, use `pull-request-body-prefix-renderer`
|
|
111
|
-
instead. It names a repository-relative Node.js file in the consumer checkout.
|
|
112
|
-
The read-only `observe` job checks out the selected SHA with credentials disabled,
|
|
113
|
-
runs the renderer with a reduced environment, and requires it to write UTF-8 text
|
|
114
|
-
to `BUILDCHAIN_CHANNEL_PATROL_PR_BODY_PREFIX_OUTPUT`. The renderer also receives
|
|
115
|
-
the selected SHA plus source and target branch names. It may derive a declaration
|
|
116
|
-
from the exact checkout and `origin/<target-branch>` without receiving the
|
|
117
|
-
promotion token.
|
|
118
|
-
|
|
119
|
-
Static and rendered prefixes are mutually exclusive. A renderer failure, path
|
|
120
|
-
escape, source-SHA mismatch, empty or oversized result, invalid UTF-8, or managed
|
|
121
|
-
controller-marker injection fails before the write-permission job can run. The
|
|
122
|
-
rendered bytes are retained with the read-only observation artifact and passed
|
|
123
|
-
to `settle` as a job output, so the candidate PR is created with the correct
|
|
124
|
-
declaration on its first write. Buildchain preserves that repository-owned text
|
|
125
|
-
when later observations update only the managed state marker. Before any write,
|
|
126
|
-
`settle` also requires its fresh observation to select the same SHA that produced
|
|
127
|
-
the rendered bytes. Concurrent qualification progress therefore fails closed
|
|
128
|
-
and is recomputed by the next patrol instead of attaching a declaration to the
|
|
129
|
-
wrong candidate.
|
|
103
|
+
## Internal workflow
|
|
104
|
+
|
|
105
|
+
The internal component separates read-only observation from write-permission
|
|
106
|
+
settlement. Its source, target, rooted observations and optional internal renderer
|
|
107
|
+
remain implementation ports. A renderer receives reduced authority, must bind
|
|
108
|
+
the exact observed source, and cannot inject managed controller markers. Rendered
|
|
109
|
+
bytes must be revalidated before any write; they are not new consumer wiring.
|
|
130
110
|
|
|
131
111
|
The separately permissioned `settle` job prepares the entry-selected runtime,
|
|
132
112
|
re-runs the exact observation, and compare-and-swap
|
|
@@ -155,7 +135,7 @@ The workflow exposes `train-root`, `cut-root`, `candidate-generation`,
|
|
|
155
135
|
selected SHA. Alpha build orchestration should bind to those outputs and treat
|
|
156
136
|
a non-empty hold root as a fail-closed result.
|
|
157
137
|
|
|
158
|
-
|
|
138
|
+
An authorized internal invocation may set `auto-merge: true` and choose `merge-method`
|
|
159
139
|
from `merge`, `squash`, or `rebase`. Buildchain only arms GitHub auto-merge for
|
|
160
140
|
the single managed, open, exact-source candidate after the write-permission
|
|
161
141
|
settlement has revalidated the observation. GitHub still owns every required
|
|
@@ -163,11 +143,8 @@ review, required check, branch-protection, and merge-queue gate; Buildchain does
|
|
|
163
143
|
not approve or directly merge the PR. Invalid merge methods and GraphQL
|
|
164
144
|
refusals fail the patrol run.
|
|
165
145
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
runs, so the event path supplies low latency while the fallback supplies
|
|
169
|
-
recovery. Workflow concurrency plus the server-side open-PR reconciliation
|
|
170
|
-
makes duplicate or delayed events idempotent.
|
|
146
|
+
Runtime-owned routing and server-side reconciliation handle duplicate and delayed
|
|
147
|
+
events. Consumers do not configure completion listeners or fallback cron jobs.
|
|
171
148
|
|
|
172
149
|
The workflow never moves the Alpha ref directly, directly merges the pull
|
|
173
150
|
request, approves it, publishes npm, creates a Git tag or GitHub Release, or
|
|
@@ -8,31 +8,32 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: B
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-09-
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-09-
|
|
16
|
-
visible_context:
|
|
17
|
-
invisible_context_boundary: No
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Schema-2 consumer contract, pipeline and recovery entries, and internal release implementations.
|
|
17
|
+
invisible_context_boundary: No unobserved hosted publication or external consumer migration is claimed.
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
# Dev delivery orchestration
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
The internal `.ops-dev-auto-merge.yml` component orchestrates six owned delivery
|
|
23
|
+
nodes. It is an implementation behind the shared pipeline, with no public
|
|
24
|
+
compatibility alias. Consumers use `public-ops-pipeline.yml` and do not select
|
|
25
|
+
Warrant modes, proof inputs or a separate merge workflow. Node ownership and the
|
|
26
|
+
orchestration size budget are declared in
|
|
26
27
|
[`architecture/dev-delivery-orchestration.json`](../architecture/dev-delivery-orchestration.json).
|
|
27
28
|
|
|
28
29
|
| Node | Owning composite | Result and continuation |
|
|
29
30
|
| ------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
31
|
| Source admission | [source](../actions/dev-delivery/candidate/admit/action.yml) | Resolve one runtime SHA; check exact source eligibility; produce the Source Qualification Proof or an explicit failed qualification outcome. |
|
|
31
32
|
| Reservation | [reserve](../actions/dev-delivery/candidate/reserve/action.yml) | Submit the candidate and select or recover its exact Warrant. A different active owner receives a handoff; an already-qualified owner skips native execution. |
|
|
32
|
-
| Native verification | [native](../actions/dev-delivery/native/
|
|
33
|
+
| Native verification | [execute](../actions/dev-delivery/native/execute/action.yml), [seal](../actions/dev-delivery/native/seal/action.yml), [heartbeat](../actions/dev-delivery/native/heartbeat/action.yml) | Execute or reuse native proof, independently seal its transfer, and maintain the durable lease in three distinct hosted jobs. |
|
|
33
34
|
| Qualification | [qualify](../actions/dev-delivery/candidate/qualify/action.yml) | Read back provider job boundaries and heartbeat continuity; validate proof and current source/base; atomically qualify the same Warrant. |
|
|
34
35
|
| Landing | [land](../actions/dev-delivery/queue/land/action.yml) | Recheck admission and enqueue or directly merge according to the existing policy. Publish artifacts and enforce the final result even after a predecessor fails. |
|
|
35
|
-
| Settlement | [settle](../actions/dev-delivery/warrant/settle/action.yml) | Settle independently verified native failure, or process a later provider terminal event through
|
|
36
|
+
| Settlement | [settle](../actions/dev-delivery/warrant/settle/action.yml) | Settle independently verified native failure, or process a later provider terminal event through `.ops-warrant-close.yml`. Clear only the exact authority and wake its successor. |
|
|
36
37
|
|
|
37
38
|
The six nodes describe ownership, not six new runner allocations. Source and
|
|
38
39
|
reservation share the existing admission job. Qualification, native-failure
|
|
@@ -79,9 +80,12 @@ close workflow. A queue admission cannot select terminal settlement by itself.
|
|
|
79
80
|
|
|
80
81
|
## Failure and recovery
|
|
81
82
|
|
|
83
|
+
Consumers request recovery by exact attempt through `buildchain-recover.yml`; the
|
|
84
|
+
runtime owns all internal selectors described below.
|
|
85
|
+
|
|
82
86
|
The original `off`, `shadow`, `required`, dry-run, universal-bootstrap,
|
|
83
87
|
proof-reuse, legacy handoff and deferred-landing paths remain in their owning
|
|
84
|
-
nodes. A node boundary does not grant new retry or cleanup authority.
|
|
88
|
+
nodes. A node boundary does not grant new retry or cleanup authority. Internal resumption
|
|
85
89
|
continues to require the exact candidate, live fence and verified reusable proof
|
|
86
90
|
under the [Warrant contract](dev-delivery-warrant.md).
|
|
87
91
|
|
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: self-reviewed
|
|
11
|
-
last_reviewed: 2026-
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# ADR: Qualification Leases and the exclusive Landing Warrant
|
|
@@ -231,12 +231,13 @@ skipped, nonterminal, or cross-PR predecessors.
|
|
|
231
231
|
- Generated references: [`cli-reference.md`](cli-reference.md) and
|
|
232
232
|
[`node-api-reference.md`](node-api-reference.md).
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
single-flight v1 controller and
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
At the original ADR's rollout boundary, the standalone dev-auto-merge entry
|
|
235
|
+
exercised the single-flight v1 controller and did not claim v2 Landing
|
|
236
|
+
guarantees. That observation remains historical. Current consumers use the
|
|
237
|
+
shared normal pipeline; `.ops-dev-auto-merge.yml` is an internal component.
|
|
238
|
+
Consumers do not deploy a second controller or supply its proof/lease ports.
|
|
239
|
+
The v1/v2 authority and migration invariants in this ADR remain implementation
|
|
240
|
+
constraints, not extra consumer wiring.
|
|
240
241
|
|
|
241
242
|
All mutations are plan-only unless `--execute` is supplied. Merge-group
|
|
242
243
|
admission is always a read-only authority check; it never mutates GitHub Merge
|
|
@@ -245,7 +246,7 @@ Queue itself.
|
|
|
245
246
|
## Consequences
|
|
246
247
|
|
|
247
248
|
Qualification throughput can increase without increasing the number of
|
|
248
|
-
candidates permitted to land.
|
|
249
|
-
|
|
249
|
+
candidates permitted to land. The original rollout retained the single-flight default until explicit v2
|
|
250
|
+
admission. Current selection belongs to the runtime. The tradeoff
|
|
250
251
|
is a second state contract and controller family; Buildchain keeps that
|
|
251
252
|
separation explicit so a rollout cannot silently weaken Warrant semantics.
|