@kungfu-tech/buildchain 3.0.3-alpha.0 → 3.0.3-alpha.2
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 +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +32 -1
- package/actions/promote-buildchain-ref/README.md +90 -19
- package/actions/report-buildchain-issue/README.md +19 -1
- package/actions/run-lifecycle/README.md +5 -0
- package/actions/validate-config/README.md +19 -1
- package/bin/buildchain.mjs +41 -241
- package/bin/internal/command-registry.mjs +82 -0
- package/bin/internal/trust-release-cli.mjs +1 -0
- package/contracts/auditable-demo-media-profiles-v1.json +116 -1
- package/contracts/buildchain-v2-residuals-v1.json +0 -45
- package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +143 -0
- package/contracts/evidence/auditable-demo-web-delivery-v1.json +7 -3
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/complete-transcript.txt +2 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/public-projection.json +16 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/scene.json +12 -0
- package/dist/site/buildchain-contract.json +161 -42
- package/dist/site/buildchain-site.json +180 -84
- package/dist/site/capability-registry.json +6 -6
- package/dist/site/cli-registry.json +932 -98
- package/dist/site/controller-registry.json +97 -5
- package/dist/site/kfd-claims.json +316 -23
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +20 -20
- package/dist/site/node-api-registry.json +371 -56
- package/dist/site/page-registry.json +155 -59
- package/dist/site/public-surface-audit.json +286 -24
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +3 -0
- package/dist/site/site-manifest.json +24 -24
- package/dist/site/workflow-registry.json +570 -79
- package/docs/MAP.md +22 -4
- package/docs/auditable-demo.md +35 -12
- package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
- package/docs/cli.md +143 -12
- package/docs/consumer-issue-reporting.md +19 -1
- package/docs/github-governance-authority.md +2 -2
- package/docs/lifecycle-protocol.md +20 -2
- package/docs/migration-inventory.md +24 -5
- package/docs/ownership.md +19 -1
- package/docs/publication-artifacts.md +185 -18
- package/docs/publication-authority.md +4 -4
- package/docs/publish-transaction.md +78 -31
- package/docs/release-candidate.md +24 -0
- package/docs/release-flow.md +50 -32
- package/docs/release-governance.md +31 -31
- package/docs/release-passport.md +4 -0
- package/docs/release-propagation.md +57 -12
- package/docs/reusable-build-surface.md +95 -27
- package/docs/runtime-train-validation.md +20 -2
- package/docs/stable-candidate-patrol.md +6 -6
- package/docs/toolkit-observability.md +22 -0
- package/docs/versioning.md +6 -4
- package/docs/web-surface-deployments.md +62 -0
- package/package.json +7 -5
- package/packages/core/README.md +61 -4
- package/packages/core/buildchain-contract.js +8 -4
- package/packages/core/cache-evidence.js +1 -0
- package/packages/core/diagnostics.js +105 -30
- package/packages/core/github-governance-authority.js +10 -25
- package/packages/core/index.js +40 -0
- package/packages/core/paper-fleet.js +260 -0
- package/packages/core/paper-repository.js +210 -0
- package/packages/core/paper-work.js +365 -0
- package/packages/core/paper.js +3180 -0
- package/packages/core/public-surface-audit.js +26 -75
- package/packages/core/public-surface-cli.js +117 -0
- package/packages/core/publication-artifact.js +1 -6
- package/packages/core/publication-authority.js +1 -0
- package/packages/core/publication-reproducibility.js +947 -0
- package/packages/core/publication-sealed-bundle.js +190 -0
- package/packages/core/publish-transaction.js +147 -17
- package/packages/core/release-candidate.js +234 -0
- package/packages/core/release-passport.js +483 -201
- package/packages/core/release-propagation.js +175 -1
- package/scripts/auditable-demo.mjs +119 -5
- package/scripts/aws-codebuild-toolchain.mjs +285 -0
- package/scripts/aws-macos-jit-core.mjs +378 -0
- package/scripts/aws-macos-jit.mjs +123 -0
- package/scripts/aws-runner-burst-core.mjs +248 -0
- package/scripts/aws-runner-burst.mjs +79 -0
- package/scripts/aws-windows-jit-core.mjs +374 -0
- package/scripts/aws-windows-jit.mjs +121 -0
- package/scripts/build-contract-core.mjs +69 -6
- package/scripts/build-standalone-binary.mjs +23 -0
- package/scripts/buildchain-cli-help.mjs +256 -0
- package/scripts/buildchain-contract-lock.mjs +1 -1
- package/scripts/check-internal-architecture.mjs +69 -2
- package/scripts/check-inventory.mjs +69 -2
- package/scripts/check-javascript-syntax.mjs +31 -0
- package/scripts/check-maintainability.mjs +371 -0
- package/scripts/compiler-cache-evidence.mjs +221 -0
- package/scripts/dev-alpha-candidate-patrol.mjs +268 -43
- package/scripts/finalize-native-artifact-signing-result.mjs +75 -4
- package/scripts/generate-channel-promotion-workflow.mjs +3 -12
- package/scripts/generate-release-candidate-passport.mjs +4 -0
- package/scripts/generate-site-bundle.mjs +68 -188
- package/scripts/import-artifact-signing-results.mjs +64 -5
- package/scripts/inspect-artifact-signing-requests.mjs +7 -0
- package/scripts/maintainability-metrics.mjs +339 -0
- package/scripts/npm-publish-transaction.mjs +57 -6
- package/scripts/paper-work-fleet-cli.mjs +563 -0
- package/scripts/paper.mjs +631 -0
- package/scripts/promotion-channel-router.mjs +16 -4
- package/scripts/publication-reproducibility.mjs +62 -0
- package/scripts/release-propagation.mjs +39 -0
- package/scripts/resolve-build-contract.mjs +6 -0
- package/scripts/route-offline-runners.mjs +236 -0
- package/scripts/run-lifecycle-core.mjs +62 -1
- package/scripts/runtime-ref-core.mjs +23 -2
- package/scripts/seal-artifact-signing-requests.mjs +13 -6
- package/scripts/site-capability-metadata.mjs +202 -0
- package/scripts/stable-candidate-qualification.mjs +42 -0
- package/scripts/web-surface-core.mjs +272 -86
|
@@ -132,6 +132,13 @@ This lets a site repository render the latest reader page and historical
|
|
|
132
132
|
version index from release facts while keeping old PDFs, source bundles,
|
|
133
133
|
manifests, and passports immutable.
|
|
134
134
|
|
|
135
|
+
When the downstream consumer is expected to update an exact npm paper pin, the
|
|
136
|
+
upstream envelope must carry both `package` and `publicationArtifact`. The
|
|
137
|
+
consumer can then prove that package name, version, sha512 integrity,
|
|
138
|
+
publication URLs, and immutable artifact digests all describe the same release.
|
|
139
|
+
`publicationArtifact` without `package` remains valid for evidence-only
|
|
140
|
+
propagation, but it cannot qualify a package-pin fast path.
|
|
141
|
+
|
|
135
142
|
## CLI
|
|
136
143
|
|
|
137
144
|
Generate a propagation plan:
|
|
@@ -164,7 +171,34 @@ The written lock has contract
|
|
|
164
171
|
- release passport URL and SHA-256;
|
|
165
172
|
- optional site bundle manifest SHA-256;
|
|
166
173
|
- downstream repository, channel, base ref, lock path;
|
|
167
|
-
- edge id and channel policy
|
|
174
|
+
- edge id and channel policy;
|
|
175
|
+
- a deterministic propagation key and branch derived from the exact upstream
|
|
176
|
+
repository/version/channel plus downstream repository.
|
|
177
|
+
|
|
178
|
+
Repeated runs for the same release identity reuse that branch and lock. A
|
|
179
|
+
different release version or channel receives a different branch, so concurrent
|
|
180
|
+
releases cannot collapse into one mutable propagation PR.
|
|
181
|
+
|
|
182
|
+
Create the exact propagation receipt after the lock/PR outcome is known:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
buildchain release-propagation receipt \
|
|
186
|
+
--plan .buildchain/release-propagation-plan.json \
|
|
187
|
+
--lock-result .buildchain/release-propagation-write-lock.json \
|
|
188
|
+
--pr-outcome .buildchain/release-propagation-pr-outcome.json \
|
|
189
|
+
--target site-libkungfu-dev \
|
|
190
|
+
--output .buildchain/release-propagation-receipt.json \
|
|
191
|
+
--json
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The receipt keeps four machine states separate:
|
|
195
|
+
|
|
196
|
+
- `package-published`: exact npm name/version/integrity exists;
|
|
197
|
+
- `alpha-complete`: the upstream alpha passport/tag is complete;
|
|
198
|
+
- `staging-visible`: the downstream staging surface is actually visible;
|
|
199
|
+
- `production-visible`: the production surface is actually visible.
|
|
200
|
+
|
|
201
|
+
Package publication or alpha completion never implies either visibility state.
|
|
168
202
|
|
|
169
203
|
## Reusable Workflow
|
|
170
204
|
|
|
@@ -181,7 +215,11 @@ jobs:
|
|
|
181
215
|
upstream-release-json: ${{ needs.release.outputs.upstream-release-json }}
|
|
182
216
|
downstream-target: site-libkungfu-dev
|
|
183
217
|
downstream-repository: kungfu-systems/site-libkungfu-dev
|
|
184
|
-
downstream-base-ref:
|
|
218
|
+
downstream-base-ref: dev/v2/v2.7
|
|
219
|
+
downstream-update-command: >-
|
|
220
|
+
node scripts/paper-propagation.cjs consume
|
|
221
|
+
--lock "$BUILDCHAIN_PROPAGATION_LOCK_PATH"
|
|
222
|
+
&& corepack pnpm install --lockfile-only --ignore-scripts
|
|
185
223
|
downstream-prepare-command: pnpm install --frozen-lockfile --ignore-scripts
|
|
186
224
|
downstream-verify-command: pnpm run check
|
|
187
225
|
dry-run: false
|
|
@@ -201,8 +239,14 @@ open PR.
|
|
|
201
239
|
The workflow checks out the Buildchain runtime selected by
|
|
202
240
|
`buildchain-repository` and `buildchain-ref` into `.buildchain/runtime`, invokes
|
|
203
241
|
that runtime for the propagation plan and lock write, then checks out the
|
|
204
|
-
downstream repository and writes the exact lock.
|
|
205
|
-
|
|
242
|
+
downstream repository and writes the exact lock. If
|
|
243
|
+
`downstream-update-command` is set, Buildchain runs that consumer-owned command
|
|
244
|
+
after writing the lock and exposes the exact lock path, lock SHA-256,
|
|
245
|
+
propagation key, branch, and upstream release JSON as
|
|
246
|
+
`BUILDCHAIN_PROPAGATION_*` environment variables. The command is part of the
|
|
247
|
+
downstream PR diff; it is not a deployment hook.
|
|
248
|
+
|
|
249
|
+
A consumer that must perform further deterministic preparation can declare
|
|
206
250
|
`downstream-prepare-command`. The command receives
|
|
207
251
|
`BUILDCHAIN_UPSTREAM_PACKAGE_NAME`, `BUILDCHAIN_UPSTREAM_PACKAGE_VERSION`, and
|
|
208
252
|
`BUILDCHAIN_UPSTREAM_RELEASE_LOCK`. After preparation, Buildchain refreshes an
|
|
@@ -210,14 +254,15 @@ existing `<!-- buildchain:badges:start -->` README block by default. Consumers
|
|
|
210
254
|
can disable that step with `refresh-managed-readme-badges: false`.
|
|
211
255
|
|
|
212
256
|
`downstream-verify-command` runs against the final tree before any commit or
|
|
213
|
-
push, so consumers can use the same check as their PR workflow.
|
|
214
|
-
badge refresh, and verification failures all fail closed. The
|
|
215
|
-
the complete deterministic result, signs the propagation
|
|
216
|
-
then opens or updates the PR. It does not publish the
|
|
217
|
-
directly. The downstream repository keeps its normal
|
|
218
|
-
PR updates source-of-truth facts, then downstream
|
|
219
|
-
runs through its own protected channel. A
|
|
220
|
-
successful no-op.
|
|
257
|
+
push, so consumers can use the same check as their PR workflow. Update,
|
|
258
|
+
preparation, badge refresh, and verification failures all fail closed. The
|
|
259
|
+
workflow stages the complete deterministic result, signs the propagation
|
|
260
|
+
commit with DCO, and then opens or updates the PR. It does not publish the
|
|
261
|
+
downstream release directly. The downstream repository keeps its normal
|
|
262
|
+
Buildchain governance: the PR updates source-of-truth facts, then downstream
|
|
263
|
+
alpha or release publication runs through its own protected channel. A
|
|
264
|
+
byte-identical rerun is an explicit successful no-op.
|
|
265
|
+
|
|
221
266
|
For unreleased runtime validation, keep the caller's reusable workflow reference
|
|
222
267
|
on `@v3` and pass a temporary train ref through `buildchain-ref`.
|
|
223
268
|
|
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-07-
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
@@ -18,7 +18,7 @@ ai_provenance:
|
|
|
18
18
|
|
|
19
19
|
# Reusable Build Surface
|
|
20
20
|
|
|
21
|
-
Buildchain
|
|
21
|
+
Buildchain v3 provides a reusable build workflow for repositories that need
|
|
22
22
|
Buildchain's release semantics but cannot be described as a simple Node package.
|
|
23
23
|
The first target shape is `libnode`: expensive native builds, multiple operating
|
|
24
24
|
systems, self-hosted runner labels, and release artifacts that must be auditable.
|
|
@@ -31,9 +31,8 @@ only signs and verifies immutable data. See
|
|
|
31
31
|
|
|
32
32
|
## Automatic Channel Router
|
|
33
33
|
|
|
34
|
-
The preferred consumer surface is one reusable workflow call.
|
|
35
|
-
|
|
36
|
-
development and stable release work:
|
|
34
|
+
The preferred consumer surface is one reusable workflow call. Consumers keep
|
|
35
|
+
this configuration for both alpha development and stable release work:
|
|
37
36
|
|
|
38
37
|
```yaml
|
|
39
38
|
jobs:
|
|
@@ -79,10 +78,10 @@ with:
|
|
|
79
78
|
buildchain-channel: stable
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
During
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
During v3 prerelease evaluation windows, canaries use `build.yml@v3-alpha`.
|
|
82
|
+
The same router then selects `v3-alpha` or stable `v3` as the runtime.
|
|
83
|
+
Production consumers use `build.yml@v3`; this keeps the routing shell itself on
|
|
84
|
+
a stable ref.
|
|
86
85
|
|
|
87
86
|
The router is generated from `.build.yml`'s input/output surface. Run
|
|
88
87
|
`node scripts/generate-channel-build-workflow.mjs` after changing the advanced
|
|
@@ -123,6 +122,27 @@ jobs:
|
|
|
123
122
|
| `kungfu-v4-native` | Kungfu Linux x64, Linux ARM64, macOS ARM64, and Windows x64; Linux ARM64 uses GitHub-hosted `ubuntu-24.04-arm` |
|
|
124
123
|
| `custom` | Requires `platforms-json` |
|
|
125
124
|
|
|
125
|
+
Set `self-hosted-offline-fallback: true` to inspect every exact-label
|
|
126
|
+
self-hosted lane from the trusted Buildchain workflow shell before the matrix
|
|
127
|
+
starts. A lane with no matching online runner is replaced independently by its
|
|
128
|
+
supported GitHub-hosted runner: Kungfu Linux x64 uses `ubuntu-24.04`, macOS ARM64
|
|
129
|
+
uses `macos-15`, and Windows x64 uses `windows-2022`. Online-but-busy runners
|
|
130
|
+
remain online and keep their declared self-hosted route. Organization-owned
|
|
131
|
+
repositories inspect organization runner inventory so selected-repository runner
|
|
132
|
+
groups are not mistaken for an empty repository runner inventory. If the
|
|
133
|
+
inventory token, permission, or API is unavailable, Buildchain preserves the
|
|
134
|
+
original matrix instead of guessing that the fleet is offline. The public
|
|
135
|
+
workflow output `runner-routing-json` records only de-identified counts,
|
|
136
|
+
inventory scope, and routing decisions.
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
with:
|
|
140
|
+
runner-preset: kungfu-v4-native
|
|
141
|
+
self-hosted-offline-fallback: true
|
|
142
|
+
secrets:
|
|
143
|
+
BUILDCHAIN_PROMOTION_TOKEN: ${{ secrets.KUNGFU_GITHUB_TOKEN }}
|
|
144
|
+
```
|
|
145
|
+
|
|
126
146
|
Callers can still provide a custom matrix with `platforms-json`. Each platform
|
|
127
147
|
object has:
|
|
128
148
|
|
|
@@ -275,16 +295,23 @@ Allowed override refs are deliberately narrow:
|
|
|
275
295
|
| `<40-character SHA>` | Exact immutable Buildchain runtime commit |
|
|
276
296
|
|
|
277
297
|
Override requests fail closed unless the event is `workflow_dispatch` and the
|
|
278
|
-
actor has write, maintain, or admin permission on the caller repository.
|
|
298
|
+
actor has write, maintain, or admin permission on the caller repository. One
|
|
299
|
+
non-override exact-pin case is also admitted: when the reusable workflow itself
|
|
300
|
+
is invoked from an exact Buildchain SHA and `buildchain-ref` names that identical
|
|
301
|
+
SHA, the run records `pinned-self`. The input cannot select code other than the
|
|
302
|
+
already-running workflow shell, so protected push and pull-request publication
|
|
303
|
+
jobs can retain one immutable runtime root. Different SHA and train requests
|
|
304
|
+
still fail closed outside trusted manual dispatch.
|
|
305
|
+
|
|
279
306
|
Pull requests, including same-repository pull requests and fork-originated pull
|
|
280
|
-
requests, cannot
|
|
281
|
-
the stable runtime surface.
|
|
307
|
+
requests, cannot select an independent `buildchain-ref` override. This keeps
|
|
308
|
+
automated PR builds on the stable or exact pinned-self runtime surface.
|
|
282
309
|
|
|
283
310
|
Every run resolves the runtime ref to an immutable SHA before checkout. The job
|
|
284
311
|
summary and aggregate build summary record the workflow shell ref, requested
|
|
285
312
|
runtime ref, resolved runtime ref, runtime SHA, stability class, trust decision,
|
|
286
313
|
and rollback ref. Train refs are development validation refs: they do not move
|
|
287
|
-
`
|
|
314
|
+
`v3`, `vX.Y`, `vX.Y-alpha`, npm dist-tags, or production release refs, and they
|
|
288
315
|
must not be pinned as long-term production dependencies.
|
|
289
316
|
|
|
290
317
|
Runtime override validates Buildchain runtime scripts, CLI code, local actions,
|
|
@@ -304,13 +331,13 @@ major line, and compatibility policy they reviewed.
|
|
|
304
331
|
|
|
305
332
|
The reusable build trust gate checks this lock before any heavy matrix job:
|
|
306
333
|
|
|
307
|
-
1. resolve the Buildchain runtime ref, for example `
|
|
334
|
+
1. resolve the Buildchain runtime ref, for example `v3`, to an immutable SHA;
|
|
308
335
|
2. read `dist/site/buildchain-contract.json` from that checked-out Buildchain
|
|
309
336
|
ref;
|
|
310
337
|
3. read the consumer's `.buildchain/contract-lock.json`;
|
|
311
338
|
4. compare the accepted contract with the current contract.
|
|
312
339
|
|
|
313
|
-
SHA drift alone is not a failure. `
|
|
340
|
+
SHA drift alone is not a failure. `v3` is expected to advance. Buildchain only
|
|
314
341
|
fails fast when the accepted contract is no longer compatible, for example a
|
|
315
342
|
required input is removed, a required output disappears, a protected behavior
|
|
316
343
|
promise changes, or the major line changes. Additive changes such as optional
|
|
@@ -466,6 +493,33 @@ Runtime checkout evidence is uploaded separately as `runtime-checkout.json`,
|
|
|
466
493
|
including cache transport, fallback attempts, and exact runtime `HEAD`
|
|
467
494
|
verification, even when a later lifecycle step fails.
|
|
468
495
|
|
|
496
|
+
## Auditable Compiler Cache
|
|
497
|
+
|
|
498
|
+
Consumers can prepare `sccache` on selected platforms after the install
|
|
499
|
+
lifecycle and before compilation:
|
|
500
|
+
|
|
501
|
+
```yaml
|
|
502
|
+
with:
|
|
503
|
+
compiler-cache-provider: sccache
|
|
504
|
+
compiler-cache-platforms-json: '["windows-x64"]'
|
|
505
|
+
compiler-cache-required: true
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
The consumer remains responsible for installing and pinning the tool before
|
|
509
|
+
the preparation step. Buildchain probes its version, runs `sccache
|
|
510
|
+
--zero-stats`, and writes
|
|
511
|
+
`compiler-cache-preparation.json`. The receipt binds the source commit/tree,
|
|
512
|
+
Buildchain runtime, platform, cache profile, and any declared dependency,
|
|
513
|
+
toolchain, or policy roots. It resets counters only; it does not delete cached
|
|
514
|
+
compiler outputs.
|
|
515
|
+
|
|
516
|
+
Final diagnostics admit sccache hit/miss outcomes as current-run evidence only
|
|
517
|
+
when that preparation receipt is present and valid. A bare `sccache
|
|
518
|
+
--show-stats` result without the reset receipt remains cumulative and is
|
|
519
|
+
reported as unavailable for the current run. The preparation receipt is copied
|
|
520
|
+
into the small diagnostics artifact and sealed by
|
|
521
|
+
`diagnostics-manifest.json`.
|
|
522
|
+
|
|
469
523
|
When a Buildchain maintainer asks for downstream validation, the expected
|
|
470
524
|
request is:
|
|
471
525
|
|
|
@@ -562,7 +616,11 @@ lifecycle and before verification. Buildchain binds the exact artifact bytes or
|
|
|
562
616
|
the caller repository, source commit, source tree, immutable runtime, platform,
|
|
563
617
|
and requested signature semantics, then publishes a deterministic
|
|
564
618
|
`<artifact>-signing-request-<platform>-<source-sha>` request. No consumer
|
|
565
|
-
workflow step is required.
|
|
619
|
+
workflow step is required. The lifecycle runner automatically adds declarations
|
|
620
|
+
selected for the current platform to the `build` manifest scan, including
|
|
621
|
+
subjects outside the caller's ordinary `artifact-paths`; this extends the
|
|
622
|
+
evidence preimage without silently adding those subjects to the ordinary
|
|
623
|
+
artifact upload.
|
|
566
624
|
|
|
567
625
|
The request root is a Buildchain-owned generated output. After the declaration,
|
|
568
626
|
lifecycle manifest, and source paths pass validation, sealing replaces that root
|
|
@@ -637,6 +695,17 @@ archive container cannot carry a stapled ticket and is not itself a Gatekeeper
|
|
|
637
695
|
execution target; Gatekeeper evaluates the extracted signed code. Archive path
|
|
638
696
|
and symlink validation fail closed before any payload is signed.
|
|
639
697
|
|
|
698
|
+
For a declared `app-bundle`, the same protected authority extracts the sealed
|
|
699
|
+
application, derives and verifies its bundle identity, signs nested native code,
|
|
700
|
+
submits both the application and disk image for notarization, staples and
|
|
701
|
+
Gatekeeper-assesses both deliverables, and returns a ZIP, DMG, evidence document,
|
|
702
|
+
and source-bound manifest. The reusable workflow verifies those returned bytes
|
|
703
|
+
on GitHub-hosted infrastructure, adds them to the normal macOS platform payload,
|
|
704
|
+
and publishes a separate `<artifact>-macos-credential-<source-sha>` projection
|
|
705
|
+
for release pipelines that consume the credential-island evidence contract.
|
|
706
|
+
Consumers declare the `.app` under `[[signing.artifacts]]`; they do not configure
|
|
707
|
+
an environment, certificate, notary credential, or authority workflow.
|
|
708
|
+
|
|
640
709
|
The durable v3 authority runtime is
|
|
641
710
|
`authority/v3/v3.0/artifact-signing`. It is channel-neutral: alpha and stable
|
|
642
711
|
release work use the same protected `buildchain-artifact-signing` environment
|
|
@@ -902,15 +971,14 @@ promotion starts:
|
|
|
902
971
|
`vN`, and `buildchain-stable-contract-lock-path`.
|
|
903
972
|
|
|
904
973
|
The generated router also owns the stable-shell layout transition through
|
|
905
|
-
`.buildchain/promotion-shell-routing.json`.
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
change.
|
|
974
|
+
`.buildchain/promotion-shell-routing.json`. The v3 stable and alpha lanes call
|
|
975
|
+
the hidden advanced workflow at the exact immutable SHA behind their selected
|
|
976
|
+
v3 channel state and forward the complete internal promotion identity surface.
|
|
977
|
+
The logical shell identity remains `vN`, and the router retains it in the public
|
|
978
|
+
audit outputs. The internal advanced-shell call receives the exact call ref
|
|
979
|
+
selected by the routing configuration, so its called-workflow ref check and
|
|
980
|
+
checkout SHA both bind to the same immutable identity. Updating a routing pin
|
|
981
|
+
after a release does not require any consumer declaration change.
|
|
914
982
|
|
|
915
983
|
The router resolves immutable SHAs and the selected lock digest before candidate
|
|
916
984
|
download. The advanced shell verifies the same router, shell, runtime, lock,
|
|
@@ -982,7 +1050,7 @@ main`, marks the rest as `role: platform`, and passes the generated
|
|
|
982
1050
|
side effect. Downloaded platform manifests are still passed into the release
|
|
983
1051
|
passport unless `release-passport-platform-manifest-paths` is set explicitly.
|
|
984
1052
|
The same Buildchain contract lock check runs before release-candidate
|
|
985
|
-
resolution and before publish. A compatible `
|
|
1053
|
+
resolution and before publish. A compatible `v3` drift leaves an issue in the
|
|
986
1054
|
consumer repository but does not trigger a second heavy build; an incompatible
|
|
987
1055
|
drift fails before publish side effects.
|
|
988
1056
|
|
|
@@ -1147,7 +1215,7 @@ Supported placeholders are `{artifact}`, `{artifactName}`, `{platform}`,
|
|
|
1147
1215
|
`{platformId}`, `{platformName}`, `{sha}`, `{shortSha}`, `{ref}`, `{runId}`,
|
|
1148
1216
|
and `{runAttempt}`. Invalid GitHub artifact name characters are normalized to
|
|
1149
1217
|
`-`, so `{ref}` remains deterministic even for refs such as
|
|
1150
|
-
`refs/heads/dev/
|
|
1218
|
+
`refs/heads/dev/v3/v3.0`.
|
|
1151
1219
|
|
|
1152
1220
|
Each platform also writes and uploads:
|
|
1153
1221
|
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-runtime-train-validation
|
|
5
|
+
doc_type: technical-reference
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-07-31
|
|
16
|
+
invisible_context: not asserted
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# Runtime Train Validation
|
|
2
20
|
|
|
3
21
|
Buildchain consumers should keep stable workflow refs such as `@v3` in
|
|
@@ -23,7 +41,7 @@ train/v3/v3.0/<capability>
|
|
|
23
41
|
|
|
24
42
|
It is a validation pointer, not a release channel:
|
|
25
43
|
|
|
26
|
-
- it does not move `
|
|
44
|
+
- it does not move `v3`, `vX.Y`, `vX.Y-alpha`, exact tags, npm dist-tags, or
|
|
27
45
|
production refs;
|
|
28
46
|
- it must not be pinned as a long-term production dependency;
|
|
29
47
|
- it should point at the Buildchain commit that downstream maintainers are
|
|
@@ -140,7 +158,7 @@ summary. The evidence should include:
|
|
|
140
158
|
|
|
141
159
|
## Trust and limitation
|
|
142
160
|
|
|
143
|
-
Official floating channel refs such as `
|
|
161
|
+
Official floating channel refs such as `v3` and `v3-alpha` may be selected on
|
|
144
162
|
pull requests and pushes. Train refs and arbitrary exact-SHA overrides still
|
|
145
163
|
fail closed unless the event is `workflow_dispatch` and the actor has write,
|
|
146
164
|
maintain, or admin permission on the caller repository. Pull requests,
|
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: self-reviewed
|
|
11
|
-
last_reviewed: 2026-07-
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
@@ -162,15 +162,15 @@ returned a GraphQL error in the response body.
|
|
|
162
162
|
|
|
163
163
|
## Exact-source stable promotion
|
|
164
164
|
|
|
165
|
-
For a selected `
|
|
165
|
+
For a selected `3.0.2-alpha.4`, Patrol creates the immutable source branch:
|
|
166
166
|
|
|
167
167
|
```text
|
|
168
|
-
publish-gate/release/
|
|
168
|
+
publish-gate/release/v3/v3.0/3.0.2-alpha.4
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
and opens it against `release/
|
|
172
|
-
governance path. The PR freezes the qualified candidate even if `
|
|
173
|
-
or `alpha/
|
|
171
|
+
and opens it against `release/v3/v3.0`. This is an existing strict Buildchain
|
|
172
|
+
governance path. The PR freezes the qualified candidate even if `v3.0-alpha`
|
|
173
|
+
or `alpha/v3/v3.0` has already moved to alpha.5. Normal Verify,
|
|
174
174
|
release-candidate resolution, source-tree equivalence, publish transaction,
|
|
175
175
|
passport, registry, tag, and floating-ref checks still run.
|
|
176
176
|
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-observability
|
|
5
|
+
doc_type: technical-reference
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-07-31
|
|
16
|
+
invisible_context: not asserted
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# Toolkit Observability
|
|
2
20
|
|
|
3
21
|
Buildchain ships a small logging toolkit for repository workflows and project
|
|
@@ -232,6 +250,10 @@ are recorded as unavailable instead of failing the diagnostics artifact. Call
|
|
|
232
250
|
compiler cache data. Native diagnostics also expose `compilerCaches` and
|
|
233
251
|
`nativeCacheDirs` as top-level fields in each diagnostics artifact and aggregate
|
|
234
252
|
summary, so reviewers do not have to dig through nested cache sections first.
|
|
253
|
+
For reusable builds, sccache outcomes enter structured current-run evidence only
|
|
254
|
+
when a sibling `compiler-cache-preparation.json` proves the counters were reset
|
|
255
|
+
after install and before build; cumulative stats without that receipt remain
|
|
256
|
+
explicitly unavailable.
|
|
235
257
|
|
|
236
258
|
Process samples are intentionally summarized before they become long-lived
|
|
237
259
|
artifacts. The summary records requested parallelism, the source of that value
|
package/docs/versioning.md
CHANGED
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-07-
|
|
11
|
+
last_reviewed: 2026-07-31
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
@@ -31,9 +31,9 @@ on.
|
|
|
31
31
|
| Minor | New compatible welded surface: reusable workflow output, CLI command family, config protocol, published subpath, evidence file, runner contract, or agent-readable artifact. |
|
|
32
32
|
| Major | Breaking semantic change, removed stable surface, changed branch/tag governance, or incompatible protocol rewrite. |
|
|
33
33
|
|
|
34
|
-
Kungfu minor lines are long-lived trains. `
|
|
35
|
-
receive many patch releases. The major ref, such as `
|
|
36
|
-
selected stable major entrypoint; the minor ref, such as `
|
|
34
|
+
Kungfu minor lines are long-lived trains. `v3.0`, `v3.1`, and `v3.2` can each
|
|
35
|
+
receive many patch releases. The major ref, such as `v3`, points at the
|
|
36
|
+
selected stable major entrypoint; the minor ref, such as `v3.2`, points at the
|
|
37
37
|
latest stable production patch for that minor line.
|
|
38
38
|
|
|
39
39
|
## Welded Surfaces
|
|
@@ -79,6 +79,8 @@ repository changes are patch".
|
|
|
79
79
|
|
|
80
80
|
| Date | Action | Line | Faces | Class | Rationale | PR |
|
|
81
81
|
| ---------- | ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
82
|
+
| 2026-07-31 | extend-minor | `v3.0` | auditable-demo-workflow, auditable-demo-media-profile, auditable-demo-media-receipt | additive | Add an opt-in responsive profile that binds source-resolution and exact 1280x720 MP4/WebM/GIF renditions to one Gate and receipt while rejecting upscales, aspect-ratio drift, and profile changes between Gate-only and full-render paths. | |
|
|
83
|
+
| 2026-07-31 | extend-minor | `v3.0` | release-candidate-family-evidence, release-passport-evidence-attachment, promotion-action, release-passport-cli | additive | Restore all-ref v2 parity for optional Initiative-family candidate binding and typed product-owned release evidence attachments while retaining Kungfu native Family State authority and the newer v3 post-activation released-evidence stage. | #2089 |
|
|
82
84
|
| 2026-07-30 | extend-minor | `v3.0` | reusable-build-workflow, observed-evidence-bundle, release-passport-json-reader, web-surface-release-governance | additive | Add bounded artifact compression and remote-read controls plus transactional derived evidence projections while repairing release-PR runtime handoff so production remains protected-main-only. | |
|
|
83
85
|
| 2026-07-29 | extend-minor | `v3.0` | artifact-signing-config, apple-developer-id-authority, artifact-signing-evidence | additive | Extend the consumer-neutral signing declaration to macOS compound archives, including nested wheel Mach-O signing, PEP 427 RECORD repair, safe archive reconstruction, and whole-product notarization under the same protected authority. | |
|
|
84
86
|
| 2026-07-28 | extend-minor | `v3.0` | auditable-demo-workflow, auditable-demo-media-profile, auditable-demo-media-receipt | additive | Add opt-in archive, web-delivery, and site-hero profiles; independently bind codec, container, audio, layout, byte-budget, role, and fast-start facts into a v2 media receipt while preserving the existing archive default. | |
|
|
@@ -459,6 +459,68 @@ the owning and parent surface syncs carried their required delete exclusions.
|
|
|
459
459
|
The runner must provide an AWS CLI version whose `s3 sync` supports
|
|
460
460
|
`--no-overwrite`.
|
|
461
461
|
|
|
462
|
+
### Qualified publication package-pin fast path
|
|
463
|
+
|
|
464
|
+
A consumer may narrow one deployment to the exact paper version introduced by
|
|
465
|
+
a package-pin-only PR. The artifact root `manifest.json` must carry a
|
|
466
|
+
consumer-owned qualification envelope:
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
{
|
|
470
|
+
"publicationFastPath": {
|
|
471
|
+
"contract": "kungfu-buildchain-publication-package-pin-fast-path",
|
|
472
|
+
"mode": "package-pin-only",
|
|
473
|
+
"targetSurface": "papers",
|
|
474
|
+
"qualificationRoot": "sha256:...",
|
|
475
|
+
"immutablePrefixes": [
|
|
476
|
+
"archive/observer-declared-timelines/v0.1.0-alpha.10"
|
|
477
|
+
],
|
|
478
|
+
"mutableFiles": [
|
|
479
|
+
"archive/index.html",
|
|
480
|
+
"index.html",
|
|
481
|
+
"manifest.json",
|
|
482
|
+
"observer-declared-timelines/index.html",
|
|
483
|
+
"observer-declared-timelines/latest/index.html",
|
|
484
|
+
"registry.json"
|
|
485
|
+
],
|
|
486
|
+
"invalidationPaths": [
|
|
487
|
+
"/",
|
|
488
|
+
"/archive/",
|
|
489
|
+
"/archive/observer-declared-timelines/v0.1.0-alpha.10*",
|
|
490
|
+
"/observer-declared-timelines/",
|
|
491
|
+
"/observer-declared-timelines/latest/",
|
|
492
|
+
"/manifest.json",
|
|
493
|
+
"/registry.json"
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
Buildchain validates that the target surface exists, every immutable prefix is
|
|
500
|
+
declared by that surface's archive manifest, every mutable file exists outside
|
|
501
|
+
those prefixes, and the qualification root is exact. A qualified plan:
|
|
502
|
+
|
|
503
|
+
- selects only `targetSurface`;
|
|
504
|
+
- verifies/uploads only the declared immutable prefixes with the normal
|
|
505
|
+
no-overwrite digest safeguards;
|
|
506
|
+
- copies only the declared mutable files;
|
|
507
|
+
- skips full `sync --delete` and directory-index alias writes;
|
|
508
|
+
- invalidates only the declared viewer paths plus the deployment manifest.
|
|
509
|
+
|
|
510
|
+
Any missing, malformed, or unqualified envelope keeps the normal full-surface
|
|
511
|
+
plan. The fast path narrows bytes; it does not weaken channel controls.
|
|
512
|
+
`package-published`, `alpha-complete`, `staging-visible`, and
|
|
513
|
+
`production-visible` remain separate facts, and a package qualification never
|
|
514
|
+
authorizes production by itself.
|
|
515
|
+
|
|
516
|
+
Publication manifests may retain release history without rematerializing every
|
|
517
|
+
historical package into the current site artifact. When at least one version
|
|
518
|
+
declares `immutableIndex`, Buildchain treats that field as the materialization
|
|
519
|
+
envelope: all declared version prefixes remain protected from deletion, while
|
|
520
|
+
only prefixes with `immutableIndex` must exist locally and are eligible for
|
|
521
|
+
upload. Manifests without the envelope retain the legacy rule that every
|
|
522
|
+
declared prefix must exist.
|
|
523
|
+
|
|
462
524
|
For multi-surface sites, each surface host is treated as a root-relative view
|
|
463
525
|
of that surface's artifact path prefix. For example, a `buildchain` surface with
|
|
464
526
|
`path = "/buildchain/"` and preview URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "3.0.3-alpha.
|
|
3
|
+
"version": "3.0.3-alpha.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
|
|
6
6
|
"repository": "https://github.com/kungfu-systems/buildchain",
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
"./portable-dev-cache": "./packages/core/portable-dev-cache.js",
|
|
42
42
|
"./publication-artifact": "./packages/core/publication-artifact.js",
|
|
43
43
|
"./publication-package": "./packages/core/publication-package.js",
|
|
44
|
+
"./publication-reproducibility": "./packages/core/publication-reproducibility.js",
|
|
45
|
+
"./publication-sealed-bundle": "./packages/core/publication-sealed-bundle.js",
|
|
46
|
+
"./paper": "./packages/core/paper.js",
|
|
44
47
|
"./publication-authority": "./packages/core/publication-authority.js",
|
|
45
48
|
"./publication-control-plane-audit": "./packages/core/publication-control-plane-audit.js",
|
|
46
49
|
"./buildchain-publication-authority": "./packages/core/buildchain-publication-authority.js",
|
|
@@ -105,7 +108,8 @@
|
|
|
105
108
|
},
|
|
106
109
|
"packageManager": "pnpm@11.7.0",
|
|
107
110
|
"scripts": {
|
|
108
|
-
"check": "node scripts/check-internal-architecture.mjs && node scripts/check-inventory.mjs && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && node scripts/check-action-bundles.mjs",
|
|
111
|
+
"check": "pnpm run check:static && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/check-inventory.mjs && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && node scripts/check-action-bundles.mjs",
|
|
112
|
+
"check:static": "node scripts/check-javascript-syntax.mjs && prettier --check architecture/*.json bin/internal/command-registry.mjs scripts/authorize-promotion-runtime-override.cjs scripts/check-javascript-syntax.mjs scripts/check-maintainability.mjs scripts/maintainability-metrics.mjs tests/authorize-promotion-runtime-override.test.mjs tests/command-registry.test.mjs tests/maintainability.test.mjs tests/promotion-responsibilities.test.mjs",
|
|
109
113
|
"check:workflows": "bash scripts/check-workflows.sh",
|
|
110
114
|
"generate:site": "node scripts/generate-site-bundle.mjs",
|
|
111
115
|
"check:site": "node scripts/generate-site-bundle.mjs --check",
|
|
@@ -116,11 +120,9 @@
|
|
|
116
120
|
"pack:check": "npm pack --dry-run --json --registry=https://registry.npmjs.org/"
|
|
117
121
|
},
|
|
118
122
|
"devDependencies": {
|
|
119
|
-
"@types/node": "^24.0.0",
|
|
120
123
|
"prettier": "^3.9.0",
|
|
121
124
|
"tsup": "^8.5.0",
|
|
122
|
-
"typescript": "^5.9.0"
|
|
123
|
-
"vitest": "^4.1.9"
|
|
125
|
+
"typescript": "^5.9.0"
|
|
124
126
|
},
|
|
125
127
|
"dependencies": {
|
|
126
128
|
"@kungfu-tech/kfd": "1.0.0-alpha.47",
|