@kungfu-tech/buildchain 4.0.2-alpha.34 → 4.0.2-alpha.36

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 (93) hide show
  1. package/AGENTS.md +9 -0
  2. package/CONTRIBUTING.md +24 -0
  3. package/README.md +2 -2
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/architecture/agent-change-map.md +7 -4
  6. package/architecture/ci-lane-change-budget.json +17 -0
  7. package/architecture/internal-capabilities.json +4 -4
  8. package/architecture/maintainability-debt.json +14 -11
  9. package/architecture/maintainability-policy.json +4 -4
  10. package/architecture/release-tail-contract-inventory.json +6 -6
  11. package/architecture/v4-delivery-authority-parity.json +2 -2
  12. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +1 -1
  13. package/architecture/v4-floating-consumer-policy.json +1 -1
  14. package/architecture/v4-next-development-parity.json +4 -4
  15. package/architecture/v4-platform-stage-checkpoints.json +1 -1
  16. package/architecture/v4-publication-facade-patches.json +53 -0
  17. package/architecture/v4-release-topology.json +56 -33
  18. package/architecture/v4-rust-wasm-production-authority.json +1 -0
  19. package/architecture/v4-stage-capsule-qualification.json +1 -1
  20. package/architecture/v4-universal-workflow-bootstrap.json +1 -1
  21. package/architecture/v4-universal-workflow-fault-campaign.json +1 -1
  22. package/architecture/v4-universal-workflow-train-admission.json +4 -4
  23. package/architecture/workflow-taxonomy.json +1448 -0
  24. package/contracts/buildchain-v2-residuals-v1.json +64 -1
  25. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  26. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  27. package/dist/site/buildchain-contract.json +20 -20
  28. package/dist/site/buildchain-site.json +127 -56
  29. package/dist/site/capability-registry.json +4 -4
  30. package/dist/site/controller-registry.json +5 -4
  31. package/dist/site/kfd-claims.json +2623 -956
  32. package/dist/site/kfd-upstream-aggregate.json +1 -1
  33. package/dist/site/manual-registry.json +10 -10
  34. package/dist/site/node-api-registry.json +26 -21
  35. package/dist/site/page-registry.json +112 -41
  36. package/dist/site/public-surface-audit.json +3205 -1126
  37. package/dist/site/publication-authority-registry.json +1182 -415
  38. package/dist/site/publication-registry.json +4 -4
  39. package/dist/site/site-manifest.json +14 -14
  40. package/dist/site/workflow-registry.json +5460 -1870
  41. package/docs/MAP.md +1 -0
  42. package/docs/auditable-demo.md +1 -1
  43. package/docs/cli.md +3 -3
  44. package/docs/dev-delivery-warrant.md +1 -1
  45. package/docs/engineering-housekeeper.md +3 -3
  46. package/docs/next-development-transition.md +1 -1
  47. package/docs/node-api-reference.md +30 -30
  48. package/docs/publication-authority.md +2 -2
  49. package/docs/release-candidate.md +3 -3
  50. package/docs/release-flow.md +67 -19
  51. package/docs/release-governance.md +8 -8
  52. package/docs/v4-adopter-delivery.md +1 -1
  53. package/docs/v4-production-release.md +71 -8
  54. package/docs/v4-stage-capsule.md +1 -1
  55. package/docs/workflow-catalog.md +152 -0
  56. package/package.json +8 -6
  57. package/packages/core/buildchain-contract.js +1 -1
  58. package/packages/core/buildchain-kfd-claims.js +2 -2
  59. package/packages/core/buildchain-publication-authority.js +40 -25
  60. package/packages/core/buildchain-v4-domain.wasm +0 -0
  61. package/packages/core/controller-evidence.js +4 -1
  62. package/packages/core/github-governance-authority.js +4 -4
  63. package/packages/core/next-development-projection.js +1 -1
  64. package/packages/core/release-line-dry-run.js +1 -1
  65. package/packages/core/v4-canonical-contracts.js +1 -0
  66. package/packages/core/v4-domain-wasm-artifact.js +2 -2
  67. package/packages/core/v4-floating-consumer-evidence.js +1 -1
  68. package/packages/core/v4-floating-consumer-policy.js +1 -1
  69. package/scripts/binary-publication-evidence.mjs +135 -0
  70. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  71. package/scripts/check-core-mechanism-inventory.mjs +4 -3
  72. package/scripts/check-inventory.mjs +22 -22
  73. package/scripts/check-v4-floating-consumer-policy-contract.mjs +1 -1
  74. package/scripts/check-v4-public-dogfood-contract.mjs +18 -5
  75. package/scripts/check-v4-release-topology.mjs +35 -6
  76. package/scripts/check-v4-runtime-semantic-closure.mjs +4 -1
  77. package/scripts/check-v4-universal-workflow-bootstrap.mjs +5 -9
  78. package/scripts/check-workflow-taxonomy.mjs +6 -0
  79. package/scripts/generate-channel-build-workflow.mjs +2 -1
  80. package/scripts/generate-channel-promotion-workflow.mjs +4 -3
  81. package/scripts/generate-site-bundle.mjs +11 -11
  82. package/scripts/generate-v4-universal-workflow-facades.mjs +24 -6
  83. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  84. package/scripts/maintainability-metrics.mjs +16 -5
  85. package/scripts/next-development-review.mjs +307 -0
  86. package/scripts/release-asset-client.mjs +91 -0
  87. package/scripts/release-candidate-resolver.mjs +1 -1
  88. package/scripts/source-verification-evidence.mjs +344 -0
  89. package/scripts/stable-candidate-qualification.mjs +1 -1
  90. package/scripts/v4-publication-settlement.mjs +211 -0
  91. package/scripts/v4-universal-workflow-self-dogfood.mjs +1 -1
  92. package/scripts/verify-version-state-delta.mjs +173 -0
  93. package/scripts/workflow-taxonomy.mjs +468 -0
package/AGENTS.md CHANGED
@@ -79,6 +79,15 @@ pnpm install --frozen-lockfile
79
79
  pnpm run check
80
80
  ```
81
81
 
82
+ Workflow paths are governed by [`architecture/workflow-taxonomy.json`](architecture/workflow-taxonomy.json)
83
+ and the generated [`Workflow Catalog`](docs/workflow-catalog.md). Before adding,
84
+ renaming, or editing workflow YAML, register its role (`public`, component `.`,
85
+ or `self`) and category (`build`, `release`, or `ops`). Use the derived filename;
86
+ do not invent prefixes, categories, or compatibility aliases. Edit canonical
87
+ implementations, run `pnpm run generate:workflows`, and pass
88
+ `pnpm run check:workflows` plus the full check. Taxonomy and gate changes require
89
+ independent `@kungfu-origin` review through CODEOWNERS.
90
+
82
91
  Buildchain v4 Stage Capsule checkpoint work is governed by
83
92
  `architecture/v4-platform-stage-checkpoints.json`. Agents must use that single
84
93
  platform/stage declaration for shadow emission and clean-process restore. Do
package/CONTRIBUTING.md CHANGED
@@ -73,6 +73,30 @@ pnpm run build
73
73
  npm pack --dry-run --json --registry=https://registry.npmjs.org/
74
74
  ```
75
75
 
76
+ ## Workflow organization
77
+
78
+ All workflows remain directly under `.github/workflows/`. The finite role and
79
+ category vocabulary is enforced by `architecture/workflow-taxonomy.json`:
80
+
81
+ | Role | Filename | Scope |
82
+ | --- | --- | --- |
83
+ | Public | `public-<category>-<purpose>.yml` | Consumer entry |
84
+ | Component | `.<category>-<purpose>.yml` | Advanced reusable component |
85
+ | Self | `self-<category>-<purpose>.yml` | Buildchain repository automation |
86
+
87
+ Categories are only `build`, `release`, and `ops`. Register the identity, role,
88
+ category, purpose, owner, lifecycle status, invocation, and rationale before
89
+ adding its derived filename. The [Workflow Catalog](docs/workflow-catalog.md)
90
+ lists every allowed path and compatibility exception. Existing public aliases
91
+ are generated from their canonical implementations; self workflows have one
92
+ event entry. A matching prefix alone does not admit an unregistered workflow.
93
+
94
+ Run `pnpm run generate:workflows`, `pnpm run check:workflows`, then the full
95
+ `pnpm run check`. The required Verify lifecycle runs this gate on PRs, merge
96
+ queue candidates, and pushes. Policy, enforcement, and ownership changes require
97
+ independent `@kungfu-origin` review. Keep published floating consumers on their
98
+ registered legacy paths until the selected channel actually ships the new path.
99
+
76
100
  ## Generated files
77
101
 
78
102
  GitHub Actions consume committed bundles. When changing an action
package/README.md CHANGED
@@ -324,9 +324,9 @@ The active reusable workflow surfaces are:
324
324
  heavy build;
325
325
  - `.github/workflows/.web-surface.yml` for preview, staging, production, and
326
326
  cleanup plans for site/app repositories;
327
- - `.github/workflows/buildchain-ref-promotion.yml` for protected release
327
+ - `.github/workflows/self-release-promote.yml` for protected release
328
328
  promotion and version-state transactions;
329
- - `.github/workflows/binary-distribution.yml` for Buildchain's own release
329
+ - `.github/workflows/self-build-binary-distribution.yml` for Buildchain's own release
330
330
  passport proof case.
331
331
 
332
332
  Stable consumers should reference actions and workflows through floating major
@@ -310,7 +310,7 @@ Buildchain itself uses this path for npm. Its `lifecycle.publish` runs
310
310
  `node scripts/npm-publish-transaction.mjs`, which publishes
311
311
  `@kungfu-tech/buildchain` through npm Trusted Publishing and writes npm
312
312
  artifact evidence into the transaction before release refs move. The separate
313
- `.github/workflows/npm-publish.yml` workflow is dry-run only.
313
+ `.github/workflows/self-release-npm-dry-run.yml` workflow is dry-run only.
314
314
 
315
315
  Publish lifecycle environment:
316
316
 
@@ -178,6 +178,7 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
178
178
  - `actions/promote-buildchain-ref/lib.js`
179
179
  - `actions/v4-release-candidate-promote/index.js`
180
180
  - `actions/v4-release-candidate-promote/product-provider.js`
181
+ - `actions/v4-release-candidate-promote/product-provider-github-adapters.js`
181
182
  - `tests/v4-release-candidate-promote.test.mjs`
182
183
  - `scripts/check-inventory.mjs`
183
184
  - `tests/promote-buildchain-ref.test.mjs`
@@ -197,6 +198,8 @@ Safe change route: Reduce one owned responsibility behind the stable facade, run
197
198
  - `scripts/buildchain-cli-help.mjs`
198
199
  - `scripts/check-maintainability.mjs`
199
200
  - `tests/maintainability.test.mjs`
201
+ - `scripts/generate-v4-universal-workflow-facades.mjs`
202
+ - `scripts/check-v4-release-topology.mjs`
200
203
 
201
204
  ## cli-command-registry
202
205
 
@@ -741,7 +744,7 @@ Owner: Buildchain adopter delivery maintainers
741
744
  - `contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json`
742
745
  - `contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json`
743
746
  - `.github/workflows/v4-adopter-delivery.yml`
744
- - `.github/workflows/v4-adopter-delivery-dogfood.yml`
747
+ - `.github/workflows/self-build-adopter-dogfood.yml`
745
748
  - `docs/v4-adopter-delivery.md`
746
749
 
747
750
  ### Tests
@@ -953,7 +956,7 @@ Owner: Buildchain protected delivery maintainers
953
956
  - `contracts/dev-delivery-authority-v2.schema.json`
954
957
  - `dist/site/schemas/dev-delivery-authority-v2.schema.json`
955
958
  - `.github/workflows/dev-pr-auto-merge.yml`
956
- - `.github/workflows/buildchain-dev-delivery.yml`
959
+ - `.github/workflows/self-ops-dev-delivery.yml`
957
960
  - `templates/native-dev-delivery.yml`
958
961
  - `docs/dev-delivery-warrant.md`
959
962
  - `docs/dev-delivery-qualification-landing-adr.md`
@@ -995,7 +998,7 @@ Owner: Buildchain publication rehearsal maintainers
995
998
 
996
999
  - `architecture/v4-publication-rehearsal-parity.json`
997
1000
  - `contracts/v4-publication-rehearsal-capsule-v1.schema.json`
998
- - `.github/workflows/v4-publication-rehearsal-dogfood.yml`
1001
+ - `.github/workflows/self-release-rehearsal-dogfood.yml`
999
1002
  - `docs/v4-publication-rehearsal.md`
1000
1003
 
1001
1004
  ### Tests
@@ -1029,7 +1032,7 @@ Owner: Buildchain workflow maintainers
1029
1032
  - `architecture/v4-universal-workflow-fault-campaign.json`
1030
1033
  - `architecture/v4-universal-workflow-train-admission.json`
1031
1034
  - `.github/workflows/bootstrap.yml`
1032
- - `.github/workflows/universal-bootstrap-dogfood.yml`
1035
+ - `.github/workflows/self-ops-bootstrap-dogfood.yml`
1033
1036
  - `templates/universal-buildchain-bootstrap-recovery.yml`
1034
1037
 
1035
1038
  ### Tests
@@ -591,6 +591,23 @@
591
591
  "expectedContributionSeconds": 0,
592
592
  "rationale": "The opt-in universal path preserves the default compatibility lane and executes only an exact admitted runtime."
593
593
  }
594
+ },
595
+ {
596
+ "laneId": ".github/workflows/self-release-next-development.yml#review",
597
+ "authorityClass": "merge-critical-admission",
598
+ "triggerClass": "mixed",
599
+ "concurrencyPolicy": {
600
+ "mode": "ref-scoped",
601
+ "cancelInProgress": false
602
+ },
603
+ "expectedRunnerMinutes": 3,
604
+ "cancellationBehavior": "finish-started",
605
+ "sloImpact": {
606
+ "mergeCritical": true,
607
+ "metric": "generated next-development independent review latency",
608
+ "expectedContributionSeconds": 180,
609
+ "rationale": "Only successful same-repository version PRs regenerate from the protected base and read completed publication evidence; ordinary source PRs skip the lane. Native queue checks remain final merge authority."
610
+ }
594
611
  }
595
612
  ],
596
613
  "declarationFamilies": [
@@ -589,7 +589,7 @@
589
589
  "contracts": [
590
590
  "architecture/v4-publication-rehearsal-parity.json",
591
591
  "contracts/v4-publication-rehearsal-capsule-v1.schema.json",
592
- ".github/workflows/v4-publication-rehearsal-dogfood.yml",
592
+ ".github/workflows/self-release-rehearsal-dogfood.yml",
593
593
  "docs/v4-publication-rehearsal.md"
594
594
  ],
595
595
  "generatedOutputs": [],
@@ -656,7 +656,7 @@
656
656
  "contracts/dev-delivery-authority-v2.schema.json",
657
657
  "dist/site/schemas/dev-delivery-authority-v2.schema.json",
658
658
  ".github/workflows/dev-pr-auto-merge.yml",
659
- ".github/workflows/buildchain-dev-delivery.yml",
659
+ ".github/workflows/self-ops-dev-delivery.yml",
660
660
  "templates/native-dev-delivery.yml",
661
661
  "docs/dev-delivery-warrant.md",
662
662
  "docs/dev-delivery-qualification-landing-adr.md"
@@ -734,7 +734,7 @@
734
734
  "contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json",
735
735
  "contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json",
736
736
  ".github/workflows/v4-adopter-delivery.yml",
737
- ".github/workflows/v4-adopter-delivery-dogfood.yml",
737
+ ".github/workflows/self-build-adopter-dogfood.yml",
738
738
  "docs/v4-adopter-delivery.md"
739
739
  ],
740
740
  "generatedOutputs": [],
@@ -866,7 +866,7 @@
866
866
  "architecture/v4-universal-workflow-fault-campaign.json",
867
867
  "architecture/v4-universal-workflow-train-admission.json",
868
868
  ".github/workflows/bootstrap.yml",
869
- ".github/workflows/universal-bootstrap-dogfood.yml",
869
+ ".github/workflows/self-ops-bootstrap-dogfood.yml",
870
870
  "templates/universal-buildchain-bootstrap-recovery.yml"
871
871
  ],
872
872
  "generatedOutputs": [
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "totalExcessLedger": {
9
9
  "metric": "calibrated-full-dimensional-excess-v1",
10
- "measuredExcess": 64779,
11
- "current": 56718
10
+ "measuredExcess": 64771,
11
+ "current": 56710
12
12
  },
13
13
  "defaults": {
14
14
  "owner": "Buildchain architecture maintainers",
@@ -1435,21 +1435,21 @@
1435
1435
  "scripts/generate-channel-promotion-workflow.mjs": {
1436
1436
  "baseline": {
1437
1437
  "functions": {
1438
- "generateChannelPromotionWorkflow@279": {
1438
+ "generateChannelPromotionWorkflow@280": {
1439
1439
  "lines": 282
1440
1440
  }
1441
1441
  }
1442
1442
  },
1443
1443
  "current": {
1444
1444
  "functions": {
1445
- "generateChannelPromotionWorkflow@279": {
1445
+ "generateChannelPromotionWorkflow@280": {
1446
1446
  "lines": 240
1447
1447
  }
1448
1448
  }
1449
1449
  },
1450
1450
  "target": {
1451
1451
  "functions": {
1452
- "generateChannelPromotionWorkflow@279": {
1452
+ "generateChannelPromotionWorkflow@280": {
1453
1453
  "lines": 180
1454
1454
  }
1455
1455
  }
@@ -1459,7 +1459,7 @@
1459
1459
  "baseline": {
1460
1460
  "lines": 1410,
1461
1461
  "functions": {
1462
- "buildSiteBundle@719": {
1462
+ "buildSiteBundle@720": {
1463
1463
  "lines": 637
1464
1464
  }
1465
1465
  }
@@ -1467,15 +1467,15 @@
1467
1467
  "current": {
1468
1468
  "lines": 1410,
1469
1469
  "functions": {
1470
- "buildSiteBundle@719": {
1471
- "lines": 637
1470
+ "buildSiteBundle@720": {
1471
+ "lines": 636
1472
1472
  }
1473
1473
  }
1474
1474
  },
1475
1475
  "target": {
1476
1476
  "lines": 600,
1477
1477
  "functions": {
1478
- "buildSiteBundle@719": {
1478
+ "buildSiteBundle@720": {
1479
1479
  "lines": 180
1480
1480
  }
1481
1481
  }
@@ -2075,7 +2075,7 @@
2075
2075
  "current": {
2076
2076
  "functions": {
2077
2077
  "dispatch@61": {
2078
- "lines": 214,
2078
+ "lines": 207,
2079
2079
  "complexity": 64
2080
2080
  }
2081
2081
  }
@@ -3150,6 +3150,7 @@
3150
3150
  "actions/promote-buildchain-ref/lib.js",
3151
3151
  "actions/v4-release-candidate-promote/index.js",
3152
3152
  "actions/v4-release-candidate-promote/product-provider.js",
3153
+ "actions/v4-release-candidate-promote/product-provider-github-adapters.js",
3153
3154
  "tests/v4-release-candidate-promote.test.mjs",
3154
3155
  "scripts/check-inventory.mjs",
3155
3156
  "tests/promote-buildchain-ref.test.mjs",
@@ -3168,7 +3169,9 @@
3168
3169
  "tests/promote-buildchain-ref-governance.test.mjs",
3169
3170
  "scripts/buildchain-cli-help.mjs",
3170
3171
  "scripts/check-maintainability.mjs",
3171
- "tests/maintainability.test.mjs"
3172
+ "tests/maintainability.test.mjs",
3173
+ "scripts/generate-v4-universal-workflow-facades.mjs",
3174
+ "scripts/check-v4-release-topology.mjs"
3172
3175
  ],
3173
3176
  "burnDownSlices": [
3174
3177
  {
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "repositoryBudgets": {
28
28
  "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
- "maxHandMaintainedSourceFiles": 472,
30
- "maxHandMaintainedSourceLines": 170850,
29
+ "maxHandMaintainedSourceFiles": 484,
30
+ "maxHandMaintainedSourceLines": 172859,
31
31
  "maxWorkflowFiles": 80,
32
32
  "maxWorkflowLines": 26791,
33
- "latestTransition": "Alpha publishes the reviewed version and advances Dev afterward.",
34
- "latestTransitionRationale": "The Rust/WASM publication authority now uses the exact reviewed Alpha candidate version and sealed npm tarball, keeps Dev outside release-ref convergence, and reuses the existing next-development transition to create and enqueue one successor-version Dev pull request only after publication succeeds. Candidate-input discovery remains inside the existing product provider, preserving the privileged module topology and adding no workflow, credential, provider permission, merge authority, capability, or publication scope.",
33
+ "latestTransition": "Independently verified next-development review and publication-before-development persistence.",
34
+ "latestTransitionRationale": "Add two bounded provider orchestration modules and 383 measured source lines over protected dev c90a0f55cb10561a9a99090a0f412a7064418328. Exact protected-base regeneration, complete immutable publication readback, separate reviewer credentials and fresh provider observations qualify one generated version PR. Move publication persistence before development waiting. Existing file/function limits, exception inventories and calibrated debt ceilings remain unchanged; the new workflow fits the retained aggregate workflow allowance. The executable closure now follows parsed JavaScript imports and includes the independent review entrypoint; embedded generator program text is not mistaken for an import of the host script.",
35
35
  "rationale": "Bounded modules separate candidate, evidence, native proof and execution, canonical failure verification, closed-set execution transfer, process-boundary verification, Warrant state and qualification, authority state, qualification, Landing acquisition, verified-attempt admission, Landing settlement and fence validation, provider attempt and heartbeat readback, sealed terminal evidence, hosted heartbeat, resume, store, options, command-specific adapters, and CLI orchestration responsibilities. The protected delivery workflow gives candidate and seal jobs no provider write credential, recursively rejects transfer drift, scopes every transfer artifact to the exact provider run attempt, chains every durable heartbeat state and receipt root on a distinct hosted runner domain, and permits qualification or exact failure settlement only after the finalizer verifies live jobs and the latest durable authority state. Public Landing admission and heartbeat always perform non-injectable fresh exact-attempt provider readback, tolerate only a not-yet-materialized seal job while retaining exact native and duplicate-job rejection, and heartbeat-loss coordination never invokes GitHub's run-scoped cancellation API where a successor rerun could race. The hosted process boundary anchors trust in the kernel-resolved versioned Runner.Worker path while accepting an equivalent argv-zero spelling with the same basename; its public boundary marker is allowed only at the one exact non-secret value, so a forged value under the same credential-like name still fails closed. The credentialless transfer seal validates the rooted native reuse decision against the Warrant-bound source, closure, dependency, toolchain, environment and command inputs; qualifiedBase stays in the proof and decision where it is rooted and later independently rechecked, rather than being assumed on the Warrant schema. V2 mutation cannot initialize a second empty authority beside a legacy ref: migration reads and roots the canonical live v1 ref, rechecks it, applies the explicit configured v2 policy, and atomically replaces its bytes through one expected-old non-force update, so old v1 controllers fail closed while the prior commit remains immutable history. Candidate ancestry classifies the GitHub artifact runtime token as credential authority. Every Landing settlement, including an unexpired fence, requires product-owned terminal readback. Terminal cleanup reads the immutable historical attempt, derives workflow and hosted Landing job identity from live run data, reads the exact protected ref head and compares containment against that immutable SHA, and seals merged only when the admitted merge-group head is contained by that protected base; a later different-head merge settles the old attempt as dequeued. Terminal normalization preserves transfer, finalizer boundary, native and seal job, admitted provider attempt, protected-base head, containment result, and terminal readback coordinates. The public reusable workflow truthfully retains its single-flight v1 authority without advertising v2 migration, while bounded v2 remains a separate opt-in CLI, Node API, and schema contract; the tracked self-caller stays on public v4-alpha with matching stable and alpha locks, and transient train selection is dispatch-only. Next-development parity adds one versioned transition authority, one durable controller, one bounded reservation adapter, and pure public-contract recovery evidence while retaining the existing thin floating-channel callers byte-for-byte. The floating-consumer gate reuses the existing contract-world evaluator so SHA drift passes only under the selected lock's compatibility policy, breaking surface drift still fails closed, and external certification reconstructs the receipt from the observed workflow SHA rather than the lock's historical evidence SHA. Tail reseal adds no Stage Capsule effect or general rebuild authority: it verifies the exact retained four-platform bytes, admits one known macOS tail failure through live provider readback, fences signing and finalization to explicit credentials and Warrant identity, and requires standard candidate Passport plus provider and protected readback. Compatibility Facts parity isolates canonical encoding, temporal verification, lifecycle validation, fixture projection, public authority projection, and CLI adaptation into bounded modules; legacy digest and proof arrays are derived only from exact current Fact lineage. Publication Rehearsal adds no production release authority: the content-addressed capsule contract binds source, candidate, manifest, config, canonical data-only provider bindings, provider policy, observations and core version separately from filesystem, runtime and rehearsal-only provider authority; simulate, replay and explicitly authorized provider rehearsal all reuse the release-tail planner, while same-commit local dogfood resolves the new reusable contract and exact current runtime before external callers remain on floating v4-alpha. Cross-runtime candidate recovery preserves original runtime and provider roots and creates resume lineage only after exact public ref, tag, ancestry, npm version and integrity readback. Adopter Delivery restores the reviewed public v3 gate, drivers, Passport binding, N-1 bootstrap and exact archive loader through one public v4 surface while keeping provider and release authority explicit non-claims. Floating Alpha bootstrap uses only the existing exact resolver and protected Alpha private shell to move an otherwise stale floating shell, retains public v4 stable promotion, and removes itself after protected readback. CI lane change-budget enforcement adds a bounded parser, evaluator, guard, and tests without creating another merge authority.",
36
36
  "governance": "legacy-debt-sunset-2026q4"
37
37
  },
@@ -427,7 +427,7 @@
427
427
  "repository": "kungfu-systems/buildchain",
428
428
  "sourceCommit": "7c8956e8babb521d3e743d40108f115a59a40427",
429
429
  "sourceTree": "7e24ca6bafe98b571d94c3bcf07a9d38b31092c5",
430
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
430
+ "workflow": ".github/workflows/self-release-promote.yml",
431
431
  "runtimeRef": "local exact checkout",
432
432
  "executableSurfaceIds": []
433
433
  },
@@ -454,7 +454,7 @@
454
454
  "repository": "kungfu-systems/kungfu",
455
455
  "sourceCommit": "445ec32d6bf53dd5ff502d685792406ad38dd4f5",
456
456
  "sourceTree": "4963b2f9deb0245f7277cea7224ab0d062a0cc54",
457
- "workflow": ".github/workflows/release-new-version.yml",
457
+ "workflow": ".github/workflows/self-release-new-version-compat.yml",
458
458
  "runtimeRef": "train/v3/v3.0/resume-candidate-run",
459
459
  "executableSurfaceIds": [
460
460
  "publication-admission-commands",
@@ -470,7 +470,7 @@
470
470
  "repository": "kungfu-systems/libnode",
471
471
  "sourceCommit": "4bef69b88a441f22024fa9f3d7bfd76a89963e8a",
472
472
  "sourceTree": "6c4dec7fd70cbdcfbc9ada19e66271654eb393af",
473
- "workflow": ".github/workflows/release-new-version.yml",
473
+ "workflow": ".github/workflows/self-release-new-version-compat.yml",
474
474
  "runtimeRef": "v3-alpha",
475
475
  "executableSurfaceIds": ["release-passport-producer-commands"]
476
476
  },
@@ -479,7 +479,7 @@
479
479
  "repository": "kungfu-systems/kfd",
480
480
  "sourceCommit": "e82fe11acecdbebfd0c42778c7a1bd6fdc54ab81",
481
481
  "sourceTree": "fe0ad4f4b98889c7c246fe16958e118ff79b193b",
482
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
482
+ "workflow": ".github/workflows/self-release-promote.yml",
483
483
  "runtimeRef": "v3-alpha",
484
484
  "executableSurfaceIds": []
485
485
  },
@@ -488,7 +488,7 @@
488
488
  "repository": "kungfu-systems/paper-kungfu-product-white-paper",
489
489
  "sourceCommit": "82dd748d6b0edf18d0074262cc8d8ac803e45c7e",
490
490
  "sourceTree": "a918f8840608931fdf88d007e20bc4f70ab7eb54",
491
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
491
+ "workflow": ".github/workflows/self-release-promote.yml",
492
492
  "runtimeRef": "v3",
493
493
  "executableSurfaceIds": []
494
494
  }
@@ -497,7 +497,7 @@
497
497
  {
498
498
  "repository": "kungfu-systems/agent-hub-demo",
499
499
  "sourceCommit": "633111450867919d5063298308cdbfcbd77a8d2e",
500
- "workflow": ".github/workflows/buildchain-ref-promotion.yml",
500
+ "workflow": ".github/workflows/self-release-promote.yml",
501
501
  "runtimeRef": "v2",
502
502
  "reason": "outside the Buildchain v3 contract inventory"
503
503
  }
@@ -227,7 +227,7 @@
227
227
  "docs/dev-delivery-warrant.md",
228
228
  "docs/dev-delivery-qualification-landing-adr.md",
229
229
  "templates/native-dev-delivery.yml",
230
- ".github/workflows/buildchain-dev-delivery.yml",
230
+ ".github/workflows/self-ops-dev-delivery.yml",
231
231
  ".buildchain/contract-lock.json",
232
232
  ".buildchain/alpha-contract-lock.json"
233
233
  ],
@@ -246,5 +246,5 @@
246
246
  "verificationEvidence": []
247
247
  }
248
248
  ],
249
- "matrixRoot": "sha256:5be5abf70b982374f32a1400d4ec7c830017a0473d03165e831a506c94c8b881"
249
+ "matrixRoot": "sha256:85fc624f09abb2014601a9857dbcd07a59750b6dd6d77ab240ed037d3169ac69"
250
250
  }
@@ -9,7 +9,7 @@
9
9
  "legacyCore": "packages/core/dev-delivery-warrant.js",
10
10
  "legacyStore": "scripts/dev-delivery-warrant.mjs",
11
11
  "legacyWorkflows": [
12
- ".github/workflows/buildchain-dev-delivery.yml",
12
+ ".github/workflows/self-ops-dev-delivery.yml",
13
13
  ".github/workflows/dev-delivery-warrant-close.yml",
14
14
  ".github/workflows/dev-delivery-warrant-cancel.yml"
15
15
  ]
@@ -38,7 +38,7 @@
38
38
  "persistedSelectorOverride": false,
39
39
  "protectedAlphaRecoveryBootstrap": {
40
40
  "selector": "alpha/v4/v4.0",
41
- "sourcePath": ".github/workflows/buildchain-ref-promotion-recovery.yml",
41
+ "sourcePath": ".github/workflows/self-ops-promotion-recovery.yml",
42
42
  "workflow": ".github/workflows/.release-candidate-promote.yml",
43
43
  "repository": "kungfu-systems/buildchain"
44
44
  },
@@ -11,7 +11,7 @@
11
11
  "target": {
12
12
  "branch": "dev/v4/v4.0",
13
13
  "implementationBaseline": "36ad1dc03a9d2785aca938a7a369e4b96707fa32",
14
- "publicConsumerCaller": ".github/workflows/v4-public-consumer-dogfood.yml",
14
+ "publicConsumerCaller": ".github/workflows/self-build-public-consumer-dogfood.yml",
15
15
  "publicConsumerReusable": "kungfu-systems/buildchain/.github/workflows/v4-stage-capsule-canary.yml@v4-alpha"
16
16
  },
17
17
  "earlierContinuityDelta": {
@@ -152,8 +152,8 @@
152
152
  "claim": "V4 recovery proof runs as pure tests through the standard lifecycle.verify reached by the exact thin public consumer caller, while existing hosted dual-channel evidence keeps public v4-alpha and v4 routes.",
153
153
  "disposition": "implemented",
154
154
  "implementationEvidence": [
155
- ".github/workflows/v4-public-consumer-dogfood.yml",
156
- ".github/workflows/buildchain-alpha-self-dogfood.yml",
155
+ ".github/workflows/self-build-public-consumer-dogfood.yml",
156
+ ".github/workflows/self-build-alpha-dogfood.yml",
157
157
  ".buildchain/buildchain.toml",
158
158
  "scripts/next-development-self-dogfood.mjs",
159
159
  "scripts/next-development-self-dogfood-harness.mjs"
@@ -188,5 +188,5 @@
188
188
  "verificationEvidence": []
189
189
  }
190
190
  ],
191
- "matrixRoot": "sha256:0f0d69dd338cad33dc61870675cbedb8664e019e403f73a1ddcf8471d69df405"
191
+ "matrixRoot": "sha256:59bf32516748d4d2f823cdcbcfe0b75a7332fa122e2ebc66c6ea8553b34c5ccf"
192
192
  }
@@ -81,7 +81,7 @@
81
81
  }
82
82
  ],
83
83
  "projections": {
84
- "protectedWorkflow": ".github/workflows/verify.yml",
84
+ "protectedWorkflow": ".github/workflows/self-build-verify.yml",
85
85
  "generatedTemplate": "scripts/init-repo.mjs",
86
86
  "agentGuidance": "AGENTS.md",
87
87
  "manual": "docs/v4-stage-capsule.md"
@@ -0,0 +1,53 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "sourceRevision": "a41c00a0c0b2dbd57c238cd9b326b167a1d27ca8",
4
+ "purpose": "Retain completed v4 publication receipt independently of next-development and preserve immutable binary publication assets.",
5
+ "facades": [
6
+ {
7
+ "workflow": ".github/workflows/.binary-release-assets.yml",
8
+ "beforeSha256": "5dfaea0f9cf83500706f423eca08f43594fe3653fa139da359041e88fae49266",
9
+ "afterSha256": "06831b3ec8db28fbf96ffa8907fd58c1a77dd09e8d4fe02100a98febe10dba34",
10
+ "replacements": [
11
+ {
12
+ "before": " fs.writeFileSync(\".buildchain/publication-authority/capability.json\", `${JSON.stringify(capability, null, 2)}\\n`);\n NODE\n\n - name: Upload GitHub Release assets\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n",
13
+ "after": " fs.writeFileSync(\".buildchain/publication-authority/capability.json\", `${JSON.stringify(capability, null, 2)}\\n`);\n NODE\n\n - uses: actions/setup-node@v6.4.0\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n with:\n node-version: \"24\"\n\n - name: Install exact publication runtime dependencies\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n run: corepack pnpm@11.7.0 install --frozen-lockfile --ignore-scripts\n\n - name: Upload immutable GitHub Release assets and verify readback\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n run: node scripts/binary-publication-evidence.mjs publish\n\n - name: Retain binary publication readback\n if: ${{ startsWith(inputs.release-tag, 'v4.') }}\n uses: actions/upload-artifact@v7.0.1\n with:\n name: binary-publication-readback-${{ inputs.release-tag }}\n path: .buildchain/binary-publication/readback.json\n include-hidden-files: true\n if-no-files-found: error\n\n - name: Upload GitHub Release assets\n if: ${{ !startsWith(inputs.release-tag, 'v4.') }}\n env:\n GH_TOKEN: ${{ github.token }}\n RELEASE_TAG: ${{ inputs.release-tag }}\n"
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "workflow": ".github/workflows/.release-candidate-promote.yml",
19
+ "beforeSha256": "177b3c50685405e5ed2bf1ac893469fdb3a27e7b03d55025611b2985028cd8cf",
20
+ "afterSha256": "9c7f3586a3444cdad34d2a61be3cb9b0ae271fb56f9e371d9c37940e6b317780",
21
+ "replacements": [
22
+ {
23
+ "before": " release-candidate-artifact: ${{ needs.qualify.outputs.candidate-artifact }}\n release-candidate-action: canonical-release-invocation\n release-candidate-outcome: success\n promotion-outcome: success\n finalization-needed: \"false\"\n release-tail-transaction-state: ${{ steps.provider.outputs.transaction-state || steps.resume.outputs.transaction-state }}\n release-tail-declaration-root: ${{ steps.provider.outputs.declaration-root || steps.resume.outputs.declaration-root }}\n release-tail-transaction-root: ${{ steps.provider.outputs.transaction-root || steps.resume.outputs.transaction-root }}\n",
24
+ "after": " release-candidate-artifact: ${{ needs.qualify.outputs.candidate-artifact }}\n release-candidate-action: canonical-release-invocation\n release-candidate-outcome: success\n promotion-outcome: ${{ steps.publication-settlement.outputs.status == 'complete' && 'success' || 'failure' }}\n finalization-needed: ${{ steps.publication-settlement.outputs.status != 'complete' }}\n release-tail-transaction-state: ${{ steps.provider.outputs.transaction-state || steps.resume.outputs.transaction-state }}\n release-tail-declaration-root: ${{ steps.provider.outputs.declaration-root || steps.resume.outputs.declaration-root }}\n release-tail-transaction-root: ${{ steps.provider.outputs.transaction-root || steps.resume.outputs.transaction-root }}\n"
25
+ },
26
+ {
27
+ "before": " release-tail-receipt-roots-json: ${{ steps.provider.outputs.receipt-roots-json || steps.resume.outputs.receipt-roots-json }}\n release-invocation-root: ${{ steps.provider.outputs.release-invocation-root || steps.resume.outputs.release-invocation-root }}\n release-transaction-root: ${{ steps.provider.outputs.release-transaction-root || steps.resume.outputs.release-transaction-root }}\n release-receipt-root: ${{ steps.provider.outputs.release-receipt-root || steps.resume.outputs.release-receipt-root }}\n steps:\n - name: Checkout the admitted protected channel state\n uses: actions/checkout@v7.0.0\n",
28
+ "after": " release-tail-receipt-roots-json: ${{ steps.provider.outputs.receipt-roots-json || steps.resume.outputs.receipt-roots-json }}\n release-invocation-root: ${{ steps.provider.outputs.release-invocation-root || steps.resume.outputs.release-invocation-root }}\n release-transaction-root: ${{ steps.provider.outputs.release-transaction-root || steps.resume.outputs.release-transaction-root }}\n release-receipt-root: ${{ steps.publication-settlement.outputs.receipt-root || steps.provider.outputs.release-receipt-root || steps.resume.outputs.release-receipt-root }}\n steps:\n - name: Checkout the admitted protected channel state\n uses: actions/checkout@v7.0.0\n"
29
+ },
30
+ {
31
+ "before": " uses: ./.buildchain/runtime/actions/v4-release-candidate-promote\n with: *provider-inputs\n\n - name: Retain canonical APPLY and ReleaseReceipt evidence\n if: ${{ always() }}\n uses: actions/upload-artifact@v7.0.1\n",
32
+ "after": " uses: ./.buildchain/runtime/actions/v4-release-candidate-promote\n with: *provider-inputs\n\n - name: Retain completed publication independently of next-development\n id: publication-settlement\n if: ${{ always() && hashFiles('.buildchain/release-tail/release-receipt.json') != '' }}\n env:\n GH_TOKEN: ${{ github.token }}\n CANDIDATE_SHA: ${{ needs.qualify.outputs.requested-sha }}\n APPLY_OUTCOME: ${{ (steps.resume.outcome == 'success' || steps.resume.outcome == 'failure') && steps.resume.outcome || steps.provider.outcome }}\n run: node .buildchain/runtime/scripts/v4-publication-settlement.mjs .buildchain\n\n - name: Retain canonical APPLY and ReleaseReceipt evidence\n if: ${{ always() }}\n uses: actions/upload-artifact@v7.0.1\n"
33
+ },
34
+ {
35
+ "before": " controller-receipt-status: ${{ steps.verify.outputs.status || steps.projection-state.outputs.status }}\n steps:\n - name: Checkout the admitted receipt verifier\n if: ${{ needs.apply.result == 'success' }}\n uses: actions/checkout@v7.0.0\n with:\n repository: kungfu-systems/buildchain\n",
36
+ "after": " controller-receipt-status: ${{ steps.verify.outputs.status || steps.projection-state.outputs.status }}\n steps:\n - name: Checkout the admitted receipt verifier\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n uses: actions/checkout@v7.0.0\n with:\n repository: kungfu-systems/buildchain\n"
37
+ },
38
+ {
39
+ "before": " persist-credentials: false\n\n - name: Restore canonical APPLY evidence\n if: ${{ needs.apply.result == 'success' }}\n uses: actions/download-artifact@v7.0.0\n with:\n name: buildchain-v4-release-apply-${{ needs.qualify.outputs.requested-sha }}\n",
40
+ "after": " persist-credentials: false\n\n - name: Restore canonical APPLY evidence\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n uses: actions/download-artifact@v7.0.0\n with:\n name: buildchain-v4-release-apply-${{ needs.qualify.outputs.requested-sha }}\n"
41
+ },
42
+ {
43
+ "before": "\n - name: Verify the single terminal receipt\n id: verify\n if: ${{ needs.apply.result == 'success' }}\n shell: bash\n run: |\n node --input-type=module <<'NODE'\n import fs from \"node:fs\";\n import {\n createV4ReleaseInvocation,\n createV4ReleaseReceipt,\n createV4ReleaseTransaction,\n } from \"./.buildchain/runtime/packages/core/v4-release-invocation.js\";\n const base = \".buildchain/evidence/release-tail\";\n const invocation = JSON.parse(fs.readFileSync(`${base}/release-invocation.json`, \"utf8\"));\n const transaction = JSON.parse(fs.readFileSync(`${base}/release-transaction.json`, \"utf8\"));\n const storedReceipt = JSON.parse(fs.readFileSync(`${base}/release-receipt.json`, \"utf8\"));\n const invocationProjection = createV4ReleaseInvocation(invocation);\n const transactionProjection = createV4ReleaseTransaction({\n invocationRoot: transaction.invocationRoot,\n publisherRoot: transaction.publisherRoot,\n runtimeRoot: transaction.runtimeRoot,\n providerRoot: transaction.providerRoot,\n parentRoot: transaction.parentRoot,\n });\n const { receiptRoot, ...receipt } = storedReceipt;\n const receiptProjection = createV4ReleaseReceipt(receipt);\n if (transaction.invocationRoot !== invocationProjection.roots.invocationRoot ||\n transaction.transactionRoot !== transactionProjection.transactionRoot ||\n receipt.transactionRoot !== transactionProjection.transactionRoot ||\n receiptProjection.receiptRoot !== receiptRoot || receipt.outcome !== \"complete\") {\n throw new Error(\"terminal ReleaseReceipt lineage does not verify\");\n }\n fs.appendFileSync(process.env.GITHUB_OUTPUT,\n `receipt-json=${JSON.stringify(storedReceipt)}\\nreceipt-root=${receiptRoot}\\nstatus=complete\\n`);\n NODE\n\n - name: Record non-terminal projection state\n id: projection-state\n if: ${{ needs.apply.result != 'success' }}\n shell: bash\n run: |\n echo \"status=${{ inputs.dry-run && 'dry-run' || needs.qualify.outputs.action == 'noop' && 'noop' || 'blocked' }}\" >> \"$GITHUB_OUTPUT\"\n",
44
+ "after": "\n - name: Verify the single terminal receipt\n id: verify\n env:\n CANDIDATE_SHA: ${{ needs.qualify.outputs.requested-sha }}\n if: ${{ needs.qualify.outputs.action == 'promote' && !inputs.dry-run }}\n shell: bash\n run: |\n node --input-type=module <<'NODE'\n import fs from \"node:fs\";\n const { readApplyDocuments, verifyPublicationSettlement } = await import(\"./.buildchain/runtime/scripts/v4-publication-settlement.mjs\");\n const documents = readApplyDocuments(\".buildchain/evidence\");\n verifyPublicationSettlement(documents, {\n repository: process.env.GITHUB_REPOSITORY,\n candidateSha: process.env.CANDIDATE_SHA,\n tag: documents.invocation.target.tag,\n sourceSha: documents.product.publication.releaseSha,\n });\n const storedReceipt = documents.receipt;\n const receiptRoot = storedReceipt.receiptRoot;\n fs.appendFileSync(process.env.GITHUB_OUTPUT,\n `receipt-json=${JSON.stringify(storedReceipt)}\\nreceipt-root=${receiptRoot}\\nstatus=complete\\n`);\n NODE\n\n - name: Record non-terminal projection state\n id: projection-state\n if: ${{ always() && steps.verify.outcome != 'success' }}\n shell: bash\n run: |\n echo \"status=${{ inputs.dry-run && 'dry-run' || needs.qualify.outputs.action == 'noop' && 'noop' || 'blocked' }}\" >> \"$GITHUB_OUTPUT\"\n"
45
+ },
46
+ {
47
+ "before": " .buildchain/evidence/release-tail/release-invocation.json\n .buildchain/evidence/release-tail/release-transaction.json\n .buildchain/evidence/release-tail/release-receipt.json\n if-no-files-found: error\n",
48
+ "after": " .buildchain/evidence/release-tail/release-invocation.json\n .buildchain/evidence/release-tail/release-transaction.json\n .buildchain/evidence/release-tail/release-receipt.json\n .buildchain/evidence/release-tail/delivery-summary.json\n .buildchain/evidence/release-tail/buildchain-publication-settlement.json\n if-no-files-found: error\n"
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ }