@kungfu-tech/buildchain 4.0.0 → 4.0.1-alpha.10
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 +13 -5
- package/actions/promote-buildchain-ref/README.md +11 -6
- package/actions/release-tail/README.md +8 -0
- package/architecture/ci-lane-change-budget.json +187 -0
- package/architecture/decisions/0002-next-development-transition.md +101 -0
- package/architecture/decisions/0003-two-phase-delivery-warrant.md +152 -0
- package/architecture/internal-capabilities.json +219 -7
- package/architecture/maintainability-policy.json +246 -29
- package/architecture/release-tail-contract-inventory.json +5 -2
- package/architecture/v3-core-mechanism-inventory.json +91 -0
- package/architecture/v4-adopter-delivery-parity.json +32 -5
- package/architecture/v4-capability-state-machine-manifest.json +73 -0
- package/architecture/v4-compatibility-facts-parity.json +77 -0
- package/architecture/v4-delivery-authority-parity.json +250 -0
- package/architecture/v4-delivery-warrant-shadow-fixtures.json +41 -9
- package/architecture/v4-floating-consumer-policy.json +81 -0
- package/architecture/v4-floating-consumer-policy.md +32 -0
- package/architecture/v4-next-development-parity.json +192 -0
- package/architecture/v4-publication-rehearsal-parity.json +84 -0
- package/architecture/v4-release-train-parity.json +1 -0
- package/architecture/v4-runtime-ref-resume-authority.json +64 -0
- package/architecture/v4-stage-capsule-qualification.json +2 -2
- package/architecture/v4-tail-reseal-parity.json +150 -0
- package/bin/buildchain.mjs +32 -3
- package/bin/internal/adopter-delivery-cli.mjs +70 -0
- package/bin/internal/command-registry.mjs +3 -0
- package/bin/internal/compatibility-facts-cli.mjs +101 -0
- package/bin/internal/trust-release-release-handlers.mjs +5 -0
- package/contracts/dev-delivery-authority-v2.schema.json +662 -0
- package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
- package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
- package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
- package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
- package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
- package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
- package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
- package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
- package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
- package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +59 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
- package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
- package/contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json +15 -0
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
- package/contracts/next-development-request-v1.schema.json +66 -0
- package/contracts/next-development-transition-v1.schema.json +292 -0
- package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
- package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
- package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +107 -0
- package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
- package/contracts/v4-runtime-ref-resume-authority-v1.schema.json +235 -0
- package/contracts/v4-tail-reseal-v1.schema.json +276 -0
- package/dist/site/agent-index.json +5 -0
- package/dist/site/artifact-schemas.json +10 -0
- package/dist/site/buildchain-contract.json +1562 -44
- package/dist/site/buildchain-site.json +684 -42
- package/dist/site/capability-registry.json +17 -14
- package/dist/site/cli-registry.json +205 -3
- package/dist/site/controller-registry.json +62 -6
- package/dist/site/kfd-claims.json +551 -22
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +55 -9
- package/dist/site/node-api-registry.json +15247 -8690
- package/dist/site/page-registry.json +647 -29
- package/dist/site/public-surface-audit.json +876 -55
- package/dist/site/publication-authority-registry.json +44 -8
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +26 -0
- package/dist/site/schemas/dev-delivery-authority-v2.schema.json +662 -0
- package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
- package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
- package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
- package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
- package/dist/site/site-manifest.json +37 -13
- package/dist/site/workflow-registry.json +200 -22
- package/docs/MAP.md +10 -2
- package/docs/cli-reference.md +404 -13
- package/docs/cli.md +8 -0
- package/docs/dev-alpha-candidate-patrol.md +8 -0
- package/docs/dev-delivery-qualification-landing-adr.md +251 -0
- package/docs/dev-delivery-warrant.md +361 -30
- package/docs/lifecycle-protocol.md +41 -0
- package/docs/next-development-transition.md +118 -0
- package/docs/node-api-reference.md +748 -322
- package/docs/release-tail-provider-plane.md +30 -0
- package/docs/reusable-build-surface.md +41 -0
- package/docs/runtime-train-validation.md +10 -0
- package/docs/v4-adopter-delivery.md +133 -0
- package/docs/v4-compatibility-facts.md +91 -0
- package/docs/v4-publication-rehearsal.md +130 -0
- package/docs/v4-runtime-ref-resume-authority.md +69 -0
- package/docs/v4-tail-reseal.md +73 -0
- package/docs/versioning.md +4 -2
- package/package.json +36 -6
- package/packages/core/adopter-delivery-passport.js +259 -0
- package/packages/core/adopter-delivery-vectors.js +158 -0
- package/packages/core/adopter-delivery-vectors.json +77 -0
- package/packages/core/artifact-signing.js +61 -0
- package/packages/core/buildchain-agent-manuals.js +3 -0
- package/packages/core/buildchain-compatibility-authority.js +336 -0
- package/packages/core/buildchain-compatibility-fact.js +394 -0
- package/packages/core/buildchain-compatibility-facts.json +217 -0
- package/packages/core/buildchain-compatibility-proof.js +566 -0
- package/packages/core/buildchain-config.js +150 -1
- package/packages/core/buildchain-contract.js +96 -143
- package/packages/core/buildchain-delivery-bootstrap.js +240 -0
- package/packages/core/buildchain-delivery-infrastructure.js +164 -0
- package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
- package/packages/core/buildchain-publication-authority.js +1 -0
- package/packages/core/channel-candidate.js +8 -0
- package/packages/core/channel-promotion-baseline.js +55 -0
- package/packages/core/ci-lane-change-budget.js +247 -0
- package/packages/core/dev-alpha-candidate-selection.js +10 -2
- package/packages/core/dev-delivery-authority-candidate.js +270 -0
- package/packages/core/dev-delivery-authority-evidence.js +146 -0
- package/packages/core/dev-delivery-authority-landing.js +461 -0
- package/packages/core/dev-delivery-authority-observation.js +48 -0
- package/packages/core/dev-delivery-authority-qualification.js +591 -0
- package/packages/core/dev-delivery-authority-settlement.js +213 -0
- package/packages/core/dev-delivery-authority-state.js +583 -0
- package/packages/core/dev-delivery-candidate-identity.js +13 -0
- package/packages/core/dev-delivery-contract-surface.js +76 -0
- package/packages/core/dev-delivery-execution-failure.js +133 -0
- package/packages/core/dev-delivery-execution-transfer.js +592 -0
- package/packages/core/dev-delivery-landing-admission-core.js +119 -0
- package/packages/core/dev-delivery-landing-readback.js +598 -0
- package/packages/core/dev-delivery-landing-terminal-evidence.js +271 -0
- package/packages/core/dev-delivery-landing-testing-port.js +6 -0
- package/packages/core/dev-delivery-native-execution.js +110 -0
- package/packages/core/dev-delivery-native-proof.js +562 -0
- package/packages/core/dev-delivery-process-boundary.js +563 -0
- package/packages/core/dev-delivery-proof.js +37 -3
- package/packages/core/dev-delivery-provider-attempt.js +127 -0
- package/packages/core/dev-delivery-provider-heartbeat.js +382 -0
- package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
- package/packages/core/dev-delivery-warrant-qualification.js +145 -0
- package/packages/core/dev-delivery-warrant-settlement.js +237 -36
- package/packages/core/dev-delivery-warrant-state.js +587 -0
- package/packages/core/dev-delivery-warrant.js +328 -370
- package/packages/core/github-governance-authority.js +1 -0
- package/packages/core/index.js +7 -0
- package/packages/core/kungfu-temporal-fact.js +557 -0
- package/packages/core/legacy-kfd-adopter-driver.js +167 -0
- package/packages/core/next-development-candidate-reservation.js +186 -0
- package/packages/core/next-development-controller.js +728 -0
- package/packages/core/next-development-projection.js +287 -0
- package/packages/core/next-development-transition.js +738 -0
- package/packages/core/paper-agent-entry.js +11 -5
- package/packages/core/paper.js +16 -5
- package/packages/core/publication-authority.js +5 -5
- package/packages/core/published-delivery-authority.js +266 -0
- package/packages/core/release-candidate-recovery.js +66 -11
- package/packages/core/release-candidate.js +79 -19
- package/packages/core/release-passport.js +271 -38
- package/packages/core/v4-adopter-delivery-parity.js +3 -3
- package/packages/core/v4-adopter-delivery.js +359 -0
- package/packages/core/v4-canonical-contracts.js +5 -0
- package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
- package/packages/core/v4-floating-consumer-evidence.js +338 -0
- package/packages/core/v4-floating-consumer-policy.js +569 -0
- package/packages/core/v4-floating-consumer-release-passport.js +153 -0
- package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
- package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
- package/packages/core/v4-publication-rehearsal.js +481 -0
- package/packages/core/v4-runtime-ref-resume-authority.js +625 -0
- package/packages/core/v4-runtime-selector-persistence.js +228 -0
- package/packages/core/v4-tail-reseal-contract.js +26 -0
- package/packages/core/v4-tail-reseal-github.js +178 -0
- package/packages/core/v4-tail-reseal-receipt.js +225 -0
- package/packages/core/v4-tail-reseal.js +594 -0
- package/packages/core/workflow-yaml-contract.js +72 -2
- package/scripts/audit-publication-control-plane.mjs +31 -31
- package/scripts/buildchain-cli-help.mjs +41 -2
- package/scripts/check-ci-lane-change-budget.mjs +100 -0
- package/scripts/check-inventory.mjs +14 -3
- package/scripts/check-v4-floating-consumer-policy-contract.mjs +217 -0
- package/scripts/check-v4-public-dogfood-contract.mjs +6 -11
- package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
- package/scripts/dev-delivery-authority-command-adapters.mjs +206 -0
- package/scripts/dev-delivery-authority-provider.mjs +28 -0
- package/scripts/dev-delivery-authority.mjs +490 -0
- package/scripts/dev-delivery-native-run.mjs +177 -0
- package/scripts/dev-delivery-process-boundary.mjs +260 -0
- package/scripts/dev-delivery-proof.mjs +67 -2
- package/scripts/dev-delivery-provider-heartbeat.mjs +215 -0
- package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
- package/scripts/dev-delivery-source-proof-reuse.mjs +547 -0
- package/scripts/dev-delivery-two-phase-resume.mjs +345 -0
- package/scripts/dev-delivery-two-phase.mjs +573 -0
- package/scripts/dev-delivery-warrant-options.mjs +266 -0
- package/scripts/dev-delivery-warrant-store.mjs +231 -0
- package/scripts/dev-delivery-warrant.mjs +232 -194
- package/scripts/dev-pr-auto-merge.mjs +37 -48
- package/scripts/dev-pr-delivery-warrant.mjs +216 -2
- package/scripts/dev-pr-prequeue-guard.mjs +399 -0
- package/scripts/dev-qualification-patrol.mjs +9 -9
- package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
- package/scripts/ensure-github-release.mjs +3 -3
- package/scripts/generate-channel-build-workflow.mjs +3 -0
- package/scripts/generate-channel-promotion-workflow.mjs +114 -14
- package/scripts/generate-next-development-guidance.mjs +49 -0
- package/scripts/generate-release-candidate-passport.mjs +192 -32
- package/scripts/generate-site-bundle.mjs +69 -4
- package/scripts/init-repo.mjs +26 -4
- package/scripts/inspect-artifact-signing-requests.mjs +6 -0
- package/scripts/next-development-self-dogfood-harness.mjs +460 -0
- package/scripts/next-development-self-dogfood.mjs +597 -0
- package/scripts/next-development-transition.mjs +47 -0
- package/scripts/npm-publish-transaction.mjs +103 -91
- package/scripts/promotion-channel-router.mjs +4 -4
- package/scripts/release-candidate-anchor-provenance.mjs +99 -0
- package/scripts/release-tail.mjs +51 -3
- package/scripts/release-train-self-dogfood.mjs +94 -92
- package/scripts/resume-from-candidate-run.mjs +565 -41
- package/scripts/seal-artifact-signing-requests.mjs +6 -0
- package/scripts/site-capability-metadata.mjs +43 -0
- package/scripts/stable-candidate-qualification.mjs +9 -10
- package/scripts/v4-consumer-policy.mjs +231 -0
- package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
- package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
- package/scripts/v4-tail-reseal.mjs +416 -0
- package/templates/native-dev-delivery.yml +143 -0
|
@@ -38,6 +38,36 @@ inspects, verifies, and diagnoses bounded v3 compatibility using the same core
|
|
|
38
38
|
transaction format. The reusable workflow checks out an exact Buildchain ref
|
|
39
39
|
and invokes the packaged Action; callers cannot inject an execution command.
|
|
40
40
|
|
|
41
|
+
The reusable workflow is permission-neutral: it inherits the calling job's
|
|
42
|
+
GitHub token permissions and never elevates them. A rehearsal caller can remain
|
|
43
|
+
`contents: read` and must pass `execute: false`. An effectful production caller
|
|
44
|
+
owns and declares its provider authority explicitly:
|
|
45
|
+
|
|
46
|
+
<!-- release-tail-production-caller-contract -->
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
name: Production release tail
|
|
50
|
+
|
|
51
|
+
on:
|
|
52
|
+
workflow_dispatch:
|
|
53
|
+
|
|
54
|
+
jobs:
|
|
55
|
+
release-tail:
|
|
56
|
+
permissions:
|
|
57
|
+
contents: write
|
|
58
|
+
uses: kungfu-systems/buildchain/.github/workflows/release-tail.yml@<exact-buildchain-sha>
|
|
59
|
+
with:
|
|
60
|
+
buildchain-ref: <exact-buildchain-sha>
|
|
61
|
+
declaration-path: .buildchain/release-tail/declaration.json
|
|
62
|
+
provider-bindings-path: .buildchain/release-tail/provider-bindings.json
|
|
63
|
+
execute: true
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Omitting caller write authority cannot be repaired by the reusable workflow;
|
|
67
|
+
GitHub rejects or constrains the call before provider execution. `execute:
|
|
68
|
+
false` remains a plan/rehearsal boundary and does not authorize production
|
|
69
|
+
mutation even when a caller token has broader ambient permissions.
|
|
70
|
+
|
|
41
71
|
## Inputs and secrets
|
|
42
72
|
|
|
43
73
|
The declaration follows
|
|
@@ -102,6 +102,36 @@ The router is generated from `.build.yml`'s input/output surface. Run
|
|
|
102
102
|
`node scripts/generate-channel-build-workflow.mjs` after changing the advanced
|
|
103
103
|
build workflow; inventory and unit tests reject a stale generated router.
|
|
104
104
|
|
|
105
|
+
### v4 floating consumer admission
|
|
106
|
+
|
|
107
|
+
The v4 public surfaces add a source policy gate before dependency setup, matrix
|
|
108
|
+
planning, build, publication, or promotion work. Tracked caller YAML may use
|
|
109
|
+
only `@v4` or `@v4-alpha`, and the repository must commit both
|
|
110
|
+
`.buildchain/contract-lock.json` and `.buildchain/alpha-contract-lock.json`.
|
|
111
|
+
Source-persisted exact SHAs, exact defaults, repository/input/environment
|
|
112
|
+
indirection, nested composite indirection, a missing lock, or a stale selected
|
|
113
|
+
lock fail closed.
|
|
114
|
+
|
|
115
|
+
Admission emits a rooted receipt binding the caller source, public workflow,
|
|
116
|
+
visible selector and workflow-shell SHA, actual runtime SHA, both lock roots,
|
|
117
|
+
and policy/scanner roots. A trusted `workflow_dispatch` train or SHA remains a
|
|
118
|
+
non-persistent runtime override: the tracked floating selector and its selected
|
|
119
|
+
lock still bind the visible workflow shell. Release-candidate evidence carries
|
|
120
|
+
the receipt; promotion certifies it independently; final v4 Release Passport
|
|
121
|
+
construction requires the matching certification.
|
|
122
|
+
|
|
123
|
+
Transient train, authority, and exact-SHA selections additionally produce a
|
|
124
|
+
provider-readback-bound runtime authorization receipt. A resumed failed tail
|
|
125
|
+
uses a fresh attempt and records the original build runtime, the resume runtime,
|
|
126
|
+
the exact sealed Stage Capsules reused per platform, and the platforms rebuilt
|
|
127
|
+
in the final Release Passport. See
|
|
128
|
+
[`v4-runtime-ref-resume-authority.md`](v4-runtime-ref-resume-authority.md).
|
|
129
|
+
|
|
130
|
+
See the normative
|
|
131
|
+
[`v4 floating consumer policy`](../architecture/v4-floating-consumer-policy.md)
|
|
132
|
+
and its machine declaration for the exact acceptance boundary. This policy does
|
|
133
|
+
not change v3 behavior.
|
|
134
|
+
|
|
105
135
|
## Advanced Workflow
|
|
106
136
|
|
|
107
137
|
Consumers that need direct workflow-shell or runtime control call the advanced
|
|
@@ -699,6 +729,17 @@ For a declared macOS `archive`, the authority safely extracts the sealed
|
|
|
699
729
|
container, signs and verifies every Mach-O payload, signs Mach-O payloads inside
|
|
700
730
|
embedded Python wheels, rebuilds each affected wheel's PEP 427 `RECORD`, and
|
|
701
731
|
recreates the original zip or tar.gz before returning the exact final bytes.
|
|
732
|
+
Archives whose executable hosts a JIT runtime can additionally request the
|
|
733
|
+
Buildchain-owned `entitlements_profile = "jit-executable-v1"` and exact paths,
|
|
734
|
+
for example `entitlements_paths = ["product/runtime/python/bin/python3"]`.
|
|
735
|
+
Paths are relative to the extracted archive root. The authority
|
|
736
|
+
then attaches only `com.apple.security.cs.allow-jit` to the exact executable
|
|
737
|
+
Mach-O files sealed in `entitlements_paths`, leaves every other executable and
|
|
738
|
+
library without exception entitlements, and records the profile, paths, and
|
|
739
|
+
entitled executable count in provider evidence. Consumer-provided entitlement
|
|
740
|
+
files and wildcard target paths are unsupported. The profile is valid only for
|
|
741
|
+
Apple `archive` requests and fails closed on an unsafe, missing,
|
|
742
|
+
non-executable, duplicate, or unsealed target path.
|
|
702
743
|
Windows `pe` and `binary` artifacts
|
|
703
744
|
resolve to timestamped native `windows-authenticode`; Windows PE never falls
|
|
704
745
|
back to a detached signature. Linux and other non-native binary files,
|
|
@@ -176,3 +176,13 @@ actions, configuration parsing, and lifecycle behavior. It cannot validate
|
|
|
176
176
|
changes that require the outer reusable workflow YAML itself to change, such as
|
|
177
177
|
new jobs, permissions, workflow outputs, or matrix topology. Those changes need
|
|
178
178
|
a canary workflow path or a temporary explicit workflow ref.
|
|
179
|
+
|
|
180
|
+
## v4 persisted-selector boundary
|
|
181
|
+
|
|
182
|
+
For v4 consumers, never commit a train or exact SHA in a `uses` node. Keep the
|
|
183
|
+
caller on `@v4` or `@v4-alpha`, retain both stable and alpha contract locks, and
|
|
184
|
+
pass a temporary train/SHA only through the trusted `workflow_dispatch`
|
|
185
|
+
`buildchain-ref` input. Consumer admission binds the selected lock to the exact
|
|
186
|
+
workflow-shell commit while recording the separately resolved runtime SHA.
|
|
187
|
+
Therefore a train can exercise candidate runtime code without weakening the
|
|
188
|
+
durable floating-selector policy or masquerading as a channel promotion.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: preview
|
|
3
|
+
period: 2026-08-16
|
|
4
|
+
theme: buildchain-v4-adopter-delivery
|
|
5
|
+
doc_type: product-manual
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: self-reviewed
|
|
11
|
+
last_reviewed: 2026-08-16
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-16
|
|
16
|
+
visible_context: Exact protected v3 adopter-delivery cut, v4 pure contract core, published npm archive bytes, and public consumer policy.
|
|
17
|
+
invisible_context_boundary: No credentials, provider mutations, signing operations, publication operations, or release authority were used.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# V4 Public Adopter Delivery
|
|
21
|
+
|
|
22
|
+
Buildchain v4 carries the v3 adopter-delivery capability through a public,
|
|
23
|
+
protocol-neutral boundary. Consumers select an exact protocol driver and
|
|
24
|
+
artifact profile, retain the rooted gate result, and independently recompute
|
|
25
|
+
that readback. Buildchain does not interpret a protocol owned by another
|
|
26
|
+
project and a passing result never grants runtime, provider, signing,
|
|
27
|
+
publication, or release authority.
|
|
28
|
+
|
|
29
|
+
The parity source is the read-only protected cut
|
|
30
|
+
`dev/v3/v3.0@6b96bdad8d9f8ccf9275f27d9370a226a9c78465`. Work began from the
|
|
31
|
+
minimal v4 absorption base
|
|
32
|
+
`dev/v4/v4.0@e5611377efc03178f8687d99968cfdfa3ce2825b` and absorbed the
|
|
33
|
+
verified protected-base advances through
|
|
34
|
+
`dev/v4/v4.0@e0342713c7447960c13bd73377282b2e93f4853d` before delivery. These
|
|
35
|
+
identities, the v3 vector-suite root, and the KFD package cut are committed in
|
|
36
|
+
[`v4-adopter-delivery-parity.json`](../architecture/v4-adopter-delivery-parity.json)
|
|
37
|
+
and exposed by the public Node API.
|
|
38
|
+
|
|
39
|
+
## Public contract
|
|
40
|
+
|
|
41
|
+
The JSON input schema is
|
|
42
|
+
[`v4-adopter-delivery-v1.schema.json`](../contracts/v4-adopter-delivery-v1.schema.json).
|
|
43
|
+
An input names both selectors and the exact request identities. A selector
|
|
44
|
+
whose implementation identity differs from the request fails closed. The
|
|
45
|
+
public selectors are `json-assertion`, `kfd-category`, and `legacy-kfd`, with
|
|
46
|
+
`git-commit` and `package` artifact profiles.
|
|
47
|
+
|
|
48
|
+
Applications can also import the lower-level driver interface from
|
|
49
|
+
`@kungfu-tech/buildchain/adopter-delivery-gate` and define an isolated driver.
|
|
50
|
+
The v4 convenience runtime, exact source declaration, readback verification,
|
|
51
|
+
N-1 lineage check, and published archive loader are exported from
|
|
52
|
+
`@kungfu-tech/buildchain/v4-adopter-delivery`.
|
|
53
|
+
|
|
54
|
+
## CLI
|
|
55
|
+
|
|
56
|
+
All four operations are offline after the declared archive bytes exist:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
buildchain adopter-delivery run \
|
|
60
|
+
--input contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json \
|
|
61
|
+
--output .buildchain/adopter-delivery/readback.json
|
|
62
|
+
|
|
63
|
+
buildchain adopter-delivery verify \
|
|
64
|
+
--input contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json \
|
|
65
|
+
--readback .buildchain/adopter-delivery/readback.json
|
|
66
|
+
|
|
67
|
+
buildchain adopter-delivery bootstrap \
|
|
68
|
+
--input contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json
|
|
69
|
+
|
|
70
|
+
buildchain adopter-delivery archive \
|
|
71
|
+
--input contracts/fixtures/v4-adopter-delivery-v1/archive-template.json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`verify` requires the complete rooted readback and recomputes it. Missing or
|
|
75
|
+
substituted readback, unknown selector, unknown driver, protocol-version
|
|
76
|
+
mismatch, archive-byte or package-identity mismatch, and altered bootstrap
|
|
77
|
+
lineage all fail closed.
|
|
78
|
+
|
|
79
|
+
## N-1 and published archives
|
|
80
|
+
|
|
81
|
+
N-1 bootstrap is distinct from the candidate. The lineage wrapper requires
|
|
82
|
+
the exact v3 authority commit, exact v4 absorption base, and exact public
|
|
83
|
+
Buildchain archive root. The retained v3 bootstrap also requires protected and
|
|
84
|
+
published N-1 authority, rejects self-authorization, binds the candidate gate
|
|
85
|
+
artifact, and requires merged Warrant-shaped evidence. Protocol, profile, or
|
|
86
|
+
gate changes require independently reviewed transition evidence.
|
|
87
|
+
|
|
88
|
+
Published authority loading verifies compressed bytes before extraction,
|
|
89
|
+
rejects unsafe paths and links, verifies extracted package identity, verifies
|
|
90
|
+
KFD's semantic package root, and imports only declared public delivery modules.
|
|
91
|
+
The caller must supply an independently retained authority readback root. The
|
|
92
|
+
fixture binds `@kungfu-tech/buildchain@3.0.9-alpha.16` and
|
|
93
|
+
`@kungfu-tech/kfd@1.0.0-alpha.65`; a package version is not treated as proof of
|
|
94
|
+
the Git source cut.
|
|
95
|
+
|
|
96
|
+
## Config and reusable workflow
|
|
97
|
+
|
|
98
|
+
Consumer configuration is closed and repository-relative:
|
|
99
|
+
|
|
100
|
+
```toml
|
|
101
|
+
[adopter_delivery]
|
|
102
|
+
contract = "kungfu-buildchain-v4-adopter-delivery/v1"
|
|
103
|
+
input_path = "contracts/adopter-delivery/input.json"
|
|
104
|
+
readback_path = ".buildchain/adopter-delivery/readback.json"
|
|
105
|
+
bootstrap_path = "contracts/adopter-delivery/bootstrap.json"
|
|
106
|
+
archive_path = "contracts/adopter-delivery/archives.json"
|
|
107
|
+
result_path = ".buildchain/adopter-delivery/result.json"
|
|
108
|
+
driver_selector = "kfd-category"
|
|
109
|
+
artifact_profile_selector = "package"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The public reusable workflow is
|
|
113
|
+
`kungfu-systems/buildchain/.github/workflows/v4-adopter-delivery.yml@v4` for
|
|
114
|
+
stable use and `@v4-alpha` during prerelease evaluation. It resolves the exact
|
|
115
|
+
called-workflow SHA, enforces floating selector plus dual-lock consumer
|
|
116
|
+
admission, and runs the same CLI on Linux, macOS, and Windows. Buildchain
|
|
117
|
+
dogfoods it through the thin
|
|
118
|
+
[`v4-adopter-delivery-dogfood.yml`](../.github/workflows/v4-adopter-delivery-dogfood.yml)
|
|
119
|
+
caller, which contains no steps or local orchestration and persists only the
|
|
120
|
+
floating `@v4-alpha` selector.
|
|
121
|
+
|
|
122
|
+
The reusable workflow downloads exact public N-1 npm archives and uses the
|
|
123
|
+
committed byte roots, semantic identity, and authority readback root. It has
|
|
124
|
+
only `contents: read`; no provider credential or production writer is accepted
|
|
125
|
+
or synthesized.
|
|
126
|
+
|
|
127
|
+
## Offline vectors
|
|
128
|
+
|
|
129
|
+
[`offline-vectors.json`](../contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json)
|
|
130
|
+
indexes positive driver, N-1, and archive cases plus negative selector, driver,
|
|
131
|
+
archive identity, bootstrap lineage, protocol version, and tampered readback
|
|
132
|
+
cases. Tests synthesize archives locally so extraction and identity failures do
|
|
133
|
+
not depend on the network.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: active
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-v4-compatibility-facts
|
|
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-08-16
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-16
|
|
16
|
+
invisible_context: not asserted
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Buildchain v4 compatibility Facts
|
|
20
|
+
|
|
21
|
+
Buildchain v4 authorizes contract compatibility with immutable, directional
|
|
22
|
+
Facts. `compatibleBreakingDigests` and the v1 proof objects remain public for
|
|
23
|
+
older consumers, but they are deterministic projections. Neither can authorize
|
|
24
|
+
a transition without the current Fact registry, its exact Project Cut, and a
|
|
25
|
+
verified path receipt.
|
|
26
|
+
|
|
27
|
+
## Authority chain
|
|
28
|
+
|
|
29
|
+
The package source is
|
|
30
|
+
`packages/core/buildchain-compatibility-facts.json`, retained from v3 exact head
|
|
31
|
+
`6b96bdad8d9f8ccf9275f27d9370a226a9c78465`. Each declaration becomes a KFR2
|
|
32
|
+
predicate and relation, then enters an append-only temporal bundle. The
|
|
33
|
+
registry identity binds all Fact, proof, Cut, supersession, revocation, and
|
|
34
|
+
bundle roots.
|
|
35
|
+
|
|
36
|
+
V4 projects a legacy digest only when a verified Fact targets the exact current
|
|
37
|
+
surface kind, ID, and breaking digest. The old proof's v2/v3 `majorLines` field
|
|
38
|
+
is historical projection metadata; it does not narrow or enlarge the
|
|
39
|
+
digest-and-Cut-bound Fact. A target digest that has changed since v3 receives no
|
|
40
|
+
projection.
|
|
41
|
+
|
|
42
|
+
## Decision semantics
|
|
43
|
+
|
|
44
|
+
- Direction is always source to target. Reverse use rejects.
|
|
45
|
+
- The only operation is `accept-contract-lock`.
|
|
46
|
+
- Evaluation selects one direct Fact. It never searches for a path or infers
|
|
47
|
+
symmetry or transitivity.
|
|
48
|
+
- Composition requires an ordered caller-supplied path and positive bounded
|
|
49
|
+
depth.
|
|
50
|
+
- Supersession and revocation append lifecycle records. Old Cuts replay old
|
|
51
|
+
truth; later Cuts deterministically reject superseded or revoked relations.
|
|
52
|
+
- A revocation is the safety-equivalent expiry boundary: compatibility has no
|
|
53
|
+
wall-clock-only truth outside a rooted Cut.
|
|
54
|
+
- Missing, ambiguous, not-yet-valid, revoked, superseded, wrong-direction,
|
|
55
|
+
wrong-Cut, disconnected, cyclic, inactive, or corrupted inputs produce a
|
|
56
|
+
rooted rejected receipt.
|
|
57
|
+
|
|
58
|
+
Rust and TypeScript implement the same KFR2 closed-field encoding and emit
|
|
59
|
+
byte-identical JSON for the shared fixture in
|
|
60
|
+
`contracts/fixtures/v4-compatibility-facts-v1/shared.json`.
|
|
61
|
+
|
|
62
|
+
## CLI and Node API
|
|
63
|
+
|
|
64
|
+
Project and verify the built-in registry:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
npx @kungfu-tech/buildchain facts compatibility project --json
|
|
68
|
+
npx @kungfu-tech/buildchain facts compatibility verify --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Create a direct query template for one current Fact, then verify it:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npx @kungfu-tech/buildchain facts compatibility query-template \
|
|
75
|
+
--fact-root sha256:... --json
|
|
76
|
+
npx @kungfu-tech/buildchain facts compatibility query \
|
|
77
|
+
--query query.json --registry registry.json --json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The `@kungfu-tech/buildchain/compatibility-fact-authority` export provides the
|
|
81
|
+
same constructors, verifiers, resolver, and Release Passport evidence helper.
|
|
82
|
+
Compatibility evidence explicitly sets `grantsReleaseAuthority: false`; it can
|
|
83
|
+
be attached through the existing release-evidence route but cannot publish,
|
|
84
|
+
merge, sign, or release anything.
|
|
85
|
+
|
|
86
|
+
## Updating the registry
|
|
87
|
+
|
|
88
|
+
Append a new source Fact or lifecycle record. Never rewrite an existing Fact,
|
|
89
|
+
directly edit a surface digest allowlist, or convert a caller claim into
|
|
90
|
+
authority. Regenerate references and site facts, then run the shared parity
|
|
91
|
+
fixture and the complete repository check.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: preview
|
|
3
|
+
period: 2026-08-16
|
|
4
|
+
theme: buildchain-v4-publication-rehearsal
|
|
5
|
+
doc_type: product-manual
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: self-reviewed
|
|
11
|
+
last_reviewed: 2026-08-16
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-16
|
|
16
|
+
visible_context: Exact v3 rehearsal runtime, v4 release-tail core, Stage Capsule contracts, public workflow and offline vectors.
|
|
17
|
+
invisible_context_boundary: No credentials, private provider state, signed URLs or production publication receipts were read.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# V4 Publication Rehearsal Capsule
|
|
21
|
+
|
|
22
|
+
The v4 Publication Rehearsal Capsule is the content-addressed input for
|
|
23
|
+
testing publication behavior without acquiring production publication
|
|
24
|
+
authority. It is deliberately not a Stage Capsule. A Stage Capsule retains a
|
|
25
|
+
pure platform-stage build checkpoint; a Publication Rehearsal Capsule binds a
|
|
26
|
+
release candidate and asks the production release-tail planner and executor to
|
|
27
|
+
simulate, replay, or observe provider-facing publication behavior.
|
|
28
|
+
|
|
29
|
+
The rooted parity matrix is
|
|
30
|
+
[`architecture/v4-publication-rehearsal-parity.json`](../architecture/v4-publication-rehearsal-parity.json),
|
|
31
|
+
and the public schema is
|
|
32
|
+
[`v4-publication-rehearsal-capsule-v1.schema.json`](../contracts/v4-publication-rehearsal-capsule-v1.schema.json).
|
|
33
|
+
|
|
34
|
+
## Bound identity
|
|
35
|
+
|
|
36
|
+
One capsule commits to all of these values:
|
|
37
|
+
|
|
38
|
+
- its own canonical capsule root;
|
|
39
|
+
- the exact source repository, Git revision, and source root;
|
|
40
|
+
- the sorted candidate file inventory and candidate root;
|
|
41
|
+
- the exact candidate manifest and Buildchain config paths and roots;
|
|
42
|
+
- the canonical data-only provider bindings and `providerBindingsRoot`;
|
|
43
|
+
- the effect-disabled provider policy and its exact capability/adapter set;
|
|
44
|
+
- expected provider observations and their root;
|
|
45
|
+
- the initial transaction produced by the production release-tail planner;
|
|
46
|
+
- `buildchain.release-tail/v1` as the shared core version.
|
|
47
|
+
|
|
48
|
+
Changing any one of those values, or changing a candidate byte, fails closed.
|
|
49
|
+
Candidate paths must remain regular non-symlink files below an explicit
|
|
50
|
+
absolute root. Every artifact, provider document, and released-evidence input
|
|
51
|
+
named by the bindings must also appear in the rooted file inventory. The
|
|
52
|
+
evidence output may be absent, but its path and every existing ancestor must
|
|
53
|
+
remain below that root without symlinks.
|
|
54
|
+
|
|
55
|
+
## Modes and authority
|
|
56
|
+
|
|
57
|
+
`simulate` uses in-memory adapters and makes no provider call. `replay` feeds a
|
|
58
|
+
recorded response sequence through the same production transaction executor.
|
|
59
|
+
`provider` requires a capsule-bound
|
|
60
|
+
`buildchain-v4-publication-rehearsal-authority/v1` receipt plus the declared
|
|
61
|
+
provider adapters. The authority binds `providerBindingsRoot` directly as well
|
|
62
|
+
as through `capsuleRoot`, so request bytes cannot be replaced while retaining
|
|
63
|
+
authority. It is rehearsal-only: its
|
|
64
|
+
`productionAuthority` field is always `false`, and it binds a separately
|
|
65
|
+
supplied live `authorizationRoot` rather than minting authority from the
|
|
66
|
+
capsule alone.
|
|
67
|
+
|
|
68
|
+
Every provider readback and apply request is retained in the rooted transcript.
|
|
69
|
+
The resulting evidence always contains `productionAuthority: false` and
|
|
70
|
+
`releasePassport: null`. It therefore cannot publish by itself, authorize a
|
|
71
|
+
production release tail, or stand in for a Release Passport, protected
|
|
72
|
+
readback, or Delivery Warrant.
|
|
73
|
+
|
|
74
|
+
## CLI and Node API
|
|
75
|
+
|
|
76
|
+
Local simulation and replay use the public `release-tail` command:
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
buildchain release-tail rehearse \
|
|
80
|
+
--capsule "$PWD/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json" \
|
|
81
|
+
--candidate-root "$PWD/contracts/fixtures/v4-publication-rehearsal-v1/candidate" \
|
|
82
|
+
--mode simulate \
|
|
83
|
+
--state "$PWD/.buildchain/publication-rehearsal/state.json" \
|
|
84
|
+
--evidence "$PWD/.buildchain/publication-rehearsal/evidence.json"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Applications import `@kungfu-tech/buildchain/v4-publication-rehearsal` to
|
|
88
|
+
create and verify capsules, create provider-rehearsal authority, and execute
|
|
89
|
+
all three modes. The API delegates planning, transaction initialization, and
|
|
90
|
+
execution to the same `release-tail-provider-plane` functions used by the
|
|
91
|
+
production Action.
|
|
92
|
+
|
|
93
|
+
## Config and public workflow
|
|
94
|
+
|
|
95
|
+
The consumer config is closed and effect-disabled:
|
|
96
|
+
|
|
97
|
+
```toml
|
|
98
|
+
[publication_rehearsal]
|
|
99
|
+
contract = "buildchain-v4-publication-rehearsal-capsule/v1"
|
|
100
|
+
capsule_path = "contracts/fixtures/v4-publication-rehearsal-v1/capsule.json"
|
|
101
|
+
candidate_root = "contracts/fixtures/v4-publication-rehearsal-v1/candidate"
|
|
102
|
+
state_path = ".buildchain/publication-rehearsal/state.json"
|
|
103
|
+
evidence_path = ".buildchain/publication-rehearsal/evidence.json"
|
|
104
|
+
effect_default = "disabled"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The public reusable
|
|
108
|
+
[`release-tail.yml`](../.github/workflows/release-tail.yml) accepts the same
|
|
109
|
+
capsule, candidate root, mode, state and evidence paths. Before publication,
|
|
110
|
+
Buildchain dogfoods that public surface through a thin same-commit local reusable
|
|
111
|
+
call with the exact PR-head or dispatch SHA as its runtime. The reusable is
|
|
112
|
+
permission-neutral and the self-dogfood caller stays `contents: read`, passes
|
|
113
|
+
`execute: false`, and therefore cannot inherit or synthesize production write
|
|
114
|
+
authority. Effectful production callers must explicitly declare their own
|
|
115
|
+
provider permission. Durable external consumers remain on the floating
|
|
116
|
+
`@v4-alpha` contract. Provider mode additionally requires the exact authority
|
|
117
|
+
path. Provider bindings come from the capsule; an optional external bindings
|
|
118
|
+
input is accepted only when its canonical exact root and payload equal the
|
|
119
|
+
capsule binding. Ordinary calls default to `simulate`.
|
|
120
|
+
|
|
121
|
+
## Offline portability vectors
|
|
122
|
+
|
|
123
|
+
[`offline-vectors.json`](../contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json)
|
|
124
|
+
records Linux, macOS and Windows projections. Their capsule, transaction,
|
|
125
|
+
state, and evidence roots are byte-identical. Regenerate or verify them with:
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
node scripts/v4-publication-rehearsal-fixture.mjs
|
|
129
|
+
node scripts/v4-publication-rehearsal-fixture.mjs --check
|
|
130
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: buildchain-v4-runtime-ref-resume-authority
|
|
5
|
+
doc_type: contract-guide
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-08-15
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-14
|
|
16
|
+
invisible_context: not asserted
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Buildchain v4 transient runtime and resume authority
|
|
20
|
+
|
|
21
|
+
Buildchain v4 consumers keep `v4` or `v4-alpha` in tracked workflow source.
|
|
22
|
+
A train, authority ref, or exact SHA is transient run data, never a new
|
|
23
|
+
committed default. The public promotion router accepts that escape only from a
|
|
24
|
+
trusted `workflow_dispatch` actor with write, maintain, or admin permission.
|
|
25
|
+
Before heavy promotion work, it binds an exact source tree, operator reason,
|
|
26
|
+
dual consumer contract-lock roots, the floating-consumer policy receipt, a
|
|
27
|
+
clean persistence scan, and GitHub provider readbacks proving that the selected
|
|
28
|
+
runtime is reachable from an approved v4 ref.
|
|
29
|
+
|
|
30
|
+
The persistence scan covers tracked workflow, composite-action, JSON, TOML, and
|
|
31
|
+
YAML surfaces. Exact SHA, train/authority defaults, and runtime selectors hidden
|
|
32
|
+
through repository variables, secrets, or environment indirection reject the
|
|
33
|
+
run. OIDC, IAM, and other external authority references are inventoried as
|
|
34
|
+
metadata only; credential values are never read or written to evidence.
|
|
35
|
+
|
|
36
|
+
## Resume after a floating ref moves
|
|
37
|
+
|
|
38
|
+
A late platform failure is resumed as a new governed attempt. It is not a
|
|
39
|
+
GitHub failed-job rerun. The lineage keeps runtime A (the runtime that built and
|
|
40
|
+
sealed each reusable Stage Capsule) separate from runtime B (the authorized
|
|
41
|
+
runtime executing the new attempt). A Capsule is reusable only when its source
|
|
42
|
+
SHA, source tree, platform, policy root, build runtime, identity root, Capsule
|
|
43
|
+
root, and artifact digest still match. Valid unaffected platforms are restored;
|
|
44
|
+
only missing platforms rebuild. Stale, ambiguous, unsealed, cross-source, or
|
|
45
|
+
cross-policy evidence fails closed.
|
|
46
|
+
|
|
47
|
+
This deliberately does not weaken the existing Stage Capsule resume planner's
|
|
48
|
+
`runtime-changed` invalidation. That planner decides whether a stage may be
|
|
49
|
+
reused under one expected build identity. This contract instead proves that an
|
|
50
|
+
already sealed output built under runtime A remains the exact product input
|
|
51
|
+
while a distinct orchestration attempt runs under runtime B. Runtime B never
|
|
52
|
+
rewrites the Capsule's build identity.
|
|
53
|
+
|
|
54
|
+
Final Release Passport evidence embeds the complete authorization receipt and
|
|
55
|
+
the A+B resume lineage under `v4RuntimeResume`. The section binds the new
|
|
56
|
+
attempt, floating-ref movement, reused and rebuilt platform partition,
|
|
57
|
+
consumer-policy receipt, resume plan, and final public readback roots. Tampering
|
|
58
|
+
with either document or crossing authorization/lineage roots rejects Passport
|
|
59
|
+
construction and verification.
|
|
60
|
+
|
|
61
|
+
Normative files:
|
|
62
|
+
|
|
63
|
+
- `architecture/v4-runtime-ref-resume-authority.json`
|
|
64
|
+
- `contracts/v4-runtime-ref-resume-authority-v1.schema.json`
|
|
65
|
+
- `packages/core/v4-runtime-ref-resume-authority.js`
|
|
66
|
+
- `scripts/authorize-promotion-runtime-override.cjs`
|
|
67
|
+
|
|
68
|
+
This contract changes no v3 behavior, grants no provider mutation authority,
|
|
69
|
+
and stores no credential material.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# V4 retained-candidate tail reseal
|
|
2
|
+
|
|
3
|
+
Buildchain v4 can recover one narrowly defined late Alpha failure without
|
|
4
|
+
rebuilding a qualified four-platform candidate. The recovery is not a cache hit
|
|
5
|
+
and does not give Stage Capsule any provider authority. It is a fresh governed
|
|
6
|
+
run that proves all retained bytes first, then executes only the explicitly
|
|
7
|
+
fenced macOS signing-finalization tail.
|
|
8
|
+
|
|
9
|
+
The authoritative request schema is
|
|
10
|
+
[`contracts/v4-tail-reseal-v1.schema.json`](../contracts/v4-tail-reseal-v1.schema.json).
|
|
11
|
+
It binds the failed run and source tree, four payload and manifest archive
|
|
12
|
+
digests, four content roots, Stage Capsule roots and reuse decisions, Warrant
|
|
13
|
+
lineage, retention, credential authority, signing delegation/result, release
|
|
14
|
+
tail transaction, idempotency key, and independent provider readbacks. Any
|
|
15
|
+
mismatch rejects reuse and requires a normal candidate build.
|
|
16
|
+
|
|
17
|
+
## Authority boundary
|
|
18
|
+
|
|
19
|
+
- `install`, `build`, `verify`, `package`, and the ordinary platform matrix are
|
|
20
|
+
skipped only when all 16 per-platform Stage Capsule decisions prove exact
|
|
21
|
+
reuse. Capsule reuse has no external effects.
|
|
22
|
+
- Only `macos-arm64:signing-finalization` may change payload bytes. The public
|
|
23
|
+
workflow verifies the retained macOS bytes before the effect and verifies the
|
|
24
|
+
resealed bytes plus signing and release-tail readbacks afterward.
|
|
25
|
+
- The signing token exists only in the macOS credential-island step. It is not
|
|
26
|
+
stored in a Capsule, request, artifact, log, Passport, or receipt.
|
|
27
|
+
- A successful run emits the existing
|
|
28
|
+
`kungfu-buildchain-release-candidate-passport` contract. Tail reseal does not
|
|
29
|
+
create a second candidate or release artifact class.
|
|
30
|
+
- Durable callers use `@v4-alpha` during Alpha evaluation or `@v4` after stable
|
|
31
|
+
promotion. Exact SHAs are runtime evidence from `job.workflow_sha`, never a
|
|
32
|
+
persisted selector.
|
|
33
|
+
|
|
34
|
+
## CLI and Node API
|
|
35
|
+
|
|
36
|
+
Plan locally from the deterministic data contract:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
buildchain tail-reseal plan \
|
|
40
|
+
--request .buildchain/tail-reseal/request.json \
|
|
41
|
+
--output .buildchain/tail-reseal/plan.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`tail-reseal admit` performs the provider readback of the exact failed run,
|
|
45
|
+
jobs, retained GitHub artifact archives, and signing-authority result. Each
|
|
46
|
+
fresh platform runner then uses `verify-platform --mode retained`. Only the
|
|
47
|
+
macOS runner may follow with `--mode resealed --provider-readback-root ...`.
|
|
48
|
+
After the ordinary Release Candidate Passport is generated, `tail-reseal seal`
|
|
49
|
+
binds all four readbacks and the protected Warrant readback into the final
|
|
50
|
+
receipt.
|
|
51
|
+
|
|
52
|
+
The Node exports are `@kungfu-tech/buildchain/v4-tail-reseal` for request and
|
|
53
|
+
plan logic and `@kungfu-tech/buildchain/v4-tail-reseal-receipt` for terminal
|
|
54
|
+
receipt creation and verification.
|
|
55
|
+
|
|
56
|
+
## Reusable workflow
|
|
57
|
+
|
|
58
|
+
Consumers invoke
|
|
59
|
+
`kungfu-systems/buildchain/.github/workflows/v4-tail-reseal.yml@v4-alpha` from a
|
|
60
|
+
trusted, same-repository workflow. The caller supplies the rooted request, the
|
|
61
|
+
original candidate consumer-policy receipt, a reviewed macOS finalization
|
|
62
|
+
command, and the explicitly named signing secret. The command must write:
|
|
63
|
+
|
|
64
|
+
- `.buildchain/tail-reseal/signing-provider-readback.json`
|
|
65
|
+
- `.buildchain/tail-reseal/release-tail-provider-readback.json`
|
|
66
|
+
|
|
67
|
+
Their byte digests must equal the roots fixed in the request. The workflow
|
|
68
|
+
downloads the signing result by exact authority repository, run, artifact name,
|
|
69
|
+
and archive digest; no credential or provider effect is replayed from a Stage
|
|
70
|
+
Capsule.
|
|
71
|
+
|
|
72
|
+
The v3-to-v4 invariant mapping is recorded in
|
|
73
|
+
[`architecture/v4-tail-reseal-parity.json`](../architecture/v4-tail-reseal-parity.json).
|
package/docs/versioning.md
CHANGED
|
@@ -79,8 +79,10 @@ repository changes are patch".
|
|
|
79
79
|
|
|
80
80
|
| Date | Action | Line | Faces | Class | Rationale | PR |
|
|
81
81
|
| ---------- | ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
82
|
-
| 2026-08-
|
|
83
|
-
| 2026-08-
|
|
82
|
+
| 2026-08-16 | extend-minor | `v4.0` | next-development-transition, next-development-controller, next-development-projection, next-development-cli | additive | Forward-port the rooted completed-Alpha successor contract, semver/auto and anchored/manual modes, CAS recovery, protected Dev reconciliation, reservation readback, public templates, and consumer-equivalent lifecycle proof from the exact v3 evidence into v4. | |
|
|
83
|
+
| 2026-08-14 | extend-minor | `v4.0` | source-qualification-proof-v2, source-proof-reuse-decision, reusable-check-workflow | additive | Forward-port opt-in exact accepted source-proof reuse for merge groups, binding source, base, patch, runtime, plan, policy, closure, dependency, required-context, producer receipt, and caller run. Any missing or changed predicate fails closed to the existing full source lifecycle, which remains the default. | |
|
|
84
|
+
| 2026-08-11 | extend-minor | `v4.0` | release-blocker-repair-contract, release-blocker-priority-claim, release-train-node-export, dev-delivery-warrant-node-export | additive | Forward-port rooted successor candidate generations, exact semantic patch identity across cut and Dev landings, publication blocking through conflict or mismatch, and the narrow non-preemptive Warrant blocker lane already protected and self-dogfood-proven on v3. | |
|
|
85
|
+
| 2026-08-10 | extend-minor | `v4.0` | release-cut-contract, release-train-state-machine, release-train-node-export | additive | Forward-port the provider-neutral rooted Release Cut and idempotent Release Train state contract already proven on v3; candidate, tree, Alpha base, runtime, generation, and authority stay frozen while later Dev movement remains an observation rather than implicit supersession. | |
|
|
84
86
|
| 2026-08-08 | extend-minor | `v4.0` | dev-delivery-warrant-read-candidate, rust-state-projection, dev-delivery-cli | additive | Add an opt-in, qualification-bound read projection behind `observe --read-mode v4`; v3 remains the sole writer and default reader, mutation commands ignore the switch, failures stop, and rollback is the explicit caller change back to v3. | |
|
|
85
87
|
| 2026-08-05 | extend-minor | `v3.0` | auditable-demo-scenario, auditable-demo-capture, auditable-demo-adapter | additive | Add an opt-in deterministic readable-playback declaration that preserves captured terminal payloads and order while normalizing only presentation timing; omitted playback continues to use observed PTY timestamps, and existing composition modes remain unchanged. | |
|
|
86
88
|
| 2026-08-04 | extend-minor | `v3.0` | dev-delivery-warrant-queue, source-qualification-proof, integration-delivery-proof, dev-delivery-cli, reusable-dev-delivery-workflows | additive | Add durable fair and fenced protected-dev scheduling plus split source/integration proof contracts. Existing PR admission remains available through explicit `off` and `shadow` rollout modes; no existing command, export, or release flow is removed. | |
|