@kungfu-tech/buildchain 3.0.3-alpha.0 → 3.0.3-alpha.1
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 +27 -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 +56 -2
- 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 +175 -84
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/cli-registry.json +860 -98
- package/dist/site/controller-registry.json +97 -5
- package/dist/site/kfd-claims.json +228 -19
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +20 -20
- package/dist/site/node-api-registry.json +370 -55
- package/dist/site/page-registry.json +150 -59
- package/dist/site/public-surface-audit.json +226 -22
- 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 +119 -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 +158 -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 +60 -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/index.js +40 -0
- package/packages/core/paper.js +3226 -0
- package/packages/core/public-surface-audit.js +3 -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-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 +84 -18
- 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.mjs +645 -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/stable-candidate-qualification.mjs +42 -0
- package/scripts/web-surface-core.mjs +272 -86
package/docs/cli.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-cli
|
|
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
|
# Buildchain CLI, npm Package, and Toolkit API
|
|
2
20
|
|
|
3
21
|
Buildchain is published as the public npm package
|
|
@@ -76,6 +94,8 @@ import { collectReadmeBadgeFacts } from "@kungfu-tech/buildchain/readme-badges";
|
|
|
76
94
|
import { verifyReleasePassport } from "@kungfu-tech/buildchain/release-passport";
|
|
77
95
|
import { verifyGitHubArtifactAttestationEvidence } from "@kungfu-tech/buildchain/github-artifact-attestation";
|
|
78
96
|
import { createReleasePropagationPlan } from "@kungfu-tech/buildchain/release-propagation";
|
|
97
|
+
import { verifyPublicationReproducibility } from "@kungfu-tech/buildchain/publication-reproducibility";
|
|
98
|
+
import { collectPaperStatus } from "@kungfu-tech/buildchain/paper";
|
|
79
99
|
import { planReleaseLineBootstrap } from "@kungfu-tech/buildchain/release-line-bootstrap";
|
|
80
100
|
import { collectPublicSurfaceReverseAudit } from "@kungfu-tech/buildchain/public-surface-audit";
|
|
81
101
|
import { createBuildchainLayoutDiscovery } from "@kungfu-tech/buildchain/buildchain-layout";
|
|
@@ -101,6 +121,70 @@ with the exact signer/source policy and then verifies the retained bundle,
|
|
|
101
121
|
predicate, platform manifest, Passport, and Buildchain evidence locally. See
|
|
102
122
|
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
103
123
|
|
|
124
|
+
### Governed paper lifecycle
|
|
125
|
+
|
|
126
|
+
`buildchain paper` is the unified operator surface for a paper repository. Its
|
|
127
|
+
eight subcommands return versioned JSON contracts with `--json`:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
buildchain paper scaffold --package @kungfu-tech/paper-example \
|
|
131
|
+
--repository kungfu-systems/paper-example
|
|
132
|
+
buildchain paper migrate --json
|
|
133
|
+
buildchain paper preflight --offline --json
|
|
134
|
+
buildchain paper bootstrap npm --json
|
|
135
|
+
buildchain paper build --json
|
|
136
|
+
buildchain paper alpha --json
|
|
137
|
+
buildchain paper status --json
|
|
138
|
+
buildchain paper resume --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The safety and authority boundary is explicit:
|
|
142
|
+
|
|
143
|
+
- `scaffold` plans a 14-file, no-overwrite repository shape by default; add
|
|
144
|
+
`--write` to create only missing files.
|
|
145
|
+
- `migrate` plans the five Buildchain-owned control-file changes needed by an
|
|
146
|
+
existing paper repository. Add `--write` only after reviewing exact old and
|
|
147
|
+
new digests; paper content and publication configuration are never rewritten.
|
|
148
|
+
- The scaffolded `.buildchain/paper/provisioning-authority.json` binds both
|
|
149
|
+
caller workflow byte digests, their exact reusable-workflow SHA, the runtime
|
|
150
|
+
SHA, contract-lock bytes, npm registry and trusted-publisher coordinates, and
|
|
151
|
+
the repository Actions/generated-write policy under one digest. A floating
|
|
152
|
+
Buildchain ref cannot change release policy after that authority is accepted.
|
|
153
|
+
- `preflight` separates local readiness from readiness for external mutation.
|
|
154
|
+
`--offline` skips live GitHub and npm observations without treating them as
|
|
155
|
+
local failures. Live readiness requires default workflow permissions `read`,
|
|
156
|
+
Actions pull-request approval disabled, and GitHub App or equivalent narrow
|
|
157
|
+
generated-write credential metadata.
|
|
158
|
+
- `bootstrap npm` always performs npm pack and publish dry-runs first. A real
|
|
159
|
+
public bootstrap requires both `--execute` and
|
|
160
|
+
`--confirm-public-package <exact-name>`, uses only the official npm registry,
|
|
161
|
+
fixes the bootstrap version at `0.0.0-bootstrap.0`, and returns only npm URLs
|
|
162
|
+
observed from command output. Success requires public package readback and
|
|
163
|
+
the exact repository/workflow/environment trusted-publisher binding. For
|
|
164
|
+
GitHub, the npm coordinate is the workflow filename (`paper-release.yml`),
|
|
165
|
+
not its `.github/workflows/` repository path.
|
|
166
|
+
- `build` plans the two-clean-build reproducibility proof. Add `--execute` to
|
|
167
|
+
create and verify the sealed publication bundle.
|
|
168
|
+
- `alpha` plans or opens the protected Alpha pull request; it never merges,
|
|
169
|
+
publishes, or advances a floating ref.
|
|
170
|
+
- `status` reports only evidence found in the repository or external
|
|
171
|
+
observations. It never infers a later lifecycle state from an earlier one.
|
|
172
|
+
- `resume` plans or dispatches the repository's thin release workflow; the
|
|
173
|
+
protected workflow remains the release authority.
|
|
174
|
+
|
|
175
|
+
The ordered evidence states are `scaffolded`, `governed`, `admitted`,
|
|
176
|
+
`bootstrapped`, `trust-bound`, `content-ready`, `artifact-sealed`,
|
|
177
|
+
`package-published`, `alpha-complete`, `staging-visible`, and
|
|
178
|
+
`production-visible`. A state can be `satisfied`, `not-reached`, `blocked`, or
|
|
179
|
+
`unknown`; consumers must not collapse those distinctions.
|
|
180
|
+
|
|
181
|
+
The corresponding Node surface is
|
|
182
|
+
`@kungfu-tech/buildchain/paper`. Planning and status functions are read-only;
|
|
183
|
+
`writePaperScaffold()` and `writePaperMigration()` are the bounded local
|
|
184
|
+
writers, and
|
|
185
|
+
`executePaperNpmBootstrap()` preserves the same confirmation boundary used by
|
|
186
|
+
the CLI.
|
|
187
|
+
|
|
104
188
|
`buildchain layout` is the stable machine question for repository layout. Tools
|
|
105
189
|
such as Shifu should call it instead of copying `.buildchain/` path constants:
|
|
106
190
|
|
|
@@ -249,9 +333,9 @@ branch action, and initial version before any GitHub mutation happens:
|
|
|
249
333
|
|
|
250
334
|
```bash
|
|
251
335
|
buildchain release line open \
|
|
252
|
-
--major
|
|
253
|
-
--minor
|
|
254
|
-
--source-ref release/
|
|
336
|
+
--major 3 \
|
|
337
|
+
--minor 1 \
|
|
338
|
+
--source-ref release/v3/v3.0 \
|
|
255
339
|
--json
|
|
256
340
|
```
|
|
257
341
|
|
|
@@ -264,9 +348,9 @@ reconciliation succeeds, and opens the first dev-to-alpha channel PR:
|
|
|
264
348
|
|
|
265
349
|
```bash
|
|
266
350
|
buildchain release line open \
|
|
267
|
-
--major
|
|
268
|
-
--minor
|
|
269
|
-
--source-ref release/
|
|
351
|
+
--major 3 \
|
|
352
|
+
--minor 1 \
|
|
353
|
+
--source-ref release/v3/v3.0 \
|
|
270
354
|
--write \
|
|
271
355
|
--json
|
|
272
356
|
```
|
|
@@ -284,7 +368,9 @@ import {
|
|
|
284
368
|
assertPublicSurfaceReverseAudit,
|
|
285
369
|
} from "@kungfu-tech/buildchain/public-surface-audit";
|
|
286
370
|
|
|
287
|
-
assertPublicSurfaceReverseAudit(
|
|
371
|
+
assertPublicSurfaceReverseAudit(
|
|
372
|
+
collectPublicSurfaceReverseAudit({ root: process.cwd() }),
|
|
373
|
+
);
|
|
288
374
|
```
|
|
289
375
|
|
|
290
376
|
`buildchain kfd` is the product-facing KFD namespace. Schema commands expose the
|
|
@@ -398,7 +484,10 @@ The event protocol is JSONL and is also available from the SDK:
|
|
|
398
484
|
```js
|
|
399
485
|
import { createBuildchainLogger } from "@kungfu-tech/buildchain/logging";
|
|
400
486
|
|
|
401
|
-
const logger = createBuildchainLogger({
|
|
487
|
+
const logger = createBuildchainLogger({
|
|
488
|
+
source: "user",
|
|
489
|
+
component: "native-build",
|
|
490
|
+
});
|
|
402
491
|
logger.mark("configure.ready", { phase: "configure" });
|
|
403
492
|
```
|
|
404
493
|
|
|
@@ -530,6 +619,24 @@ buildchain publication-artifact manifest \
|
|
|
530
619
|
--json
|
|
531
620
|
```
|
|
532
621
|
|
|
622
|
+
Run the fail-closed clean-room gate before Alpha or release admission:
|
|
623
|
+
|
|
624
|
+
```bash
|
|
625
|
+
buildchain publication-artifact reproducibility \
|
|
626
|
+
--source-sha "$(git rev-parse HEAD)" \
|
|
627
|
+
--promote \
|
|
628
|
+
--json
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
The command checks two independent clones of the exact commit, isolates caches,
|
|
632
|
+
derives `SOURCE_DATE_EPOCH` from Git, and compares every declared artifact,
|
|
633
|
+
source bundle, publication evidence file, npm package file, and actual npm
|
|
634
|
+
tarball. It writes
|
|
635
|
+
`.buildchain/publication/reproducibility-receipt.json`. Only a byte-identical
|
|
636
|
+
build using the digest-pinned `latex-docker` toolchain is qualifying.
|
|
637
|
+
`--allow-unpinned-toolchain` exists for local diagnostics and never changes the
|
|
638
|
+
receipt's `qualifying` field.
|
|
639
|
+
|
|
533
640
|
Generate the Buildchain-owned npm paper package contents from declared
|
|
534
641
|
publication facts:
|
|
535
642
|
|
|
@@ -629,7 +736,7 @@ buildchain collect github-release \
|
|
|
629
736
|
--kfd-2-claim-json .buildchain/kfd/kfd-2/release-claims.json \
|
|
630
737
|
--kfd-3-prebuild-witness-json .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json \
|
|
631
738
|
--kfd-3-artifact-verify-cmd "kungfu agent verify --json" \
|
|
632
|
-
--release-extra-json '{"channel":"release","targetRef":"release/
|
|
739
|
+
--release-extra-json '{"channel":"release","targetRef":"release/v3/v3.0"}' \
|
|
633
740
|
--output-dir .buildchain/release-passport
|
|
634
741
|
```
|
|
635
742
|
|
|
@@ -880,9 +987,9 @@ Buildchain's own npm package is published from
|
|
|
880
987
|
`.github/workflows/buildchain-ref-promotion.yml`, inside the same publish
|
|
881
988
|
transaction that promotes release refs:
|
|
882
989
|
|
|
883
|
-
- `
|
|
884
|
-
- `
|
|
885
|
-
- moving refs such as `
|
|
990
|
+
- `v3.0.3-alpha.0` publishes to npm with dist-tag `alpha`.
|
|
991
|
+
- `v3.0.2` publishes to npm with dist-tag `latest`.
|
|
992
|
+
- moving refs such as `v3`, `v3.0`, and `v3.0-alpha` do not match the publish
|
|
886
993
|
workflow and do not publish.
|
|
887
994
|
|
|
888
995
|
The promotion workflow uses npm Trusted Publishing through GitHub Actions OIDC.
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-consumer-issue-reporting
|
|
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
|
# Consumer Issue Reporting
|
|
2
20
|
|
|
3
21
|
Buildchain ships a first-class issue reporting surface for consumer workflows.
|
|
@@ -73,7 +91,7 @@ const result = await reportBuildchainIssue({
|
|
|
73
91
|
token: process.env.BUILDCHAIN_ISSUE_TOKEN,
|
|
74
92
|
summary: "Native artifact manifest is incomplete",
|
|
75
93
|
failureCode: "native-manifest-incomplete",
|
|
76
|
-
buildchainRef: "
|
|
94
|
+
buildchainRef: "v3",
|
|
77
95
|
diagnosticsPath: ".buildchain/artifacts/diagnostics.json",
|
|
78
96
|
});
|
|
79
97
|
```
|
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: B
|
|
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
|
|
@@ -234,7 +234,7 @@ branch; unrelated rules and conditions are preserved in place.
|
|
|
234
234
|
```bash
|
|
235
235
|
buildchain github-governance ruleset-policy-plan \
|
|
236
236
|
--repository kungfu-systems/buildchain \
|
|
237
|
-
--branch alpha/
|
|
237
|
+
--branch alpha/v3/v3.0 \
|
|
238
238
|
--ruleset-id 19518955 \
|
|
239
239
|
--snapshot-output ruleset-rollback.json \
|
|
240
240
|
--plan-output ruleset-rollout.json
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-lifecycle-protocol
|
|
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
|
# Lifecycle Protocol
|
|
2
20
|
|
|
3
|
-
Buildchain uses `.buildchain/buildchain.toml` as the
|
|
21
|
+
Buildchain uses `.buildchain/buildchain.toml` as the v3 repository configuration format.
|
|
4
22
|
The file is optional for simple JavaScript repositories, but it is the preferred
|
|
5
23
|
way to describe release version state and lifecycle commands when a project is
|
|
6
24
|
not a plain pnpm, npm, or yarn workspace.
|
|
@@ -10,7 +28,7 @@ For compatibility, Buildchain still reads a legacy root `buildchain.toml` when
|
|
|
10
28
|
`.buildchain/` layout so all Buildchain-owned local state lives under one
|
|
11
29
|
directory.
|
|
12
30
|
|
|
13
|
-
Only TOML is supported in
|
|
31
|
+
Only TOML is supported in v3. YAML, JSON, and JavaScript config files are not
|
|
14
32
|
loaded.
|
|
15
33
|
|
|
16
34
|
## Minimal File
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: historical
|
|
3
|
+
period: 2026-07
|
|
4
|
+
theme: buildchain-v2-migration-inventory
|
|
5
|
+
doc_type: migration-inventory
|
|
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
|
# Buildchain v2 Migration Inventory
|
|
2
20
|
|
|
3
|
-
This inventory records the
|
|
4
|
-
monorepo source of truth for
|
|
5
|
-
reusable build
|
|
6
|
-
|
|
21
|
+
This historical inventory records the Buildchain v2 consolidation boundary.
|
|
22
|
+
Buildchain v3 is now the active monorepo source of truth for Kungfu repository
|
|
23
|
+
workflows, reusable build workflows, and Buildchain-native actions. The v2
|
|
24
|
+
names below preserve the migration decisions that v3 inherited; they are not a
|
|
25
|
+
current runtime baseline.
|
|
7
26
|
Standalone `workflows` and `action-*` repositories are historical rollback
|
|
8
27
|
anchors, not active Buildchain migration targets.
|
|
9
28
|
|
|
@@ -111,7 +130,7 @@ older standalone action repository.
|
|
|
111
130
|
| `actions/run-lifecycle` | lifecycle command execution and deterministic artifact manifest generation |
|
|
112
131
|
| `actions/validate-config` | `buildchain.toml` version-state and lifecycle preflight without executing lifecycle commands |
|
|
113
132
|
|
|
114
|
-
##
|
|
133
|
+
## Current v3 Refs
|
|
115
134
|
|
|
116
135
|
- Actions: `kungfu-systems/buildchain/actions/<name>@v3`
|
|
117
136
|
- Reusable workflows: `kungfu-systems/buildchain/.github/workflows/<workflow>.yml@v3`
|
package/docs/ownership.md
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-ownership-and-migration
|
|
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
|
# Ownership And Migration Rules
|
|
2
20
|
|
|
3
21
|
## Source Of Truth
|
|
4
22
|
|
|
5
|
-
Buildchain
|
|
23
|
+
Buildchain v3 workflow and action design lands in this repository. Standalone
|
|
6
24
|
`workflows` and `action-*` repositories are historical rollback anchors.
|
|
7
25
|
Buildchain only ships the native action surface required for config validation,
|
|
8
26
|
lifecycle execution, and release ref promotion.
|
|
@@ -106,6 +106,37 @@ for compatibility, but the passport records it as lower trust because
|
|
|
106
106
|
Buildchain can record the command boundary without proving the compiler or
|
|
107
107
|
LaTeX distribution digest.
|
|
108
108
|
|
|
109
|
+
## Reproducibility Gate
|
|
110
|
+
|
|
111
|
+
Alpha and release admission require
|
|
112
|
+
`.buildchain/publication/reproducibility-receipt.json`. Buildchain creates the
|
|
113
|
+
receipt by cloning the exact checked-out Git commit into two independent local
|
|
114
|
+
repositories, assigning each build a separate home and npm cache, and deriving
|
|
115
|
+
`SOURCE_DATE_EPOCH` from the source commit. A pinned `latex-docker` build runs
|
|
116
|
+
with UTC, `C.UTF-8`, no build-time network, and the exact image digest declared
|
|
117
|
+
in `[publication.toolchain]`.
|
|
118
|
+
|
|
119
|
+
Each clean build independently creates the PDF set, source bundle, publication
|
|
120
|
+
manifest and passport, append-only registry, synthesized npm package directory,
|
|
121
|
+
and an actual npm tarball. After qualification, Buildchain copies the first
|
|
122
|
+
qualifying tarball into the promoted publication candidate instead of deleting
|
|
123
|
+
it with the temporary clean build. The receipt compares exact bytes and records:
|
|
124
|
+
|
|
125
|
+
- source repository, commit, tree, and `SOURCE_DATE_EPOCH`;
|
|
126
|
+
- toolchain image, digest, command, and toolchain identity root;
|
|
127
|
+
- every artifact and evidence path with byte size and SHA-256;
|
|
128
|
+
- npm tarball SHA-256, SHA-1 shasum, and `sha512` integrity;
|
|
129
|
+
- per-build output-set roots and the first differing field or artifact.
|
|
130
|
+
|
|
131
|
+
The gate is fail-closed. A build-only `custom-command` run can diagnose byte
|
|
132
|
+
drift and promote its byte-identical local output with
|
|
133
|
+
`--allow-unpinned-toolchain`, but it is never a qualifying publication receipt.
|
|
134
|
+
Any workflow that prepares a publishable paper package accepts only a
|
|
135
|
+
digest-pinned toolchain and promotes the first clean build into the publication
|
|
136
|
+
candidate only after both builds are byte-identical. The receipt remains
|
|
137
|
+
outside the npm tarball to avoid a circular digest; it binds the tarball bytes
|
|
138
|
+
from the surrounding sealed publication evidence.
|
|
139
|
+
|
|
109
140
|
`publish.kind = "npm-paper-package"` declares that Buildchain, not the consumer
|
|
110
141
|
repository, owns the standard paper npm package shape and release transaction
|
|
111
142
|
mechanics. `publish.package` is the public npm package that contains the PDF,
|
|
@@ -134,14 +165,18 @@ The build-only workflow:
|
|
|
134
165
|
any paper build runs;
|
|
135
166
|
- resolves the declared publication toolchain from `[publication.toolchain]` or
|
|
136
167
|
workflow inputs;
|
|
168
|
+
- hydrates authenticated registry history before building so both clean
|
|
169
|
+
candidates include the same append-only history;
|
|
137
170
|
- for `latex-docker`, pulls the pinned build-images LaTeX builder digest and
|
|
138
|
-
runs
|
|
171
|
+
runs two independent clean builds with the reproducibility policy above;
|
|
139
172
|
- for `custom-command`, runs the declared command and records the lower-trust
|
|
140
|
-
boundary in the passport;
|
|
173
|
+
boundary in the passport, but refuses publication qualification;
|
|
141
174
|
- runs the verify command;
|
|
142
175
|
- creates a source bundle from `publication.source_paths`;
|
|
143
176
|
- writes `.buildchain/publication/publication-artifact.json`;
|
|
144
177
|
- writes `.buildchain/publication/publication-artifact-passport.json`;
|
|
178
|
+
- writes a qualifying
|
|
179
|
+
`.buildchain/publication/reproducibility-receipt.json`;
|
|
145
180
|
- when `[publication.archive]` is configured, writes
|
|
146
181
|
`.buildchain/publication/publication-registry.json` and verifies same-version
|
|
147
182
|
immutability;
|
|
@@ -174,36 +209,36 @@ on:
|
|
|
174
209
|
- alpha/v1/v1.0
|
|
175
210
|
- release/v1/v1.0
|
|
176
211
|
workflow_dispatch:
|
|
177
|
-
inputs:
|
|
178
|
-
buildchain-ref:
|
|
179
|
-
description: "Temporary Buildchain runtime ref"
|
|
180
|
-
required: false
|
|
181
|
-
default: ""
|
|
182
212
|
|
|
183
213
|
jobs:
|
|
184
214
|
paper-release:
|
|
185
|
-
uses: kungfu-systems/buildchain/.github/workflows/paper-release-sealed.yml
|
|
215
|
+
uses: kungfu-systems/buildchain/.github/workflows/paper-release-sealed.yml@<exact-buildchain-sha>
|
|
186
216
|
permissions:
|
|
187
217
|
actions: read
|
|
188
218
|
checks: write
|
|
189
|
-
contents:
|
|
219
|
+
contents: read
|
|
190
220
|
id-token: write
|
|
191
221
|
issues: write
|
|
192
222
|
with:
|
|
193
|
-
buildchain-ref:
|
|
223
|
+
buildchain-ref: <exact-buildchain-sha>
|
|
194
224
|
publisher-workflow-path: .github/workflows/paper-release.yml
|
|
195
225
|
toolchain-type: config
|
|
196
226
|
verify-command: make check
|
|
197
227
|
artifact-paths: _build/paper-name.pdf
|
|
198
228
|
buildchain-contract-lock-path: .buildchain/contract-lock.json
|
|
199
229
|
secrets:
|
|
200
|
-
|
|
230
|
+
BUILDCHAIN_GENERATED_WRITE_APP_CLIENT_ID: ${{ secrets.BUILDCHAIN_GENERATED_WRITE_APP_CLIENT_ID }}
|
|
231
|
+
BUILDCHAIN_GENERATED_WRITE_APP_PRIVATE_KEY: ${{ secrets.BUILDCHAIN_GENERATED_WRITE_APP_PRIVATE_KEY }}
|
|
232
|
+
BUILDCHAIN_GENERATED_WRITE_TOKEN: ${{ secrets.BUILDCHAIN_GENERATED_WRITE_TOKEN }}
|
|
201
233
|
```
|
|
202
234
|
|
|
203
|
-
The sealed preset does not use a long-lived token for npm publication. It
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
235
|
+
The sealed preset does not use a long-lived token for npm publication. It
|
|
236
|
+
prefers a repository-scoped GitHub App installation token for generated
|
|
237
|
+
repository writes and accepts `BUILDCHAIN_GENERATED_WRITE_TOKEN` as an
|
|
238
|
+
equivalent narrow compatibility authority. The deprecated
|
|
239
|
+
`BUILDCHAIN_PROMOTION_TOKEN` name remains accepted for existing consumers, but
|
|
240
|
+
there is no `github.token` fallback for generated writes. npm publication
|
|
241
|
+
remains bound to GitHub OIDC trusted publishing. The preset builds and packages the
|
|
207
242
|
paper in a read-only job, then a credential-free authority job downloads that
|
|
208
243
|
exact candidate, audits the external control plane, and seals a capability over
|
|
209
244
|
the source tree, Buildchain runtime, controller receipt, PDF, and npm package
|
|
@@ -214,8 +249,9 @@ workflow named by `publisher-workflow-path`.
|
|
|
214
249
|
|
|
215
250
|
The preset:
|
|
216
251
|
|
|
217
|
-
-
|
|
218
|
-
publication candidate and
|
|
252
|
+
- uses the exact Buildchain SHA admitted by the provisioning authority and
|
|
253
|
+
binds it into the caller bytes, contract lock, publication candidate, and
|
|
254
|
+
authority capability;
|
|
219
255
|
- builds the PDF through the declared pinned LaTeX Docker toolchain or custom
|
|
220
256
|
command in a read-only job;
|
|
221
257
|
- verifies the paper repository;
|
|
@@ -229,7 +265,13 @@ The preset:
|
|
|
229
265
|
channel commit and requires `promote-buildchain-ref` to verify that lock
|
|
230
266
|
before any publish side effect;
|
|
231
267
|
- verifies the complete candidate again after authority and publishes the
|
|
232
|
-
package through npm Trusted Publishing without rebuilding it;
|
|
268
|
+
package through npm Trusted Publishing without rebuilding or repacking it;
|
|
269
|
+
- writes a typed sealed-bundle manifest that binds the candidate root, exact
|
|
270
|
+
npm tarball, every GitHub Release asset, durable storage path, and resume
|
|
271
|
+
command;
|
|
272
|
+
- persists the complete binary bundle to the transaction's durable release-state
|
|
273
|
+
ref before npm receives credentials, allowing an empty runner to restore and
|
|
274
|
+
verify the same bytes after interruption;
|
|
233
275
|
- writes Buildchain release/passport evidence; and
|
|
234
276
|
- creates or updates the exact-version GitHub Release by default, uploading
|
|
235
277
|
every file declared by `publication.primary_artifact` and
|
|
@@ -239,6 +281,17 @@ Consumers can opt out of the GitHub Release with `github-release: false`, but
|
|
|
239
281
|
the default is on so downstream release propagation can observe
|
|
240
282
|
`release.published` without hand-written `gh release` steps.
|
|
241
283
|
|
|
284
|
+
The transaction exposes a stable publication progression:
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
prepared -> sealed -> package-published -> alpha-complete
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Stable publication ends at `release-complete`. If a run stops after npm but
|
|
291
|
+
before GitHub Release completion, the next run starts from
|
|
292
|
+
`package-published`, restores the sealed PDF and companion assets, and finishes
|
|
293
|
+
the release without invoking the paper build or `npm pack` again.
|
|
294
|
+
|
|
242
295
|
Declared publication artifacts are resolved from the generated publication
|
|
243
296
|
manifest rather than repeated in consumer workflow YAML. Publication fails
|
|
244
297
|
before upload if a declared artifact is missing or if its basename would
|
|
@@ -256,12 +309,92 @@ Buildchain rather than forking the mechanics into each paper repository.
|
|
|
256
309
|
|
|
257
310
|
## CLI And Node API
|
|
258
311
|
|
|
312
|
+
### Unified paper operator surface
|
|
313
|
+
|
|
314
|
+
The `buildchain paper` command family assembles the existing publication
|
|
315
|
+
primitives into a resumable operator flow:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
scaffold/new or migrate/existing -> preflight -> bootstrap npm -> build -> alpha -> status -> resume
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Each command emits a typed JSON envelope with `--json`. Dry-run is the default
|
|
322
|
+
for every external mutation. `scaffold --write` is limited to no-overwrite
|
|
323
|
+
local file creation. `migrate --write` is limited to the Buildchain-owned
|
|
324
|
+
contract lock, version pin, thin workflows, and provisioning authority; paper
|
|
325
|
+
content and publication configuration are preserved. `bootstrap npm --execute`, `alpha --execute`, and
|
|
326
|
+
`resume --execute` cross external authority boundaries and therefore require
|
|
327
|
+
explicit execution.
|
|
328
|
+
|
|
329
|
+
The evidence model is intentionally non-inferential:
|
|
330
|
+
|
|
331
|
+
| State | Required evidence |
|
|
332
|
+
| -------------------- | -------------------------------------------------------- |
|
|
333
|
+
| `scaffolded` | Complete managed scaffold inventory |
|
|
334
|
+
| `governed` | Compatible Buildchain contract lock |
|
|
335
|
+
| `admitted` | Repository admission receipt |
|
|
336
|
+
| `bootstrapped` | Successful public npm bootstrap receipt or registry fact |
|
|
337
|
+
| `trust-bound` | Trusted publisher binding receipt |
|
|
338
|
+
| `content-ready` | Declared source paths present |
|
|
339
|
+
| `artifact-sealed` | Verified sealed publication bundle |
|
|
340
|
+
| `package-published` | Exact package version visible in npm |
|
|
341
|
+
| `alpha-complete` | Protected Alpha PR completion evidence |
|
|
342
|
+
| `staging-visible` | Staging route evidence |
|
|
343
|
+
| `production-visible` | Production route evidence |
|
|
344
|
+
|
|
345
|
+
`paper status` reports `satisfied`, `not-reached`, `blocked`, or `unknown` for
|
|
346
|
+
each state. It does not promote a state merely because a prior state is
|
|
347
|
+
complete. This makes a later `paper resume` safe: the command dispatches the
|
|
348
|
+
thin repository release workflow, while the workflow re-verifies durable
|
|
349
|
+
evidence and remains the publication authority.
|
|
350
|
+
|
|
351
|
+
Operationally, responsibility remains split:
|
|
352
|
+
|
|
353
|
+
- the paper repository owns content, declared metadata, and its thin
|
|
354
|
+
build/release workflow;
|
|
355
|
+
- Buildchain owns scaffold shape, evidence contracts, reproducibility, sealed
|
|
356
|
+
bundle mechanics, npm transaction mechanics, and resumption planning;
|
|
357
|
+
- GitHub branch protection and trusted publishing own authority transitions;
|
|
358
|
+
- the papers site consumes publication evidence and owns reader-facing
|
|
359
|
+
rendering.
|
|
360
|
+
|
|
361
|
+
Run a local readiness check without network observations:
|
|
362
|
+
|
|
363
|
+
```sh
|
|
364
|
+
buildchain paper preflight --offline --json
|
|
365
|
+
buildchain paper status --json
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Before real npm bootstrap, first inspect the default dry-run result:
|
|
369
|
+
|
|
370
|
+
```sh
|
|
371
|
+
buildchain paper bootstrap npm --json
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Only after reviewing the package, repository, workflow, and dry-run evidence:
|
|
375
|
+
|
|
376
|
+
```sh
|
|
377
|
+
buildchain paper bootstrap npm \
|
|
378
|
+
--execute \
|
|
379
|
+
--confirm-public-package @kungfu-tech/paper-example \
|
|
380
|
+
--json
|
|
381
|
+
```
|
|
382
|
+
|
|
259
383
|
Generate the publication manifest locally or in CI:
|
|
260
384
|
|
|
261
385
|
```sh
|
|
262
386
|
buildchain publication-artifact manifest --source-sha "$(git rev-parse HEAD)" --json
|
|
263
387
|
```
|
|
264
388
|
|
|
389
|
+
Prove the complete candidate from two clean builds:
|
|
390
|
+
|
|
391
|
+
```sh
|
|
392
|
+
buildchain publication-artifact reproducibility \
|
|
393
|
+
--source-sha "$(git rev-parse HEAD)" \
|
|
394
|
+
--promote \
|
|
395
|
+
--json
|
|
396
|
+
```
|
|
397
|
+
|
|
265
398
|
Generate the npm package contents after the manifest exists:
|
|
266
399
|
|
|
267
400
|
```sh
|
|
@@ -280,6 +413,13 @@ import {
|
|
|
280
413
|
collectPublicationPackageFacts,
|
|
281
414
|
preparePublicationNpmPackage,
|
|
282
415
|
} from "@kungfu-tech/buildchain/publication-package";
|
|
416
|
+
|
|
417
|
+
import { verifyPublicationReproducibility } from "@kungfu-tech/buildchain/publication-reproducibility";
|
|
418
|
+
|
|
419
|
+
import {
|
|
420
|
+
createPublicationSealedBundle,
|
|
421
|
+
verifyPublicationSealedBundle,
|
|
422
|
+
} from "@kungfu-tech/buildchain/publication-sealed-bundle";
|
|
283
423
|
```
|
|
284
424
|
|
|
285
425
|
`writePublicationArtifact()` is the single implementation used by the CLI and
|
|
@@ -8,7 +8,7 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: B
|
|
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
|
|
@@ -212,7 +212,7 @@ providers select an explicit adapter:
|
|
|
212
212
|
```bash
|
|
213
213
|
buildchain audit publication-control-plane \
|
|
214
214
|
--repository kungfu-systems/buildchain \
|
|
215
|
-
--branch dev/
|
|
215
|
+
--branch dev/v3/v3.0 \
|
|
216
216
|
--source-sha <exact-merged-branch-sha> \
|
|
217
217
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
218
218
|
--workflow-ref <exact-buildchain-sha> \
|
|
@@ -223,7 +223,7 @@ buildchain audit publication-control-plane \
|
|
|
223
223
|
# Optional stronger external evidence; generate the JSON outside the workflow.
|
|
224
224
|
buildchain audit publication-control-plane \
|
|
225
225
|
--repository kungfu-systems/buildchain \
|
|
226
|
-
--branch dev/
|
|
226
|
+
--branch dev/v3/v3.0 \
|
|
227
227
|
--workflow .github/workflows/release-candidate-promote.yml \
|
|
228
228
|
--publisher-workflow .github/workflows/buildchain-ref-promotion.yml \
|
|
229
229
|
--job promote \
|
|
@@ -232,7 +232,7 @@ buildchain audit publication-control-plane \
|
|
|
232
232
|
|
|
233
233
|
buildchain audit publication-control-plane \
|
|
234
234
|
--repository kungfu-systems/buildchain \
|
|
235
|
-
--branch release/
|
|
235
|
+
--branch release/v3/v3.0 \
|
|
236
236
|
--workflow .github/workflows/.binary-release-assets.yml \
|
|
237
237
|
--job publish \
|
|
238
238
|
--environment buildchain-release-assets \
|