@kungfu-tech/buildchain 4.0.2-alpha.5 → 4.0.2-alpha.50
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 +10 -1
- package/CONTRIBUTING.md +24 -0
- package/README.md +2 -2
- package/actions/promote-buildchain-ref/README.md +1 -1
- package/actions/v4-release-candidate-promote/README.md +28 -0
- package/architecture/agent-change-map.md +70 -9
- package/architecture/ci-lane-change-budget.json +384 -0
- package/architecture/internal-capabilities.json +56 -9
- package/architecture/maintainability-debt.json +162 -107
- package/architecture/maintainability-policy.json +34 -30
- package/architecture/release-tail-contract-inventory.json +6 -6
- package/architecture/v4-architecture-constitution.md +23 -20
- package/architecture/v4-cross-platform-adopter-qualification.json +1 -1
- package/architecture/v4-delivery-authority-parity.json +2 -2
- package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +1 -1
- package/architecture/v4-floating-consumer-policy.json +2 -2
- package/architecture/v4-next-development-parity.json +5 -5
- package/architecture/v4-partial-mutation-recovery-qualification.json +4 -1
- package/architecture/v4-platform-stage-checkpoints.json +1 -1
- package/architecture/v4-provider-operation-journal-contract.json +5 -2
- package/architecture/v4-publication-facade-patches.json +64 -0
- package/architecture/v4-release-activation-shadow-domain.json +5 -2
- package/architecture/v4-release-topology.json +198 -38
- package/architecture/v4-rust-wasm-production-authority.json +58 -0
- package/architecture/v4-stable-publication-fence.json +5 -2
- package/architecture/v4-stage-capsule-qualification.json +2 -2
- package/architecture/v4-tail-reseal-parity.json +8 -6
- package/architecture/v4-universal-workflow-bootstrap.json +176 -0
- package/architecture/v4-universal-workflow-fault-campaign.json +72 -0
- package/architecture/v4-universal-workflow-train-admission.json +40 -0
- package/architecture/workflow-taxonomy.json +1462 -0
- package/bin/buildchain.mjs +7 -7
- package/contracts/buildchain-v2-residuals-v1.json +57 -48
- package/contracts/dev-delivery-authority-v2.schema.json +16 -2
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
- package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
- package/dist/site/buildchain-contract.json +93 -48
- package/dist/site/buildchain-site.json +276 -72
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/controller-registry.json +50 -13
- package/dist/site/kfd-claims.json +2610 -983
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +14 -14
- package/dist/site/node-api-registry.json +273 -127
- package/dist/site/page-registry.json +257 -53
- package/dist/site/public-surface-audit.json +3239 -1232
- package/dist/site/publication-authority-registry.json +1135 -363
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +2 -1
- package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
- package/dist/site/site-manifest.json +18 -18
- package/dist/site/workflow-registry.json +5097 -1659
- package/docs/MAP.md +2 -0
- package/docs/auditable-demo.md +1 -1
- package/docs/cli.md +21 -8
- package/docs/dev-delivery-warrant.md +1 -1
- package/docs/engineering-housekeeper.md +3 -3
- package/docs/kfd-support.md +26 -2
- package/docs/next-development-transition.md +2 -2
- package/docs/node-api-reference.md +216 -205
- package/docs/oci-publication.md +160 -0
- package/docs/publication-authority.md +2 -2
- package/docs/publish-transaction.md +36 -3
- package/docs/release-candidate.md +3 -3
- package/docs/release-flow.md +67 -19
- package/docs/release-governance.md +8 -8
- package/docs/release-passport.md +27 -2
- package/docs/reusable-build-surface.md +16 -0
- package/docs/v4-adopter-delivery.md +2 -2
- package/docs/v4-production-release.md +71 -8
- package/docs/v4-rust-wasm-production-authority.md +58 -0
- package/docs/v4-stage-capsule.md +2 -2
- package/docs/v4-tail-reseal.md +1 -1
- package/docs/workflow-catalog.md +155 -0
- package/docs/workflow-path-migration.md +109 -0
- package/package.json +12 -7
- package/packages/core/artifact-verification-envelope.js +5 -5
- package/packages/core/buildchain-contract.js +1 -1
- package/packages/core/buildchain-kfd-claims.js +2 -2
- package/packages/core/buildchain-publication-authority.js +43 -26
- package/packages/core/buildchain-v4-domain.wasm +0 -0
- package/packages/core/ci-lane-change-budget.js +14 -1
- package/packages/core/controller-evidence.js +4 -1
- package/packages/core/dev-delivery-candidate-identity.js +40 -6
- package/packages/core/dev-delivery-warrant-state.js +3 -4
- package/packages/core/dev-delivery-warrant.js +12 -2
- package/packages/core/github-governance-authority.js +4 -4
- package/packages/core/kfd-adopter-manifest.js +46 -47
- package/packages/core/next-development-projection.js +2 -2
- package/packages/core/next-development-transition.js +5 -6
- package/packages/core/oci-compose-qualification.js +140 -0
- package/packages/core/oci-publication-bundle.js +281 -0
- package/packages/core/oci-publication-graph.js +206 -0
- package/packages/core/paper-agent-entry.js +30 -4
- package/packages/core/paper-fleet.js +1 -1
- package/packages/core/paper-runtime-channels.js +348 -0
- package/packages/core/paper-scaffold-content.js +10 -0
- package/packages/core/paper.js +37 -71
- package/packages/core/publication-sealed-bundle.js +78 -13
- package/packages/core/release-line-dry-run.js +1 -1
- package/packages/core/release-passport-contract.js +5 -5
- package/packages/core/release-passport.js +5 -4
- package/packages/core/release-tail-product-capabilities.js +38 -0
- package/packages/core/release-tail-provider-plane.js +68 -1048
- package/packages/core/v4-canonical-contracts.js +15 -75
- package/packages/core/v4-domain-wasm-artifact.js +7 -0
- package/packages/core/v4-domain-wasm.js +216 -0
- package/packages/core/v4-floating-consumer-evidence.js +1 -1
- package/packages/core/v4-floating-consumer-policy.js +1 -1
- package/packages/core/v4-partial-mutation-recovery-qualification.js +9 -386
- package/packages/core/v4-product-publication.js +59 -0
- package/packages/core/v4-protected-publication-source.js +19 -21
- package/packages/core/v4-provider-operation-journal.js +18 -487
- package/packages/core/v4-provider-readback-idempotency.js +12 -97
- package/packages/core/v4-release-activation-shadow.js +13 -500
- package/packages/core/v4-release-invocation.js +28 -389
- package/packages/core/v4-stable-publication-fence.js +13 -342
- package/packages/core/v4-universal-workflow-bootstrap.js +586 -0
- package/scripts/binary-publication-evidence.mjs +135 -0
- package/scripts/build-contract-core.mjs +1 -14
- package/scripts/build-v4-domain-wasm.mjs +189 -0
- package/scripts/check-action-bundles.mjs +12 -2
- package/scripts/check-ci-lane-change-budget.mjs +4 -1
- package/scripts/check-core-mechanism-inventory.mjs +4 -3
- package/scripts/check-inventory.mjs +35 -44
- package/scripts/check-maintainability.mjs +16 -113
- package/scripts/check-v4-floating-consumer-policy-contract.mjs +2 -2
- package/scripts/check-v4-public-dogfood-contract.mjs +22 -9
- package/scripts/check-v4-release-topology.mjs +236 -50
- package/scripts/check-v4-runtime-semantic-closure.mjs +4 -1
- package/scripts/check-v4-universal-workflow-bootstrap.mjs +266 -0
- package/scripts/check-workflow-taxonomy.mjs +6 -0
- package/scripts/copy-v4-domain-wasm.mjs +14 -0
- package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
- package/scripts/dev-delivery-authority.mjs +8 -8
- package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
- package/scripts/dev-delivery-warrant-options.mjs +14 -9
- package/scripts/dev-delivery-warrant-store.mjs +73 -7
- package/scripts/dev-delivery-warrant-transition.mjs +109 -0
- package/scripts/dev-delivery-warrant.mjs +76 -99
- package/scripts/dev-pr-auto-merge.mjs +15 -15
- package/scripts/generate-channel-build-workflow.mjs +7 -2
- package/scripts/generate-channel-promotion-workflow.mjs +10 -25
- package/scripts/generate-site-bundle.mjs +11 -11
- package/scripts/generate-v4-universal-workflow-facades.mjs +497 -0
- package/scripts/generate-workflow-taxonomy.mjs +25 -0
- package/scripts/github-output.mjs +31 -0
- package/scripts/maintainability-metrics.mjs +16 -5
- package/scripts/maintainability-public-surface.mjs +115 -0
- package/scripts/next-development-review.mjs +307 -0
- package/scripts/oci-compose-preview.mjs +250 -0
- package/scripts/paper-work-fleet-cli.mjs +2 -0
- package/scripts/publication-candidate-kind.mjs +93 -0
- package/scripts/publication-candidate-sealer.mjs +16 -1
- package/scripts/release-asset-client.mjs +91 -0
- package/scripts/release-candidate-resolver.mjs +23 -35
- package/scripts/resume-from-candidate-run.mjs +11 -18
- package/scripts/site-capability-metadata.mjs +1 -0
- package/scripts/source-verification-evidence.mjs +344 -0
- package/scripts/stable-candidate-qualification.mjs +1 -1
- package/scripts/universal-facade-maintainability.mjs +91 -0
- package/scripts/v4-product-publication-intent.mjs +129 -0
- package/scripts/v4-publication-settlement.mjs +211 -0
- package/scripts/v4-universal-workflow-backflow.mjs +212 -0
- package/scripts/v4-universal-workflow-engine.mjs +620 -0
- package/scripts/v4-universal-workflow-self-dogfood.mjs +205 -0
- package/scripts/verify-version-state-delta.mjs +173 -0
- package/scripts/workflow-taxonomy.mjs +507 -0
- package/templates/native-dev-delivery.yml +4 -7
- package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
- package/templates/universal-buildchain-bootstrap.yml +28 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: oci-publication
|
|
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-07
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-6
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-09-06
|
|
16
|
+
invisible_context_boundary: No credentials or production registry state inspected.
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# OCI image family publication
|
|
20
|
+
|
|
21
|
+
Buildchain v4 can publish a sealed family of container images to GHCR through
|
|
22
|
+
`publish-artifact-kind: oci` on the public release candidate promotion workflow.
|
|
23
|
+
The candidate build produces the image bytes and smoke evidence. The built-in
|
|
24
|
+
provider verifies and uploads those bytes, reads back every public image digest,
|
|
25
|
+
then allows release references and GitHub Release evidence to converge.
|
|
26
|
+
|
|
27
|
+
## Candidate contract
|
|
28
|
+
|
|
29
|
+
Publish exactly one `oci-family.json` alongside OCI layouts and smoke JSON files
|
|
30
|
+
in the Build artifact. Import `sealOciPublicationBundle` from
|
|
31
|
+
`@kungfu-tech/buildchain/oci-publication` to validate and seal the family. Its
|
|
32
|
+
`body` contains:
|
|
33
|
+
|
|
34
|
+
- `schema: kungfu-buildchain-oci-family/v1`, consumer `repository`, exact Git
|
|
35
|
+
`sourceSha`, and candidate package `version`.
|
|
36
|
+
- `expectedImages`: the complete set of image names.
|
|
37
|
+
- `images`: one entry for each expected image, with `name`, `repository`,
|
|
38
|
+
`digest`, `layout`, `platform`, `action`, `content`, and `smoke`.
|
|
39
|
+
|
|
40
|
+
Destinations must be `ghcr.io/<consumer-owner>/<consumer-repo>/<image-name>`.
|
|
41
|
+
`layout` is a relative OCI layout directory. Each image is a single Linux
|
|
42
|
+
amd64 or arm64 manifest; OCI and Docker schema 2 manifests are supported.
|
|
43
|
+
Layouts may share blobs and an index; each shared index entry identifies its
|
|
44
|
+
image with the `org.opencontainers.image.ref.name` annotation.
|
|
45
|
+
|
|
46
|
+
`content` records the image's original `sourceSha` and `version`, matching its
|
|
47
|
+
OCI revision/version labels. For `action: built`, both equal the candidate.
|
|
48
|
+
For `action: reused`, they retain the original content provenance while the
|
|
49
|
+
family binds the current candidate. `smoke` records a relative `path` and SHA256
|
|
50
|
+
`sha256`; its JSON must identify the image and record `passed: true`. The
|
|
51
|
+
consumer owns the actual smoke command and must fail the build if it fails.
|
|
52
|
+
|
|
53
|
+
Sealing verifies all config/layer sizes and digests, platform and provenance
|
|
54
|
+
labels, smoke bytes, and family completeness. Absolute paths, traversal, and
|
|
55
|
+
symlinks are rejected. The resolver derives the exact required image artifacts
|
|
56
|
+
from this sealed family, including when recovering a previous candidate run.
|
|
57
|
+
|
|
58
|
+
## Authority and publication
|
|
59
|
+
|
|
60
|
+
The thin caller grants `packages: write` in addition to its existing promotion
|
|
61
|
+
permissions. Reusable promotion wrappers inherit that caller envelope; npm
|
|
62
|
+
consumers do not need to request package registry authority. The provider uses
|
|
63
|
+
the action token only for GHCR, scoped to each declared consumer image.
|
|
64
|
+
No consumer publish command is executed.
|
|
65
|
+
|
|
66
|
+
The rooted product plan declares version-state materialization, OCI family
|
|
67
|
+
publication, then release reference convergence. Each image uses the exact
|
|
68
|
+
`v<version>` tag. A different existing digest aborts publication; a matching
|
|
69
|
+
existing image is reused. After a partial failure, recovery validates the same
|
|
70
|
+
candidate bytes and publishes only missing images. GHCR does not provide tag
|
|
71
|
+
compare-and-swap: callers must serialize publishers for a version, and external
|
|
72
|
+
writers must not race the publication workflow.
|
|
73
|
+
|
|
74
|
+
Success requires anonymous readback of every declared image at its expected
|
|
75
|
+
digest. Existing GHCR packages must permit the repository token to write and
|
|
76
|
+
anonymous clients to pull. The provider does not change package visibility or
|
|
77
|
+
access policy. It attaches `oci-publication-readback.json` to the GitHub Release;
|
|
78
|
+
the caller should also include the family and smoke JSON files in
|
|
79
|
+
`github-release-payload-patterns`.
|
|
80
|
+
|
|
81
|
+
See [Runtime Train Validation](runtime-train-validation.md) for testing an
|
|
82
|
+
unreleased runtime without persisting a train or exact SHA in the workflow.
|
|
83
|
+
|
|
84
|
+
## Multi-platform images and Compose applications
|
|
85
|
+
|
|
86
|
+
Use `schema: kungfu-buildchain-oci-family/v2` when the family includes an OCI
|
|
87
|
+
index or a Compose application. Existing v1 families keep their published
|
|
88
|
+
single-platform contract.
|
|
89
|
+
|
|
90
|
+
An index entry declares `platform: multi-platform` and the complete `platforms`
|
|
91
|
+
array, for example `["linux/amd64", "linux/arm64"]`. Every runnable child must
|
|
92
|
+
have matching platform and content labels. Descriptor sizes, digests and media
|
|
93
|
+
types are verified recursively; nested manifests are uploaded before their
|
|
94
|
+
parent index. BuildKit attestation manifests must identify a runnable child and
|
|
95
|
+
contain matching in-toto subjects. Missing platforms, duplicate platforms,
|
|
96
|
+
foreign URLs and broken blob references fail sealing. Embedded descriptor `data`
|
|
97
|
+
is accepted only as canonical Base64 for at most 1 MiB, with the declared size
|
|
98
|
+
and digest matching the required local blob byte for byte. Malformed or
|
|
99
|
+
inconsistent embedded content fails sealing; manifests are never rewritten.
|
|
100
|
+
This follows the [OCI embedded-content contract](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#embedded-content).
|
|
101
|
+
|
|
102
|
+
A Compose entry declares `kind: compose`, `platform: compose`, and `targetImage`
|
|
103
|
+
pointing to an image in the same family. Its unique family name may differ from
|
|
104
|
+
that image, but its destination repository must match it. The immutable tag is
|
|
105
|
+
`compose-v<version>`; image entries retain `v<version>`.
|
|
106
|
+
|
|
107
|
+
The bounded Compose representation is an OCI 1.1 image manifest with
|
|
108
|
+
`artifactType: application/vnd.docker.compose.project`, an empty JSON config
|
|
109
|
+
and one `application/vnd.docker.compose.file+yaml` layer. That layer contains
|
|
110
|
+
JSON, a YAML subset, so structural verification needs no executable YAML loader.
|
|
111
|
+
Every service image is pinned to a digest and at least one uses the exact
|
|
112
|
+
family image. Environment interpolation inside other fields can remain intact.
|
|
113
|
+
These media types follow the [Docker Compose publisher](https://github.com/docker/compose/blob/v5.1.2/internal/oci/push.go).
|
|
114
|
+
|
|
115
|
+
Candidate smoke evidence describes its actual pre-publication checks. It must
|
|
116
|
+
not claim that an unpublished public Compose reference was installed. Public
|
|
117
|
+
installation qualification occurs after immutable publication and before a
|
|
118
|
+
preview alias moves.
|
|
119
|
+
|
|
120
|
+
## Evidence-gated Compose preview
|
|
121
|
+
|
|
122
|
+
An optional Compose `preview` declaration contains exactly the supported alias
|
|
123
|
+
`compose-preview`, the previously accepted `previousDigest` (or `none`), and
|
|
124
|
+
`qualificationWorkflow`, a repository workflow path. The immutable family seals
|
|
125
|
+
this policy before any publication effect.
|
|
126
|
+
|
|
127
|
+
After v4 publication is complete, dispatch that qualification workflow on the
|
|
128
|
+
exact published alpha tag. It must pull the immutable public image and Compose,
|
|
129
|
+
run fresh installation, restart, account-isolation, runtime-hardening, upgrade
|
|
130
|
+
and rollback checks, and qualify both Linux architectures. The workflow has no
|
|
131
|
+
registry write authority. Upload one artifact named
|
|
132
|
+
`oci-compose-qualification-<run-id>-<run-attempt>` containing `qualification.json`
|
|
133
|
+
and its hash-bound JSON evidence files.
|
|
134
|
+
|
|
135
|
+
The receipt uses `schema: kungfu-buildchain-compose-qualification/v1` and binds
|
|
136
|
+
`repository`, `tag`, published `sourceSha`, sealed `familyRoot`, `runId`,
|
|
137
|
+
`runAttempt`, exact `image` and `application` repository/digest references,
|
|
138
|
+
`previousDigest`, and `passed: true`. Its `checks` object requires all of
|
|
139
|
+
`freshInstall`, `restartPersistence`, `upgradePersistence`, `rollbackPersistence`,
|
|
140
|
+
`accountIsolation`, and `hardenedRuntime` to be true. Its `platforms` object
|
|
141
|
+
requires `linux/amd64` and `linux/arm64` entries with `passed: true`; `evidence`
|
|
142
|
+
contains nonempty `{path, sha256}` bindings to the actual JSON results.
|
|
143
|
+
|
|
144
|
+
A thin consumer workflow listens to completion of that qualification workflow
|
|
145
|
+
and calls `public-release-oci-compose-preview.yml@v4-alpha`, passing
|
|
146
|
+
`BUILDCHAIN_PROMOTION_TOKEN`. The reusable workflow resolves its own exact
|
|
147
|
+
runtime, enforces the dual floating-channel locks, verifies the public v4
|
|
148
|
+
settlement, family and provider readback roots, and checks the live GitHub run's
|
|
149
|
+
repository, source, workflow, event, attempt and successful conclusion. It never
|
|
150
|
+
executes the consumer's artifact files. Only then does it copy the exact Compose
|
|
151
|
+
manifest bytes to the declared alias and verify the public digest.
|
|
152
|
+
|
|
153
|
+
The expected-old digest is checked immediately before mutation. An already
|
|
154
|
+
matching target is an idempotent success; any other drift blocks the move.
|
|
155
|
+
Publishers for this alias share repository-level concurrency. GHCR has no atomic
|
|
156
|
+
tag compare-and-swap, so external writers must also avoid racing this workflow.
|
|
157
|
+
The immutable release retains the appended
|
|
158
|
+
`buildchain-compose-preview-<run-id>-<run-attempt>.json` receipt. A failed
|
|
159
|
+
qualification leaves the existing preview intact, while the immutable alpha
|
|
160
|
+
and its original publication evidence remain available for diagnosis.
|
|
@@ -227,7 +227,7 @@ buildchain audit publication-control-plane \
|
|
|
227
227
|
--source-sha <exact-merged-branch-sha> \
|
|
228
228
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
229
229
|
--workflow-ref <exact-buildchain-sha> \
|
|
230
|
-
--publisher-workflow .github/workflows/
|
|
230
|
+
--publisher-workflow .github/workflows/self-release-promote.yml \
|
|
231
231
|
--job promote \
|
|
232
232
|
--environment none
|
|
233
233
|
|
|
@@ -236,7 +236,7 @@ buildchain audit publication-control-plane \
|
|
|
236
236
|
--repository kungfu-systems/buildchain \
|
|
237
237
|
--branch dev/v3/v3.0 \
|
|
238
238
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
239
|
-
--publisher-workflow .github/workflows/
|
|
239
|
+
--publisher-workflow .github/workflows/self-release-promote.yml \
|
|
240
240
|
--job promote \
|
|
241
241
|
--environment none \
|
|
242
242
|
--npm-trust-json sanitized-npm-trust.json
|
|
@@ -8,11 +8,11 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-
|
|
11
|
+
last_reviewed: 2026-09-06
|
|
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-06
|
|
16
16
|
invisible_context: not asserted
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -113,6 +113,39 @@ a missing or different id fails before provider mutation. An absent transaction
|
|
|
113
113
|
is created only when no expected existing identity was requested. See
|
|
114
114
|
[Release Candidate: Resume from an existing candidate run](release-candidate.md#resume-from-an-existing-candidate-run).
|
|
115
115
|
|
|
116
|
+
## V4 sealed npm package sets
|
|
117
|
+
|
|
118
|
+
The v4 alpha provider accepts a sealed set of 2–64 npm tarballs with one main
|
|
119
|
+
package and same-version platform packages. The candidate resolver records each
|
|
120
|
+
package's name, version, role, relative path, size, SHA-256, and npm integrity in
|
|
121
|
+
the candidate root. QUALIFY passes the set into the Rust/WASM publication
|
|
122
|
+
planner, which binds every package to its own operation and orders platform
|
|
123
|
+
packages by name before the main package. A single package retains the existing
|
|
124
|
+
operation identity.
|
|
125
|
+
|
|
126
|
+
Use `publish-package-main` to name the main package. The optional
|
|
127
|
+
`publish-package-set-order: platforms-first-main-last` input states the same
|
|
128
|
+
ordering. Omit legacy `publish-mode` and `publish-command` inputs: the v4 provider
|
|
129
|
+
publishes the sealed tarballs through npm trusted publishing. It does not run a
|
|
130
|
+
consumer publish command.
|
|
131
|
+
|
|
132
|
+
Before any provider effect, APPLY checks the complete package inventory,
|
|
133
|
+
tarball package identities, bytes, and integrity against the rooted intent.
|
|
134
|
+
Each package receives independent registry readback and a Release Tail receipt.
|
|
135
|
+
After an interrupted attempt, existing matching versions are observed without
|
|
136
|
+
republishing; conflicting integrity stops the transaction. Release refs follow
|
|
137
|
+
only after every package is confirmed.
|
|
138
|
+
|
|
139
|
+
Anchored alpha versions such as `22.22.3-kf.5-alpha.4` remain unchanged. For
|
|
140
|
+
`anchored/manual` repositories, successful publication leaves next development
|
|
141
|
+
in `waiting-anchor`; it does not invent the next upstream anchor. Multi-package
|
|
142
|
+
stable rematerialization is not supported by this provider and fails before
|
|
143
|
+
publication. The existing singleton stable flow remains available.
|
|
144
|
+
|
|
145
|
+
The contract is exercised by `v4-product-publication-topology.test.mjs`,
|
|
146
|
+
`v4-product-provider-adapters.test.mjs`, and
|
|
147
|
+
`v4-alpha-next-development-provider.test.mjs` under `tests/`.
|
|
148
|
+
|
|
116
149
|
## Lifecycle
|
|
117
150
|
|
|
118
151
|
Repositories declare publish work in `.buildchain/buildchain.toml`:
|
|
@@ -265,7 +265,7 @@ in the release passport.
|
|
|
265
265
|
|
|
266
266
|
Standalone binary publication is a separate consumer capability. The promotion
|
|
267
267
|
wrapper does not assume that an npm-only repository provides
|
|
268
|
-
`.github/workflows/binary-distribution.yml`. Repositories that own that workflow
|
|
268
|
+
`.github/workflows/self-build-binary-distribution.yml`. Repositories that own that workflow
|
|
269
269
|
opt in with `standalone-binary-distribution: true`; Buildchain's self-promotion
|
|
270
270
|
does so explicitly. Once enabled, a missing or invalid binary workflow remains a
|
|
271
271
|
hard failure rather than being silently skipped.
|
|
@@ -303,7 +303,7 @@ short-lived admission JSON in repository-specific workflow code:
|
|
|
303
303
|
```yaml
|
|
304
304
|
publication-auto-admission: true
|
|
305
305
|
publication-auto-no-gate: true
|
|
306
|
-
publication-publisher-workflow-path: .github/workflows/
|
|
306
|
+
publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
|
|
307
307
|
publication-product: Example Product
|
|
308
308
|
publication-target: npm:@example/product
|
|
309
309
|
publication-package-name: "@example/product"
|
|
@@ -339,7 +339,7 @@ an npm package identity:
|
|
|
339
339
|
```yaml
|
|
340
340
|
publication-auto-admission: true
|
|
341
341
|
publication-auto-no-gate: true
|
|
342
|
-
publication-publisher-workflow-path: .github/workflows/
|
|
342
|
+
publication-publisher-workflow-path: .github/workflows/self-release-promote.yml
|
|
343
343
|
publication-product: Example Binary
|
|
344
344
|
publication-target: github-release:example/example-binary
|
|
345
345
|
publication-package-name: ""
|
package/docs/release-flow.md
CHANGED
|
@@ -8,17 +8,17 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-
|
|
11
|
+
last_reviewed: 2026-09-05
|
|
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-05
|
|
16
16
|
invisible_context: not asserted
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Release Flow Diagrams
|
|
20
20
|
|
|
21
|
-
This document describes
|
|
21
|
+
This document describes v4 alpha publication and the legacy v3 release flow.
|
|
22
22
|
See [Release governance](release-governance.md) for the design rationale.
|
|
23
23
|
|
|
24
24
|
## Architecture
|
|
@@ -142,7 +142,21 @@ published. Queue reconciliation runs after branch protection and before the
|
|
|
142
142
|
default-branch switch, so a failed governance apply leaves the old active line
|
|
143
143
|
in place and the idempotently created new refs can be retried.
|
|
144
144
|
|
|
145
|
-
## Alpha
|
|
145
|
+
## V4 Alpha Publication
|
|
146
|
+
|
|
147
|
+
The protected `dev/v4/v4.0 -> alpha/v4/v4.0` channel PR admits the source.
|
|
148
|
+
Publication creates the immutable `v4.0.Z-alpha.N` tag and advances the eligible
|
|
149
|
+
floating alpha refs to that published source. Its completed receipt and original
|
|
150
|
+
Release Passport remain the publication authority.
|
|
151
|
+
|
|
152
|
+
A separate protected next-development PR prepares `4.0.Z-alpha.(N+1)` on
|
|
153
|
+
`dev/v4/v4.0`. Preparing that version does not publish another exact tag or move
|
|
154
|
+
the alpha refs. A review, queue, or transient API failure in that PR leaves
|
|
155
|
+
publication complete and next-development incomplete; recovery resumes the
|
|
156
|
+
missing tail. Binary distribution has its own evidence and completion state.
|
|
157
|
+
See [What each verification proves](#what-each-verification-proves).
|
|
158
|
+
|
|
159
|
+
## Legacy V3 Alpha Promotion
|
|
146
160
|
|
|
147
161
|
```mermaid
|
|
148
162
|
sequenceDiagram
|
|
@@ -180,7 +194,7 @@ dev/vX/vX.Y
|
|
|
180
194
|
|
|
181
195
|
all point at the generated alpha version-state commit.
|
|
182
196
|
|
|
183
|
-
## Release Promotion
|
|
197
|
+
## Legacy V3 Release Promotion
|
|
184
198
|
|
|
185
199
|
```mermaid
|
|
186
200
|
sequenceDiagram
|
|
@@ -234,7 +248,7 @@ dev/vX/vX.Y
|
|
|
234
248
|
|
|
235
249
|
point at the next alpha version-state commit.
|
|
236
250
|
|
|
237
|
-
## State Machine
|
|
251
|
+
## Legacy V3 State Machine
|
|
238
252
|
|
|
239
253
|
```mermaid
|
|
240
254
|
stateDiagram-v2
|
|
@@ -249,28 +263,28 @@ stateDiagram-v2
|
|
|
249
263
|
|
|
250
264
|
The same minor line can loop through this state machine many times.
|
|
251
265
|
|
|
252
|
-
## Version Examples
|
|
266
|
+
## Legacy V3 Version Examples
|
|
253
267
|
|
|
254
|
-
Assume `
|
|
255
|
-
`alpha/
|
|
268
|
+
Assume `v3.0.2-alpha.1` has been tested and a maintainer merges
|
|
269
|
+
`alpha/v3/v3.0 -> release/v3/v3.0`.
|
|
256
270
|
|
|
257
271
|
Buildchain should produce:
|
|
258
272
|
|
|
259
273
|
```text
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
release/
|
|
274
|
+
v3.0.2 exact production tag
|
|
275
|
+
v3.0 floating minor tag
|
|
276
|
+
v3 floating major tag when v3.0 is the selected major line
|
|
277
|
+
release/v3/v3.0 production channel branch
|
|
264
278
|
```
|
|
265
279
|
|
|
266
280
|
It should also prepare:
|
|
267
281
|
|
|
268
282
|
```text
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
alpha/
|
|
273
|
-
dev/
|
|
283
|
+
v3.0.3-alpha.0 exact next alpha tag
|
|
284
|
+
v3.0-alpha floating alpha tag
|
|
285
|
+
v3-alpha floating major alpha tag when v3.0 is the highest published alpha minor
|
|
286
|
+
alpha/v3/v3.0 alpha channel branch
|
|
287
|
+
dev/v3/v3.0 development channel branch
|
|
274
288
|
```
|
|
275
289
|
|
|
276
290
|
This is expected behavior. A production release closes one patch and opens the
|
|
@@ -333,3 +347,37 @@ the current target ref contains or corresponds to the recorded
|
|
|
333
347
|
`release_material_sha`. It must then tolerate exact tags, dev refs, or alpha
|
|
334
348
|
refs that have already moved and continue filling any missing floating tags
|
|
335
349
|
before writing the transaction state as `complete`.
|
|
350
|
+
|
|
351
|
+
## What each verification proves
|
|
352
|
+
|
|
353
|
+
| Evidence | Meaning and reuse boundary |
|
|
354
|
+
| --- | --- |
|
|
355
|
+
| Full source execution | `pnpm run check` runs source tests, Rust gates, policy checks and generated artifact checks. Each Node test file runs once; the focused `check:v4-contracts` command still includes its 22 contract test files. |
|
|
356
|
+
| Merge queue proof | A successful full merge-group run seals its exact source SHA/tree, workflow, check definition, WASM runtime, toolchain versions, dependency locks, hosted image and platform. The proof expires after six hours and is verified against the completed GitHub run attempt and artifact archive digest. |
|
|
357
|
+
| Push reuse | A Dev push may reuse that exact full execution. Its summary links the original run and proof; it does not claim to have rerun tests. Missing, failed, expired, ambiguous, tampered or unavailable evidence executes the full check. |
|
|
358
|
+
| Version-state projection | Requires an authenticated full-source proof for the exact base and an ancestor-bound delta containing only declared version files and derived material. The base generator reconstructs every tracked byte, including derived digests. Any source, workflow, lock, configuration, file-mode or unexplained output change executes the full check. Projection results cannot issue a new full-source proof. |
|
|
359
|
+
| Generated version-state check | `Version-state projection / <context>` describes generated material. It never uses a protected full-source check's name on v4. Required PR lineage, review and merge queue gates remain independent. |
|
|
360
|
+
| Candidate qualification | Validates the sealed candidate, admitted runtime, source lock and publication authority. Source test reuse grants no provider mutation authority. |
|
|
361
|
+
| Provider readback and settlement | Verifies actual tags, npm integrity, release assets and native receipt roots. Publication, next-development and binary distribution are reported separately. |
|
|
362
|
+
|
|
363
|
+
The protected `check` context keeps its stable name while step names and summaries
|
|
364
|
+
identify full execution, exact proof reuse, or generated projection. The two
|
|
365
|
+
consumer-policy checks execute inside the root check, without duplicate Verify
|
|
366
|
+
pre-steps. The root check uses the Rust-only contract command before its complete
|
|
367
|
+
Node suite, removing 22 repeated test-file executions without removing tests.
|
|
368
|
+
|
|
369
|
+
The public v4 consumer remains a thin floating-channel caller with both locks.
|
|
370
|
+
Linux, macOS and Windows each execute the declared lifecycle, clean-process
|
|
371
|
+
restore and runtime/source binding. Their platform and called-runtime identities
|
|
372
|
+
differ from the source Verify lane, so a Linux source proof cannot replace them.
|
|
373
|
+
The Stage Capsule checkpoint matrix also retains all three platforms. Shared
|
|
374
|
+
platform-independent logic lives in the root check and public runtime; there is
|
|
375
|
+
no Buildchain-only dogfood exception or persisted candidate runtime selector.
|
|
376
|
+
|
|
377
|
+
A local Linux sample on 2026-09-05 measured the original full check at
|
|
378
|
+
`a41c00a0c0b2dbd57c238cd9b326b167a1d27ca8` at 148.772 seconds and the updated check
|
|
379
|
+
at 126.731 seconds, both exit 0. The original plan executed 226 Node test files
|
|
380
|
+
plus 22 duplicate selections; the updated plan executes all 231 files once,
|
|
381
|
+
including the new negative and recovery tests (2,047 tests). These are individual
|
|
382
|
+
local measurements with existing tool caches; hosted queue/push reuse is proved
|
|
383
|
+
separately by the exact run attempt and evidence roots in each job summary.
|
|
@@ -77,8 +77,8 @@ line.
|
|
|
77
77
|
|
|
78
78
|
Buildchain implements the same governance loop with:
|
|
79
79
|
|
|
80
|
-
- `.github/workflows/release-verify.yml` for PR verification;
|
|
81
|
-
- `.github/workflows/
|
|
80
|
+
- `.github/workflows/self-build-release-verify-compat.yml` for PR verification;
|
|
81
|
+
- `.github/workflows/self-release-promote.yml` for post-verify ref
|
|
82
82
|
promotion; this workflow dogfoods the declarative
|
|
83
83
|
`release-candidate-promote.yml` wrapper and does not hand-wire resolver,
|
|
84
84
|
artifact download, publish-gate, or promote action steps;
|
|
@@ -246,7 +246,7 @@ while exact tags and SHAs remain the reproducible audit choice.
|
|
|
246
246
|
### Buildchain Alpha Self-Dogfood
|
|
247
247
|
|
|
248
248
|
Buildchain continuously consumes its own current major alpha through
|
|
249
|
-
`.github/workflows/
|
|
249
|
+
`.github/workflows/self-build-alpha-dogfood.yml`. Both lanes call the
|
|
250
250
|
released channel router at `build.yml@v3-alpha`. The auto lane must resolve
|
|
251
251
|
`v3-alpha`; the explicit stable lane must resolve `v3`. Both execute the same
|
|
252
252
|
declared install, build, and verify fixture, proving that a single consumer
|
|
@@ -295,7 +295,7 @@ resolution and evidence comparison.
|
|
|
295
295
|
|
|
296
296
|
This is a post-publication consumer canary, not a release bootstrap. Source
|
|
297
297
|
verification still runs the current commit, and
|
|
298
|
-
`
|
|
298
|
+
`self-release-promote.yml` still passes the verified exact SHA into the
|
|
299
299
|
promotion workflow. Patrol, dev-merge, repair, and promotion defaults remain on
|
|
300
300
|
stable or exact refs so a broken alpha cannot prevent Buildchain from publishing
|
|
301
301
|
its fix. When Buildchain opens a new major, inventory validation requires this
|
|
@@ -526,7 +526,7 @@ The repository policy can be declared once instead of repeated as CLI flags:
|
|
|
526
526
|
```toml
|
|
527
527
|
[governance.dev.merge_queue]
|
|
528
528
|
mode = "inherit"
|
|
529
|
-
required_workflows = [".github/workflows/verify.yml"]
|
|
529
|
+
required_workflows = [".github/workflows/self-build-verify.yml"]
|
|
530
530
|
```
|
|
531
531
|
|
|
532
532
|
`enabled` explicitly requires Buildchain to create or update an exact-branch
|
|
@@ -632,7 +632,7 @@ binds the caller commit/tree and both workflow digests.
|
|
|
632
632
|
```sh
|
|
633
633
|
node .buildchain/workflow-contract-runtime/scripts/workflow-call-contract.mjs check \
|
|
634
634
|
--caller-root . \
|
|
635
|
-
--caller-workflow .github/workflows/release-new-version.yml \
|
|
635
|
+
--caller-workflow .github/workflows/self-release-new-version-compat.yml \
|
|
636
636
|
--caller-repository kungfu-systems/example \
|
|
637
637
|
--job promote \
|
|
638
638
|
--callee-root .buildchain/workflow-contract-runtime \
|
|
@@ -1009,8 +1009,8 @@ v3.0.1-alpha.0
|
|
|
1009
1009
|
When debugging or extending release behavior, read in this order:
|
|
1010
1010
|
|
|
1011
1011
|
1. `docs/release-flow.md`
|
|
1012
|
-
2. `.github/workflows/release-verify.yml`
|
|
1013
|
-
3. `.github/workflows/
|
|
1012
|
+
2. `.github/workflows/self-build-release-verify-compat.yml`
|
|
1013
|
+
3. `.github/workflows/self-release-promote.yml`
|
|
1014
1014
|
4. `.github/workflows/release-candidate-promote.yml`
|
|
1015
1015
|
5. `.github/workflows/.release-candidate-promote.yml`
|
|
1016
1016
|
6. `actions/promote-buildchain-ref/README.md`
|
package/docs/release-passport.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: generic-kfd-adopter-binding
|
|
5
|
+
doc_type: 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-06
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-6
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-09-06
|
|
16
|
+
visible_context: Buildchain v3 implementation and v4 source and regression tests.
|
|
17
|
+
invisible_context_boundary: No credentials or private runtime evidence inspected.
|
|
18
|
+
---
|
|
19
|
+
|
|
1
20
|
# Release Passport
|
|
2
21
|
|
|
3
22
|
Buildchain Release Passport is the core product mechanism: a mature product
|
|
@@ -403,8 +422,14 @@ Pass the standard full-cut declaration with `--kfd-adopter-manifest-json`
|
|
|
403
422
|
together with three `--kfd-product-gate-json` arguments for KFD-4, KFD-5, and
|
|
404
423
|
KFD-7. The collector invokes the verifier from the exact installed
|
|
405
424
|
`@kungfu-tech/kfd` package, binds the package artifact, registry and verifier
|
|
406
|
-
roots, the exact
|
|
407
|
-
and the existing product-gate roots.
|
|
425
|
+
roots, the collector's exact product repository and source, the
|
|
426
|
+
manifest/report/bundle witness roots, and the existing product-gate roots. A
|
|
427
|
+
non-Buildchain adopter is accepted only when its manifest identity, artifact
|
|
428
|
+
coordinate, and all three product-gate repositories match the collector's
|
|
429
|
+
`--repository` value. The lower-level Node API exposes the same boundary as
|
|
430
|
+
`expectedAdopterId`, `expectedSourceRepository`, and `expectedSourceSha`, while
|
|
431
|
+
omitted identity/repository values retain the Buildchain self-release default.
|
|
432
|
+
It emits `kfd-adopter-manifest.json`,
|
|
408
433
|
`kfd-adopter-manifest-gate.json`, and a legacy `kfd-support.json` projection.
|
|
409
434
|
The release passport and `artifact-evidence.json` carry the same rooted
|
|
410
435
|
`kfdAdopter` binding.
|
|
@@ -132,6 +132,22 @@ See the normative
|
|
|
132
132
|
and its machine declaration for the exact acceptance boundary. This policy does
|
|
133
133
|
not change v3 behavior.
|
|
134
134
|
|
|
135
|
+
### Universal Bootstrap verified-caller admission
|
|
136
|
+
|
|
137
|
+
The v4 Universal Bootstrap does not maintain a repository allowlist. Any
|
|
138
|
+
repository that can call the public reusable workflow may submit the single
|
|
139
|
+
versioned request envelope. Admission still fails closed unless the request's
|
|
140
|
+
consumer repository, caller workflow path, and source SHA exactly match the
|
|
141
|
+
GitHub-observed caller context.
|
|
142
|
+
|
|
143
|
+
Open consumer admission does not mean open execution authority. The candidate
|
|
144
|
+
must still be an exact Buildchain SHA selected through a governed discovery
|
|
145
|
+
ref, bind the current candidate-owned admission root, have exact-head
|
|
146
|
+
independent review and required checks, request an admitted capability and
|
|
147
|
+
contract-root set, stay within the permission ceiling and validity window, and
|
|
148
|
+
inherit only authority available from the caller. The candidate engine exposes
|
|
149
|
+
bounded capability adapters; it does not accept caller-provided shell or code.
|
|
150
|
+
|
|
135
151
|
## Advanced Workflow
|
|
136
152
|
|
|
137
153
|
Consumers that need direct workflow-shell or runtime control call the advanced
|
|
@@ -110,12 +110,12 @@ artifact_profile_selector = "package"
|
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
The public reusable workflow is
|
|
113
|
-
`kungfu-systems/buildchain/.github/workflows/
|
|
113
|
+
`kungfu-systems/buildchain/.github/workflows/public-build-adopter-qualification.yml@v4` for
|
|
114
114
|
stable use and `@v4-alpha` during prerelease evaluation. It resolves the exact
|
|
115
115
|
called-workflow SHA, enforces floating selector plus dual-lock consumer
|
|
116
116
|
admission, and runs the same CLI on Linux, macOS, and Windows. Buildchain
|
|
117
117
|
dogfoods it through the thin
|
|
118
|
-
[`
|
|
118
|
+
[`self-build-adopter-dogfood.yml`](../.github/workflows/self-build-adopter-dogfood.yml)
|
|
119
119
|
caller, which contains no steps or local orchestration and persists only the
|
|
120
120
|
floating `@v4-alpha` selector.
|
|
121
121
|
|
|
@@ -7,12 +7,12 @@ source_level: repository-contracts + protected-provider-readback
|
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
|
-
review_state:
|
|
11
|
-
last_reviewed: 2026-
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-09-05
|
|
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-05
|
|
16
16
|
invisible_context: Provider credentials and private provider state were not read.
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -26,8 +26,9 @@ dev/v4/v4.0 -> alpha/v4/v4.0 -> release/v4/v4.0
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Public consumers use `v4-alpha` for the current prerelease channel and `v4`
|
|
29
|
-
for stable
|
|
30
|
-
|
|
29
|
+
for stable, with matching stable and alpha contract locks. Exact commits and
|
|
30
|
+
immutable release tags identify retained evidence and explicitly admitted runtime
|
|
31
|
+
inputs; tracked v4 reusable-workflow selectors remain `@v4` or `@v4-alpha`.
|
|
31
32
|
|
|
32
33
|
The release transaction is fail-closed. The v4 provider-operation journal,
|
|
33
34
|
activation plan, stable publication fence, and partial-mutation recovery plan
|
|
@@ -51,8 +52,9 @@ exact alpha tag, and npm's `alpha` tag.
|
|
|
51
52
|
## Non-destructive rollback
|
|
52
53
|
|
|
53
54
|
Rollback never rewrites an exact tag, release, package version, Passport, or
|
|
54
|
-
provider journal. Stop forward promotion
|
|
55
|
-
|
|
55
|
+
provider journal. Stop forward promotion and select the last verified exact
|
|
56
|
+
v4 runtime through an admitted, non-persistent recovery input; keep tracked v4
|
|
57
|
+
workflow selectors on their locked floating channel. Use `release/v3/v3.0`
|
|
56
58
|
coordinate only as an explicit compatibility rollback reference. Restoring v3
|
|
57
59
|
as production authority requires a new reviewed cutover; it is not an implicit
|
|
58
60
|
fallback.
|
|
@@ -61,3 +63,64 @@ Before any retry, compare the current provider state with the retained
|
|
|
61
63
|
transaction and operation roots. Resume only missing eligible operations.
|
|
62
64
|
Conflicting state remains `repair-required` or terminal and must not be
|
|
63
65
|
converted into success by moving a floating ref.
|
|
66
|
+
|
|
67
|
+
## Publication settlement and binary recovery
|
|
68
|
+
|
|
69
|
+
Publication, next-development advancement, and binary distribution have separate
|
|
70
|
+
results. A completed native ReleaseReceipt remains publication evidence when the
|
|
71
|
+
later generated Dev PR is still pending or its enqueue call fails. SETTLE verifies
|
|
72
|
+
the immutable invocation, transaction, both provider states, receipt and Passport
|
|
73
|
+
roots even when APPLY fails after publication. It has no provider write permission.
|
|
74
|
+
|
|
75
|
+
APPLY retains that exact chain before waiting for next-development in the existing GitHub Release as
|
|
76
|
+
`buildchain-publication-settlement.json`; it reads the exact tag and original
|
|
77
|
+
`buildchain.release.json` before adding the packet. The APPLY artifact also retains
|
|
78
|
+
`delivery-summary.json`, which reports publication and next-development separately.
|
|
79
|
+
A green workflow label cannot substitute for this receipt verification.
|
|
80
|
+
|
|
81
|
+
Binary Distribution reads this settlement and the original publication Passport.
|
|
82
|
+
Tag creation can precede settlement, so it waits at most 40 observations, 15 seconds
|
|
83
|
+
apart, for missing evidence. A mismatched source, tag, Passport or receipt fails
|
|
84
|
+
immediately. It no longer requires a legacy `buildchain/release-state/*` ref for v4.
|
|
85
|
+
|
|
86
|
+
The sealed binary publisher retains the publication Passport and writes its own
|
|
87
|
+
Passport as `buildchain.binary.release.json`. All v4 asset collisions are checked
|
|
88
|
+
before uploads: identical bytes are preserved, absent assets are added, and
|
|
89
|
+
conflicting bytes are rejected. Each publication authorization is retained as
|
|
90
|
+
`buildchain.binary.capability-<sha256>.json`, so a fresh recovery capability does
|
|
91
|
+
not overwrite an earlier grant. Existing assets are never clobbered. Recovery uses
|
|
92
|
+
the same exact successful Binary Distribution evidence run through
|
|
93
|
+
`self-release-binary-assets.yml`; it does not rebuild already admitted archives or
|
|
94
|
+
create another npm version. Read back all three platform archives, checksums,
|
|
95
|
+
both Passports and the settlement packet before declaring distribution complete.
|
|
96
|
+
|
|
97
|
+
The native publication receipt authorizes no stable promotion and makes no claim
|
|
98
|
+
that a pending next-development PR has merged. Inspect the exact PR head, protected
|
|
99
|
+
base and merge result independently. A retry of the publication phase must first
|
|
100
|
+
read retained provider facts and resume only missing operations.
|
|
101
|
+
|
|
102
|
+
## Automatic next-development review
|
|
103
|
+
|
|
104
|
+
`self-release-next-development.yml` observes a successful exact `Verify` PR run
|
|
105
|
+
for a same-repository `chore/next-development/*` branch. It executes only the
|
|
106
|
+
protected default branch runtime. The PR must have one parent equal to the
|
|
107
|
+
current protected Dev head. The protected generator reconstructs every tracked
|
|
108
|
+
byte, permits only the declared immediate alpha version increment, and verifies
|
|
109
|
+
the completed alpha settlement against the exact tag and original Passport.
|
|
110
|
+
The published source tree must equal the protected development base tree.
|
|
111
|
+
|
|
112
|
+
The verification step receives no approval credential and never executes PR
|
|
113
|
+
code. A separate step uses `BUILDCHAIN_APPROVAL_TOKEN`, verifies that its identity
|
|
114
|
+
is the independent `kungfu-origin` CODEOWNER, rereads the exact PR/run/base, and
|
|
115
|
+
approves only that commit. Existing requests for changes stop automation.
|
|
116
|
+
The exact approval is read back before queue admission with the separate
|
|
117
|
+
`BUILDCHAIN_PROMOTION_TOKEN`. Required checks, CODEOWNER protection and native
|
|
118
|
+
merge-group verification remain enforced. Missing credentials or evidence,
|
|
119
|
+
forks, source changes and base/head drift fail closed.
|
|
120
|
+
|
|
121
|
+
The producer waits for pending independent review and required checks with a
|
|
122
|
+
bounded retry budget. Publication evidence is already durable during this wait,
|
|
123
|
+
so binaries can proceed independently. The reviewer also enqueues the verified
|
|
124
|
+
head idempotently, allowing a producer interruption to leave a recoverable PR.
|
|
125
|
+
An interrupted producer run remains failed; a successful later release is needed
|
|
126
|
+
to establish an uninterrupted end-to-end publication.
|