@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
|
@@ -1,1021 +1,173 @@
|
|
|
1
1
|
---
|
|
2
|
-
status:
|
|
2
|
+
status: active
|
|
3
3
|
period: ongoing
|
|
4
4
|
theme: buildchain-release-governance
|
|
5
5
|
doc_type: technical-reference
|
|
6
6
|
source_level: local-files
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
|
-
evidence_grade:
|
|
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
|
# Release Governance
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
A reviewed channel PR expresses delivery or release intent. Buildchain manages
|
|
23
|
+
source qualification, protected landing, version material, publication, provider
|
|
24
|
+
readback and recovery through one normal pipeline.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
release intent. Automation must then create the version-state commit, exact tag,
|
|
27
|
-
floating tag, and next alpha state that make that intent true in Git.
|
|
26
|
+
## Consumer contract
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
1. The source tree that was reviewed.
|
|
34
|
-
2. The package version recorded in manifests such as `package.json` or
|
|
35
|
-
`lerna.json`.
|
|
36
|
-
3. The exact immutable release or prerelease tag.
|
|
37
|
-
4. The floating channel refs that consumers actually use.
|
|
28
|
+
Consumers maintain three files: `.buildchain/buildchain.toml`, the generated
|
|
29
|
+
`buildchain.yml`, and the generated `buildchain-recover.yml`. Tool-maintained
|
|
30
|
+
contract locks and one-time provider permissions are separate setup facts.
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
The only public reusable workflows are `public-ops-pipeline.yml` and
|
|
33
|
+
`public-ops-recover.yml`. npm packages, binary assets and Paper PDFs share these
|
|
34
|
+
entries. Their product differences are declared in TOML and ordinary product
|
|
35
|
+
source. See [Getting started](getting-started.md).
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- an alpha can be promoted to production even though the release tree is not the
|
|
45
|
-
same tree that was tested;
|
|
46
|
-
- a protected branch merge can succeed while the follow-up version commit is
|
|
47
|
-
missing, or a flow-internal generated `dev`/`alpha`/`release` ref update can
|
|
48
|
-
fail after publish because the automation identity was not declared in the
|
|
49
|
-
branch-protection review bypass allowance.
|
|
37
|
+
Internal actions and workflows are implementation details. Consumers do not add
|
|
38
|
+
patrol, promotion, attestation, candidate or product-specific release callers;
|
|
39
|
+
they do not pass Warrant, proof, payload handoff or arbitrary request JSON.
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
state. Buildchain keeps that choice because it makes release intent reviewable,
|
|
53
|
-
observable, and recoverable from Git history.
|
|
54
|
-
|
|
55
|
-
## What ABV Contributed
|
|
41
|
+
## Design Problem
|
|
56
42
|
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
A release must agree on the reviewed source, version material, exact tags,
|
|
44
|
+
published bytes and floating channel refs. A successful test or a merged PR
|
|
45
|
+
proves only its own stage. Buildchain records source and runtime identities and
|
|
46
|
+
reads providers back before accepting publication or terminal settlement.
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
administrative `publish-gate/major`;
|
|
62
|
-
- a PR from one channel to the next is the release request;
|
|
63
|
-
- verify jobs check that the branch pair is valid before merge;
|
|
64
|
-
- a maintainer review is required before the branch moves;
|
|
65
|
-
- after merge, automation writes the version change and moves tags;
|
|
66
|
-
- exact tags and floating refs are aligned with the resulting commit;
|
|
67
|
-
- the next development channel is prepared automatically.
|
|
48
|
+
## Version Lines
|
|
68
49
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
| Intent | Source | Target |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| Development | `feature/*`, `fix/*`, `chore/*`, `docs/*`, `ci/*`, `refactor/*` | configured `dev/vX/vX.Y` |
|
|
53
|
+
| Alpha | `dev/vX/vX.Y` | `alpha/vX/vX.Y` |
|
|
54
|
+
| Stable | `alpha/vX/vX.Y` | `release/vX/vX.Y` |
|
|
55
|
+
| Major | `release/vX/vX.Y` | `publish-gate/major` |
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
The schema-2 channel declaration admits only legal branch pairs. `dev` is a
|
|
58
|
+
protected development channel; work is proposed from an isolated task branch.
|
|
59
|
+
`publish-gate/major` is an explicit major-release decision, not a development trunk.
|
|
76
60
|
|
|
77
61
|
## Buildchain Implementation
|
|
78
62
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
promotion; this workflow dogfoods the declarative
|
|
84
|
-
`public-release-promote.yml` wrapper and does not hand-wire resolver,
|
|
85
|
-
artifact download, publish-gate, or promote action steps;
|
|
86
|
-
- Buildchain self promotion enables `release-passport-buildchain-self-kfd`, so
|
|
87
|
-
the promote action generates KFD-1 witnesses, KFD-2 public claim JSON, and
|
|
88
|
-
KFD-3 collaboration-interface witnesses from the final version-state workspace
|
|
89
|
-
before release passport finalization. The witness hashes therefore bind to the
|
|
90
|
-
exact published package and site facts from
|
|
91
|
-
`packages/core/adoption/buildchain-kfd-claims.js` instead of relying on prose release
|
|
92
|
-
notes;
|
|
93
|
-
- `actions/release/promotion/ref` for branch, tag, version-state, and
|
|
94
|
-
governance checks;
|
|
95
|
-
- package-manager adapters that can update version state for pnpm, npm, and
|
|
96
|
-
yarn style repositories;
|
|
97
|
-
- `buildchain.toml` lifecycle configuration for repositories whose version
|
|
98
|
-
state or verification commands are not Node package-manager defaults.
|
|
99
|
-
|
|
100
|
-
The implementation is intentionally stricter than a local release script:
|
|
101
|
-
|
|
102
|
-
- manual workflow dispatch can only do dry-run promotion;
|
|
103
|
-
- non-dry-run promotion must be driven by a completed `Verify` workflow;
|
|
104
|
-
- target branch protection details must be readable, and branch protection must
|
|
105
|
-
apply to administrators as well as regular contributors;
|
|
106
|
-
- `alpha/vX/vX.Y` and `release/vX/vX.Y` branch protection must require both the
|
|
107
|
-
general `check` context and the Release Verify aggregate `verify` context, so
|
|
108
|
-
an invalid channel pair cannot merge even when repository checks pass;
|
|
109
|
-
- release targets keep those checks non-strict with respect to source-branch
|
|
110
|
-
ancestry: generated channel bookkeeping intentionally makes the source and
|
|
111
|
-
target histories diverge, while the pair-specific `verify` context validates
|
|
112
|
-
the legal channel transition;
|
|
113
|
-
- alpha promotion must come from a merged same-repository PR from
|
|
114
|
-
`dev/vX/vX.Y` to `alpha/vX/vX.Y`;
|
|
115
|
-
- release promotion must come from a merged same-repository PR from
|
|
116
|
-
`alpha/vX/vX.Y` to `release/vX/vX.Y`;
|
|
117
|
-
- major promotion must come from a merged same-repository PR from
|
|
118
|
-
`release/vX/vX.Y` to `publish-gate/major`;
|
|
119
|
-
- release promotion requires an existing same-patch alpha tag and checks the
|
|
120
|
-
release source tree against that tested alpha tree;
|
|
121
|
-
- generated version-state commits are verified before refs move.
|
|
122
|
-
|
|
123
|
-
## Reconciling a protected line without rebuilding
|
|
124
|
-
|
|
125
|
-
The public `build.yml` channel router ends with a top-level job named
|
|
126
|
-
`Summarize build contract`. Keeping this aggregate at the public router boundary
|
|
127
|
-
prevents its required check context from changing when the internal reusable
|
|
128
|
-
build workflow gains another nesting layer.
|
|
129
|
-
|
|
130
|
-
For an already-tested pull request whose protected target still requires an
|
|
131
|
-
older Buildchain aggregate context, inspect the exact candidate SHA first:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
GH_TOKEN="$(gh auth token)" npx @kungfu-tech/buildchain@latest \
|
|
135
|
-
release-governance reconcile \
|
|
136
|
-
--repository kungfu-systems/example \
|
|
137
|
-
--branch release/v3/v3.0 \
|
|
138
|
-
--candidate-sha <tested-pr-head-sha> \
|
|
139
|
-
--json
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The dry run reads the successful checks emitted for that SHA and reports the
|
|
143
|
-
exact expected/actual context pair. It chooses the shallowest successful
|
|
144
|
-
`Summarize build contract` context, so a new top-level router aggregate wins
|
|
145
|
-
over the nested internal build summary. To apply the plan, rerun the same
|
|
146
|
-
command with `--apply` using a token that can update branch protection.
|
|
147
|
-
|
|
148
|
-
Reconciliation changes only the required-status-check subresource. It replaces
|
|
149
|
-
stale Buildchain aggregate contexts, preserves unrelated checks and strictness,
|
|
150
|
-
and does not modify review requirements, administrator enforcement,
|
|
151
|
-
conversation resolution, force-push policy, or deletion policy. The candidate
|
|
152
|
-
must still be the head of a pull request targeting the named managed branch;
|
|
153
|
-
the command fails closed otherwise. This lets a previously successful candidate
|
|
154
|
-
continue from the same SHA without another native build or an administrator
|
|
155
|
-
merge bypass.
|
|
156
|
-
|
|
157
|
-
Repositories may also expose a small caller workflow around
|
|
158
|
-
`.github/workflows/public-ops-release-governance.yml@v3`. Pass `branch`,
|
|
159
|
-
`candidate-sha`, and `apply`, and provide `governance-token` through the caller's
|
|
160
|
-
secrets. The reusable workflow uploads the JSON reconciliation receipt.
|
|
161
|
-
|
|
162
|
-
Exact publication planning installs the checked-out promotion source's declared
|
|
163
|
-
dependencies before version-state verification. This keeps the pre-authority
|
|
164
|
-
version plan on the same package-manager boundary as the later promotion job,
|
|
165
|
-
including repositories whose verification commands import production packages.
|
|
166
|
-
The planning pass may materialize and verify declared derived files locally,
|
|
167
|
-
but dry-run never creates Git blobs, trees, commits, refs, or tags.
|
|
168
|
-
|
|
169
|
-
Promotion intents are serialized globally per caller repository with
|
|
170
|
-
`cancel-in-progress: false`. A queued intent re-reads its protected target ref
|
|
171
|
-
before checkout, dependency installation, release-candidate resolution, or any
|
|
172
|
-
publish-gate/ref mutation. If the ref already points at a newer SHA, that older
|
|
173
|
-
intent is no longer release authority: the workflow records the requested and
|
|
174
|
-
current SHAs, proves that the current target is ahead of the requested commit,
|
|
175
|
-
and completes as a `target-ref-advanced` superseded no-op. Diverged or behind
|
|
176
|
-
comparisons are not superseded transactions and still fail closed.
|
|
177
|
-
Missing refs, unreadable repository state, invalid channels, governance
|
|
178
|
-
failures, and artifact mismatches still fail closed. The promote action repeats
|
|
179
|
-
the target check at the mutation boundary, so a ref that advances after the
|
|
180
|
-
workflow preflight cannot receive a second set of publication side effects.
|
|
181
|
-
|
|
182
|
-
## Version Lines
|
|
63
|
+
The generated normal entry handles source events and invokes the shared runtime.
|
|
64
|
+
The runtime owns internal build, delivery and publication jobs while retaining
|
|
65
|
+
independent reviews, merge queues, credential isolation and exact-source checks.
|
|
66
|
+
An internal split across several jobs or workflows does not add consumer wiring.
|
|
183
67
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
v3.0.0
|
|
190
|
-
v3.0.1
|
|
191
|
-
v3.0.2
|
|
192
|
-
...
|
|
193
|
-
v3.0.1234
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
This is why Buildchain maintains both exact and floating refs:
|
|
197
|
-
|
|
198
|
-
- `v3.0.2` is immutable release evidence;
|
|
199
|
-
- `v3.0` is the latest production release on the `3.0` line;
|
|
200
|
-
- `v3` is the selected stable major-line entrypoint;
|
|
201
|
-
- `v3.0.3-alpha.0` is immutable alpha evidence;
|
|
202
|
-
- `v3.0-alpha` is the latest test channel for the `3.0` line.
|
|
203
|
-
- `v3-alpha` is the latest test channel on the highest published alpha minor in major `3`.
|
|
204
|
-
|
|
205
|
-
A release does not mean "minor is complete." It means "this patch on this minor
|
|
206
|
-
line is now production."
|
|
207
|
-
|
|
208
|
-
GitHub repository rules must preserve that distinction. Exact tags such as
|
|
209
|
-
`v3.0.2` and `v3.0.3-alpha.0` should be immutable. Floating channel tags such as
|
|
210
|
-
`v3`, `v3.0`, `v3.0-alpha`, and `v3-alpha` must remain movable by the Buildchain promotion
|
|
211
|
-
token after governance checks and publish evidence pass. A tag ruleset that
|
|
212
|
-
protects every `refs/tags/v*` ref is too broad because it also locks the
|
|
213
|
-
floating channel tags that Buildchain is required to update. Prefer exact-tag
|
|
214
|
-
patterns such as `refs/tags/v*.*.*` for immutable release evidence, while
|
|
215
|
-
leaving floating channel tags under Buildchain automation control.
|
|
216
|
-
|
|
217
|
-
## Alpha Semantics
|
|
68
|
+
The TOML compiler is closed: products declare install/build/verify commands,
|
|
69
|
+
artifacts and supported publication targets; version files and channel policy
|
|
70
|
+
are explicit. Consumer commands do not implement registry publication, evidence
|
|
71
|
+
packaging, provider readback, event routing or recovery. The schema is described
|
|
72
|
+
in the [CLI manual](cli.md) and [product publication guide](publication-artifacts.md).
|
|
218
73
|
|
|
219
|
-
|
|
74
|
+
## Protected Dev Branches
|
|
220
75
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
76
|
+
The declared review policy requires independent approval, Code Owners and a
|
|
77
|
+
protected merge queue. The runtime validates current source/base identity and
|
|
78
|
+
the provider's review/check state before landing. A queue admission or a pending
|
|
79
|
+
check is not a merged delivery. Repeated, stale and out-of-order events remain
|
|
80
|
+
bound to their own source and attempt.
|
|
224
81
|
|
|
225
|
-
Buildchain
|
|
82
|
+
Buildchain's Warrant, fencing and native-proof mechanisms are internal scheduling
|
|
83
|
+
and authority boundaries. Their [implementation contract](dev-delivery-warrant.md)
|
|
84
|
+
and [node orchestration](dev-delivery-orchestration.md) do not require additional
|
|
85
|
+
consumer scripts or allow a caller to forge proof or bypass protection.
|
|
226
86
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
3. Verifies the generated version-state tree.
|
|
230
|
-
4. Creates or reuses the exact alpha tag.
|
|
231
|
-
5. Moves `alpha/vX/vX.Y` to the generated alpha commit.
|
|
232
|
-
6. Moves `dev/vX/vX.Y` to the same generated alpha commit when this is a
|
|
233
|
-
fast-forward update.
|
|
234
|
-
7. Moves `vX.Y-alpha` to the same generated alpha commit.
|
|
235
|
-
8. Moves `vX-alpha` only when `X.Y` is the highest minor in major `X` with a published alpha; older minor alpha work records a skip and cannot move the major channel backwards.
|
|
87
|
+
One-time permission or provider setup must preserve these review and credential
|
|
88
|
+
boundaries. It does not become a recurring consumer runtime step.
|
|
236
89
|
|
|
237
|
-
|
|
238
|
-
with dist-tag `alpha`; maintenance alphas on an older minor publish with the
|
|
239
|
-
line-specific dist-tag `vX.Y-alpha` so they cannot roll the global `alpha`
|
|
240
|
-
channel backward. Exact prerelease versions remain installable directly.
|
|
90
|
+
## Alpha Semantics
|
|
241
91
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
92
|
+
A legal development-to-alpha PR requests a fresh prerelease. The runtime owns
|
|
93
|
+
version materialization, product qualification and publication. Exact alpha tags
|
|
94
|
+
and published package versions are immutable evidence; floating alpha refs
|
|
95
|
+
identify the published channel. A later alpha is a new publication, not a rewrite
|
|
96
|
+
or repair of an earlier failed version.
|
|
246
97
|
|
|
247
98
|
### Buildchain public build self-dogfood
|
|
248
99
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
the same root lifecycle on Linux, macOS, and Windows. Project settings
|
|
254
|
-
live in TOML; the selected runtime records its execution SHA and configuration
|
|
255
|
-
root into the build receipts. Separate workflow validation allows each channel
|
|
256
|
-
to advance independently during a breaking producer-first release.
|
|
257
|
-
|
|
258
|
-
Buildchain's generic artifact-signing contract seals source-, tree-, runtime-,
|
|
259
|
-
platform-, and digest-bound requests from ordinary credential-free build jobs.
|
|
260
|
-
Provider-specific authority jobs consume only those sealed payloads. Apple
|
|
261
|
-
Developer ID, Windows Authenticode, and detached cryptographic signatures share
|
|
262
|
-
the request/receipt model, while each profile retains its honest platform
|
|
263
|
-
semantics and fail-closed verification requirements.
|
|
264
|
-
|
|
265
|
-
The authority verifies the complete result set on GitHub-hosted infrastructure
|
|
266
|
-
before delivery. The consumer controller also performs final result verification,
|
|
267
|
-
exact-byte import, manifest recomputation, and deterministic-artifact replacement
|
|
268
|
-
on a GitHub-hosted lane. Self-hosted build runners do not download authority
|
|
269
|
-
result payloads, and aggregate/release evidence fails closed until this
|
|
270
|
-
finalization succeeds.
|
|
271
|
-
|
|
272
|
-
The central `buildchain-artifact-signing` environment reuses the established
|
|
273
|
-
macOS Credential Island names (`BUILDCHAIN_MACOS_CERTIFICATE_*`,
|
|
274
|
-
`BUILDCHAIN_MACOS_NOTARY_API_*`, and
|
|
275
|
-
`BUILDCHAIN_MACOS_EXPECTED_TEAM_ID`). Those authority-only values are never
|
|
276
|
-
declared by or forwarded through a consumer repository. Windows and detached
|
|
277
|
-
providers follow the same central-environment boundary.
|
|
278
|
-
|
|
279
|
-
The reusable build trust gate reads `job.workflow_ref`, which identifies the
|
|
280
|
-
called workflow and its selected ref. It does not infer the runtime from
|
|
281
|
-
`github.workflow_ref`, because GitHub defines that context as the caller
|
|
282
|
-
workflow identity during a reusable call.
|
|
283
|
-
|
|
284
|
-
The router selects `.buildchain/alpha-contract-lock.json` for alpha and
|
|
285
|
-
`.buildchain/contract-lock.json` for stable. The alpha lock records the exact
|
|
286
|
-
reviewed alpha SHA and compatibility digest; it does not replace the stable
|
|
287
|
-
consumer lock. A later alpha with only compatible additive drift continues,
|
|
288
|
-
while a changed breaking digest fails until the new alpha contract is reviewed.
|
|
289
|
-
|
|
290
|
-
The evidence job resolves `v3-alpha` and `v3` through the GitHub refs API,
|
|
291
|
-
compares those immutable SHAs with the reusable workflow outputs, verifies the
|
|
292
|
-
`alpha` and `stable` classifications, and uploads a JSON evidence artifact.
|
|
293
|
-
The canary runs after successful Buildchain ref promotion, on a daily fallback
|
|
294
|
-
schedule, and on manual dispatch. It shares the release-promotion concurrency
|
|
295
|
-
group, so another promotion cannot move the floating refs between runtime
|
|
296
|
-
resolution and evidence comparison.
|
|
297
|
-
|
|
298
|
-
This is a post-publication consumer canary, not a release bootstrap. Source
|
|
299
|
-
verification still runs the current commit, and
|
|
300
|
-
`self-release-promote.yml` still passes the verified exact SHA into the
|
|
301
|
-
promotion workflow. Patrol, dev-merge, repair, and promotion defaults remain on
|
|
302
|
-
stable or exact refs so a broken alpha cannot prevent Buildchain from publishing
|
|
303
|
-
its fix. When Buildchain opens a new major, inventory validation requires this
|
|
304
|
-
workflow's fixed GitHub `uses` refs to move from `vN`/`vN-alpha` to the new
|
|
305
|
-
major; GitHub does not allow expressions in a reusable-workflow `uses` ref.
|
|
306
|
-
|
|
307
|
-
If `dev/vX/vX.Y` has already advanced before generated alpha version-state
|
|
308
|
-
bookkeeping can sync back, Buildchain records `skipped-non-fast-forward` for the
|
|
309
|
-
dev sync and still completes the exact and floating alpha tags for the reviewed
|
|
310
|
-
alpha commit. Later dev changes must go through their own dev-to-alpha
|
|
311
|
-
promotion instead of rewinding dev. The normal path is direct: after alpha
|
|
312
|
-
merges, Buildchain applies the generated version-state commit to alpha and then
|
|
313
|
-
fast-forwards dev to the same commit without a human version-state PR.
|
|
314
|
-
|
|
315
|
-
If alpha finalization is resumed after generated version-state bookkeeping was
|
|
316
|
-
partially applied, Buildchain accepts the current alpha head as the generated
|
|
317
|
-
commit, or as a historical merge commit that contains the recorded release
|
|
318
|
-
material. An already-created exact alpha tag may point at the transaction
|
|
319
|
-
release/material SHA or at the finalized alpha head; missing floating alpha
|
|
320
|
-
tags are retried before the transaction becomes `complete`.
|
|
100
|
+
Buildchain consumes the same generated normal/recovery pair and schema-2 policy.
|
|
101
|
+
Its product commands verify Node, Rust and the required Linux/macOS/Windows
|
|
102
|
+
artifacts. Runtime locks, source identities and hosted evidence remain separate;
|
|
103
|
+
self-consumption has no repository-specific runtime-selection exception.
|
|
321
104
|
|
|
322
105
|
## Release Semantics
|
|
323
106
|
|
|
324
|
-
A release
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
alpha/vX/vX.Y -> release/vX/vX.Y
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
Buildchain then:
|
|
331
|
-
|
|
332
|
-
1. Finds the same-patch alpha tag that was tested.
|
|
333
|
-
2. Checks that the release source tree matches that alpha tag tree, excluding
|
|
334
|
-
only generated version-state differences.
|
|
335
|
-
3. Writes final release version state such as `vX.Y.Z`.
|
|
336
|
-
4. Verifies the generated release tree.
|
|
337
|
-
5. Creates or reuses the exact release tag `vX.Y.Z`.
|
|
338
|
-
6. Moves `release/vX/vX.Y` to the exact release commit.
|
|
339
|
-
7. Moves `vX.Y` to the exact release commit.
|
|
340
|
-
8. Moves `vX` when this minor line should be the stable major entrypoint.
|
|
341
|
-
9. Prepares the next alpha version-state commit, such as
|
|
342
|
-
`vX.Y.(Z+1)-alpha.0`.
|
|
343
|
-
10. Moves `alpha/vX/vX.Y`, `dev/vX/vX.Y`, and `vX.Y-alpha` to that next alpha
|
|
344
|
-
commit.
|
|
345
|
-
11. Moves `vX-alpha` to that next alpha only when this remains the highest published alpha minor.
|
|
346
|
-
|
|
347
|
-
The historical alpha tree comparison remains the default stable source gate.
|
|
348
|
-
A promote-only stable run may accept a broader reviewed release PR only when
|
|
349
|
-
the downloaded RC passport proves that the PR's exact target tree is the tree
|
|
350
|
-
that completed the PR-stage build. Buildchain also requires the target commit
|
|
351
|
-
to belong to a merged same-repository PR into the selected release branch and
|
|
352
|
-
records the accepted commit, tree, RC source, alpha source, and PR as promotion
|
|
353
|
-
evidence. A stale passport, a different target tree, a generated final release
|
|
354
|
-
commit, or an unreviewed target commit still falls through to the normal
|
|
355
|
-
alpha-tree and declared version-state checks.
|
|
356
|
-
|
|
357
|
-
The production channel and the test channel therefore intentionally diverge
|
|
358
|
-
after release: production stays on the release commit, while alpha/dev continue
|
|
359
|
-
at the next prerelease commit.
|
|
107
|
+
A legal alpha-to-release PR requests stable publication. The runtime validates
|
|
108
|
+
its source, admitted material and version-bound evidence before provider effects.
|
|
109
|
+
Existing published payloads and receipt bytes remain immutable on recovery.
|
|
360
110
|
|
|
361
111
|
### Stable Release Evidence Gate
|
|
362
112
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
All alpha and release promotions first run a metadata-only release-candidate
|
|
369
|
-
preflight after queued-intent revalidation. The preflight uses the same resolver
|
|
370
|
-
and exact target SHA as the publication job, but does not download payloads or
|
|
371
|
-
install the candidate repository dependencies. Missing channel PRs, stale
|
|
372
|
-
workflow runs, expired passport pairs, and insufficient payload artifact sets
|
|
373
|
-
therefore fail before the full promotion job starts. The publication job still
|
|
374
|
-
downloads and validates the exact evidence again at the trust boundary; the
|
|
375
|
-
preflight moves failure earlier without weakening the final check.
|
|
376
|
-
|
|
377
|
-
The policy is versioned in `.buildchain/stable-release-policy.json`. A stable
|
|
378
|
-
candidate is allowed only when all of these facts are true:
|
|
379
|
-
|
|
380
|
-
- the candidate resolves to an immutable exact alpha tag and its GitHub
|
|
381
|
-
prerelease timestamp;
|
|
382
|
-
- the preceding stable-to-alpha comparison contains a product or public
|
|
383
|
-
contract path, not only version, test, evidence, or retrospective changes;
|
|
384
|
-
- the version-bound impact record has a non-empty summary and at least one
|
|
385
|
-
surface impact;
|
|
386
|
-
- the `Build Surface Fixture` release-candidate run succeeded;
|
|
387
|
-
- Buildchain's zero-input `Buildchain Alpha Self-Dogfood` completed on all three
|
|
388
|
-
platforms, and `github-actions[bot]` attested the exact published alpha runtime
|
|
389
|
-
through `buildchain-canary/buildchain-zero-input`;
|
|
390
|
-
- the status target is the repository-owned alpha dogfood workflow, its summary
|
|
391
|
-
archive matches the provider digest, and the summary binds the source run,
|
|
392
|
-
attempt, exact candidate runtime and all install/build/verify stages; overrides,
|
|
393
|
-
another candidate and incomplete artifacts are rejected.
|
|
394
|
-
|
|
395
|
-
The machine report is written to
|
|
396
|
-
`.buildchain/release-passport/stable-release-gate.json`. A passing report is
|
|
397
|
-
uploaded with the stable release passport. A blocked run writes the same report
|
|
398
|
-
before failing, so the missing or stale condition is inspectable without
|
|
399
|
-
opening a publication transaction.
|
|
400
|
-
|
|
401
|
-
The `public-build` canary uses the build summary as runtime evidence. It does
|
|
402
|
-
not infer the runtime from the consumer source commit or a run display name.
|
|
403
|
-
Generic `commit-status` consumer canaries remain supported for repositories that
|
|
404
|
-
explicitly declare them; their runtime input or workflow-owned run-name binding
|
|
405
|
-
continues to apply.
|
|
406
|
-
|
|
407
|
-
Buildchain sets both the minimum stable interval and canary soak duration to
|
|
408
|
-
zero. A candidate can proceed as soon as its required evidence is valid; no
|
|
409
|
-
fixed cooldown, soak window or scheduled release time delays this delivery.
|
|
410
|
-
Changing the canary set, attestors or product path boundary remains a reviewed
|
|
411
|
-
policy change.
|
|
412
|
-
|
|
413
|
-
Repositories that want a predictable scheduled stable window can use
|
|
414
|
-
[`Stable Candidate Patrol`](stable-candidate-patrol.md). It persists each exact
|
|
415
|
-
alpha independently, qualifies it after repository-declared checks and soak,
|
|
416
|
-
and selects the newest qualified non-revoked candidate. A newer soaking alpha
|
|
417
|
-
does not invalidate an older qualified candidate. The selected tree enters the
|
|
418
|
-
existing strict `publish-gate/release/<line>/<version> -> release/<line>` PR
|
|
419
|
-
path, so scheduled selection changes release intent timing without weakening
|
|
420
|
-
source locks, review, verification, publish transactions, or passports.
|
|
421
|
-
|
|
422
|
-
If release finalization is resumed after generated version-state bookkeeping was
|
|
423
|
-
partially applied, Buildchain applies the same recovery rule: the current
|
|
424
|
-
release head may be the generated commit, or a historical merge commit that
|
|
425
|
-
contains the recorded release material, existing exact tags and alpha/dev refs
|
|
426
|
-
are accepted when they match the transaction, and missing floating `vX.Y` or
|
|
427
|
-
`vX` tags are retried idempotently before completion.
|
|
428
|
-
|
|
429
|
-
Once the durable release transaction is `complete` and the exact/floating
|
|
430
|
-
stable refs have moved, next-alpha preparation is post-release bookkeeping. A
|
|
431
|
-
failure there records `deferred-post-release-bookkeeping` and
|
|
432
|
-
`next-anchor-required` instead of retroactively reporting the stable release as
|
|
433
|
-
failed. Generated next-alpha merges use the current dev tree as their base and
|
|
434
|
-
overlay only declared version-state paths, preserving concurrent dev changes.
|
|
435
|
-
|
|
436
|
-
## Major Gate Semantics
|
|
437
|
-
|
|
438
|
-
A major gate merge is:
|
|
113
|
+
The stable policy requires product impact and qualified published-entry evidence
|
|
114
|
+
bound to the selected source/runtime. `.buildchain/buildchain.toml` declares the
|
|
115
|
+
current policy, with supporting version-bound impact in
|
|
116
|
+
`.buildchain/release-impact.json`. Buildchain currently declares both minimum
|
|
117
|
+
interval and soak as zero: valid evidence can proceed without a fixed delay.
|
|
439
118
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
119
|
+
The [stable-entry implementation](../packages/core/publication/pipeline/stable-entry.js)
|
|
120
|
+
checks the published entry; an old standalone dogfood workflow name or a green
|
|
121
|
+
local test is not a substitute. Publication and its later distribution and
|
|
122
|
+
next-development stages retain separate completion facts.
|
|
443
123
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
PR UI as alpha and release promotion keeps the human workflow simple while
|
|
448
|
-
avoiding the misleading meaning of `main`. The older `major-gate` branch name is
|
|
449
|
-
a compatibility alias only.
|
|
124
|
+
Stable completion prepares the next patch's `alpha.0` using the current protected
|
|
125
|
+
development source and declared version paths. Concurrent development must be
|
|
126
|
+
preserved. See [Next-development transition](next-development-transition.md).
|
|
450
127
|
|
|
451
|
-
|
|
128
|
+
## Major Gate Semantics
|
|
452
129
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
3. Creates or reuses the exact release tag `v(X+1).0.0`.
|
|
457
|
-
4. Moves `publish-gate/major` and `release/v(X+1)/v(X+1).0` to that release commit.
|
|
458
|
-
5. Moves `v(X+1).0` and `v(X+1)` to that release commit.
|
|
459
|
-
6. Prepares the next alpha version-state commit, such as
|
|
460
|
-
`v(X+1).0.1-alpha.0`.
|
|
461
|
-
7. Moves `alpha/v(X+1)/v(X+1).0`, `dev/v(X+1)/v(X+1).0`, and
|
|
462
|
-
`v(X+1).0-alpha` to that next alpha commit.
|
|
130
|
+
A release-to-major-gate PR is the reviewed intent to publish the next major.
|
|
131
|
+
The runtime applies the same exact source, version, provider and protected-ref
|
|
132
|
+
boundaries. A branch name or manual workflow dispatch alone is not authority.
|
|
463
133
|
|
|
464
|
-
|
|
465
|
-
state, not like a branch where day-to-day source work continues. Day-to-day
|
|
466
|
-
source work continues on `dev/vX/vX.Y`.
|
|
134
|
+
## Failure and recovery
|
|
467
135
|
|
|
468
|
-
|
|
136
|
+
Use `buildchain-recover.yml` with the exact `attempt`. Supply the optional
|
|
137
|
+
`runtime-ref` only when a repaired runtime is needed. Recovery restores original
|
|
138
|
+
material and reads providers before remaining effects; it does not replace
|
|
139
|
+
source or published payloads. Consumers do not supply run/Discussion/transaction
|
|
140
|
+
selector combinations or custom recovery scripts.
|
|
469
141
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
request into the target dev line.
|
|
474
|
-
|
|
475
|
-
This keeps the earliest development channel audit-friendly:
|
|
476
|
-
|
|
477
|
-
- the version line being changed is visible in the PR base branch;
|
|
478
|
-
- CI and required checks run before the channel moves;
|
|
479
|
-
- branch protection can prevent direct pushes and stale merges;
|
|
480
|
-
- later `dev -> alpha -> release` promotion inherits a reviewable source
|
|
481
|
-
lineage instead of trying to reconstruct how the dev branch changed.
|
|
482
|
-
|
|
483
|
-
When required checks take longer than the normal dev-channel commit interval,
|
|
484
|
-
classic strict up-to-date protection can become a non-converging retry loop:
|
|
485
|
-
each base update invalidates a completed check set and rebasing restarts the
|
|
486
|
-
same slow checks. Buildchain supports GitHub merge queues for that channel
|
|
487
|
-
shape. The queue validates the projected merged result and serializes the final
|
|
488
|
-
ref update, so concurrent channel movement no longer invalidates the candidate.
|
|
489
|
-
|
|
490
|
-
GitHub Merge Queue does not by itself decide which candidate may spend a long
|
|
491
|
-
native proof before enqueue. Repositories with that workload use the
|
|
492
|
-
[Dev Delivery Warrant Queue](dev-delivery-warrant.md) as the durable,
|
|
493
|
-
FIFO-aging scheduling and fencing authority before native queue admission. A
|
|
494
|
-
selected Warrant owns one complete delivery attempt and later candidates remain
|
|
495
|
-
visibly queued; GitHub still owns the exact `merge_group` proof and final ref
|
|
496
|
-
mutation. Workflow concurrency remains only a process critical section and is
|
|
497
|
-
not fairness or ownership authority.
|
|
498
|
-
|
|
499
|
-
Every required workflow must handle both `pull_request` and `merge_group`
|
|
500
|
-
before the queue is enabled. Queue runs do not provide
|
|
501
|
-
`github.event.pull_request`; required workflows must use the checked-out
|
|
502
|
-
`github.sha` or event-neutral source facts. The governance command is dry-run by
|
|
503
|
-
default and refuses to enable a queue when a declared required workflow lacks
|
|
504
|
-
either trigger or still reads the pull-request-only payload directly:
|
|
505
|
-
|
|
506
|
-
```bash
|
|
507
|
-
buildchain dev merge-queue \
|
|
508
|
-
--repository owner/repository \
|
|
509
|
-
--branch dev/v4/v4.0 \
|
|
510
|
-
--workflow .github/workflows/source-acceptance.yml \
|
|
511
|
-
--workflow .github/workflows/affected-native-pr.yml \
|
|
512
|
-
--bypass-app dedicated-release-app
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
After reviewing the plan, repeat with `--apply`. Buildchain creates or updates
|
|
516
|
-
an exact-branch `merge_queue` ruleset first, then changes only the classic
|
|
517
|
-
required-status-check policy from strict to loose. Reviews, administrator
|
|
518
|
-
enforcement, conversation resolution, required check identities, force-push
|
|
519
|
-
protection, and deletion protection remain owned by the existing branch
|
|
520
|
-
protection. The ruleset uses the first merge method that the repository itself
|
|
521
|
-
allows, and fails closed when the repository has no enabled merge method.
|
|
522
|
-
Re-running the command is idempotent.
|
|
523
|
-
|
|
524
|
-
The repository policy can be declared once instead of repeated as CLI flags:
|
|
525
|
-
|
|
526
|
-
```toml
|
|
527
|
-
[governance.dev.merge_queue]
|
|
528
|
-
mode = "inherit"
|
|
529
|
-
required_workflows = [".github/workflows/self-build-verify.yml"]
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
`enabled` explicitly requires Buildchain to create or update an exact-branch
|
|
533
|
-
queue; `inherit` copies queue parameters and bypass actors from the repository's
|
|
534
|
-
current default dev branch; `disabled` prevents automatic queue creation. An
|
|
535
|
-
absent declaration behaves as `inherit` during release-line bootstrap so a new
|
|
536
|
-
major or minor line does not silently lose governance already active on the
|
|
537
|
-
previous line. Required status-check identities still come from the new
|
|
538
|
-
branch's own classic protection rather than being copied from the old branch.
|
|
539
|
-
|
|
540
|
-
Merge-queue rules also reject generated post-publish version-state ref updates.
|
|
541
|
-
When the sealed promotion workflow uses a dedicated GitHub App, user, or team
|
|
542
|
-
already declared by release governance, repeat `--bypass-app`, `--bypass-user`,
|
|
543
|
-
or `--bypass-team` to project that exact actor into the ruleset. Bypass actors
|
|
544
|
-
are never inferred and broad repository or organization roles are not accepted.
|
|
545
|
-
This keeps ordinary feature PRs on the predecessor-aligned queue path while the
|
|
546
|
-
sealed publication authority can finish its machine-verified bookkeeping. The
|
|
547
|
-
dry-run receipt exposes the exact actor IDs before `--apply` changes GitHub.
|
|
548
|
-
|
|
549
|
-
Buildchain provides the reusable
|
|
550
|
-
`.github/workflows/public-ops-dev-auto-merge.yml` workflow for repositories that want a
|
|
551
|
-
scheduled or manual "merge ready dev PRs" pass. The consumer repository owns
|
|
552
|
-
the trigger schedule, but the merge decision is declared through workflow
|
|
553
|
-
inputs: target dev branch, required status/check names, ready and block labels,
|
|
554
|
-
allowed work-branch prefixes, review requirements, maximum merges per run,
|
|
555
|
-
merge method, and dry-run mode.
|
|
556
|
-
|
|
557
|
-
Agent delivery uses the targeted Buildchain command instead of relying on a
|
|
558
|
-
scheduled scan:
|
|
559
|
-
|
|
560
|
-
```sh
|
|
561
|
-
buildchain dev pr-admit \
|
|
562
|
-
--repository kungfu-systems/example \
|
|
563
|
-
--branch dev/v3/v3.0 \
|
|
564
|
-
--pull-request 123 \
|
|
565
|
-
--expected-head 0123456789abcdef0123456789abcdef01234567
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
The default is a mutation-free plan. After reviewing it, add `--execute` to
|
|
569
|
-
establish the configured readiness label for only that PR and exact head, read
|
|
570
|
-
the state back, and attempt native queue admission. Repeating execute is
|
|
571
|
-
idempotent: an exact matching queue entry is adopted, not submitted again. A
|
|
572
|
-
stale head or base, fork, draft, block label, missing approval, failed check,
|
|
573
|
-
active predecessor, or rejected enqueue exits nonzero. Execute mode also
|
|
574
|
-
creates or updates an exact-head PR comment and named commit status containing
|
|
575
|
-
the current state, reason, receipt root, and copyable next action. The JSON
|
|
576
|
-
receipt remains the complete content-addressed evidence.
|
|
577
|
-
|
|
578
|
-
GitHub auto-merge is observed but is never readiness or admission authority.
|
|
579
|
-
Approval plus green checks plus auto-merge enabled does not qualify a PR that
|
|
580
|
-
lacks explicit Buildchain delivery intent. The targeted workflow interface
|
|
581
|
-
exposes the same contract through `expected-pr-number` and
|
|
582
|
-
`expected-head-sha`; cadence patrol runs leave those inputs empty.
|
|
583
|
-
|
|
584
|
-
The workflow defaults are conservative. A PR is skipped unless it targets the
|
|
585
|
-
configured dev line, is not a draft, has the ready label, has no block label,
|
|
586
|
-
comes from the same repository, uses an allowed work-branch prefix, has a
|
|
587
|
-
current approval, is mergeable, and has the configured required checks passing.
|
|
588
|
-
`landing-mode: auto` reads the target branch's native merge-queue state. When a
|
|
589
|
-
queue exists, Buildchain never calls the direct merge endpoint: it admits at
|
|
590
|
-
most one PR against the observed target-branch SHA and immutable PR head, then
|
|
591
|
-
calls GraphQL `enqueuePullRequest` with `expectedHeadOid`. GitHub's
|
|
592
|
-
`merge_group` checks remain the final authority for the projected merge.
|
|
593
|
-
|
|
594
|
-
The admission receipt records the expected and observed base/head SHAs, policy
|
|
595
|
-
checks, decision, reason, and active predecessor. Buildchain re-reads the base,
|
|
596
|
-
head, mergeability, and native queue immediately before enqueueing. Base or
|
|
597
|
-
head drift fails closed, an active queue entry blocks admission, and a rejected
|
|
598
|
-
ready predecessor leaves its PR open while later PRs receive
|
|
599
|
-
`blocked-by-predecessor`. Workflow concurrency serializes Buildchain-owned
|
|
600
|
-
admission runs; GitHub still owns the atomic queue and protected-ref update.
|
|
601
|
-
Repositories may explicitly select `landing-mode: direct` only when the target
|
|
602
|
-
branch has no native queue. Queue presence always disables the direct path.
|
|
603
|
-
|
|
604
|
-
For slow candidates on a frequently advancing dev line, the optional
|
|
605
|
-
[Dev Delivery Warrant Queue](dev-delivery-warrant.md) adds durable FIFO plus
|
|
606
|
-
aging scheduling before native queue admission. It separates reusable source
|
|
607
|
-
qualification from exact merge-group integration, uses expected-old Git-ref
|
|
608
|
-
updates and fenced leases, and keeps the PR head unchanged when only dev moves.
|
|
609
|
-
The reusable caller supports `off`, read-only `shadow`, and fail-closed
|
|
610
|
-
`required` rollout modes. GitHub Merge Queue remains the final protected-ref
|
|
611
|
-
authority in every mode.
|
|
612
|
-
|
|
613
|
-
The canonical consumer required check context is `check / check`, matching the
|
|
614
|
-
reusable workflow call plus its `check` job. Buildchain's own `Verify` workflow
|
|
615
|
-
emits the repository-local context `check`, so Buildchain self-promotion,
|
|
616
|
-
release-line bootstrap, and dogfood patrol wrappers pass `check` explicitly.
|
|
617
|
-
Release governance preserves the exact context emitted by the repository and
|
|
618
|
-
records branch-protection policy before/after facts; it does not rewrite one
|
|
619
|
-
context shape into the other. Consumer repositories can keep their context
|
|
620
|
-
stable while changing the actual verification command declaratively in
|
|
621
|
-
`buildchain.toml`:
|
|
622
|
-
|
|
623
|
-
Before a release caller is merged, consumers should also verify its exact
|
|
624
|
-
reusable-workflow call contract. The checker reads the caller and an already
|
|
625
|
-
checked-out exact Buildchain commit; it never resolves a floating ref or starts
|
|
626
|
-
a release. It rejects unknown or missing inputs and secrets, literal type
|
|
627
|
-
drift, insufficient permissions, untrusted event classes, and a caller pin that
|
|
628
|
-
does not equal the checked callee commit. Defaults, workflow bytes, and the
|
|
629
|
-
complete interface are bound into `contractRoot`; the receipt additionally
|
|
630
|
-
binds the caller commit/tree and both workflow digests.
|
|
631
|
-
|
|
632
|
-
```sh
|
|
633
|
-
node .buildchain/runtime/packages/core/contracts/commands/workflow-call-contract.mjs check \
|
|
634
|
-
--caller-root . \
|
|
635
|
-
--caller-workflow .github/workflows/self-release-new-version-compat.yml \
|
|
636
|
-
--caller-repository kungfu-systems/example \
|
|
637
|
-
--job promote \
|
|
638
|
-
--callee-root .buildchain/runtime \
|
|
639
|
-
--callee-workflow .github/workflows/public-release-promote.yml \
|
|
640
|
-
--callee-repository kungfu-systems/buildchain \
|
|
641
|
-
--trusted-event workflow_dispatch \
|
|
642
|
-
--trusted-event pull_request:closed \
|
|
643
|
-
--expected-contract-root "$(cat .buildchain/release-call-contract-root)" \
|
|
644
|
-
--output .buildchain/workflow-call-receipts/release-new-version.json
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
Use the runtime prepared by the central entry for this offline contract audit.
|
|
648
|
-
The caller persists a floating entry; its resolved API definition is distinct
|
|
649
|
-
from the selected execution runtime. To accept an intentional contract change,
|
|
650
|
-
review the full diagnostic and source coordinates before replacing the committed
|
|
651
|
-
contract root. This audit does not add a runtime-SHA equality gate to execution.
|
|
652
|
-
Local pre-commit rehearsal may add `--allow-dirty`; that result is marked
|
|
653
|
-
`receiptReusable: false` and cannot replace the clean exact-source receipt.
|
|
654
|
-
|
|
655
|
-
```toml
|
|
656
|
-
[lifecycle.install]
|
|
657
|
-
command = "cargo fetch --locked"
|
|
658
|
-
|
|
659
|
-
[lifecycle.verify]
|
|
660
|
-
command = "cargo test --workspace --locked"
|
|
661
|
-
```
|
|
662
|
-
|
|
663
|
-
Consumers that want Buildchain to own the check wrapper can call
|
|
664
|
-
`.github/workflows/public-build-check.yml@v4`. The wrapper runs the declared
|
|
665
|
-
`lifecycle.install` and `lifecycle.verify` stages and fails the `check` job when
|
|
666
|
-
either declaration is missing or the command exits non-zero.
|
|
667
|
-
|
|
668
|
-
Development pull requests that need source acceptance without product build or
|
|
669
|
-
artifact verification can opt into `mode: source`. That mode runs only
|
|
670
|
-
`lifecycle.install` and `lifecycle.check` on GitHub-hosted `ubuntu-24.04` while
|
|
671
|
-
preserving the stable `check / check` required-check context. Existing callers
|
|
672
|
-
remain on `mode: verify` by default, and callers may set
|
|
673
|
-
`upload-artifacts: false` without weakening the job conclusion.
|
|
674
|
-
|
|
675
|
-
Typical consumer wrapper:
|
|
676
|
-
|
|
677
|
-
```yaml
|
|
678
|
-
name: Merge Ready Dev PRs
|
|
679
|
-
|
|
680
|
-
on:
|
|
681
|
-
schedule:
|
|
682
|
-
- cron: "17 * * * *"
|
|
683
|
-
workflow_dispatch:
|
|
684
|
-
inputs:
|
|
685
|
-
dry-run:
|
|
686
|
-
type: boolean
|
|
687
|
-
default: true
|
|
688
|
-
|
|
689
|
-
jobs:
|
|
690
|
-
merge-dev:
|
|
691
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-ops-dev-auto-merge.yml@v3
|
|
692
|
-
permissions:
|
|
693
|
-
contents: write
|
|
694
|
-
pull-requests: write
|
|
695
|
-
checks: read
|
|
696
|
-
statuses: write
|
|
697
|
-
with:
|
|
698
|
-
target-branch: dev/v3/v3.0
|
|
699
|
-
required-status-checks: check / check
|
|
700
|
-
queue-admission-context: Queue admission lease
|
|
701
|
-
ready-label: ready
|
|
702
|
-
block-labels: blocked,do-not-merge
|
|
703
|
-
max-merges: 1
|
|
704
|
-
landing-mode: auto
|
|
705
|
-
dry-run: ${{ inputs.dry-run || false }}
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
When the protected branch requires a merge-group-only queue lease, the wrapper
|
|
709
|
-
posts that configured context as a temporary success status on the exact PR
|
|
710
|
-
head only after the ready, review, and required-check gates pass. It then
|
|
711
|
-
enqueues with `expectedHeadOid`; a rejected enqueue rewrites the temporary
|
|
712
|
-
status to failure, while the merge group must still produce its own final check.
|
|
713
|
-
|
|
714
|
-
## Buildchain Patrol
|
|
715
|
-
|
|
716
|
-
`public-ops-dev-auto-merge.yml` remains the focused merge primitive. For repositories
|
|
717
|
-
that want a stable day-to-day operations contract, Buildchain also exposes a
|
|
718
|
-
patrol workflow family:
|
|
719
|
-
|
|
720
|
-
| Workflow | Intended cadence | Default intent |
|
|
721
|
-
| ------------------------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
722
|
-
| `.github/workflows/public-ops-patrol-daily.yml` | daily | lightweight inspection plus ready dev PR maintenance |
|
|
723
|
-
| `.github/workflows/public-ops-patrol-weekly.yml` | weekly | release-state, passport, gate, and stale-state health checks as they are added |
|
|
724
|
-
| `.github/workflows/public-ops-patrol-monthly.yml` | monthly | governance, permission, branch-protection, and workflow drift checks as they are added |
|
|
725
|
-
| `.github/workflows/public-ops-observed-evidence.yml` | caller-selected schedule | validated immutable observation plus atomic last-known-good publication; no per-refresh PR |
|
|
726
|
-
| `.github/workflows/public-ops-stable-candidate-patrol.yml` | repository-selected release window | qualify immutable alpha candidates and open the exact source-lock stable PR |
|
|
727
|
-
|
|
728
|
-
The cadence names describe patrol intensity, not release cadence:
|
|
729
|
-
|
|
730
|
-
- daily patrol can run every day without implying a daily release;
|
|
731
|
-
- weekly patrol is for medium-cost maintenance and audit checks;
|
|
732
|
-
- monthly patrol is for structural drift checks that should not block ordinary
|
|
733
|
-
development velocity.
|
|
734
|
-
|
|
735
|
-
Every cadence result is typed `runKind: cadence-patrol` with
|
|
736
|
-
`qualification: false`. A run with no open candidates reports
|
|
737
|
-
`no-op-no-candidates`; a run where every candidate is skipped reports
|
|
738
|
-
`no-op-all-skipped`. Either no-op can keep maintenance green, but neither is a
|
|
739
|
-
delivery qualification, a targeted admission receipt, or evidence that an
|
|
740
|
-
expected PR entered the merge queue.
|
|
741
|
-
|
|
742
|
-
Stable Candidate Patrol is separate from those maintenance cadences because its
|
|
743
|
-
caller-owned cron is a release-intent window. Its candidate ledger and selection
|
|
744
|
-
remain generic; registry-specific side effects still run through the normal
|
|
745
|
-
repository `lifecycle.publish` transaction. See
|
|
746
|
-
[`stable-candidate-patrol.md`](stable-candidate-patrol.md).
|
|
747
|
-
|
|
748
|
-
Observed data that is mechanically regenerated and path-scoped uses the
|
|
749
|
-
separate [`Observed Evidence Patrol`](observed-evidence-patrol.md) contract.
|
|
750
|
-
Its one-time mechanism changes remain reviewed, while steady-state snapshot
|
|
751
|
-
refreshes publish directly from trusted default-branch schedule/manual callers.
|
|
752
|
-
|
|
753
|
-
Consumers should schedule thin callers and keep their YAML declarative. For
|
|
754
|
-
example:
|
|
755
|
-
|
|
756
|
-
```yaml
|
|
757
|
-
name: Buildchain Daily Patrol
|
|
758
|
-
|
|
759
|
-
on:
|
|
760
|
-
schedule:
|
|
761
|
-
- cron: "17 2 * * *"
|
|
762
|
-
workflow_dispatch:
|
|
763
|
-
|
|
764
|
-
jobs:
|
|
765
|
-
patrol:
|
|
766
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-ops-patrol-daily.yml@v3
|
|
767
|
-
with:
|
|
768
|
-
dry-run: false
|
|
769
|
-
max-actions: 1
|
|
770
|
-
```
|
|
771
|
-
|
|
772
|
-
Weekly and monthly callers use the matching wrapper:
|
|
773
|
-
|
|
774
|
-
```yaml
|
|
775
|
-
jobs:
|
|
776
|
-
patrol:
|
|
777
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-ops-patrol-weekly.yml@v3
|
|
778
|
-
with:
|
|
779
|
-
dry-run: true
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
All three wrappers default to the `v3` floating Buildchain runtime. When
|
|
783
|
-
`target-branch` is omitted, the caller's current/default branch selects the
|
|
784
|
-
active semver dev line, so consumers do not pin patrol to a stale minor branch.
|
|
785
|
-
The separate workflow names keep consumer schedules readable and stable while
|
|
786
|
-
Buildchain adds new checks behind the cadence wrappers.
|
|
787
|
-
|
|
788
|
-
Branch and pull-request residue uses the separate
|
|
789
|
-
[`Engineering Housekeeper`](engineering-housekeeper.md) contract. Its reusable
|
|
790
|
-
surface remains report-first, while Buildchain's committed daily, weekly, and
|
|
791
|
-
monthly callers run unattended apply across all discovered protected mainlines.
|
|
792
|
-
Only the positive temporary-development allowlist is mutable; unknown branch
|
|
793
|
-
families remain report-only. Every apply still requires the caller's explicit
|
|
794
|
-
two-part policy inputs, exact provider-state revalidation, scoped job
|
|
795
|
-
permissions, and rooted plan/report/receipt evidence.
|
|
796
|
-
|
|
797
|
-
## Package-Manager Adapters
|
|
798
|
-
|
|
799
|
-
Old ABV assumed JavaScript repositories with root version state and often
|
|
800
|
-
Lerna. Buildchain keeps the version-state contract but does not assume every
|
|
801
|
-
repository is yarn/Lerna.
|
|
802
|
-
|
|
803
|
-
The promotion action discovers and updates:
|
|
804
|
-
|
|
805
|
-
- root `package.json`;
|
|
806
|
-
- `lerna.json`;
|
|
807
|
-
- package manifests from `package.json` workspaces;
|
|
808
|
-
- package manifests from `lerna.json` packages;
|
|
809
|
-
- package manifests from `pnpm-workspace.yaml`.
|
|
810
|
-
|
|
811
|
-
It then runs the repository's detected package manager semantics where needed:
|
|
812
|
-
|
|
813
|
-
- pnpm repositories use pnpm-oriented workspace discovery;
|
|
814
|
-
- npm repositories use npm/package-lock semantics where present;
|
|
815
|
-
- yarn repositories use yarn-style metadata where present.
|
|
816
|
-
|
|
817
|
-
For Buildchain itself, version state is required. For a consumer repository that
|
|
818
|
-
has no package manifest, the same action can degrade to ref-only behavior only
|
|
819
|
-
when that is explicitly allowed by the caller.
|
|
820
|
-
|
|
821
|
-
## Lifecycle Configuration
|
|
822
|
-
|
|
823
|
-
`.buildchain/buildchain.toml` is the v3 user configuration format. It lets a repository
|
|
824
|
-
declare version-state files and lifecycle commands without pretending every
|
|
825
|
-
project is a Node workspace. Supported version files include JSON, TOML, and
|
|
826
|
-
regex-based files such as `CMakeLists.txt` or `conanfile.py`.
|
|
827
|
-
|
|
828
|
-
The promotion action consumes `version.files`, optional anchored/manual
|
|
829
|
-
`version.derived_files`, and `lifecycle.verify`.
|
|
830
|
-
The verify stage runs after generated version-state changes are applied locally
|
|
831
|
-
and before any release refs move. If `verification-command` is passed directly
|
|
832
|
-
to the action, that explicit command overrides `lifecycle.verify`.
|
|
833
|
-
|
|
834
|
-
Anchored/manual repositories may use `version.derived_files` for committed
|
|
835
|
-
version witnesses that are regenerated by `lifecycle.version-state`. The
|
|
836
|
-
release-candidate build verifies those witnesses before heavy builds and records
|
|
837
|
-
their digests with the exact alpha and release tree identities. Promotion then
|
|
838
|
-
accepts only declared version files, the anchor manifest, and those derived
|
|
839
|
-
files as differences from the tested alpha tree; release passports preserve the
|
|
840
|
-
same material binding.
|
|
841
|
-
|
|
842
|
-
Protected release-line branches keep their normal human review gate. Managed
|
|
843
|
-
`dev/vN/vN.M`, `alpha/vN/vN.M`, and `release/vN/vN.M` branches are configured
|
|
844
|
-
with one required approving review, required GitHub Actions checks, administrator
|
|
845
|
-
enforcement, conversation resolution, no force pushes, and no deletions. Each
|
|
846
|
-
target uses the exact check set, GitHub App identity, and strictness declared by
|
|
847
|
-
the governance authority descriptor. The
|
|
848
|
-
reusable `public-release-promote.yml` wrapper defaults
|
|
849
|
-
`branch-protection-bypass-apps` to `github-actions`, which lets the workflow's
|
|
850
|
-
automation identity apply generated version-state or post-publish channel
|
|
851
|
-
bookkeeping after the reviewed channel PR has merged. Direct
|
|
852
|
-
`promote-buildchain-ref` callers may opt into that one controlled bypass with
|
|
853
|
-
`branch-protection-bypass-apps: github-actions`; every other App slug and all
|
|
854
|
-
user or team bypass actors are rejected. Before
|
|
855
|
-
patching a protected generated bookkeeping ref, the action creates the
|
|
856
|
-
full configured required-check set on the exact generated version-state commit, so strict
|
|
857
|
-
status checks are satisfied by machine-verifiable Buildchain evidence rather
|
|
858
|
-
than a human PR. The protected ref PATCH itself uses the generated ref update
|
|
859
|
-
token; the reusable wrapper binds it to the run-scoped `github.token`. If direct generated
|
|
860
|
-
release finalization bookkeeping is still rejected, Buildchain creates or
|
|
861
|
-
reuses a same-repository `buildchain/version-state/*` PR and records
|
|
862
|
-
`finalization-needed=true` in the durable transaction output. Strict alpha
|
|
863
|
-
follows the same provider-enforced PR path for its alpha and dev bookkeeping.
|
|
864
|
-
The PR remains subject to the declared review, required checks, and merge-queue
|
|
865
|
-
policy; publication resumes idempotently after that protected transaction
|
|
866
|
-
lands.
|
|
867
|
-
|
|
868
|
-
For a stable release, the wrapper also checks out the exact current development
|
|
869
|
-
channel into `.buildchain/reconciliation/dev`. When the prepared next-alpha
|
|
870
|
-
commit cannot fast-forward dev because reviewed work landed concurrently, the
|
|
871
|
-
promotion action applies the next version to that checkout, regenerates every
|
|
872
|
-
declared derived version-state file, reruns the verification lifecycle, and
|
|
873
|
-
only then creates the two-parent reconciliation commit. A checkout/current-ref
|
|
874
|
-
SHA mismatch blocks reconciliation instead of committing stale projections.
|
|
875
|
-
Buildchain's own promotion workflow accepts only
|
|
876
|
-
`BUILDCHAIN_PROMOTION_BYPASS_APPS=github-actions`, defaulting to that exact App
|
|
877
|
-
when the variable is absent. Buildchain's release-line bootstrap uses the
|
|
878
|
-
administrator-scoped promotion token only to configure protection; branch
|
|
879
|
-
creation and generated ref updates use the run-scoped token. New channel
|
|
880
|
-
protection binds required checks to GitHub Actions App id `15368`, enables Code
|
|
881
|
-
Owner, stale-review, and latest-push review gates, and admits no user or team
|
|
882
|
-
bypass actor.
|
|
142
|
+
New work uses a new attempt/version. Historical incomplete attempts and already
|
|
143
|
+
published versions are not silently retargeted to new source. See
|
|
144
|
+
[Consumer recovery](bootstrap-recovery.md) and [Release discussions](release-discussions.md).
|
|
883
145
|
|
|
884
146
|
## What This Guarantees
|
|
885
147
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
- every next-major release is driven by a reviewed `release -> publish-gate/major` PR,
|
|
892
|
-
not a hidden manual button;
|
|
893
|
-
- every test channel has an exact alpha tag such as `v3.0.3-alpha.0`;
|
|
894
|
-
- every alpha minor line has a floating tag such as `v3.0-alpha`;
|
|
895
|
-
- every major with a published alpha has a cross-minor floating tag such as `v3-alpha`, owned by its highest published alpha minor;
|
|
896
|
-
- version manifests match the tag visible from the same commit;
|
|
897
|
-
- production releases are derived from the alpha tree that was tested;
|
|
898
|
-
- manual non-dry-run promotion cannot bypass PR review and verification;
|
|
899
|
-
- flow-internal automation bypasses apply only to declared GitHub Apps, users,
|
|
900
|
-
or teams on Buildchain-managed channel branch protection, while one-review
|
|
901
|
-
protection remains enforced for humans;
|
|
902
|
-
- admin users cannot make a channel promotion valid by temporarily bypassing
|
|
903
|
-
branch protection.
|
|
904
|
-
|
|
905
|
-
This is the practical meaning of "governance closed loop" in Buildchain: the
|
|
906
|
-
decision, code, version state, and Git refs close over the same evidence chain.
|
|
148
|
+
Successful terminal evidence binds the intended protected source, selected
|
|
149
|
+
runtime, artifacts, provider observations and required stage results. Exact tags,
|
|
150
|
+
registry integrity and immutable Release assets must agree with their recorded
|
|
151
|
+
publication. An existing asset may be reused only when its bytes agree; an
|
|
152
|
+
immutable collision is a failure, not permission to replace it.
|
|
907
153
|
|
|
908
154
|
## What This Does Not Do
|
|
909
155
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
evidence
|
|
914
|
-
consumer repository still owns registry truth: npm, PyPI, OCI, S3, Conan, CMake
|
|
915
|
-
packaging, download pages, dist-tags, and similar side effects must be
|
|
916
|
-
implemented by project lifecycle commands that emit Buildchain publish evidence.
|
|
917
|
-
|
|
918
|
-
Durable transaction recovery is also bound to the exact publication version
|
|
919
|
-
planned for the current run. An unfinished transaction may be resumed from the
|
|
920
|
-
current source or its history only when its recorded version matches that plan;
|
|
921
|
-
an older failed transaction that happens to be an ancestor cannot reserve its
|
|
922
|
-
old exact tag for a newer package publication.
|
|
923
|
-
|
|
924
|
-
The exact tag is also part of the durable transaction identity. If an anchored
|
|
925
|
-
package publication completed registry side effects under a stale internal tag
|
|
926
|
-
selection, a retry may rebind the unfinished `published` or `finalizing`
|
|
927
|
-
transaction to the newly planned internal tag only when the package version,
|
|
928
|
-
source, release material, target, complete artifact set, and evidence all still
|
|
929
|
-
match; the stale tag must not point at the transaction, and the requested tag
|
|
930
|
-
must be absent or already point at accepted release material. This preserves an
|
|
931
|
-
immutable tag that represents a completed transaction while allowing a tag
|
|
932
|
-
collision discovered after registry publication to recover without republishing.
|
|
933
|
-
|
|
934
|
-
For package publish transactions, the immutable public version tag points to
|
|
935
|
-
the transaction `source_sha`, so registry source metadata such as npm `gitHead`
|
|
936
|
-
and the Git tag identify the same source commit. Protected branches and mutable
|
|
937
|
-
channel tags continue to point to the generated `release_sha`. Recovery accepts
|
|
938
|
-
older completed transactions whose exact tags already point to recorded release
|
|
939
|
-
or release-material SHAs, but new tags are source-bound.
|
|
940
|
-
|
|
941
|
-
Every Buildchain publish model that can run registry side effects must bind the
|
|
942
|
-
publish entrypoint to an immutable `publish-gate/*` source lock. The reusable
|
|
943
|
-
`public-release-promote.yml@v3` wrapper creates or updates that gate ref and
|
|
944
|
-
passes `require-publish-source-lock`, `publish-source-ref`,
|
|
945
|
-
`publish-source-sha`, and `publish-source-locked` to
|
|
946
|
-
`promote-buildchain-ref`. Direct action callers must pass the same four inputs
|
|
947
|
-
from the reusable build outputs. Workflows that only collect passports or run
|
|
948
|
-
dry-run package checks do not move publish refs and are not publish-gate
|
|
949
|
-
publication models. A dry-run of `public-release-promote.yml` computes and
|
|
950
|
-
reports the exact `publish-gate/*` source lock that a real promotion would use,
|
|
951
|
-
but does not read, create, or move that ref.
|
|
952
|
-
|
|
953
|
-
Semver GitHub Release publication is owned by `promote-buildchain-ref`, not by
|
|
954
|
-
consumer shell glue. Consumers normally use the `public-release-promote.yml`
|
|
955
|
-
generated channel router, where GitHub Release publication is enabled by default and can be
|
|
956
|
-
disabled with `github-release: false`; the wrapper passes that declaration to
|
|
957
|
-
the action. After the publish transaction reaches `complete`, Buildchain creates
|
|
958
|
-
or updates the public GitHub Release and uploads the generated
|
|
959
|
-
`buildchain.release.json`, release-passport assets, and publish evidence. The
|
|
960
|
-
authoritative publication channel controls GitHub metadata: alpha is marked
|
|
961
|
-
`prerelease=true` and `make_latest=false`; release/stable/major is marked latest.
|
|
962
|
-
Semver tag syntax remains the fallback for ordinary callers without explicit
|
|
963
|
-
publication intent. For anchored/manual package releases, the public
|
|
964
|
-
release tag defaults to `v<publishedVersion>` while the internal exact
|
|
965
|
-
transaction tag remains in the release passport and release-state ref. This is
|
|
966
|
-
the supported path for downstream
|
|
967
|
-
`release.published` propagation across semver, major, and promote-only release
|
|
968
|
-
candidate publication models.
|
|
969
|
-
|
|
970
|
-
Published GitHub Release assets are immutable evidence. A repeated promotion
|
|
971
|
-
preserves an existing asset when its SHA-256 digest matches the regenerated
|
|
972
|
-
bytes, uploads only missing assets, and fails with an immutable-release
|
|
973
|
-
collision when a same-name asset has different bytes. It never deletes and
|
|
974
|
-
replaces an existing asset during retry or duplicate workflow delivery.
|
|
975
|
-
An explicit candidate recovery whose validated receipt records an already
|
|
976
|
-
complete transaction instead verifies the existing public Release Passport
|
|
977
|
-
bundle and preserves its Buildchain-owned evidence generation. Product payload
|
|
978
|
-
bytes remain digest-bound to the restored candidate, and missing product assets
|
|
979
|
-
alone may be filled from that sealed bundle. This exception is unavailable to
|
|
980
|
-
ordinary reruns or receipts from earlier transaction states.
|
|
981
|
-
|
|
982
|
-
Product payloads are included only through the explicit
|
|
983
|
-
`github-release-payload-patterns` input. Patterns match basenames inside the
|
|
984
|
-
downloaded PR-stage RC payload bundle; zero matches or duplicate public
|
|
985
|
-
basenames fail closed. This preserves the exact PR-built bytes instead of
|
|
986
|
-
rebuilding archives during promotion.
|
|
987
|
-
|
|
988
|
-
Consumers with a signed well-known discovery document can additionally provide
|
|
989
|
-
`publication-commit-command`. The advanced promotion workflow validates its
|
|
990
|
-
topology before any publish-gate or release mutation, then runs it only after
|
|
991
|
-
the GitHub Release and its immutable payload/passport assets exist. The command
|
|
992
|
-
must publicly read back the exact new payload root and emit
|
|
993
|
-
`kungfu-buildchain-publication-commit-evidence/v1`; that evidence is copied
|
|
994
|
-
into the controller artifact and exposed as workflow outputs. The previous
|
|
995
|
-
authority must remain valid on every failure. Deferred standalone binary
|
|
996
|
-
distribution is incompatible with this mode because the discovery authority
|
|
997
|
-
must be the final product mutation.
|
|
998
|
-
|
|
999
|
-
Buildchain also does not maintain bare exact tags such as `1.0.0`. The supported
|
|
1000
|
-
exact release and alpha refs are v-prefixed:
|
|
1001
|
-
|
|
1002
|
-
```text
|
|
1003
|
-
v3.0.0
|
|
1004
|
-
v3.0.1-alpha.0
|
|
1005
|
-
```
|
|
156
|
+
Local checks do not prove hosted review, publication or recovery. Publication
|
|
157
|
+
completion does not by itself prove next-development or binary distribution.
|
|
158
|
+
A dispatch, queued job, generated envelope or successful API response is not
|
|
159
|
+
terminal provider evidence. The runtime must retain and verify those facts.
|
|
1006
160
|
|
|
1007
161
|
## Operational Reading Order
|
|
1008
162
|
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
That path gives the policy first, the workflow trigger second, and the action
|
|
1021
|
-
implementation last.
|
|
163
|
+
1. [Release flow](release-flow.md) and [consumer setup](getting-started.md).
|
|
164
|
+
2. [Public pipeline](../.github/workflows/public-ops-pipeline.yml) and
|
|
165
|
+
[attempt recovery](../.github/workflows/public-ops-recover.yml).
|
|
166
|
+
3. [Pipeline implementation](../packages/core/workflow/pipeline/).
|
|
167
|
+
4. [Publication implementation](../packages/core/publication/pipeline/).
|
|
168
|
+
5. [Release discussions](release-discussions.md), [publish transactions](publish-transaction.md)
|
|
169
|
+
and [next-development](next-development-transition.md) for internal evidence.
|
|
170
|
+
|
|
171
|
+
Earlier v3 wrappers, lifecycle publication scripts and self-only promotion
|
|
172
|
+
workflows are retired consumer interfaces. Historical implementation records
|
|
173
|
+
remain in Git; they are not alternate setup instructions for this contract.
|