@kungfu-tech/buildchain 4.1.3-alpha.9 → 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.
Files changed (205) hide show
  1. package/AGENTS.md +11 -13
  2. package/CONTRIBUTING.md +32 -9
  3. package/README.md +56 -140
  4. package/actions/release/promotion/ref/README.md +1 -1
  5. package/architecture/action-taxonomy.json +1 -1
  6. package/architecture/agent-change-map.md +32 -45
  7. package/architecture/build-orchestration.json +1 -1
  8. package/architecture/capability-state-machine-manifest.json +5 -5
  9. package/architecture/ci-lane-change-budget.json +92 -92
  10. package/architecture/code-layout.json +2 -12
  11. package/architecture/core-mechanisms.json +38 -39
  12. package/architecture/cross-platform-adopter-qualification.json +1 -1
  13. package/architecture/dev-delivery-orchestration.json +2 -2
  14. package/architecture/floating-consumer-policy.json +3 -3
  15. package/architecture/internal-capabilities.json +27 -28
  16. package/architecture/maintainability-debt.json +60 -94
  17. package/architecture/maintainability-policy.json +7 -13
  18. package/architecture/minimal-consumer-migration.json +43 -5014
  19. package/architecture/platform-stage-checkpoints.json +1 -1
  20. package/architecture/release-tail-contract.json +2 -2
  21. package/architecture/release-topology.json +33 -25
  22. package/architecture/stage-capsule-qualification.json +1 -1
  23. package/architecture/universal-workflow-bootstrap.json +60 -60
  24. package/architecture/universal-workflow-capability-policy.json +3 -3
  25. package/architecture/universal-workflow-fault-campaign.json +7 -7
  26. package/architecture/workflow-taxonomy.json +59 -60
  27. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  28. package/dist/site/buildchain-contract.json +138 -66
  29. package/dist/site/buildchain-site.json +257 -331
  30. package/dist/site/capability-registry.json +4 -4
  31. package/dist/site/cli-registry.json +6 -142
  32. package/dist/site/controller-registry.json +19 -19
  33. package/dist/site/kfd-claims.json +481 -529
  34. package/dist/site/kfd-upstream-aggregate.json +1 -1
  35. package/dist/site/manual-registry.json +22 -22
  36. package/dist/site/node-api-registry.json +82 -339
  37. package/dist/site/page-registry.json +229 -304
  38. package/dist/site/public-surface-audit.json +544 -754
  39. package/dist/site/publication-authority-registry.json +316 -316
  40. package/dist/site/publication-registry.json +1 -1
  41. package/dist/site/site-manifest.json +23 -23
  42. package/dist/site/workflow-registry.json +1071 -1027
  43. package/docs/MAP.md +28 -20
  44. package/docs/auditable-demo.md +17 -49
  45. package/docs/bootstrap-recovery.md +46 -37
  46. package/docs/cli-reference.md +2 -46
  47. package/docs/cli.md +97 -186
  48. package/docs/code-organization.md +7 -5
  49. package/docs/dev-alpha-candidate-patrol.md +19 -42
  50. package/docs/dev-delivery-orchestration.md +15 -11
  51. package/docs/dev-delivery-qualification-landing-adr.md +10 -9
  52. package/docs/dev-delivery-warrant.md +17 -16
  53. package/docs/dev-qualification-patrol.md +25 -20
  54. package/docs/getting-started.md +80 -139
  55. package/docs/github-artifact-attestation.md +31 -81
  56. package/docs/install.md +66 -30
  57. package/docs/lifecycle-protocol.md +19 -57
  58. package/docs/migration-inventory.md +17 -45
  59. package/docs/next-development-transition.md +13 -13
  60. package/docs/node-api-reference.md +122 -138
  61. package/docs/oci-publication.md +13 -10
  62. package/docs/publication-artifacts.md +128 -486
  63. package/docs/publication-authority.md +15 -45
  64. package/docs/publish-transaction.md +13 -11
  65. package/docs/release-candidate.md +126 -355
  66. package/docs/release-discussions.md +36 -67
  67. package/docs/release-flow.md +80 -339
  68. package/docs/release-governance.md +114 -962
  69. package/docs/release-promotion-request.md +45 -43
  70. package/docs/release-propagation.md +13 -27
  71. package/docs/release-tail-provider-plane.md +38 -65
  72. package/docs/reusable-build-surface.md +78 -196
  73. package/docs/runtime-train-validation.md +8 -6
  74. package/docs/stable-candidate-patrol.md +13 -66
  75. package/docs/v4-adopter-delivery.md +15 -15
  76. package/docs/v4-declarative-release-tail-migration.md +19 -17
  77. package/docs/v4-production-release.md +11 -6
  78. package/docs/v4-publication-rehearsal.md +12 -27
  79. package/docs/v4-stage-capsule.md +14 -20
  80. package/docs/v4-tail-reseal.md +34 -20
  81. package/docs/web-surface-deployments.md +26 -264
  82. package/docs/workflow-catalog.md +31 -31
  83. package/docs/workflow-path-migration.md +10 -4
  84. package/package.json +5 -4
  85. package/packages/core/adoption/buildchain-kfd-claims.js +7 -7
  86. package/packages/core/adoption/cli/output.mjs +1 -9
  87. package/packages/core/adoption/cli/product-gate.mjs +1 -15
  88. package/packages/core/adoption/cli/project.mjs +9 -10
  89. package/packages/core/adoption/cli/standards.mjs +1 -14
  90. package/packages/core/adoption/cli/support.mjs +0 -2
  91. package/packages/core/adoption/cli/surface-register.mjs +0 -2
  92. package/packages/core/adoption/commands/init-repo.mjs +77 -485
  93. package/packages/core/adoption/consumer-init.js +279 -0
  94. package/packages/core/adoption/qualification/admission.js +1 -1
  95. package/packages/core/build/cli/cache.mjs +0 -2
  96. package/packages/core/build/cli/facts.mjs +0 -3
  97. package/packages/core/build/cli/homebrew.mjs +0 -4
  98. package/packages/core/build/cli/lifecycle.mjs +0 -3
  99. package/packages/core/build/github-artifact-attestation.js +2 -2
  100. package/packages/core/build/platform-stage-checkpoints.js +1 -1
  101. package/packages/core/build/signing/dispatch.js +1 -1
  102. package/packages/core/consumer/buildchain-config.js +9 -0
  103. package/packages/core/consumer/contract/inspection.js +351 -9
  104. package/packages/core/consumer/contract/javascript-syntax.js +439 -0
  105. package/packages/core/consumer/contract/javascript-values.js +61 -0
  106. package/packages/core/consumer/contract/javascript.js +555 -0
  107. package/packages/core/consumer/contract/local-validation.js +84 -0
  108. package/packages/core/contracts/buildchain-contract.js +39 -8
  109. package/packages/core/contracts/cli/introspection.mjs +1 -9
  110. package/packages/core/contracts/public-surface-cli.js +0 -1
  111. package/packages/core/dev-delivery/dev-delivery-contract-surface.js +2 -2
  112. package/packages/core/governance/buildchain-publication-authority.js +24 -24
  113. package/packages/core/governance/cli/doctor.mjs +58 -42
  114. package/packages/core/governance/commands/architecture.mjs +6 -1
  115. package/packages/core/governance/commands/audit-publication-control-plane.mjs +1 -1
  116. package/packages/core/governance/commands/workflow-friction-report.mjs +1 -1
  117. package/packages/core/governance/github-governance-authority.js +2 -2
  118. package/packages/core/governance/publication/collection.js +1 -1
  119. package/packages/core/index.js +1 -3
  120. package/packages/core/observability/cli/candidate.mjs +0 -2
  121. package/packages/core/observability/cli/context.mjs +0 -5
  122. package/packages/core/observability/cli/diagnostics.mjs +0 -7
  123. package/packages/core/observability/cli/events.mjs +2 -10
  124. package/packages/core/paper/commands/paper-work-fleet-cli.mjs +1 -1
  125. package/packages/core/paper/commands/paper.mjs +33 -422
  126. package/packages/core/paper/consumer-status.js +72 -0
  127. package/packages/core/paper/operations/identity.js +0 -3
  128. package/packages/core/paper/operations/migration.js +460 -0
  129. package/packages/core/paper/operations/preflight-checks.js +8 -68
  130. package/packages/core/paper/operations/scaffold.js +16 -326
  131. package/packages/core/paper/operations/status.js +27 -53
  132. package/packages/core/paper/paper-agent-entry.js +36 -147
  133. package/packages/core/paper/paper-fleet.js +24 -39
  134. package/packages/core/paper/paper-repository.js +16 -0
  135. package/packages/core/paper/paper-runtime-channels.js +1 -1
  136. package/packages/core/paper/paper-scaffold-content.js +153 -162
  137. package/packages/core/paper/paper-work.js +3 -10
  138. package/packages/core/paper/paper.js +43 -5
  139. package/packages/core/providers/github/artifact-attestation.js +1 -1
  140. package/packages/core/providers/github/pipeline-context-artifacts.js +172 -0
  141. package/packages/core/providers/github/pipeline-release-evidence.js +17 -98
  142. package/packages/core/providers/github/pipeline-stable-baseline.js +86 -0
  143. package/packages/core/providers/github/pipeline-stable-source.js +22 -4
  144. package/packages/core/providers/github/release-evidence-assets.js +97 -0
  145. package/packages/core/publication/authority/control-plane.js +2 -2
  146. package/packages/core/publication/authority/seal.js +1 -1
  147. package/packages/core/publication/cli/dispatch.mjs +1 -12
  148. package/packages/core/publication/pipeline/actions.js +16 -9
  149. package/packages/core/publication/pipeline/apply.js +17 -9
  150. package/packages/core/publication/pipeline/context.js +29 -0
  151. package/packages/core/publication/pipeline/journal.js +13 -1
  152. package/packages/core/publication/pipeline/prepare.js +15 -6
  153. package/packages/core/publication/pipeline/recovery-import.js +1 -1
  154. package/packages/core/publication/pipeline/recovery-materials.js +63 -1
  155. package/packages/core/publication/pipeline/recovery-prepare.js +21 -9
  156. package/packages/core/publication/pipeline/stable-entry.js +12 -3
  157. package/packages/core/publication/pipeline/stable-products.js +21 -19
  158. package/packages/core/publication/pipeline/version-actions.js +15 -6
  159. package/packages/core/publication/publication-rehearsal-projection.js +0 -9
  160. package/packages/core/release/cli/dispatch.mjs +1 -4
  161. package/packages/core/release/cli/inspection-handlers.mjs +1 -33
  162. package/packages/core/release/cli/release-handlers.mjs +2 -19
  163. package/packages/core/release/cli/verification-handlers.mjs +4 -25
  164. package/packages/core/release/next-development-projection.js +13 -13
  165. package/packages/core/release/passport/locations.js +13 -8
  166. package/packages/core/release/release-passport.js +70 -5
  167. package/packages/core/web/cli/badges.mjs +0 -4
  168. package/packages/core/web/publication-admission.js +1 -1
  169. package/packages/core/web/publication-capability.js +1 -1
  170. package/packages/core/web/readme-badges.js +1 -1
  171. package/packages/core/workflow/cli/main.mjs +1 -4
  172. package/packages/core/workflow/cli/process.mjs +1 -1
  173. package/packages/core/workflow/commands/buildchain-cli-help.mjs +2 -8
  174. package/packages/core/workflow/engine/conformance.js +1 -1
  175. package/packages/core/workflow/pipeline/build.js +21 -1
  176. package/packages/core/workflow/pipeline/delivery-observation.js +6 -2
  177. package/packages/core/workflow/workflow-taxonomy.mjs +61 -17
  178. package/scripts/check-code-layout.mjs +2 -0
  179. package/scripts/check-core-mechanism-inventory.mjs +29 -13
  180. package/scripts/check-floating-consumer-policy-contract.mjs +3 -3
  181. package/scripts/check-inventory.mjs +27 -27
  182. package/scripts/check-maintainability.mjs +28 -5
  183. package/scripts/check-public-dogfood-contract.mjs +3 -3
  184. package/scripts/check-release-topology.mjs +1 -1
  185. package/scripts/check-self-consumer-contract.mjs +7 -7
  186. package/scripts/check-universal-workflow-bootstrap.mjs +1 -1
  187. package/scripts/generate-channel-promotion-workflow.mjs +1 -1
  188. package/scripts/generate-minimal-consumer-contract.mjs +21 -1
  189. package/scripts/generate-site-bundle.mjs +2 -1
  190. package/scripts/generate-tail-reseal-fixture.mjs +3 -3
  191. package/scripts/inventory/promotion.mjs +1 -1
  192. package/scripts/next-development-self-dogfood-harness.mjs +1 -1
  193. package/scripts/next-development-self-dogfood.mjs +4 -4
  194. package/scripts/site-capability-metadata.mjs +2 -6
  195. package/scripts/source-metric-lineage.mjs +62 -7
  196. package/scripts/verify-golden-path.mjs +31 -35
  197. package/templates/native-dev-delivery.yml +1 -1
  198. package/templates/universal-buildchain-bootstrap.yml +1 -1
  199. package/packages/core/paper/operations/bootstrap.js +0 -75
  200. package/packages/core/paper/operations/plans.js +0 -213
  201. package/packages/core/paper/operations/provisioning.js +0 -113
  202. package/packages/core/paper/operations/scaffold-config.js +0 -77
  203. package/packages/core/paper/operations/scaffold-workflows.js +0 -116
  204. package/packages/core/paper/operations/workspace.js +0 -60
  205. package/packages/core/paper/paper-npm-bootstrap.js +0 -492
@@ -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-14
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-14
15
+ generated_at: 2026-09-20
16
16
  visible_context: User-directed zero-delay self release policy, required provider evidence and regression tests.
17
17
  invisible_context_boundary: No credentials, private logs, or unpublished consumer content were used.
18
18
  ---
19
19
 
20
20
  # Stable Candidate Patrol
21
21
 
22
+ This page describes the retained internal `.ops-stable-candidate-patrol.yml`
23
+ mechanism. Current consumer release intent is a legal channel PR through the
24
+ normal pipeline. Consumers do not add a scheduled stable caller or provider-token
25
+ inputs. The policy and ledger fields below belong to internal or historical
26
+ qualification, not schema-2 TOML extensions.
27
+
22
28
  Buildchain can treat every exact alpha as an independent stable candidate. A
23
29
  new alpha creates a new candidate; it does not silently revoke an older alpha
24
30
  that already completed its checks and soak interval.
@@ -102,68 +108,10 @@ release fact. Repositories that intentionally disable GitHub Releases omit
102
108
  `alpha-release` and declare their own exact-SHA workflow/status evidence; tag
103
109
  commit time remains the earliest possible soak start.
104
110
 
105
- `publish_at` and `timezone` are the auditable policy declaration. GitHub only
106
- starts scheduled workflows from caller-owned cron, so the thin caller keeps the
107
- matching UTC trigger:
108
-
109
- ```yaml
110
- name: Stable Candidate Patrol
111
-
112
- on:
113
- schedule:
114
- - cron: "0 19 * * *" # 03:00 Asia/Shanghai
115
- workflow_dispatch:
116
- inputs:
117
- release-now:
118
- description: Exact alpha selected by explicit human authority
119
- required: false
120
- default: ""
121
-
122
- permissions:
123
- contents: write
124
- pull-requests: write
125
- checks: read
126
- statuses: read
127
-
128
- jobs:
129
- stable:
130
- uses: kungfu-systems/buildchain/.github/workflows/public-ops-stable-candidate-patrol.yml@v4
131
- with:
132
- release-now: ${{ inputs.release-now }}
133
- dry-run: false
134
- secrets:
135
- promotion-token: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}
136
- approval-token: ${{ secrets.BUILDCHAIN_APPROVAL_TOKEN }}
137
- ```
138
-
139
- The promotion token must be repository-owned and capable of creating the
140
- machine ledger branch, exact source-lock branch, and pull request. Repositories
141
- that require an approving review can pass an independent repository-owned App,
142
- bot, or human service-account token as `approval-token`. The approval identity
143
- must differ from the promotion token identity that opens the PR. When no
144
- `approval-token` is passed, `auto-approve: true` falls back to the caller
145
- `github.token` and therefore requires GitHub Actions approval permission. The
146
- generated PR may use auto-merge, but it never bypasses the target branch
147
- checks. Callers can select `merge-method: merge`, `squash`, or `rebase`; the
148
- default is `merge` for compatibility. Unsupported values fail closed before
149
- GitHub is called.
150
-
151
- Before enabling `auto-approve` and `auto-merge`, the caller repository must
152
- provide one approval path and enable auto-merge:
153
-
154
- - pass an independent `approval-token`; or enable **Actions > General >
155
- Workflow permissions > Allow GitHub Actions to create and approve pull
156
- requests**, so the caller `github.token` can approve independently from the
157
- promotion token that opened the PR;
158
- - **General > Pull Requests > Allow auto-merge**, so Patrol can arm the
159
- protected merge while required reviews and checks are still pending.
160
-
161
- GitHub rejects approval from the same identity that opened the pull request;
162
- Patrol propagates that review failure instead of reporting success.
163
-
164
- Patrol treats a GraphQL refusal to enable auto-merge as a hard failure. A run
165
- must not report publication authority when GitHub accepted the HTTP request but
166
- returned a GraphQL error in the response body.
111
+ The retained scheduling policy does not add a consumer-owned cron workflow.
112
+ Any internal patrol mutation must use independently admitted write authority,
113
+ revalidate its exact candidate and honor protected reviews/checks. An HTTP-success
114
+ response with GraphQL errors is not accepted publication or landing authority.
167
115
 
168
116
  ## Exact-source stable promotion
169
117
 
@@ -181,8 +129,7 @@ passport, registry, tag, and floating-ref checks still run.
181
129
 
182
130
  ## Hold, revoke, and immediate release
183
131
 
184
- Persistent repository controls can be supplied as reusable-workflow inputs or
185
- repository variables:
132
+ The internal component retains these persistent control ports:
186
133
 
187
134
  ```text
188
135
  BUILDCHAIN_STABLE_HOLD=true
@@ -8,24 +8,24 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-10
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-10
15
+ generated_at: 2026-09-20
16
16
  visible_context: Current adopter runtime, public workflow, composite actions and local execution tests.
17
17
  invisible_context_boundary: No hosted cross-platform execution or publication was performed for this documentation.
18
18
  ---
19
19
 
20
- # Public Adopter Delivery
20
+ # Internal adopter qualification
21
21
 
22
- The public entry is `kungfu-systems/buildchain/.github/workflows/public-build-adopter-qualification.yml`.
23
- Consumers call its floating `@v4` or `@v4-alpha` channel and retain matching dual
24
- contract locks. The workflow owns the Linux, macOS and Windows job matrix;
25
- `actions/adoption` owns admission, conformance and reconciliation;
26
- `packages/core/adoption` owns driver coordination and exact readback.
22
+ The internal `.build-adopter-qualification.yml` component owns its platform
23
+ qualification jobs. `actions/adoption` owns admission, conformance and
24
+ reconciliation; `packages/core/adoption` owns driver coordination and readback.
25
+ Consumers use the shared normal/recovery pair and do not add an adopter-specific
26
+ caller or qualification request to their TOML. See [Getting started](getting-started.md).
27
27
 
28
- ## Public contract
28
+ ## Driver contract
29
29
 
30
30
  The [input schema](../contracts/v4-adopter-delivery-v1.schema.json) requires an
31
31
  exact protocol driver and artifact profile. Built-in driver selectors are
@@ -53,11 +53,11 @@ rooted evidence fail. The API has two operations: `run` and `verify`.
53
53
  ## Configuration
54
54
 
55
55
  The closed JSON input owns `driverSelector`, `artifactProfileSelector`, `request`
56
- and `context`. The public workflow's `input-path` names that document; CLI
56
+ and `context`. The internal component's `input-path` names that document; CLI
57
57
  `--input`, `--readback` and `--output` arguments locate the request and evidence.
58
58
  Build configuration contains no duplicate Adopter Delivery declaration.
59
59
 
60
- Paths must stay inside the consumer repository. Workflow inputs name `consumer`
60
+ For internal qualification, paths stay inside the admitted source. Component inputs name `consumer`
61
61
  and `input-path`. External qualification additionally requires the complete
62
62
  `consumer-repository`, exact `consumer-ref` and `invocation-source-path` tuple.
63
63
  The admission node verifies the checked-out source and defining runtime before
@@ -75,7 +75,7 @@ use the same runtime; each consumer must use the same source and input across
75
75
  platforms. Missing, duplicate, inconsistent or modified reports fail.
76
76
  Qualification has no production, provider or release authority.
77
77
 
78
- Buildchain's [thin dogfood caller](../.github/workflows/self-build-adopter-dogfood.yml)
79
- uses the same public entry. Historical parity research remains historical
80
- evidence; current qualification does not download old Buildchain packages or
81
- require an old release's bootstrap lineage.
78
+ The former standalone adopter dogfood caller is historical. Current self product
79
+ verification is declared in TOML and runs through the normal pipeline.
80
+ Historical parity research remains historical evidence; it does not create an
81
+ additional consumer public API or prove current hosted qualification.
@@ -8,31 +8,33 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: B
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-10
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-10
15
+ generated_at: 2026-09-20
16
16
  visible_context: Buildchain 4.1 source, architecture registries and local validation.
17
17
  invisible_context_boundary: No unpublished release or external consumer qualification is claimed.
18
18
  ---
19
19
 
20
- # Adopt the current release promotion API
20
+ # Adopt the minimal consumer pipeline
21
21
 
22
- Call `public-release-promote.yml` with the closed `request-json` contract after
23
- the selected floating channel publishes this API. Keep both channel contract
24
- locks in the consumer repository. See [Promotion request](release-promotion-request.md)
25
- for the complete request and examples.
22
+ Use the generated `buildchain.yml` and `buildchain-recover.yml` with the schema-2
23
+ `.buildchain/buildchain.toml`. The shared public workflows are
24
+ `public-ops-pipeline.yml` and `public-ops-recover.yml`. See
25
+ [Getting started](getting-started.md) for initialization.
26
26
 
27
- The declaration-driven provider plane is the sole publisher. There is no mode
28
- switch, command-hook adapter or retained v3 execution path. Candidate identity,
29
- sealed artifact manifests, qualification and provider receipt roots determine
30
- execution and recovery.
27
+ The normal pipeline owns the declaration-driven provider plane. Products declare
28
+ build/verify commands, artifacts and publication targets in TOML. Consumers do not
29
+ call a separate promotion workflow, supply request JSON, or implement release-tail
30
+ command hooks. Candidate identity, sealed materials, qualification and provider
31
+ receipts remain internal runtime authority.
31
32
 
32
- On interruption, resume the same candidate and transaction state. The workflow
33
- verifies the source, artifact and policy roots, then continues the incomplete
34
- operations. Completed publication recovery reads the existing evidence and
35
- preserves immutable product bytes.
33
+ On interruption, select the exact attempt in the generated recovery workflow.
34
+ An optional repaired runtime can continue remaining work while preserving the
35
+ original source, published bytes and historical evidence. Do not combine
36
+ candidate/run/Discussion/transaction selectors in consumer wiring.
36
37
 
37
- The 4.1 development merge is not an alpha publication. Consumer adoption waits
38
- for the corresponding published channel contract and refreshed locks.
38
+ A development merge is not a published entry. Adopt the changed contract only
39
+ after its selected channel publishes and qualifies it, then refresh the
40
+ corresponding tool-maintained locks through the supported acceptance path.
@@ -1,22 +1,27 @@
1
1
  ---
2
- status: active
2
+ status: historical
3
3
  period: ongoing
4
4
  theme: buildchain-v4-production-release
5
- doc_type: runbook
5
+ doc_type: historical-reference
6
6
  source_level: repository-contracts + protected-provider-readback
7
7
  confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-08
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-08
16
- invisible_context: Provider credentials and private provider state were not read.
15
+ generated_at: 2026-09-20
16
+ visible_context: Reclassified the retained v4.0 protocol and linked current pipeline guidance; historical body preserved.
17
+ invisible_context_boundary: No current provider state or credentials were inspected for this documentation change.
17
18
  ---
18
19
 
19
- # Buildchain v4 production release
20
+ # Historical Buildchain v4.0 production release
21
+
22
+ This document preserves the retired v4.0 workflow protocol. Current release
23
+ operations use the shared pipeline and exact-attempt recovery described in
24
+ [release governance](release-governance.md) and [release flow](release-flow.md).
20
25
 
21
26
  Buildchain v4 is the production release authority for the `v4.0` line. The
22
27
  protected source path is:
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: self-reviewed
11
- last_reviewed: 2026-09-11
11
+ last_reviewed: 2026-09-20
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-08-16
15
+ generated_at: 2026-09-20
16
16
  visible_context: Exact v3 rehearsal runtime, v4 release-tail core, Stage Capsule contracts, public workflow and offline vectors.
17
17
  invisible_context_boundary: No credentials, private provider state, signed URLs or production publication receipts were read.
18
18
  ---
@@ -90,33 +90,18 @@ all three modes. The API delegates planning, transaction initialization, and
90
90
  execution to the same `release-tail-provider-plane` functions used by the
91
91
  production Action.
92
92
 
93
- ## Config and public workflow
93
+ ## Internal configuration and component
94
94
 
95
- The consumer config is closed and effect-disabled:
95
+ The internal `.release-tail.yml` component and rehearsal CLI consume the closed
96
+ capsule, candidate, state and evidence paths. Simulation remains effect-disabled;
97
+ provider mode requires independently verified authority and exact provider
98
+ bindings. A rehearsal result never grants production publication authority.
96
99
 
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
- [`public-release-tail.yml`](../.github/workflows/public-release-tail.yml) accepts the same
109
- capsule, candidate root, mode, state and evidence paths. Before publication,
110
- Buildchain dogfoods that public surface through the same floating `@v4` entry
111
- as external consumers. The shared entry selects the runtime from the transient
112
- parameter, consumer lock, or entry default, and prepares it in each job. The reusable is
113
- permission-neutral and the self-dogfood caller stays `contents: read`, passes
114
- `execute: false`, and therefore cannot inherit or synthesize production write
115
- authority. Effectful production callers must explicitly declare their own
116
- provider permission. Durable external consumers use `@v4` or `@v4-alpha`. 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`.
100
+ The former `[publication_rehearsal]` consumer table and standalone public caller
101
+ are not accepted schema-2 wiring. Current consumers use the normal pipeline and
102
+ exact-attempt recovery. Internal fixtures retain the rehearsal inputs for
103
+ mechanism qualification, without adding a third workflow or request JSON to a
104
+ consumer repository.
120
105
 
121
106
  ## Offline portability vectors
122
107
 
@@ -8,11 +8,11 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: unreviewed
11
- last_reviewed: 2026-09-11
11
+ last_reviewed: 2026-09-20
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-08-10
15
+ generated_at: 2026-09-20
16
16
  invisible_context: not asserted
17
17
  ---
18
18
 
@@ -133,24 +133,18 @@ shadow-only: it does not skip a v3 production stage or move v3 authority.
133
133
 
134
134
  ## Three-platform qualification and Wave reconciliation
135
135
 
136
- `architecture/stage-capsule-qualification.json` closes the Wave 2
137
- qualification boundary. Buildchain and external repositories use the same
138
- Buildchain-owned public reusable workflow,
139
- `.github/workflows/public-build-stage-capsule-canary.yml`. Buildchain's caller is the thin
140
- `.github/workflows/self-build-public-consumer-dogfood.yml`; it has no steps, copied
141
- orchestration, local action, direct qualification invocation, or private
142
- consumer profile. The persisted caller uses `@v4`. Candidate validation passes
143
- `train/v4/v4.1/<capability>` as the transient `runtime-ref` input, through the
144
- same central selection and preparation entry as external consumers.
145
-
146
- The called workflow prepares the selected runtime and reads the consumer's
147
- tracked `.buildchain/buildchain.toml`, and executes only `install`, `build`,
148
- and `verify` on GitHub-hosted Linux x64, macOS arm64, and Windows x64 runners.
149
- Each stage binds its declared command, dependency edge, exact consumer source,
150
- platform, lifecycle manifest, summary, and real output roots into the campaign
151
- profile. `publish` is explicitly classified as a provider mutation and is not
152
- executed. The caller supplies only its stable consumer name and the real output
153
- paths; it does not copy the campaign orchestration.
136
+ `architecture/stage-capsule-qualification.json` owns the Wave 2 qualification
137
+ boundary. The former standalone public canary and self caller are historical;
138
+ the retained `.build-stage-capsule-canary.yml` component is internal. Current
139
+ Buildchain self verification runs the declared platform checks through the
140
+ shared pipeline and schema-2 TOML, including `scripts/verify-product-platform.mjs`.
141
+ Consumers do not copy campaign controllers or select provider/proof ports.
142
+
143
+ The internal qualification mechanism binds install/build/verify commands,
144
+ dependency edges, exact source, platform, lifecycle summaries and output roots.
145
+ Provider publication is separate authority and is not granted by Capsule reuse.
146
+ The following campaign invariants describe the retained internal mechanism;
147
+ they do not claim a new hosted qualification run.
154
148
 
155
149
  The external seed retains `install` and `build` before an intentional late
156
150
  `verify` failure. A clean process reads the retained store, restores only the
@@ -1,4 +1,27 @@
1
- # V4 retained-candidate tail reseal
1
+ ---
2
+ status: active
3
+ period: ongoing
4
+ theme: retained-candidate-tail-reseal
5
+ doc_type: technical-reference
6
+ source_level: local-files
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-20
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-20
16
+ visible_context: Internal tail-reseal contract, workflow taxonomy and shared recovery entry.
17
+ invisible_context_boundary: No hosted recovery or publication is claimed.
18
+ ---
19
+
20
+ # Internal retained-candidate tail reseal
21
+
22
+ Consumers recover through `buildchain-recover.yml` with an exact attempt and an
23
+ optional repaired runtime. The request schema, ports and commands below describe
24
+ internal mechanisms; they are not consumer setup or recovery inputs.
2
25
 
3
26
  Buildchain v4 can recover one narrowly defined late Alpha failure without
4
27
  rebuilding a qualified four-platform candidate. The recovery is not a cache hit
@@ -19,18 +42,14 @@ mismatch rejects reuse and requires a normal candidate build.
19
42
  - `install`, `build`, `verify`, `package`, and the ordinary platform matrix are
20
43
  skipped only when all 16 per-platform Stage Capsule decisions prove exact
21
44
  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
45
+ - Only `macos-arm64:signing-finalization` may change payload bytes. The internal
46
+ component verifies the retained macOS bytes before the effect and verifies the
24
47
  resealed bytes plus signing and release-tail readbacks afterward.
25
48
  - The signing token exists only in the macOS credential-island step. It is not
26
49
  stored in a Capsule, request, artifact, log, Passport, or receipt.
27
50
  - A successful run emits the existing
28
51
  `kungfu-buildchain-release-candidate-passport` contract. Tail reseal does not
29
52
  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
53
  ## CLI and Node API
35
54
 
36
55
  Plan locally from the deterministic data contract:
@@ -53,21 +72,16 @@ The Node exports are `@kungfu-tech/buildchain/v4-tail-reseal` for request and
53
72
  plan logic and `@kungfu-tech/buildchain/v4-tail-reseal-receipt` for terminal
54
73
  receipt creation and verification.
55
74
 
56
- ## Reusable workflow
57
-
58
- Consumers invoke
59
- `kungfu-systems/buildchain/.github/workflows/public-ops-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:
75
+ ## Internal component
63
76
 
64
- - `.buildchain/tail-reseal/signing-provider-readback.json`
65
- - `.buildchain/tail-reseal/release-tail-provider-readback.json`
77
+ `.ops-tail-reseal.yml` receives the runtime-admitted rooted request, original
78
+ candidate policy receipt and explicitly scoped signing authority. Only its
79
+ admitted signing-finalization tail may issue the provider effect. Its readback
80
+ files bind the exact signing and release-tail provider roots. The component
81
+ downloads retained material by exact authority identity and digest; a Stage
82
+ Capsule cannot replay credentials or provider authority.
66
83
 
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.
84
+ Consumers do not supply a signing command or call this component directly.
71
85
 
72
86
  The v3-to-v4 invariant mapping is recorded in
73
87
  [`architecture/tail-reseal-parity.json`](../architecture/tail-reseal-parity.json).