@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
|
@@ -8,16 +8,23 @@ 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
|
-
model_family: GPT-
|
|
13
|
+
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
16
|
limits: Live provider configuration must be re-audited; no credential values are represented.
|
|
17
|
+
visible_context: Current two-entry consumer contract and retained internal implementation references.
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Sealed Publication Authority
|
|
20
21
|
|
|
22
|
+
This is an internal publication-authority reference. The shared pipeline owns
|
|
23
|
+
these admission envelopes, nonces, provider observations and independent verifier
|
|
24
|
+
calls. Consumers do not generate these records or add authority-audit workflows.
|
|
25
|
+
Configured npm Trusted Publishing remains provider setup; it does not introduce
|
|
26
|
+
a recurring npm login or token step into the consumer release flow.
|
|
27
|
+
|
|
21
28
|
Buildchain publication authority is a closed-world, fail-closed protocol. It does
|
|
22
29
|
not mint registry or cloud credentials. It independently verifies whether an
|
|
23
30
|
already protected publication job is allowed to request a short-lived provider
|
|
@@ -217,48 +224,11 @@ buildchain verify publication-admission admission.json \
|
|
|
217
224
|
--json
|
|
218
225
|
```
|
|
219
226
|
|
|
220
|
-
The read-only
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
--repository kungfu-systems/buildchain \
|
|
226
|
-
--branch dev/v3/v3.0 \
|
|
227
|
-
--source-sha <exact-merged-branch-sha> \
|
|
228
|
-
--workflow .github/workflows/public-release-promote.yml \
|
|
229
|
-
--workflow-ref <exact-buildchain-sha> \
|
|
230
|
-
--publisher-workflow .github/workflows/self-release-promote.yml \
|
|
231
|
-
--job promote \
|
|
232
|
-
--environment none
|
|
233
|
-
|
|
234
|
-
# Optional stronger external evidence; generate the JSON outside the workflow.
|
|
235
|
-
buildchain audit publication-control-plane \
|
|
236
|
-
--repository kungfu-systems/buildchain \
|
|
237
|
-
--branch dev/v3/v3.0 \
|
|
238
|
-
--workflow .github/workflows/public-release-promote.yml \
|
|
239
|
-
--publisher-workflow .github/workflows/self-release-promote.yml \
|
|
240
|
-
--job promote \
|
|
241
|
-
--environment none \
|
|
242
|
-
--npm-trust-json sanitized-npm-trust.json
|
|
243
|
-
|
|
244
|
-
buildchain audit publication-control-plane \
|
|
245
|
-
--repository kungfu-systems/buildchain \
|
|
246
|
-
--branch release/v3/v3.0 \
|
|
247
|
-
--workflow .github/workflows/.release-binary-assets.yml \
|
|
248
|
-
--job publish \
|
|
249
|
-
--environment buildchain-release-assets \
|
|
250
|
-
--publisher-mode github-token
|
|
251
|
-
|
|
252
|
-
buildchain audit publication-control-plane \
|
|
253
|
-
--repository OWNER/CONSUMER \
|
|
254
|
-
--workflow-repository kungfu-systems/buildchain \
|
|
255
|
-
--branch main \
|
|
256
|
-
--workflow .github/workflows/public-release-web.yml \
|
|
257
|
-
--job production-apply \
|
|
258
|
-
--environment production \
|
|
259
|
-
--publisher-mode oidc-role \
|
|
260
|
-
--provider-audit-json sanitized-oidc-role-audit.json
|
|
261
|
-
```
|
|
227
|
+
The read-only control-plane collector is internal diagnostic tooling. Its workflow,
|
|
228
|
+
publisher, job and provider coordinates must come from the exact admitted runtime
|
|
229
|
+
and configured provider policy. For the current product publisher, inspect
|
|
230
|
+
`.release-pipeline-products.yml`; the generated consumer caller is `buildchain.yml`.
|
|
231
|
+
Do not substitute the retired standalone promotion or web workflow identities.
|
|
262
232
|
|
|
263
233
|
The authority workflow identifies the reusable implementation that performs the
|
|
264
234
|
publication job. The publisher workflow identifies the caller filename bound by
|
|
@@ -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: Current transaction documentation and the schema-2 normal and attempt recovery contracts.
|
|
17
|
+
invisible_context_boundary: No provider mutation or new publication is implied by this documentation update.
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Publish Transaction
|
|
@@ -104,14 +105,15 @@ the next version; it never rebinds or overwrites the earlier source lock. The
|
|
|
104
105
|
same source SHA reuses its own lock so authority planning and mutation stay on
|
|
105
106
|
one exact version.
|
|
106
107
|
|
|
107
|
-
`public-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
The public recovery boundary is `public-ops-recover.yml`, reached through the
|
|
109
|
+
generated `buildchain-recover.yml` caller. It accepts an exact attempt and an
|
|
110
|
+
optional transient repaired runtime. The retained attempt identifies the
|
|
111
|
+
original candidate, sealed bundle and transaction; consumers do not supply run,
|
|
112
|
+
root, discussion or transaction selector combinations. Internal recovery still
|
|
113
|
+
verifies the immutable receipt and sealed material before reading or creating
|
|
114
|
+
transaction state. An expected existing transaction must retain its exact
|
|
115
|
+
identity; missing or different state fails before provider mutation. See the
|
|
116
|
+
[Golden Path](getting-started.md) for the consumer recovery contract.
|
|
115
117
|
|
|
116
118
|
## V4 sealed npm package sets
|
|
117
119
|
|
|
@@ -1,364 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
artifact-name: libnode
|
|
20
|
-
release-candidate: true
|
|
21
|
-
publish-channel: alpha
|
|
22
|
-
publish-source-ref: publish-gate/alpha/v22/v22.22/22.22.3-kf.3-alpha.7
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
When the platform matrix and aggregate summaries complete, Buildchain uploads:
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: internal-release-candidate-evidence
|
|
5
|
+
doc_type: technical-reference
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: B
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-6
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Current consumer contract, workflow taxonomy, and retained candidate and recovery implementation contracts.
|
|
17
|
+
invisible_context_boundary: No historical receipt, published payload, or external consumer is rewritten by this documentation change.
|
|
18
|
+
---
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
<artifact-name>-release-candidate-<publish-source-sha>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The passport contract is `kungfu-buildchain-release-candidate-passport`. It
|
|
32
|
-
contains:
|
|
20
|
+
# Release Candidate Passport
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
Release candidates and their Passports are runtime-owned evidence. A consumer
|
|
23
|
+
maintains its schema-2 TOML and the generated normal/recovery workflow pair.
|
|
24
|
+
The normal pipeline binds and qualifies source, builds the declared products,
|
|
25
|
+
and manages publication. No consumer workflow downloads candidate artifacts,
|
|
26
|
+
constructs proofs, chooses a publication transaction, or prepares provider
|
|
27
|
+
requests. Start with the [Golden Path](getting-started.md).
|
|
28
|
+
|
|
29
|
+
This reference describes the retained candidate evidence mechanisms used by
|
|
30
|
+
internal promotion and historical receipt readers. It does not add another
|
|
31
|
+
consumer API. The internal [promotion request](release-promotion-request.md)
|
|
32
|
+
schemas and component workflows must not be copied into consumer wiring.
|
|
33
|
+
|
|
34
|
+
## Candidate and publication evidence
|
|
35
|
+
|
|
36
|
+
`release-candidate-passport.json` records evidence collected before promotion:
|
|
37
|
+
source identity, channel, runtime, workflow execution and verified platform
|
|
38
|
+
artifacts. `buildchain.release.json` is the durable published Release Passport.
|
|
39
|
+
These records have different purposes and retain their established schema and
|
|
40
|
+
hash identities.
|
|
41
|
+
|
|
42
|
+
The `kungfu-buildchain-release-candidate-passport` contract includes:
|
|
43
|
+
|
|
44
|
+
- repository and PR context;
|
|
45
|
+
- target channel/ref and version, or a non-publishing source candidate label;
|
|
46
|
+
- source head, merge ref and Git tree identities;
|
|
47
|
+
- Buildchain runtime and workflow entry identities;
|
|
48
|
+
- exact workflow run and attempt;
|
|
49
|
+
- platform matrix, artifact summaries and aggregate build-summary hash.
|
|
50
|
+
|
|
51
|
+
Internal admission checks the repository, channel, source, platform matrix,
|
|
52
|
+
summary and payload inventory before version, transaction, tag or branch
|
|
53
|
+
mutation. Accepted source equivalence must retain the complete proof; matching
|
|
54
|
+
a Git tree alone does not admit a candidate. Artifact names, source selectors
|
|
55
|
+
and roots are runtime transport fields, not TOML extensions.
|
|
56
|
+
|
|
57
|
+
The candidate resolver remains bound to the exact source and matching trusted
|
|
58
|
+
PR execution. A partial green status, sibling run, incomplete upload or timeout
|
|
59
|
+
cannot replace successful complete candidate evidence.
|
|
43
60
|
|
|
44
61
|
## Initiative-family release evidence
|
|
45
62
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Assignment responsible for the release; continuation evidence can also bind
|
|
52
|
-
the previous family root.
|
|
53
|
-
|
|
54
|
-
This is an adapter-edge release contract, not a second Work Control authority.
|
|
55
|
-
The immutable native Family State v1 projection and the additive Family State
|
|
56
|
-
v2 typed envelope remain owned by Kungfu. Buildchain only proves that the
|
|
57
|
-
release candidate consumed the caller-supplied family evidence exactly.
|
|
58
|
-
|
|
59
|
-
Promotion workflows that should not rebuild artifacts can enable:
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
- uses: kungfu-systems/buildchain/actions/release/promotion/ref@v3
|
|
63
|
-
with:
|
|
64
|
-
token: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}
|
|
65
|
-
sha: ${{ needs.build.outputs.publish-source-sha }}
|
|
66
|
-
target-ref: alpha/v22/v22.22
|
|
67
|
-
promote-only-release-candidate: "true"
|
|
68
|
-
release-candidate-passport-path: .buildchain/artifacts/release-candidate-passport.json
|
|
69
|
-
release-candidate-build-summary-path: .buildchain/artifacts/build-summary.json
|
|
70
|
-
release-candidate-family-evidence-required: "true"
|
|
71
|
-
release-candidate-family-evidence-root: sha256:<initiative-family-root>
|
|
72
|
-
release-candidate-family-initiative-id: 2026-07-30-example-initiative
|
|
73
|
-
release-candidate-family-assignment-id: 2026-07-30-example-release
|
|
74
|
-
```
|
|
63
|
+
The retained adapter can normalize
|
|
64
|
+
`kungfu-buildchain-initiative-family-release-evidence/v1` into the candidate
|
|
65
|
+
hash and publication authority. It can identify the family root, Initiative,
|
|
66
|
+
Assignment and previous family root. Required evidence must match these exact
|
|
67
|
+
identities before mutation.
|
|
75
68
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
matrix, or build-summary hash. Source identity accepts the exact PR source SHA,
|
|
80
|
-
the PR merge ref SHA, or an exact Git tree match with the promoted channel HEAD;
|
|
81
|
-
this keeps post-merge channel commits strict without forcing a rebuild. The
|
|
82
|
-
Buildchain-owned promotion workflow resolves the matching same-repository
|
|
83
|
-
merged channel PR and downloads its PR-stage RC passport automatically before
|
|
84
|
-
promotion starts. The consumer wrapper defaults to a PR-stage workflow file
|
|
85
|
-
named `build.yml` with display name `Build`, and filters the RC passport and
|
|
86
|
-
build summary by the configured `artifact-name` before promotion. It also
|
|
87
|
-
downloads payload artifacts from the same PR-stage run, validates the required
|
|
88
|
-
payload count, passes downloaded platform manifests into the release passport,
|
|
89
|
-
and either forwards an explicit `publish-required-artifacts-json` value or
|
|
90
|
-
generates one before calling `promote-buildchain-ref`. Before that call, the
|
|
91
|
-
wrapper creates or updates `publish-gate/{alpha,release,major}` to the
|
|
92
|
-
promotion channel commit and passes that ref, target SHA, and `locked=true` to
|
|
93
|
-
the promote action with `require-publish-source-lock: "true"`. Consumers using
|
|
94
|
-
floating `@v3` therefore get publish-side source-lock drift protection without
|
|
95
|
-
copying resolver or promote YAML. The default npm path
|
|
96
|
-
generates that requirement list from the downloaded `.tgz` payloads themselves:
|
|
97
|
-
Buildchain reads `package/package.json` inside each tarball for the real scoped
|
|
98
|
-
package name and version, computes npm-style `sha512-...` integrity over the
|
|
99
|
-
tarball bytes, marks `publish-package-main` as `role: main`, and marks every
|
|
100
|
-
other package as `role: platform`. Consumer workflows therefore stay
|
|
101
|
-
declarative and do not need their own artifact download or publish-evidence
|
|
102
|
-
generation scripts.
|
|
103
|
-
|
|
104
|
-
When `release-candidate-family-evidence-required` is true, the promotion
|
|
105
|
-
boundary additionally requires the exact family root and may require the
|
|
106
|
-
Initiative and Assignment ids. Missing, mismatched, or source-drifted family
|
|
107
|
-
evidence fails before version-state, release-state, tag, or branch mutation.
|
|
108
|
-
|
|
109
|
-
Because a channel merge can trigger promotion before its PR-stage matrix has
|
|
110
|
-
finished uploading evidence, the resolver waits up to ten minutes for the exact
|
|
111
|
-
merged PR's successful workflow run and paired artifacts. Polling remains bound
|
|
112
|
-
to the PR/head identity; timeout or a sibling run still fails closed.
|
|
113
|
-
|
|
114
|
-
The public promotion entry selects one execution runtime through the shared
|
|
115
|
-
[Runtime entry contract](runtime-entry.md). Entry and execution commits may differ.
|
|
116
|
-
Every later job prepares that selection without resolving another Buildchain ref
|
|
117
|
-
or checking entry/runtime SHA equality.
|
|
69
|
+
Kungfu owns native Family State and Work Control. Buildchain proves only that
|
|
70
|
+
its candidate consumed the bound evidence exactly. Consumers do not add a
|
|
71
|
+
family-evidence JSON transport to the shared workflow callers.
|
|
118
72
|
|
|
119
73
|
## Resume from an existing candidate run
|
|
120
74
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
workflow
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
product `install`, `build`, `verify`, and platform-matrix jobs. It restores the
|
|
183
|
-
downloaded bytes as a content-addressed sealed bundle, so npm publication uses
|
|
184
|
-
the original `.tgz`. The explicit recovery entry binds the bundle identity to
|
|
185
|
-
the original candidate runtime recorded in the Passport; a newer recovery
|
|
186
|
-
tooling SHA is recorded only in the recovery evidence and cannot perturb the
|
|
187
|
-
durable payload root. A transaction-only re-resolution remains a narrower
|
|
188
|
-
finalization path and is not a substitute for the candidate-run entry when the
|
|
189
|
-
original complete artifact inventory must be reconstructed. Recovery may
|
|
190
|
-
regenerate only Buildchain-owned receipts,
|
|
191
|
-
attestations, signatures, Release Passport data, publication, and readback.
|
|
192
|
-
|
|
193
|
-
Success emits `kungfu-buildchain-release-candidate-recovery/v1` with
|
|
194
|
-
`action: reused`, the original run/source/tree, candidate and artifact roots,
|
|
195
|
-
the skipped stages, current tooling SHA, transaction identity/state, and an
|
|
196
|
-
exact receipt root. The receipt is uploaded as an Actions artifact and staged
|
|
197
|
-
with immutable GitHub Release Passport assets.
|
|
198
|
-
|
|
199
|
-
The original candidate Passport is never rewritten when a reusable fixture or
|
|
200
|
-
consumer build records a product version different from the sealed publication
|
|
201
|
-
package. In that case the promote action validates the Passport without
|
|
202
|
-
discarding its original target, then requires the immutable recovery receipt to
|
|
203
|
-
bind the original candidate root and source/tree to the exact version read from
|
|
204
|
-
the sealed payload. Without that receipt, the existing direct Passport version
|
|
205
|
-
check remains mandatory; receipt, candidate-root, target, or version drift fails
|
|
206
|
-
before publication side effects.
|
|
207
|
-
|
|
208
|
-
Missing or expired artifacts, archive or payload digest drift, tree/root,
|
|
209
|
-
repository/workflow/channel/target mismatch, untrusted run/PR provenance,
|
|
210
|
-
incomplete controller evidence, and transaction conflict fail closed with an
|
|
211
|
-
error code and next action. Buildchain never converts recovery failure into a
|
|
212
|
-
hidden full rebuild. A repository owner must choose a new candidate build
|
|
213
|
-
explicitly.
|
|
214
|
-
|
|
215
|
-
When a durable transaction is absent, recovery seals one from the verified
|
|
216
|
-
candidate. Existing `sealed`, `publishing`, `package-published`, `finalizing`,
|
|
217
|
-
and `complete` transactions use the normal idempotent state machine. Matching
|
|
218
|
-
registry and GitHub bytes are preserved, only missing publication work is
|
|
219
|
-
performed, and conflicting public digests enter `repair_required`.
|
|
220
|
-
|
|
221
|
-
When the immutable recovery receipt proves that the transaction was already
|
|
222
|
-
`complete` before the recovery run began, Buildchain verifies the existing
|
|
223
|
-
public Release Passport bundle in place and reports the GitHub Release action
|
|
224
|
-
as `reused`. Buildchain-owned evidence regenerated by newer recovery tooling is
|
|
225
|
-
kept in the new recovery artifact; it does not replace same-name evidence that
|
|
226
|
-
was sealed by the original completed publication. Every declared product
|
|
227
|
-
payload is still compared byte-for-byte, a missing payload is uploaded from the
|
|
228
|
-
restored sealed bundle, and a conflicting payload digest fails closed. Ordinary
|
|
229
|
-
duplicate publication without a complete recovery receipt retains the stricter
|
|
230
|
-
same-name/same-digest rule for all assets.
|
|
231
|
-
|
|
232
|
-
If that explicit complete recovery finds that the public Release Passport is
|
|
233
|
-
absent, it may restore the complete locally verified evidence closure. Before
|
|
234
|
-
the first upload, Buildchain rejects undeclared remote assets and compares every
|
|
235
|
-
same-name remote asset byte-for-byte; any unknown name or digest conflict fails
|
|
236
|
-
closed without mutation. Ordinary duplicate publication cannot enter this
|
|
237
|
-
repair path.
|
|
238
|
-
|
|
239
|
-
After a transaction finalizes, the target branch can legitimately advance from
|
|
240
|
-
the original promotion SHA. Repeating explicit recovery accepts that movement
|
|
241
|
-
only when the caller supplies the exact durable transaction identity, the
|
|
242
|
-
transaction remains resumable, and GitHub proves the observed target head is a
|
|
243
|
-
descendant of the original transaction source. The recovery receipt records
|
|
244
|
-
both the immutable transaction SHA and the observed ref SHA. Missing identity,
|
|
245
|
-
unrelated advancement, or a repair state fails closed.
|
|
246
|
-
|
|
247
|
-
By default, the wrapper forwards GitHub Release publication to the underlying
|
|
248
|
-
`promote-buildchain-ref` semver model. Once the release transaction is complete,
|
|
249
|
-
the action creates or updates the public GitHub Release, applies
|
|
250
|
-
prerelease/latest metadata from the authoritative publication channel (falling
|
|
251
|
-
back to semver tag syntax only for ordinary callers without that intent), and
|
|
252
|
-
uploads the publish evidence file together with the generated release passport
|
|
253
|
-
assets. This keeps
|
|
254
|
-
npm/registry publication, Buildchain release passport persistence, and
|
|
255
|
-
`release.published` propagation in one declarative reusable workflow. Consumers
|
|
256
|
-
that do not publish GitHub Releases can opt out with `github-release: false`.
|
|
257
|
-
For anchored/manual package releases, the public GitHub Release tag defaults to
|
|
258
|
-
`v<publishedVersion>` while the internal transaction exact tag remains recorded
|
|
259
|
-
in the release passport.
|
|
260
|
-
|
|
261
|
-
Standalone binary publication is a separate consumer capability. The promotion
|
|
262
|
-
wrapper does not assume that an npm-only repository provides
|
|
263
|
-
`.github/workflows/self-build-binary-distribution.yml`. Repositories that own that workflow
|
|
264
|
-
opt in with `standalone-binary-distribution: true`; Buildchain's self-promotion
|
|
265
|
-
does so explicitly. Once enabled, a missing or invalid binary workflow remains a
|
|
266
|
-
hard failure rather than being silently skipped.
|
|
267
|
-
|
|
268
|
-
Products that publish KFD release trust evidence can keep that path declarative
|
|
269
|
-
too. Pass KFD-1 self contract witnesses, KFD-2 public claim files, and KFD-3
|
|
270
|
-
pre-build/artifact evidence into the wrapper:
|
|
271
|
-
|
|
272
|
-
```yaml
|
|
273
|
-
jobs:
|
|
274
|
-
promote:
|
|
275
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-release-promote.yml@v3
|
|
276
|
-
with:
|
|
277
|
-
buildchain-channel: auto
|
|
278
|
-
buildchain-alpha-contract-lock-path: .buildchain/alpha-contract-lock.json
|
|
279
|
-
buildchain-stable-contract-lock-path: .buildchain/contract-lock.json
|
|
280
|
-
channel: alpha
|
|
281
|
-
artifact-name: libnode
|
|
282
|
-
release-passport-kfd-1-witness-jsons: .buildchain/kfd/kfd-1/standard-contract.witness.json
|
|
283
|
-
release-passport-kfd-2-claim-jsons: .buildchain/kfd/kfd-2/release-claims.json
|
|
284
|
-
release-passport-kfd-3-prebuild-witness-jsons: .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json
|
|
285
|
-
release-passport-kfd-3-artifact-verify-command: kungfu agent verify --json
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
Buildchain forwards those declarations into `promote-buildchain-ref`, verifies
|
|
289
|
-
KFD-1 source/artifact contract surfaces, audits KFD-2 public release claims, and
|
|
290
|
-
compares KFD-3 declared shipped public surfaces with artifact-exposed public
|
|
291
|
-
surfaces. The release passport records the results under `kfd-1`, `kfd-2`, and
|
|
292
|
-
the KFD-provided `kfd-3` section.
|
|
293
|
-
|
|
294
|
-
Managed consumers may also ask the promotion wrapper to assemble sealed
|
|
295
|
-
publication evidence from the exact release candidate instead of producing
|
|
296
|
-
short-lived admission JSON in repository-specific workflow code:
|
|
297
|
-
|
|
298
|
-
```yaml
|
|
299
|
-
publication-auto-admission: true
|
|
300
|
-
publication-auto-no-gate: true
|
|
301
|
-
publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
|
|
302
|
-
publication-product: Example Product
|
|
303
|
-
publication-target: npm:@example/product
|
|
304
|
-
publication-package-name: "@example/product"
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
`publication-auto-no-gate` is an explicit consumer decision, not a default. A
|
|
308
|
-
consumer with a Shifu Gate registry either supplies
|
|
309
|
-
`publication-gate-aggregate-json`, or supplies a source-controlled
|
|
310
|
-
`publication-gate-command` that writes the aggregate to
|
|
311
|
-
`BUILDCHAIN_PUBLICATION_GATE_RESULT_PATH`. The command runs from the exact
|
|
312
|
-
consumer source in the credential-free sealed-authority job, after Buildchain
|
|
313
|
-
has downloaded the exact RC passport, summary, controller receipt, manifests,
|
|
314
|
-
and payload bytes. It can read those inputs through
|
|
315
|
-
`BUILDCHAIN_PUBLICATION_EVIDENCE_ROOT`; it receives no publication token, OIDC
|
|
316
|
-
permission, or provider write permission. Buildchain validates the aggregate
|
|
317
|
-
digest and exact source binding before it seals a capability. Exactly one of
|
|
318
|
-
the supplied aggregate, consumer command, or explicit no-Gate decision is
|
|
319
|
-
allowed. Buildchain still requires caller-owned RC evidence, an exact source SHA and prepared execution runtime, a repository-local publisher workflow, matching npm
|
|
320
|
-
target/package identity or exact caller-bound GitHub Release target, and a
|
|
321
|
-
qualifying control-plane audit.
|
|
322
|
-
|
|
323
|
-
Promotion resolves the complete PR-stage workflow, not only the first required
|
|
324
|
-
status job that becomes green. `release-candidate-wait-seconds` bounds that
|
|
325
|
-
wait and defaults to three hours so long native builds can finish controller,
|
|
326
|
-
publication-tail, and retained-evidence jobs without racing a merged promotion.
|
|
327
|
-
An incomplete or failed workflow still fails closed; the longer bound does not
|
|
328
|
-
turn a partial required-check result into candidate evidence.
|
|
329
|
-
|
|
330
|
-
GitHub-Release-only consumers use the same managed admission without inventing
|
|
331
|
-
an npm package identity:
|
|
332
|
-
|
|
333
|
-
```yaml
|
|
334
|
-
publication-auto-admission: true
|
|
335
|
-
publication-auto-no-gate: true
|
|
336
|
-
publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
|
|
337
|
-
publication-product: Example Binary
|
|
338
|
-
publication-target: github-release:example/example-binary
|
|
339
|
-
publication-package-name: ""
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
The target must exactly match the caller repository. Buildchain audits the
|
|
343
|
-
job-scoped GitHub token, exact release-candidate payloads and manifests,
|
|
344
|
-
protected channel lineage, and public release transaction before allowing the
|
|
345
|
-
GitHub Release mutation.
|
|
346
|
-
|
|
347
|
-
A consumer that owns additional product qualification semantics can opt in to
|
|
348
|
-
the sealed handoff without teaching Buildchain those semantics:
|
|
349
|
-
|
|
350
|
-
```yaml
|
|
351
|
-
publication-consumer-predicate-id: kungfu.release-admission/v1
|
|
352
|
-
publication-consumer-qualification-command: node scripts/qualify-release.mjs
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
The command reads `BUILDCHAIN_PUBLICATION_CAPABILITY_PATH` and
|
|
356
|
-
`BUILDCHAIN_PUBLICATION_GATE_AGGREGATE_PATH`, evaluates the complete aggregate,
|
|
357
|
-
and writes a decision JSON document to
|
|
358
|
-
`BUILDCHAIN_PUBLICATION_QUALIFICATION_RESULT_PATH`. It also receives
|
|
359
|
-
`BUILDCHAIN_PUBLICATION_PREDICATE_ID` and
|
|
360
|
-
`BUILDCHAIN_PUBLICATION_PREDICATE_DIGEST`. The separate qualification job has
|
|
361
|
-
no write or OIDC permission and does not inherit publication secrets. A
|
|
362
|
-
successful deterministic receipt is rechecked by the provider action
|
|
363
|
-
immediately before mutation. Omitting both inputs preserves the existing
|
|
364
|
-
consumer contract; supplying only one fails closed.
|
|
75
|
+
For current consumers, dispatch the generated `buildchain-recover.yml` with
|
|
76
|
+
an exact `attempt`. An optional `runtime-ref` can identify repaired tooling.
|
|
77
|
+
`public-ops-recover.yml` resolves the retained attempt and determines what can
|
|
78
|
+
be resumed. Consumers do not supply candidate run IDs, replacement source,
|
|
79
|
+
expected trees, roots, discussion IDs, transaction overrides or an extra
|
|
80
|
+
recovery workflow.
|
|
81
|
+
|
|
82
|
+
Internal recovery retains the original source and material identities. The
|
|
83
|
+
retained candidate recovery mechanism validates trusted repository/PR/run
|
|
84
|
+
provenance, workflow identity, target ancestry, candidate and summary roots,
|
|
85
|
+
controller receipts, platform inventory, archive sizes/digests, manifests and
|
|
86
|
+
product payload bytes. Its existing receipt schema remains
|
|
87
|
+
`kungfu-buildchain-release-candidate-recovery/v1`.
|
|
88
|
+
|
|
89
|
+
Reusing a qualified sealed candidate preserves its product bytes, including the
|
|
90
|
+
original npm tarball. A newer repair runtime is recorded as tooling; it cannot
|
|
91
|
+
change the original payload root or substitute new product source. Recovery
|
|
92
|
+
skips only stages justified by the retained attempt and evidence. It never
|
|
93
|
+
turns missing or conflicting material into a hidden fresh build.
|
|
94
|
+
|
|
95
|
+
An expected durable transaction must already exist with the same identity.
|
|
96
|
+
When internal admission permits creating missing transaction state, the state
|
|
97
|
+
is sealed from the verified original material. Existing phases use the normal
|
|
98
|
+
idempotent state machine. Missing publication work may continue; conflicting
|
|
99
|
+
public digests remain a repair failure.
|
|
100
|
+
|
|
101
|
+
## Completed publication and immutable history
|
|
102
|
+
|
|
103
|
+
Completed-publication recovery first verifies the retained transaction and
|
|
104
|
+
provider state. Same-name published evidence and payloads retain their original
|
|
105
|
+
bytes. Fresh recovery evidence belongs to the new recovery observation; it does
|
|
106
|
+
not silently replace the completed publication's evidence.
|
|
107
|
+
|
|
108
|
+
The retained recovery implementation may restore missing product bytes from
|
|
109
|
+
the verified sealed bundle. Restoring an absent Release Passport requires its
|
|
110
|
+
complete locally verified evidence closure, a check for undeclared remote
|
|
111
|
+
assets, and byte comparison of existing same-name assets before mutation.
|
|
112
|
+
Conflicting names or digests fail closed.
|
|
113
|
+
|
|
114
|
+
A protected target may advance after publication. Recovery must still bind the
|
|
115
|
+
original transaction and prove permitted ancestry from that immutable source;
|
|
116
|
+
it records both the transaction source and observed target. It cannot retarget
|
|
117
|
+
an old transaction to a newer candidate.
|
|
118
|
+
|
|
119
|
+
A new release uses a new legal candidate/version. Abandoning a failed alpha
|
|
120
|
+
leaves its historical attempts, source locks, receipts, tags and any published
|
|
121
|
+
bytes intact. See [Publish Transaction](publish-transaction.md).
|
|
122
|
+
|
|
123
|
+
## Product differences
|
|
124
|
+
|
|
125
|
+
npm packages, binary assets and Paper PDFs use the same generated callers.
|
|
126
|
+
Their install/build/verify commands, platform declarations, artifact paths and
|
|
127
|
+
publication targets belong in TOML. There is no separate consumer binary
|
|
128
|
+
workflow, Paper publication wrapper, credential-bearing publish command,
|
|
129
|
+
custom qualification handoff, or public request-JSON wrapper.
|
|
130
|
+
|
|
131
|
+
Runtime components retain separate credential and permission boundaries for
|
|
132
|
+
source qualification, sealed evidence, provider publication and readback. The
|
|
133
|
+
smaller consumer API does not collapse those internal boundaries. Legacy
|
|
134
|
+
receipt fields remain readable where required; they do not become accepted
|
|
135
|
+
fields in the closed schema-2 consumer plan.
|