@kungfu-tech/buildchain 3.0.2 → 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 +20 -2
- 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 +146 -0
- 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 +188 -46
- package/dist/site/buildchain-site.json +181 -90
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/cli-registry.json +860 -98
- package/dist/site/controller-registry.json +118 -5
- package/dist/site/kfd-claims.json +233 -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 +374 -59
- package/dist/site/page-registry.json +156 -65
- package/dist/site/public-surface-audit.json +231 -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 +575 -79
- package/docs/MAP.md +22 -4
- package/docs/auditable-demo.md +54 -13
- package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
- package/docs/cli.md +119 -12
- package/docs/consumer-issue-reporting.md +20 -2
- package/docs/dev-alpha-candidate-patrol.md +24 -10
- package/docs/github-governance-authority.md +24 -31
- package/docs/lifecycle-protocol.md +20 -2
- package/docs/migration-inventory.md +24 -5
- package/docs/observed-evidence-patrol.md +28 -12
- 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 +39 -32
- package/docs/release-passport.md +4 -0
- package/docs/release-propagation.md +57 -12
- package/docs/reusable-build-surface.md +218 -90
- package/docs/runtime-train-validation.md +20 -2
- package/docs/shifu-gate-profiles.md +7 -1
- package/docs/stable-candidate-patrol.md +6 -6
- package/docs/toolkit-observability.md +22 -0
- package/docs/versioning.md +46 -24
- package/docs/web-surface-deployments.md +82 -1
- package/package.json +7 -5
- package/packages/core/README.md +60 -4
- package/packages/core/artifact-signing.js +1 -0
- package/packages/core/buildchain-contract.js +9 -4
- package/packages/core/cache-evidence.js +1 -0
- package/packages/core/controller-evidence.js +2 -0
- package/packages/core/diagnostics.js +105 -30
- package/packages/core/github-governance-authority.js +25 -17
- 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-control-plane-audit.js +28 -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 +519 -228
- package/packages/core/release-propagation.js +175 -1
- package/packages/core/stable-release-gate.js +4 -1
- package/scripts/artifact-signing-delegation.mjs +268 -0
- package/scripts/audit-github-governance.mjs +32 -13
- package/scripts/audit-publication-control-plane.mjs +17 -8
- package/scripts/auditable-demo.mjs +266 -7
- 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/buildchain-patrol.mjs +1 -1
- package/scripts/check-internal-architecture.mjs +69 -2
- package/scripts/check-inventory.mjs +70 -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 +288 -43
- package/scripts/dispatch-artifact-signing-authority.mjs +7 -1
- package/scripts/finalize-native-artifact-signing-result.mjs +185 -31
- package/scripts/gate-profile-core.mjs +6 -1
- 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 +52 -14
- package/scripts/maintainability-metrics.mjs +339 -0
- package/scripts/npm-publish-transaction.mjs +57 -6
- package/scripts/observed-evidence.mjs +151 -33
- package/scripts/paper.mjs +645 -0
- package/scripts/promotion-channel-router.mjs +16 -4
- package/scripts/publication-reproducibility.mjs +62 -0
- package/scripts/reconcile-github-governance.mjs +8 -1
- package/scripts/release-propagation.mjs +39 -0
- package/scripts/resolve-artifact-signing-upload-route.mjs +55 -0
- package/scripts/resolve-build-contract.mjs +6 -0
- package/scripts/route-offline-runners.mjs +236 -0
- package/scripts/run-candidate-body-prefix-renderer.mjs +187 -0
- package/scripts/run-lifecycle-core.mjs +62 -1
- package/scripts/runtime-ref-core.mjs +36 -4
- package/scripts/seal-artifact-signing-requests.mjs +64 -12
- package/scripts/stable-candidate-qualification.mjs +50 -0
- package/scripts/verify-artifact-signing-results.mjs +26 -1
- package/scripts/web-surface-core.mjs +272 -86
- package/scripts/web-surface-production-decision.mjs +19 -3
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.
|
|
@@ -34,7 +52,7 @@ The recommended pattern is:
|
|
|
34
52
|
summary: "Buildchain reusable build failed before artifact finalization"
|
|
35
53
|
failure-code: reusable-build-failed
|
|
36
54
|
diagnostics-path: .buildchain/artifacts/diagnostics.json
|
|
37
|
-
buildchain-ref: ${{ inputs.buildchain-ref || '
|
|
55
|
+
buildchain-ref: ${{ inputs.buildchain-ref || 'v3' }}
|
|
38
56
|
```
|
|
39
57
|
|
|
40
58
|
## Behavior
|
|
@@ -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,12 +8,12 @@ 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-29
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-07-
|
|
16
|
-
visible_context: Existing Buildchain
|
|
15
|
+
generated_at: 2026-07-29
|
|
16
|
+
visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
17
17
|
invisible_context_boundary: No credentials, private logs, or private configuration were used.
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -77,13 +77,27 @@ exact same-SHA evidence, it may set `settlement-authorized: true` and
|
|
|
77
77
|
alias for settlement authorization.
|
|
78
78
|
|
|
79
79
|
Repositories whose promotion policy requires a machine-readable PR declaration
|
|
80
|
-
can pass
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
can pass static text through `pull-request-body-prefix`. When the declaration
|
|
81
|
+
depends on the exact qualified delta, use `pull-request-body-prefix-renderer`
|
|
82
|
+
instead. It names a repository-relative Node.js file in the consumer checkout.
|
|
83
|
+
The read-only `observe` job checks out the selected SHA with credentials disabled,
|
|
84
|
+
runs the renderer with a reduced environment, and requires it to write UTF-8 text
|
|
85
|
+
to `BUILDCHAIN_CHANNEL_PATROL_PR_BODY_PREFIX_OUTPUT`. The renderer also receives
|
|
86
|
+
the selected SHA plus source and target branch names. It may derive a declaration
|
|
87
|
+
from the exact checkout and `origin/<target-branch>` without receiving the
|
|
88
|
+
promotion token.
|
|
89
|
+
|
|
90
|
+
Static and rendered prefixes are mutually exclusive. A renderer failure, path
|
|
91
|
+
escape, source-SHA mismatch, empty or oversized result, invalid UTF-8, or managed
|
|
92
|
+
controller-marker injection fails before the write-permission job can run. The
|
|
93
|
+
rendered bytes are retained with the read-only observation artifact and passed
|
|
94
|
+
to `settle` as a job output, so the candidate PR is created with the correct
|
|
95
|
+
declaration on its first write. Buildchain preserves that repository-owned text
|
|
96
|
+
when later observations update only the managed state marker. Before any write,
|
|
97
|
+
`settle` also requires its fresh observation to select the same SHA that produced
|
|
98
|
+
the rendered bytes. Concurrent qualification progress therefore fails closed
|
|
99
|
+
and is recomputed by the next patrol instead of attaching a declaration to the
|
|
100
|
+
wrong candidate.
|
|
87
101
|
|
|
88
102
|
The separately permissioned `settle` job re-runs the exact observation before
|
|
89
103
|
any write. With no active managed candidate, it creates one branch named from
|
|
@@ -8,11 +8,11 @@ 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
|
|
15
|
-
generated_at: 2026-07-
|
|
15
|
+
generated_at: 2026-07-30
|
|
16
16
|
limits: Live GitHub state and account recovery remain provider-controlled and must be re-audited.
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -75,16 +75,19 @@ protection. Inspecting only one layer is insufficient because an applicable
|
|
|
75
75
|
bypass or weaker update path in another layer can invalidate the effective
|
|
76
76
|
policy.
|
|
77
77
|
|
|
78
|
+
When an admitted default development branch uses GitHub merge queue, its
|
|
79
|
+
candidate-source, queue-lease, and final build checks are one exact authority
|
|
80
|
+
set. The queue lease may remain intentionally unbound while workflow-produced
|
|
81
|
+
checks retain their GitHub Actions App binding; strictness must match the live
|
|
82
|
+
queue ruleset.
|
|
83
|
+
|
|
78
84
|
## Repository and plan admission
|
|
79
85
|
|
|
80
|
-
The 2026-07-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
changing repository identity or creating a circular admission dependency. A
|
|
86
|
-
newly discovered repository or target ref is non-authoritative until explicitly
|
|
87
|
-
admitted.
|
|
86
|
+
The 2026-07-30 baseline contains 16 managed public repositories. The descriptor
|
|
87
|
+
sets `managedVisibilities` to `public`; private repositories are outside the
|
|
88
|
+
managed-zone inventory and do not produce governance receipts. Public
|
|
89
|
+
repository names are versioned in the descriptor. A newly discovered public
|
|
90
|
+
repository or target ref is non-authoritative until explicitly admitted.
|
|
88
91
|
|
|
89
92
|
The descriptor also versions every active public merge target. The full audit
|
|
90
93
|
evaluates one receipt per authoritative target rather than assuming the default
|
|
@@ -94,19 +97,11 @@ which case it is non-qualifying. Retained historical channels and generated
|
|
|
94
97
|
per-release publish-gate refs are not silently deleted or promoted to current
|
|
95
98
|
authority; they require an explicit registry revision before they can qualify.
|
|
96
99
|
|
|
97
|
-
For an admitted private repository, the active target set is the current
|
|
98
|
-
default branch plus existing alpha/release siblings on the same version line.
|
|
99
|
-
Its required-check bindings remain non-qualifying until their sanitized binding
|
|
100
|
-
roots are sealed into the private identity entry after supported native
|
|
101
|
-
protection exists.
|
|
102
|
-
|
|
103
100
|
Public repositories can qualify on supported Free, Team, or Enterprise
|
|
104
|
-
enforcement.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
and the implementation never makes a private repository public as a
|
|
109
|
-
workaround.
|
|
101
|
+
enforcement. Organization-wide rules require Team or Enterprise capability.
|
|
102
|
+
The verifier does not reinterpret an excluded private repository as qualifying,
|
|
103
|
+
replace missing native enforcement with CI or documentation, or make a private
|
|
104
|
+
repository public as a workaround.
|
|
110
105
|
|
|
111
106
|
## Read-only audit
|
|
112
107
|
|
|
@@ -148,12 +143,10 @@ allow the exact publication transaction audit to resolve required check runs
|
|
|
148
143
|
and merged pull-request review lineage. Omitting either read permission makes
|
|
149
144
|
the transaction evidence incomplete and therefore non-qualifying.
|
|
150
145
|
|
|
151
|
-
The output is sanitized.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
CODEOWNERS bytes, raw permission payloads, and credential-bearing URLs are
|
|
156
|
-
never included.
|
|
146
|
+
The output is sanitized. Managed public repositories retain their public
|
|
147
|
+
identity. Excluded private repositories produce no receipt or diagnostic.
|
|
148
|
+
Tokens, cookies, recovery material, private CODEOWNERS bytes, raw permission
|
|
149
|
+
payloads, and credential-bearing URLs are never included.
|
|
157
150
|
|
|
158
151
|
## Mutation and rollback boundary
|
|
159
152
|
|
|
@@ -206,8 +199,8 @@ buildchain github-governance rollback \
|
|
|
206
199
|
|
|
207
200
|
For an admitted exact target, classic branch protection can also be compiled
|
|
208
201
|
directly from the authority descriptor. This mode preserves both App-bound
|
|
209
|
-
checks and intentionally unbound check contexts such as Kungfu
|
|
210
|
-
`build`, rather than guessing a provider App identity.
|
|
202
|
+
checks and intentionally unbound check contexts such as Kungfu release's
|
|
203
|
+
legacy `build`, rather than guessing a provider App identity.
|
|
211
204
|
|
|
212
205
|
```bash
|
|
213
206
|
buildchain github-governance protection-policy-plan \
|
|
@@ -241,7 +234,7 @@ branch; unrelated rules and conditions are preserved in place.
|
|
|
241
234
|
```bash
|
|
242
235
|
buildchain github-governance ruleset-policy-plan \
|
|
243
236
|
--repository kungfu-systems/buildchain \
|
|
244
|
-
--branch alpha/
|
|
237
|
+
--branch alpha/v3/v3.0 \
|
|
245
238
|
--ruleset-id 19518955 \
|
|
246
239
|
--snapshot-output ruleset-rollback.json \
|
|
247
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`
|
|
@@ -8,11 +8,11 @@ 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-30
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-07-
|
|
15
|
+
generated_at: 2026-07-30
|
|
16
16
|
invisible_context_boundary: No credentials, private logs, or unpublished evidence values are included.
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -30,15 +30,28 @@ binds one `snapshot.id` to two byte-identical JSON files:
|
|
|
30
30
|
`dogfood-evidence/snapshots/<snapshotId>.json`;
|
|
31
31
|
- a mutable last-known-good alias such as `dogfood-evidence.json`.
|
|
32
32
|
|
|
33
|
+
The bundle may also declare up to 16 derived mutable projections under
|
|
34
|
+
`publication.projections`. Each projection declares its artifact-relative
|
|
35
|
+
`source`, bounded destination `key`, exact `sha256`, `contentType`, and
|
|
36
|
+
`cacheControl`. This supports static HTML such as `dogfood/index.html` without
|
|
37
|
+
changing the existing immutable/latest JSON contract.
|
|
38
|
+
|
|
33
39
|
Buildchain verifies both file digests and snapshot identities before receiving
|
|
34
40
|
production authority. Apply then performs this order:
|
|
35
41
|
|
|
36
42
|
1. conditionally create the immutable key with `If-None-Match: *`;
|
|
37
43
|
2. read the immutable key back and verify its declared SHA-256 metadata;
|
|
38
|
-
3. record
|
|
39
|
-
4.
|
|
40
|
-
5.
|
|
41
|
-
6.
|
|
44
|
+
3. record preceding version metadata for every declared mutable key;
|
|
45
|
+
4. write and read back each derived projection in manifest order;
|
|
46
|
+
5. atomically replace the latest object;
|
|
47
|
+
6. read latest back and verify the same snapshot and digest;
|
|
48
|
+
7. invalidate only the declared viewer paths.
|
|
49
|
+
|
|
50
|
+
Projection-enabled publication requires bucket versioning before replacing an
|
|
51
|
+
existing mutable key. If a later projection, latest update, or invalidation
|
|
52
|
+
fails, Buildchain restores preceding object versions in reverse order and
|
|
53
|
+
removes newly introduced declared projection keys. Rollback never lists the
|
|
54
|
+
bucket and never touches keys outside the manifest.
|
|
42
55
|
|
|
43
56
|
Any generator, schema, digest, immutable-key, provider, or read-after-write
|
|
44
57
|
failure leaves the previous latest object in place. A colliding immutable key
|
|
@@ -58,6 +71,8 @@ review gate for steady-state refreshes. Its policy should allow only:
|
|
|
58
71
|
|
|
59
72
|
- `s3:GetObject` and `s3:PutObject` on the exact latest key;
|
|
60
73
|
- the same actions on the exact immutable snapshot prefix;
|
|
74
|
+
- for projection-enabled bundles, `s3:GetObjectVersion` and bounded
|
|
75
|
+
`s3:DeleteObject` on the exact declared mutable keys;
|
|
61
76
|
- `cloudfront:CreateInvalidation` on the one distribution.
|
|
62
77
|
|
|
63
78
|
It must not receive bucket-wide delete, list, repository write, GitHub PR, or
|
|
@@ -76,9 +91,10 @@ fallback.
|
|
|
76
91
|
|
|
77
92
|
## Rollback and recovery
|
|
78
93
|
|
|
79
|
-
Every receipt records the previous latest snapshot
|
|
80
|
-
version
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
Every receipt records the previous latest and projection snapshot ids, digests,
|
|
95
|
+
ETags, and S3 version ids when available. A projection transaction rolls back
|
|
96
|
+
automatically when a later mutable step or CDN invalidation fails. Operators
|
|
97
|
+
can also regenerate a bundle whose latest file is the selected immutable
|
|
98
|
+
snapshot and republish it through the same validator; immutable history is
|
|
99
|
+
never overwritten or deleted. Legacy bundles without projections retain their
|
|
100
|
+
existing idempotent rerun behavior when CDN invalidation alone fails.
|
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.
|