@kungfu-tech/buildchain 4.1.3 → 4.1.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +11 -13
- package/CONTRIBUTING.md +32 -9
- package/README.md +56 -140
- package/actions/release/promotion/ref/README.md +1 -1
- package/architecture/action-taxonomy.json +1 -1
- package/architecture/agent-change-map.md +32 -45
- package/architecture/build-orchestration.json +1 -1
- package/architecture/capability-state-machine-manifest.json +5 -5
- package/architecture/ci-lane-change-budget.json +92 -92
- package/architecture/code-layout.json +2 -12
- package/architecture/core-mechanisms.json +38 -39
- package/architecture/cross-platform-adopter-qualification.json +1 -1
- package/architecture/dev-delivery-orchestration.json +2 -2
- package/architecture/floating-consumer-policy.json +3 -3
- package/architecture/internal-capabilities.json +27 -28
- package/architecture/maintainability-debt.json +60 -94
- package/architecture/maintainability-policy.json +7 -13
- package/architecture/minimal-consumer-migration.json +43 -5014
- package/architecture/platform-stage-checkpoints.json +1 -1
- package/architecture/release-tail-contract.json +2 -2
- package/architecture/release-topology.json +31 -25
- package/architecture/stage-capsule-qualification.json +1 -1
- package/architecture/universal-workflow-bootstrap.json +60 -60
- package/architecture/universal-workflow-capability-policy.json +3 -3
- package/architecture/universal-workflow-fault-campaign.json +7 -7
- package/architecture/workflow-taxonomy.json +59 -60
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
- package/dist/site/buildchain-contract.json +138 -66
- package/dist/site/buildchain-site.json +257 -331
- package/dist/site/capability-registry.json +4 -4
- package/dist/site/cli-registry.json +6 -142
- package/dist/site/controller-registry.json +19 -19
- package/dist/site/kfd-claims.json +481 -529
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +22 -22
- package/dist/site/node-api-registry.json +82 -339
- package/dist/site/page-registry.json +229 -304
- package/dist/site/public-surface-audit.json +544 -754
- package/dist/site/publication-authority-registry.json +316 -316
- package/dist/site/publication-registry.json +1 -1
- package/dist/site/site-manifest.json +23 -23
- package/dist/site/workflow-registry.json +1071 -1027
- package/docs/MAP.md +28 -20
- package/docs/auditable-demo.md +17 -49
- package/docs/bootstrap-recovery.md +46 -37
- package/docs/cli-reference.md +2 -46
- package/docs/cli.md +97 -186
- package/docs/code-organization.md +7 -5
- package/docs/dev-alpha-candidate-patrol.md +19 -42
- package/docs/dev-delivery-orchestration.md +15 -11
- package/docs/dev-delivery-qualification-landing-adr.md +10 -9
- package/docs/dev-delivery-warrant.md +17 -16
- package/docs/dev-qualification-patrol.md +25 -20
- package/docs/getting-started.md +80 -139
- package/docs/github-artifact-attestation.md +31 -81
- package/docs/install.md +66 -30
- package/docs/lifecycle-protocol.md +19 -57
- package/docs/migration-inventory.md +17 -45
- package/docs/next-development-transition.md +13 -13
- package/docs/node-api-reference.md +122 -138
- package/docs/oci-publication.md +13 -10
- package/docs/publication-artifacts.md +128 -486
- package/docs/publication-authority.md +15 -45
- package/docs/publish-transaction.md +13 -11
- package/docs/release-candidate.md +126 -355
- package/docs/release-discussions.md +36 -67
- package/docs/release-flow.md +80 -339
- package/docs/release-governance.md +114 -962
- package/docs/release-promotion-request.md +45 -43
- package/docs/release-propagation.md +13 -27
- package/docs/release-tail-provider-plane.md +38 -65
- package/docs/reusable-build-surface.md +78 -196
- package/docs/runtime-train-validation.md +8 -6
- package/docs/stable-candidate-patrol.md +13 -66
- package/docs/v4-adopter-delivery.md +15 -15
- package/docs/v4-declarative-release-tail-migration.md +19 -17
- package/docs/v4-production-release.md +11 -6
- package/docs/v4-publication-rehearsal.md +12 -27
- package/docs/v4-stage-capsule.md +14 -20
- package/docs/v4-tail-reseal.md +34 -20
- package/docs/web-surface-deployments.md +26 -264
- package/docs/workflow-catalog.md +31 -31
- package/docs/workflow-path-migration.md +10 -4
- package/package.json +5 -4
- package/packages/core/adoption/buildchain-kfd-claims.js +7 -7
- package/packages/core/adoption/cli/output.mjs +1 -9
- package/packages/core/adoption/cli/product-gate.mjs +1 -15
- package/packages/core/adoption/cli/project.mjs +9 -10
- package/packages/core/adoption/cli/standards.mjs +1 -14
- package/packages/core/adoption/cli/support.mjs +0 -2
- package/packages/core/adoption/cli/surface-register.mjs +0 -2
- package/packages/core/adoption/commands/init-repo.mjs +77 -485
- package/packages/core/adoption/consumer-init.js +279 -0
- package/packages/core/adoption/qualification/admission.js +1 -1
- package/packages/core/build/cli/cache.mjs +0 -2
- package/packages/core/build/cli/facts.mjs +0 -3
- package/packages/core/build/cli/homebrew.mjs +0 -4
- package/packages/core/build/cli/lifecycle.mjs +0 -3
- package/packages/core/build/github-artifact-attestation.js +2 -2
- package/packages/core/build/platform-stage-checkpoints.js +1 -1
- package/packages/core/build/signing/dispatch.js +1 -1
- package/packages/core/consumer/buildchain-config.js +9 -0
- package/packages/core/consumer/contract/inspection.js +351 -9
- package/packages/core/consumer/contract/javascript-syntax.js +439 -0
- package/packages/core/consumer/contract/javascript-values.js +61 -0
- package/packages/core/consumer/contract/javascript.js +555 -0
- package/packages/core/consumer/contract/local-validation.js +84 -0
- package/packages/core/contracts/buildchain-contract.js +39 -8
- package/packages/core/contracts/cli/introspection.mjs +1 -9
- package/packages/core/contracts/public-surface-cli.js +0 -1
- package/packages/core/dev-delivery/dev-delivery-contract-surface.js +2 -2
- package/packages/core/governance/buildchain-publication-authority.js +24 -24
- package/packages/core/governance/cli/doctor.mjs +58 -42
- package/packages/core/governance/commands/architecture.mjs +6 -1
- package/packages/core/governance/commands/audit-publication-control-plane.mjs +1 -1
- package/packages/core/governance/commands/workflow-friction-report.mjs +1 -1
- package/packages/core/governance/github-governance-authority.js +2 -2
- package/packages/core/governance/publication/collection.js +1 -1
- package/packages/core/index.js +1 -3
- package/packages/core/observability/cli/candidate.mjs +0 -2
- package/packages/core/observability/cli/context.mjs +0 -5
- package/packages/core/observability/cli/diagnostics.mjs +0 -7
- package/packages/core/observability/cli/events.mjs +2 -10
- package/packages/core/paper/commands/paper-work-fleet-cli.mjs +1 -1
- package/packages/core/paper/commands/paper.mjs +33 -422
- package/packages/core/paper/consumer-status.js +72 -0
- package/packages/core/paper/operations/identity.js +0 -3
- package/packages/core/paper/operations/migration.js +460 -0
- package/packages/core/paper/operations/preflight-checks.js +8 -68
- package/packages/core/paper/operations/scaffold.js +16 -326
- package/packages/core/paper/operations/status.js +27 -53
- package/packages/core/paper/paper-agent-entry.js +36 -147
- package/packages/core/paper/paper-fleet.js +24 -39
- package/packages/core/paper/paper-repository.js +16 -0
- package/packages/core/paper/paper-runtime-channels.js +1 -1
- package/packages/core/paper/paper-scaffold-content.js +153 -162
- package/packages/core/paper/paper-work.js +3 -10
- package/packages/core/paper/paper.js +43 -5
- package/packages/core/providers/github/artifact-attestation.js +1 -1
- package/packages/core/providers/github/pipeline-context-artifacts.js +172 -0
- package/packages/core/publication/authority/control-plane.js +2 -2
- package/packages/core/publication/authority/seal.js +1 -1
- package/packages/core/publication/cli/dispatch.mjs +1 -12
- package/packages/core/publication/pipeline/actions.js +16 -9
- package/packages/core/publication/pipeline/apply.js +17 -9
- package/packages/core/publication/pipeline/context.js +29 -0
- package/packages/core/publication/pipeline/prepare.js +15 -6
- package/packages/core/publication/pipeline/recovery-materials.js +63 -1
- package/packages/core/publication/pipeline/recovery-prepare.js +21 -9
- package/packages/core/publication/pipeline/stable-entry.js +12 -7
- package/packages/core/publication/pipeline/stable-products.js +21 -19
- package/packages/core/publication/pipeline/version-actions.js +15 -6
- package/packages/core/publication/publication-rehearsal-projection.js +0 -9
- package/packages/core/release/cli/dispatch.mjs +1 -4
- package/packages/core/release/cli/inspection-handlers.mjs +1 -33
- package/packages/core/release/cli/release-handlers.mjs +2 -19
- package/packages/core/release/cli/verification-handlers.mjs +4 -25
- package/packages/core/release/next-development-projection.js +13 -13
- package/packages/core/release/passport/locations.js +13 -8
- package/packages/core/release/release-passport.js +70 -5
- package/packages/core/web/cli/badges.mjs +0 -4
- package/packages/core/web/publication-admission.js +1 -1
- package/packages/core/web/publication-capability.js +1 -1
- package/packages/core/web/readme-badges.js +1 -1
- package/packages/core/workflow/cli/main.mjs +1 -4
- package/packages/core/workflow/cli/process.mjs +1 -1
- package/packages/core/workflow/commands/buildchain-cli-help.mjs +2 -8
- package/packages/core/workflow/engine/conformance.js +1 -1
- package/packages/core/workflow/pipeline/build.js +21 -1
- package/packages/core/workflow/pipeline/delivery-observation.js +6 -2
- package/packages/core/workflow/workflow-taxonomy.mjs +61 -17
- package/scripts/check-code-layout.mjs +2 -0
- package/scripts/check-core-mechanism-inventory.mjs +29 -13
- package/scripts/check-floating-consumer-policy-contract.mjs +3 -3
- package/scripts/check-inventory.mjs +27 -27
- package/scripts/check-maintainability.mjs +28 -5
- package/scripts/check-public-dogfood-contract.mjs +3 -3
- package/scripts/check-release-topology.mjs +1 -1
- package/scripts/check-self-consumer-contract.mjs +7 -7
- package/scripts/check-universal-workflow-bootstrap.mjs +1 -1
- package/scripts/generate-channel-promotion-workflow.mjs +1 -1
- package/scripts/generate-minimal-consumer-contract.mjs +21 -1
- package/scripts/generate-site-bundle.mjs +2 -1
- package/scripts/generate-tail-reseal-fixture.mjs +3 -3
- package/scripts/inventory/promotion.mjs +1 -1
- package/scripts/next-development-self-dogfood-harness.mjs +1 -1
- package/scripts/next-development-self-dogfood.mjs +4 -4
- package/scripts/site-capability-metadata.mjs +2 -6
- package/scripts/source-metric-lineage.mjs +62 -7
- package/scripts/verify-golden-path.mjs +31 -35
- package/templates/native-dev-delivery.yml +1 -1
- package/templates/universal-buildchain-bootstrap.yml +1 -1
- package/packages/core/paper/operations/bootstrap.js +0 -75
- package/packages/core/paper/operations/plans.js +0 -213
- package/packages/core/paper/operations/provisioning.js +0 -113
- package/packages/core/paper/operations/scaffold-config.js +0 -77
- package/packages/core/paper/operations/scaffold-workflows.js +0 -116
- package/packages/core/paper/operations/workspace.js +0 -60
- package/packages/core/paper/paper-npm-bootstrap.js +0 -492
|
@@ -7,17 +7,21 @@ source_level: local-files
|
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
|
-
review_state:
|
|
11
|
-
last_reviewed: 2026-09-
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
|
-
model_family: GPT-
|
|
13
|
+
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
16
|
invisible_context: not asserted
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Dev Delivery Warrant Queue
|
|
20
20
|
|
|
21
|
+
Warrant, lease, proof and provider fields on this page are internal authority
|
|
22
|
+
contracts. Consumers use the shared normal pipeline and recover by exact attempt;
|
|
23
|
+
none of these fields or helper workflows belongs in consumer YAML or TOML.
|
|
24
|
+
|
|
21
25
|
Buildchain's Dev Delivery Warrant Queue gives a qualified slow pull request a
|
|
22
26
|
durable, non-preemptive delivery turn without replacing GitHub Merge Queue as
|
|
23
27
|
the final protected-ref authority.
|
|
@@ -321,7 +325,7 @@ The reader rejects an empty run conclusion, nonterminal run or job state,
|
|
|
321
325
|
unsupported job conclusion, or pull-request state outside `open|closed` before
|
|
322
326
|
it can seal product-owned cleanup evidence.
|
|
323
327
|
|
|
324
|
-
The
|
|
328
|
+
The internal two-phase workflow keeps heartbeat authority in a fourth,
|
|
325
329
|
GitHub-hosted job on a runner domain distinct from admission, native execution,
|
|
326
330
|
evidence sealing, and finalization. Each successful heartbeat records the exact
|
|
327
331
|
expected-old and next authority state roots plus its receipt root. The
|
|
@@ -340,13 +344,10 @@ write-normalize-observe-remutate cycle: `transferRoot`,
|
|
|
340
344
|
`providerAttempt`, and, when expiry cleanup was required, the independent
|
|
341
345
|
`providerTerminalReadbackRoot`.
|
|
342
346
|
|
|
343
|
-
Buildchain's
|
|
344
|
-
|
|
345
|
-
The
|
|
346
|
-
|
|
347
|
-
`.buildchain/alpha-contract-lock.json` (`v4-alpha`), and a train runtime may be
|
|
348
|
-
selected only through the trusted, non-persistent `workflow_dispatch` input.
|
|
349
|
-
No candidate SHA or train ref is persisted in the caller.
|
|
347
|
+
Buildchain's self entry is the same generated `buildchain.yml` used by other
|
|
348
|
+
consumers. Internal `.ops-dev-auto-merge.yml` execution retains its authority
|
|
349
|
+
boundaries. The optional repaired runtime belongs only to exact-attempt recovery;
|
|
350
|
+
no candidate SHA or train ref is persisted in the consumer caller.
|
|
350
351
|
|
|
351
352
|
Only complete `verified-native-qualification` evidence can mint a new Landing
|
|
352
353
|
Warrant. Migrated `legacy-compatibility-only` evidence may preserve an exact
|
|
@@ -402,7 +403,7 @@ native proof or reuse authority. Phase-less native candidates remain invalid.
|
|
|
402
403
|
|
|
403
404
|
## Workflow rollout and rollback
|
|
404
405
|
|
|
405
|
-
The
|
|
406
|
+
The internal `.ops-dev-auto-merge.yml` component retains three rollout modes for implementation qualification:
|
|
406
407
|
|
|
407
408
|
- `off` preserves the previous exact-head admission controller;
|
|
408
409
|
- `shadow` qualifies the source and emits a read-only queue submission plan;
|
|
@@ -423,12 +424,12 @@ The reusable `public-ops-dev-auto-merge.yml` supports three explicit rollout mod
|
|
|
423
424
|
timestamped proof bytes, but it retains the immutable active Warrant and its
|
|
424
425
|
originally selected proof instead of rewriting or rejecting that attempt.
|
|
425
426
|
Each candidate also retains the exact successful source workflow run. If a
|
|
426
|
-
controller discovers that another candidate owns the active Warrant,
|
|
427
|
-
|
|
427
|
+
controller discovers that another candidate owns the active Warrant, an
|
|
428
|
+
admitted internal continuation is dispatched immediately for that exact PR,
|
|
428
429
|
head, source run, Assignment and Initiative, source identity and patch,
|
|
429
430
|
plan, closure, dependency, toolchain, environment, affected paths, delivery
|
|
430
431
|
class, and priority; the candidate is not left waiting for a patrol cron.
|
|
431
|
-
The
|
|
432
|
+
The internal workflow and native fixture configure this handoff path
|
|
432
433
|
and accept the same complete input contract. A historical phase-less owner
|
|
433
434
|
uses the distinct `legacy-phase-less-active-owner` command path. That path
|
|
434
435
|
carries the exact queue state root observed before its duplicate submission,
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
status:
|
|
2
|
+
status: active
|
|
3
3
|
period: ongoing
|
|
4
4
|
theme: dev-qualification-patrol
|
|
5
|
-
doc_type:
|
|
5
|
+
doc_type: technical-reference
|
|
6
6
|
source_level: local-files
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
|
-
review_state:
|
|
11
|
-
last_reviewed: 2026-
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
|
-
model_family: GPT-
|
|
13
|
+
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
16
|
-
visible_context:
|
|
17
|
-
invisible_context_boundary: No
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Current workflow taxonomy, shared consumer entry contract, and retained internal qualification controller.
|
|
17
|
+
invisible_context_boundary: No new hosted qualification or external consumer migration is claimed.
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
# Dev Qualification Patrol
|
|
20
|
+
# Internal Dev Qualification Patrol
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
This document describes the internal
|
|
23
|
+
[`.ops-dev-qualification-patrol.yml`](../.github/workflows/.ops-dev-qualification-patrol.yml)
|
|
24
|
+
component. Consumers use the generated normal and attempt recovery callers;
|
|
25
|
+
they do not add a patrol workflow, schedule, dispatch payload, or controller
|
|
26
|
+
script. See the [Golden Path](getting-started.md).
|
|
27
|
+
|
|
28
|
+
The retained controller handles internal qualification for a development
|
|
29
|
+
branch that advances faster than a heavy cross-platform qualification workflow can
|
|
24
30
|
settle. The controller keeps no external queue. On every wakeup it derives the
|
|
25
31
|
only pending item from the current source-branch head and maintains these
|
|
26
32
|
states:
|
|
@@ -45,14 +51,13 @@ without consuming the shared native runners.
|
|
|
45
51
|
|
|
46
52
|
## Exact-source and priority contract
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
workflow
|
|
50
|
-
|
|
51
|
-
GitHub events. Repeated wakeups are idempotent.
|
|
54
|
+
Internal orchestration owns wakeups from preflight, qualification and priority
|
|
55
|
+
workflow completion. Repeated wakeups are idempotent. Event recovery belongs
|
|
56
|
+
to the runtime; this component does not require an extra consumer caller.
|
|
52
57
|
|
|
53
58
|
The controller requires a successful preflight whose `head_sha` equals the
|
|
54
59
|
current source head. It dispatches the heavy workflow on the source branch and
|
|
55
|
-
adds a controller-owned `source-sha` input. The
|
|
60
|
+
adds a controller-owned `source-sha` input. The internal qualification adapter must reject the run
|
|
56
61
|
before qualification if that input differs from the workflow event SHA. This
|
|
57
62
|
closes the race where the branch advances between observation and workflow
|
|
58
63
|
startup. The heavy reusable Gate workflow then receives the exact SHA as its
|
|
@@ -97,10 +102,10 @@ is false. Before writing, it re-resolves the branch and all workflow state and
|
|
|
97
102
|
requires the action and source SHA to match the read-only observation. A race
|
|
98
103
|
fails closed and the next event recomputes from current truth.
|
|
99
104
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
mutation
|
|
103
|
-
pull-request, tag, release, package, or publication
|
|
105
|
+
The internal dry-run mode retains observation and mutation decisions as
|
|
106
|
+
exact-source artifacts with a canonical decision root. Its separately scoped
|
|
107
|
+
mutation credential can write Actions; it does not receive contents,
|
|
108
|
+
pull-request, tag, release, package, or publication authority.
|
|
104
109
|
|
|
105
110
|
The controller does not merge a PR, publish an Alpha, create a tag, create a
|
|
106
111
|
release, or settle a Release Passport. Once Dev and Alpha preflight evidence
|
package/docs/getting-started.md
CHANGED
|
@@ -6,163 +6,104 @@ doc_type: technical-guide
|
|
|
6
6
|
source_level: local-files
|
|
7
7
|
confidence: high
|
|
8
8
|
sensitivity: public
|
|
9
|
-
evidence_grade:
|
|
9
|
+
evidence_grade: B
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-09-
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-09-
|
|
16
|
-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Schema-2 initializer, shared caller generator and local validation code.
|
|
17
|
+
invisible_context_boundary: Initialization does not prove hosted publication or provider authorization.
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
# Buildchain Golden Path
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exact
|
|
24
|
-
reusable workflow caller, and a Release Passport inspection.
|
|
22
|
+
A consumer owns its product source and one schema-2 TOML declaration.
|
|
23
|
+
Buildchain generates two product-independent YAML callers: normal execution
|
|
24
|
+
and exact-attempt recovery. The published runtime owns delivery and publication.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
after the local checks below are green.
|
|
26
|
+
## Install and initialize
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
In an existing npm product repository with a version in `package.json`:
|
|
30
29
|
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
npm init -y
|
|
35
|
-
buildchain_version="$(npm view @kungfu-tech/buildchain version)"
|
|
36
|
-
pnpm add -D "@kungfu-tech/buildchain@$buildchain_version"
|
|
37
|
-
pnpm exec buildchain --version
|
|
30
|
+
```sh
|
|
31
|
+
pnpm add -D --save-exact @kungfu-tech/buildchain
|
|
32
|
+
pnpm exec buildchain init --type npm --package-manager pnpm
|
|
38
33
|
```
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
Use `--type binary` for a CMake product or `--type paper` for a PDF product.
|
|
36
|
+
`package`, `native`, and `publication-artifact` select the corresponding product
|
|
37
|
+
kind. `anchored-package` selects an npm product whose version is changed by a
|
|
38
|
+
reviewed source update rather than automatic version rewriting.
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
Initialization writes:
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`
|
|
42
|
+
- `.buildchain/buildchain.toml`: products, artifacts, publication targets,
|
|
43
|
+
version files, channel routes and protected review policy;
|
|
44
|
+
- `.github/workflows/buildchain.yml`: the normal `public-ops-pipeline.yml` caller;
|
|
45
|
+
- `.github/workflows/buildchain-recover.yml`: the `public-ops-recover.yml` caller;
|
|
46
|
+
- a managed consumer section in `AGENTS.md`;
|
|
47
|
+
- `release.json` as version source when a binary or Paper product has no package version.
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
sed -n '1,220p' .buildchain/buildchain.toml
|
|
58
|
-
sed -n '1,220p' .github/workflows/build.yml
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`buildchain.toml` owns repository lifecycle declarations. The workflow is a
|
|
62
|
-
thin caller of Buildchain's reusable workflow; it is not a second release
|
|
63
|
-
implementation.
|
|
49
|
+
Both YAML files are byte-identical across npm, binary and Paper projects.
|
|
50
|
+
Edit product install, build, verification and artifact declarations in TOML to
|
|
51
|
+
match your existing source. Keep the generated caller bytes unchanged. There
|
|
52
|
+
are no consumer publication commands, hidden controller scripts or provider
|
|
53
|
+
request payloads to maintain.
|
|
64
54
|
|
|
65
|
-
##
|
|
55
|
+
## Validate locally
|
|
66
56
|
|
|
67
|
-
```
|
|
68
|
-
pnpm exec buildchain validate
|
|
69
|
-
--require-version-state \
|
|
70
|
-
--require-lifecycle-stages install,build,verify
|
|
57
|
+
```sh
|
|
58
|
+
pnpm exec buildchain validate --require-version-state
|
|
71
59
|
pnpm exec buildchain doctor --json
|
|
72
60
|
```
|
|
73
61
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
For a real release, the protected Buildchain workflow creates the Passport from
|
|
124
|
-
the exact source, artifact, controller, and publication evidence. See
|
|
125
|
-
[Release Passport](release-passport.md); do not promote this local example.
|
|
126
|
-
|
|
127
|
-
## You are done when
|
|
128
|
-
|
|
129
|
-
- the dependency and lockfile contain one exact Buildchain version;
|
|
130
|
-
- `.buildchain/buildchain.toml` declares the intended project type and lifecycle;
|
|
131
|
-
- `validate` and `doctor` succeed;
|
|
132
|
-
- `.github/workflows/build.yml` remains a thin reusable-workflow caller;
|
|
133
|
-
- the release dry-run and local Passport inspection both return structured output.
|
|
134
|
-
|
|
135
|
-
The repository test `pnpm run check:golden-path` reproduces this path in a new
|
|
136
|
-
temporary consumer using the locally packed Buildchain package.
|
|
137
|
-
|
|
138
|
-
## Choose the next manual
|
|
139
|
-
|
|
140
|
-
| Intent | Next page |
|
|
141
|
-
| --- | --- |
|
|
142
|
-
| Change lifecycle commands or version files | [Lifecycle Protocol](lifecycle-protocol.md) |
|
|
143
|
-
| Configure native matrices, runners, caches, or artifacts | [Reusable Build Surface](reusable-build-surface.md) |
|
|
144
|
-
| Look up a command | [Generated CLI Reference](cli-reference.md) |
|
|
145
|
-
| Import the Node toolkit | [Generated Node API Reference](node-api-reference.md) |
|
|
146
|
-
| Understand protected branches and tags | [Release Flow](release-flow.md) |
|
|
147
|
-
| Verify published evidence | [Release Passport](release-passport.md) |
|
|
148
|
-
|
|
149
|
-
## Troubleshooting
|
|
150
|
-
|
|
151
|
-
- `already exists`: initialization is no-overwrite by default. Inspect the
|
|
152
|
-
existing files; use `--force` only for an intentional replacement.
|
|
153
|
-
- missing lifecycle stage: add the named stage to
|
|
154
|
-
`.buildchain/buildchain.toml`; do not weaken the validation command.
|
|
155
|
-
- package release-age policy: add a temporary, package-and-version-specific
|
|
156
|
-
`minimumReleaseAgeExclude`, then remove it after the normal window.
|
|
157
|
-
- unsure about syntax: run `buildchain <path> --help`. Help is intercepted
|
|
158
|
-
before command dispatch and is side-effect free at every governed path.
|
|
159
|
-
|
|
160
|
-
## Small glossary
|
|
161
|
-
|
|
162
|
-
- **project type**: the repository shape selected by `buildchain init`.
|
|
163
|
-
- **lifecycle**: repository-owned install, build, verify, and publish commands.
|
|
164
|
-
- **reusable workflow**: Buildchain-owned GitHub Actions control plane called by
|
|
165
|
-
a thin consumer workflow.
|
|
166
|
-
- **Release Passport**: source- and artifact-bound release evidence, not a
|
|
167
|
-
release trigger.
|
|
168
|
-
- **train ref**: a temporary validation runtime; never a production dependency.
|
|
62
|
+
For npm products, `--require-lifecycle-stages install,build,verify` also checks
|
|
63
|
+
that every product declares those commands. Binary and Paper products can omit
|
|
64
|
+
an install stage. Run your product's declared build and verification commands
|
|
65
|
+
before opening the first PR.
|
|
66
|
+
|
|
67
|
+
`validate` checks the schema, declared version sources and both caller files.
|
|
68
|
+
`doctor` also checks the Git repository and, for npm products, package-manager
|
|
69
|
+
discovery. Local success establishes configuration validity; hosted qualification
|
|
70
|
+
and publication have their own source-bound results.
|
|
71
|
+
|
|
72
|
+
## Use the normal release path
|
|
73
|
+
|
|
74
|
+
Commit the generated files and product source. Complete repository permissions,
|
|
75
|
+
branch protection, independent reviewer configuration and provider authorization
|
|
76
|
+
once. When present, tool-maintained stable and Alpha contract locks select the
|
|
77
|
+
published runtime. Without a lock, the published entry uses its own exact runtime
|
|
78
|
+
commit; initialization does not invent a lock or require one to select that default.
|
|
79
|
+
Existing npm Trusted Publishing remains in use; normal releases do not require
|
|
80
|
+
an interactive npm login or a manually supplied publishing token.
|
|
81
|
+
|
|
82
|
+
Open a PR along a route declared in TOML: a feature branch into development,
|
|
83
|
+
development into Alpha, or Alpha into release. The same normal caller handles
|
|
84
|
+
build, protected delivery, publication, provider readback and next-development.
|
|
85
|
+
Follow the workflow's actual result and published Release Passport.
|
|
86
|
+
|
|
87
|
+
For an interrupted attempt, run `buildchain-recover.yml` with its exact attempt.
|
|
88
|
+
Supply a repaired runtime only when a runtime repair is needed. Do not supply
|
|
89
|
+
replacement source, artifacts or provider-effect parameters.
|
|
90
|
+
|
|
91
|
+
## Migrating old callers
|
|
92
|
+
|
|
93
|
+
Schema-1 product-specific workflow callers are not generated by this initializer.
|
|
94
|
+
The old `web-surface` and `infra-contract` initialization modes are outside the
|
|
95
|
+
current schema-2 npm/binary/Paper pipeline; initialization rejects them before
|
|
96
|
+
writing files. Their internal product modules remain available to maintainers.
|
|
97
|
+
|
|
98
|
+
Existing unrelated workflows or conflicting files stop initialization before
|
|
99
|
+
any write. `--force` replaces the declared generated files only; it does not
|
|
100
|
+
delete other workflows or follow symlinks. Move product commands into TOML and
|
|
101
|
+
remove obsolete consumer orchestration as part of an explicit migration.
|
|
102
|
+
|
|
103
|
+
See the [standard examples](../templates/minimal-consumer/),
|
|
104
|
+
[workflow catalog](workflow-catalog.md), [CLI reference](cli-reference.md), and
|
|
105
|
+
[Release Passport](release-passport.md).
|
|
106
|
+
|
|
107
|
+
`pnpm run check:golden-path` packs the local package, installs it in a temporary
|
|
108
|
+
consumer, initializes and validates the shared caller pair, and executes the
|
|
109
|
+
fixture product build and check. It performs no hosted publication.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
status: draft
|
|
3
|
-
period:
|
|
3
|
+
period: ongoing
|
|
4
4
|
theme: buildchain-linux-artifact-provenance
|
|
5
5
|
doc_type: protocol
|
|
6
6
|
source_level: code-and-official-docs
|
|
@@ -8,17 +8,23 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: unreviewed
|
|
11
|
-
last_reviewed: 2026-09-
|
|
11
|
+
last_reviewed: 2026-09-20
|
|
12
12
|
ai_provenance:
|
|
13
|
-
model_family: GPT-
|
|
13
|
+
model_family: GPT-6
|
|
14
14
|
product: Codex
|
|
15
|
-
generated_at: 2026-
|
|
16
|
-
visible_context: Buildchain
|
|
17
|
-
|
|
15
|
+
generated_at: 2026-09-20
|
|
16
|
+
visible_context: Current Buildchain taxonomy and consumer contract, retained attestation implementation and protocol documentation.
|
|
17
|
+
invisible_context_boundary: No fresh provider attestation or hosted qualification is asserted by this documentation update.
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
# GitHub-native Linux Artifact Attestation
|
|
21
21
|
|
|
22
|
+
This is an internal protocol reference. Consumers use the generated normal and
|
|
23
|
+
recovery callers described in the [Golden Path](getting-started.md); they do
|
|
24
|
+
not add a promotion or attester workflow, prepare policy JSON, or select source
|
|
25
|
+
and artifact roots. The retained internal component is
|
|
26
|
+
[`.release-artifact-attestation.yml`](../.github/workflows/.release-artifact-attestation.yml).
|
|
27
|
+
|
|
22
28
|
Buildchain can bind a Linux release artifact to its original compiler run, exact
|
|
23
29
|
source revision, platform manifest, Release Passport, and an immutable
|
|
24
30
|
Buildchain attester workflow. GitHub's OIDC identity and artifact attestation
|
|
@@ -68,7 +74,7 @@ still binding both directions.
|
|
|
68
74
|
|
|
69
75
|
## GitHub Permissions and Runtime Pins
|
|
70
76
|
|
|
71
|
-
|
|
77
|
+
The internal attester invocation and its reusable component grant only:
|
|
72
78
|
|
|
73
79
|
```yaml
|
|
74
80
|
permissions:
|
|
@@ -85,9 +91,11 @@ itself must also be called at its exact signer-bootstrap commit. The signer
|
|
|
85
91
|
commit and the later Buildchain runtime commit are separately bound so the
|
|
86
92
|
first v3 integration never relies on a mutable or self-referential workflow ref.
|
|
87
93
|
|
|
88
|
-
##
|
|
94
|
+
## Internal Release Passport preparation
|
|
89
95
|
|
|
90
|
-
|
|
96
|
+
The runtime owns policy preparation. Maintainers can inspect the retained
|
|
97
|
+
policy contract with the following low-level tooling; these commands are not
|
|
98
|
+
consumer lifecycle steps. One input document describes each Linux artifact:
|
|
91
99
|
|
|
92
100
|
```bash
|
|
93
101
|
buildchain create github-artifact-attestation-policy \
|
|
@@ -110,74 +118,17 @@ buildchain collect github-release \
|
|
|
110
118
|
# ...the existing release inputs
|
|
111
119
|
```
|
|
112
120
|
|
|
113
|
-
The
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
```yaml
|
|
119
|
-
with:
|
|
120
|
-
github-artifact-attestation-subject-path: dist/kungfu-linux-x64.tar.gz
|
|
121
|
-
github-artifact-attestation-signer-sha: <exact-signer-bootstrap-sha>
|
|
122
|
-
github-artifact-attestation-platform-id: linux-x64
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
For release promotion, prefer the integrated v3 route. The policy must already
|
|
126
|
-
be present in the downloaded release-candidate payload:
|
|
127
|
-
|
|
128
|
-
```yaml
|
|
129
|
-
permissions:
|
|
130
|
-
actions: write
|
|
131
|
-
artifact-metadata: write
|
|
132
|
-
attestations: write
|
|
133
|
-
checks: write
|
|
134
|
-
contents: write
|
|
135
|
-
id-token: write
|
|
136
|
-
issues: write
|
|
137
|
-
|
|
138
|
-
jobs:
|
|
139
|
-
promote:
|
|
140
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-release-promote.yml@v4
|
|
141
|
-
with:
|
|
142
|
-
github-release: true
|
|
143
|
-
release-passport: true
|
|
144
|
-
github-artifact-attestation-policy-json: .buildchain/release-candidate/payload/<artifact>/policy.json
|
|
145
|
-
github-artifact-attestation-environment: buildchain-artifact-attestation
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Promotion binds the policy into the Passport, stages only digest-matching data,
|
|
149
|
-
calls the public signer entry, verifies the provider identity a second time, and
|
|
150
|
-
publishes immutable bundle, predicate, verification, evidence, and receipt
|
|
151
|
-
assets beside the release artifact. A same-name Release asset with different
|
|
152
|
-
bytes is rejected instead of overwritten.
|
|
153
|
-
|
|
154
|
-
Low-level callers may call the reusable attester directly after their Passport
|
|
155
|
-
job. The public entry selects the execution runtime through the same contract as
|
|
156
|
-
build and release. Provider signer identity and subject digests remain mandatory:
|
|
121
|
+
The retained attestation mechanism binds the original compiler execution,
|
|
122
|
+
sealed candidate payload, platform manifest and Passport. Internal promotion
|
|
123
|
+
stages only digest-matching data, invokes the internal signer, verifies provider
|
|
124
|
+
identity, and retains the bundle, predicate, verification evidence and receipt.
|
|
125
|
+
A same-name published asset with different bytes is rejected.
|
|
157
126
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
actions: read
|
|
164
|
-
artifact-metadata: write
|
|
165
|
-
attestations: write
|
|
166
|
-
contents: read
|
|
167
|
-
id-token: write
|
|
168
|
-
uses: kungfu-systems/buildchain/.github/workflows/public-release-artifact-attestation.yml@v4
|
|
169
|
-
with:
|
|
170
|
-
evidence-run-id: ${{ github.run_id }}
|
|
171
|
-
source-sha: ${{ github.sha }}
|
|
172
|
-
subject-artifact-name: linux-release
|
|
173
|
-
subject-relative-path: libnode-linux-x64.tar.gz
|
|
174
|
-
platform-manifest-artifact-name: linux-platform-manifest
|
|
175
|
-
platform-manifest-relative-path: manifest.json
|
|
176
|
-
release-passport-artifact-name: release-passport
|
|
177
|
-
release-passport-relative-path: buildchain.release.json
|
|
178
|
-
policy-json: ${{ needs.release-passport.outputs.github-attestation-policy-json }}
|
|
179
|
-
evidence-artifact-name: linux-attestation-evidence
|
|
180
|
-
```
|
|
127
|
+
Signer bootstrap identity and the runtime used to build the product remain
|
|
128
|
+
separate immutable facts. These fields are derived and checked inside the
|
|
129
|
+
runtime. Neither `public-release-promote.yml` nor
|
|
130
|
+
`public-release-artifact-attestation.yml` is a current consumer API; new wiring
|
|
131
|
+
must not copy the former v3 input sets into an extra workflow.
|
|
181
132
|
|
|
182
133
|
## Verify Online and Offline
|
|
183
134
|
|
|
@@ -209,8 +160,7 @@ expected statement, or GitHub reports a self-hosted signer.
|
|
|
209
160
|
|
|
210
161
|
## Qualification Policy
|
|
211
162
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
cases above. A successful local fixture is necessary but not sufficient.
|
|
163
|
+
Protocol changes land through the protected `dev/v4/v4.1` workflow and require
|
|
164
|
+
qualification of the exact published runtime before consumer adoption. Local
|
|
165
|
+
fixtures validate the protocol's negative cases; they do not substitute for a
|
|
166
|
+
real GitHub OIDC/Sigstore qualification run or prove provider publication.
|