@kungfu-tech/buildchain 4.0.1-alpha.4 → 4.0.1-alpha.41

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 (172) hide show
  1. package/actions/release-tail/README.md +8 -0
  2. package/architecture/ci-lane-change-budget.json +187 -0
  3. package/architecture/decisions/0002-next-development-transition.md +101 -0
  4. package/architecture/internal-capabilities.json +117 -8
  5. package/architecture/maintainability-policy.json +43 -25
  6. package/architecture/release-tail-contract-inventory.json +5 -2
  7. package/architecture/v3-core-mechanism-inventory.json +89 -0
  8. package/architecture/v4-adopter-delivery-parity.json +32 -5
  9. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  10. package/architecture/v4-compatibility-facts-parity.json +77 -0
  11. package/architecture/v4-floating-consumer-policy.json +6 -0
  12. package/architecture/v4-next-development-parity.json +192 -0
  13. package/architecture/v4-publication-rehearsal-parity.json +84 -0
  14. package/architecture/v4-release-train-parity.json +1 -0
  15. package/architecture/v4-tail-reseal-parity.json +150 -0
  16. package/bin/buildchain.mjs +23 -2
  17. package/bin/internal/adopter-delivery-cli.mjs +70 -0
  18. package/bin/internal/command-registry.mjs +3 -0
  19. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  20. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  21. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  22. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  23. package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
  24. package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
  25. package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
  26. package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
  27. package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
  28. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  29. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +7 -1
  30. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
  31. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
  32. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
  33. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
  34. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
  35. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
  36. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
  37. package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
  38. package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
  39. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  40. package/contracts/next-development-request-v1.schema.json +66 -0
  41. package/contracts/next-development-transition-v1.schema.json +292 -0
  42. package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
  43. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  44. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +4 -2
  45. package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  46. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  47. package/dist/site/agent-index.json +4 -0
  48. package/dist/site/artifact-schemas.json +8 -0
  49. package/dist/site/buildchain-contract.json +1393 -28
  50. package/dist/site/buildchain-site.json +477 -32
  51. package/dist/site/capability-registry.json +17 -14
  52. package/dist/site/cli-registry.json +159 -1
  53. package/dist/site/kfd-claims.json +455 -15
  54. package/dist/site/kfd-upstream-aggregate.json +1 -1
  55. package/dist/site/manual-registry.json +53 -7
  56. package/dist/site/node-api-registry.json +14008 -9602
  57. package/dist/site/page-registry.json +442 -21
  58. package/dist/site/public-surface-audit.json +440 -11
  59. package/dist/site/publication-authority-registry.json +44 -8
  60. package/dist/site/publication-registry.json +4 -4
  61. package/dist/site/release-provenance.json +22 -0
  62. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
  63. package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
  64. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  65. package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  66. package/dist/site/site-manifest.json +35 -11
  67. package/dist/site/workflow-registry.json +142 -8
  68. package/docs/MAP.md +7 -2
  69. package/docs/cli-reference.md +193 -0
  70. package/docs/cli.md +8 -0
  71. package/docs/dev-alpha-candidate-patrol.md +8 -0
  72. package/docs/dev-delivery-warrant.md +22 -1
  73. package/docs/next-development-transition.md +118 -0
  74. package/docs/node-api-reference.md +583 -288
  75. package/docs/release-candidate.md +7 -0
  76. package/docs/release-tail-provider-plane.md +30 -0
  77. package/docs/v4-adopter-delivery.md +133 -0
  78. package/docs/v4-compatibility-facts.md +91 -0
  79. package/docs/v4-publication-rehearsal.md +130 -0
  80. package/docs/v4-tail-reseal.md +73 -0
  81. package/docs/versioning.md +4 -3
  82. package/package.json +30 -6
  83. package/packages/core/adopter-delivery-passport.js +259 -0
  84. package/packages/core/adopter-delivery-vectors.js +158 -0
  85. package/packages/core/adopter-delivery-vectors.json +77 -0
  86. package/packages/core/buildchain-agent-manuals.js +3 -0
  87. package/packages/core/buildchain-compatibility-authority.js +336 -0
  88. package/packages/core/buildchain-compatibility-fact.js +394 -0
  89. package/packages/core/buildchain-compatibility-facts.json +217 -0
  90. package/packages/core/buildchain-compatibility-proof.js +566 -0
  91. package/packages/core/buildchain-config.js +84 -0
  92. package/packages/core/buildchain-contract.js +93 -141
  93. package/packages/core/buildchain-delivery-bootstrap.js +240 -0
  94. package/packages/core/buildchain-delivery-infrastructure.js +164 -0
  95. package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
  96. package/packages/core/buildchain-publication-authority.js +1 -0
  97. package/packages/core/channel-candidate.js +8 -0
  98. package/packages/core/channel-promotion-baseline.js +55 -0
  99. package/packages/core/ci-lane-change-budget.js +247 -0
  100. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  101. package/packages/core/dev-delivery-execution-transfer.js +21 -1
  102. package/packages/core/dev-delivery-native-proof.js +43 -27
  103. package/packages/core/dev-delivery-process-boundary.js +19 -6
  104. package/packages/core/dev-delivery-provider-heartbeat.js +18 -6
  105. package/packages/core/dev-delivery-warrant-settlement.js +234 -2
  106. package/packages/core/dev-delivery-warrant-state.js +46 -10
  107. package/packages/core/dev-delivery-warrant.js +16 -3
  108. package/packages/core/github-governance-authority.js +1 -0
  109. package/packages/core/index.js +5 -0
  110. package/packages/core/kungfu-temporal-fact.js +557 -0
  111. package/packages/core/legacy-kfd-adopter-driver.js +167 -0
  112. package/packages/core/next-development-candidate-reservation.js +186 -0
  113. package/packages/core/next-development-controller.js +728 -0
  114. package/packages/core/next-development-projection.js +287 -0
  115. package/packages/core/next-development-transition.js +738 -0
  116. package/packages/core/paper-agent-entry.js +11 -5
  117. package/packages/core/paper.js +16 -5
  118. package/packages/core/published-delivery-authority.js +266 -0
  119. package/packages/core/release-candidate-recovery.js +70 -15
  120. package/packages/core/release-candidate.js +2 -2
  121. package/packages/core/release-passport.js +36 -9
  122. package/packages/core/v4-adopter-delivery-parity.js +3 -3
  123. package/packages/core/v4-adopter-delivery.js +359 -0
  124. package/packages/core/v4-canonical-contracts.js +5 -0
  125. package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
  126. package/packages/core/v4-floating-consumer-evidence.js +18 -4
  127. package/packages/core/v4-floating-consumer-policy.js +143 -20
  128. package/packages/core/v4-floating-consumer-release-passport.js +35 -8
  129. package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
  130. package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
  131. package/packages/core/v4-publication-rehearsal.js +481 -0
  132. package/packages/core/v4-tail-reseal-contract.js +26 -0
  133. package/packages/core/v4-tail-reseal-github.js +178 -0
  134. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  135. package/packages/core/v4-tail-reseal.js +594 -0
  136. package/packages/core/workflow-yaml-contract.js +24 -2
  137. package/scripts/artifact-signing-controller-core.mjs +1 -1
  138. package/scripts/buildchain-cli-help.mjs +30 -0
  139. package/scripts/check-ci-lane-change-budget.mjs +100 -0
  140. package/scripts/check-inventory.mjs +14 -3
  141. package/scripts/check-project-cut-merge-queue-admission.mjs +87 -0
  142. package/scripts/check-v4-floating-consumer-policy-contract.mjs +23 -4
  143. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  144. package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
  145. package/scripts/dev-delivery-source-proof-reuse.mjs +13 -97
  146. package/scripts/dev-delivery-warrant-options.mjs +27 -11
  147. package/scripts/dev-delivery-warrant-store.mjs +10 -6
  148. package/scripts/dev-delivery-warrant.mjs +50 -6
  149. package/scripts/dev-pr-auto-merge.mjs +25 -11
  150. package/scripts/dev-pr-delivery-warrant.mjs +45 -0
  151. package/scripts/dev-pr-prequeue-guard.mjs +0 -18
  152. package/scripts/dev-qualification-patrol.mjs +9 -9
  153. package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
  154. package/scripts/generate-channel-promotion-workflow.mjs +2 -2
  155. package/scripts/generate-next-development-guidance.mjs +49 -0
  156. package/scripts/generate-release-candidate-passport.mjs +152 -0
  157. package/scripts/generate-site-bundle.mjs +46 -3
  158. package/scripts/init-repo.mjs +22 -4
  159. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  160. package/scripts/next-development-self-dogfood.mjs +597 -0
  161. package/scripts/next-development-transition.mjs +47 -0
  162. package/scripts/project-cut-merge-queue-admission.mjs +394 -0
  163. package/scripts/promotion-channel-router.mjs +4 -4
  164. package/scripts/release-candidate-anchor-provenance.mjs +99 -0
  165. package/scripts/release-tail.mjs +51 -3
  166. package/scripts/resume-from-candidate-run.mjs +595 -65
  167. package/scripts/site-capability-metadata.mjs +29 -0
  168. package/scripts/stable-candidate-qualification.mjs +9 -10
  169. package/scripts/v4-consumer-policy.mjs +5 -5
  170. package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
  171. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  172. package/scripts/v4-tail-reseal.mjs +416 -0
@@ -0,0 +1,192 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-v4-next-development-parity",
4
+ "sourceAuthority": {
5
+ "branch": "dev/v3/v3.0",
6
+ "capturedCommit": "6b96bdad8d9f8ccf9275f27d9370a226a9c78465",
7
+ "transitionCommit": "d165c2f733859dd2e46a2d1fdb25b242e2fc2567",
8
+ "controllerCommit": "63f494d4b92c0bd01ffb454c6fce23d0692148fb",
9
+ "selfDogfoodCommit": "518bb4cb4706db1854e5a5b39bf7198f2aaa1d1d"
10
+ },
11
+ "target": {
12
+ "branch": "dev/v4/v4.0",
13
+ "implementationBaseline": "36ad1dc03a9d2785aca938a7a369e4b96707fa32",
14
+ "publicConsumerCaller": ".github/workflows/v4-public-consumer-dogfood.yml",
15
+ "publicConsumerReusable": "kungfu-systems/buildchain/.github/workflows/v4-stage-capsule-canary.yml@v4-alpha"
16
+ },
17
+ "earlierContinuityDelta": {
18
+ "assignment": "2026-08-11-buildchain-next-development-version-continuity",
19
+ "disposition": "no-current-reusable-implementation-evidence",
20
+ "requiredDelta": "implement and re-prove the exact v3 semantics against the live protected v4 head"
21
+ },
22
+ "allowedDispositions": [
23
+ "implemented",
24
+ "superseded-equivalent",
25
+ "missing-before-closeout"
26
+ ],
27
+ "invariants": [
28
+ {
29
+ "id": "ND-01",
30
+ "claim": "The exact v3 planner, controller, projection and recovery authorities are mapped to current v4 files rather than inferred from the earlier continuity family.",
31
+ "disposition": "implemented",
32
+ "implementationEvidence": [
33
+ "architecture/decisions/0002-next-development-transition.md",
34
+ "packages/core/next-development-transition.js",
35
+ "packages/core/next-development-controller.js",
36
+ "packages/core/next-development-projection.js"
37
+ ],
38
+ "verificationEvidence": ["tests/v4-next-development-parity.test.mjs"]
39
+ },
40
+ {
41
+ "id": "ND-02",
42
+ "claim": "Semver automatic planning deterministically advances only the Alpha sequence on the same patch and rejects operator-selected targets.",
43
+ "disposition": "implemented",
44
+ "implementationEvidence": [
45
+ "packages/core/next-development-transition.js",
46
+ "contracts/next-development-transition-v1.schema.json"
47
+ ],
48
+ "verificationEvidence": [
49
+ "tests/next-development-transition.test.mjs",
50
+ "contracts/fixtures/next-development-transition-v1/semver-auto-planned.json"
51
+ ]
52
+ },
53
+ {
54
+ "id": "ND-03",
55
+ "claim": "Anchored manual planning remains waiting until reviewed target and exact read-only manifest digest authority are both supplied.",
56
+ "disposition": "implemented",
57
+ "implementationEvidence": [
58
+ "packages/core/next-development-transition.js",
59
+ "scripts/next-development-transition.mjs"
60
+ ],
61
+ "verificationEvidence": [
62
+ "tests/next-development-transition.test.mjs",
63
+ "tests/next-development-controller.test.mjs",
64
+ "contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json"
65
+ ]
66
+ },
67
+ {
68
+ "id": "ND-04",
69
+ "claim": "Atomic create-if-absent and compare-and-swap checkpoints create one child per completed Alpha and recover idempotent materialization after runner loss.",
70
+ "disposition": "implemented",
71
+ "implementationEvidence": [
72
+ "packages/core/next-development-controller.js"
73
+ ],
74
+ "verificationEvidence": [
75
+ "tests/next-development-controller.test.mjs",
76
+ "tests/next-development-self-dogfood.test.mjs"
77
+ ]
78
+ },
79
+ {
80
+ "id": "ND-05",
81
+ "claim": "Protected Dev movement supersedes only stale preparation, retries from current readback and preserves completed Alpha identity without rebuilding it.",
82
+ "disposition": "implemented",
83
+ "implementationEvidence": [
84
+ "packages/core/next-development-controller.js",
85
+ "actions/promote-buildchain-ref/internal/promote-alpha-channel.js",
86
+ "actions/promote-buildchain-ref/lib.js"
87
+ ],
88
+ "verificationEvidence": [
89
+ "tests/next-development-controller.test.mjs",
90
+ "tests/promote-buildchain-ref-governance.test.mjs"
91
+ ]
92
+ },
93
+ {
94
+ "id": "ND-06",
95
+ "claim": "A protected version pull request and exact source, derived, ancestry and target-version readback are mandatory before verified state.",
96
+ "disposition": "implemented",
97
+ "implementationEvidence": [
98
+ "packages/core/next-development-controller.js"
99
+ ],
100
+ "verificationEvidence": [
101
+ "tests/next-development-controller.test.mjs",
102
+ "tests/next-development-self-dogfood.test.mjs"
103
+ ]
104
+ },
105
+ {
106
+ "id": "ND-07",
107
+ "claim": "Completed candidates and Alpha publication remain immutable and terminal; next-development exposes no tag, release, package, candidate or ref-update effect.",
108
+ "disposition": "implemented",
109
+ "implementationEvidence": [
110
+ "packages/core/next-development-transition.js",
111
+ "packages/core/next-development-controller.js"
112
+ ],
113
+ "verificationEvidence": [
114
+ "tests/next-development-transition.test.mjs",
115
+ "tests/next-development-self-dogfood.test.mjs"
116
+ ]
117
+ },
118
+ {
119
+ "id": "ND-08",
120
+ "claim": "Candidate Patrol ignores pure version preparation and requires current exact blob reservation readback before later product candidate settlement.",
121
+ "disposition": "implemented",
122
+ "implementationEvidence": [
123
+ "packages/core/next-development-candidate-reservation.js",
124
+ "packages/core/channel-promotion-baseline.js",
125
+ "scripts/dev-alpha-candidate-patrol.mjs"
126
+ ],
127
+ "verificationEvidence": ["tests/dev-alpha-candidate-patrol.test.mjs"]
128
+ },
129
+ {
130
+ "id": "ND-09",
131
+ "claim": "The public CLI, Node exports, schemas, init and Paper templates, generated Agent guidance and manual all project one contract source.",
132
+ "disposition": "implemented",
133
+ "implementationEvidence": [
134
+ "bin/buildchain.mjs",
135
+ "bin/internal/command-registry.mjs",
136
+ "scripts/next-development-transition.mjs",
137
+ "package.json",
138
+ "contracts/next-development-request-v1.schema.json",
139
+ "contracts/next-development-transition-v1.schema.json",
140
+ "scripts/init-repo.mjs",
141
+ "packages/core/paper.js",
142
+ "packages/core/paper-agent-entry.js",
143
+ "packages/core/next-development-projection.js"
144
+ ],
145
+ "verificationEvidence": [
146
+ "tests/next-development-transition.test.mjs",
147
+ "tests/v4-next-development-parity.test.mjs"
148
+ ]
149
+ },
150
+ {
151
+ "id": "ND-10",
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
+ "disposition": "implemented",
154
+ "implementationEvidence": [
155
+ ".github/workflows/v4-public-consumer-dogfood.yml",
156
+ ".github/workflows/buildchain-alpha-self-dogfood.yml",
157
+ ".buildchain/buildchain.toml",
158
+ "scripts/next-development-self-dogfood.mjs",
159
+ "scripts/next-development-self-dogfood-harness.mjs"
160
+ ],
161
+ "verificationEvidence": [
162
+ "tests/next-development-self-dogfood.test.mjs",
163
+ "tests/v4-public-dogfood-contract.test.mjs"
164
+ ]
165
+ },
166
+ {
167
+ "id": "ND-11",
168
+ "claim": "Architecture inventory, capability metadata, generated references and site facts expose the current v4 next-development contract without stale generated output.",
169
+ "disposition": "implemented",
170
+ "implementationEvidence": [
171
+ "architecture/v3-core-mechanism-inventory.json",
172
+ "architecture/v4-capability-state-machine-manifest.json",
173
+ "scripts/check-inventory.mjs",
174
+ "scripts/site-capability-metadata.mjs",
175
+ "scripts/generate-site-bundle.mjs"
176
+ ],
177
+ "verificationEvidence": [
178
+ "tests/core-mechanism-inventory.test.mjs",
179
+ "tests/v4-architecture.test.mjs",
180
+ "tests/v4-next-development-parity.test.mjs"
181
+ ]
182
+ },
183
+ {
184
+ "id": "ND-12",
185
+ "claim": "Independent review, protected merge into dev/v4/v4.0 and exact post-merge containment and readback are required external closeout evidence and cannot be inferred from local green tests.",
186
+ "disposition": "missing-before-closeout",
187
+ "implementationEvidence": [],
188
+ "verificationEvidence": []
189
+ }
190
+ ],
191
+ "matrixRoot": "sha256:0f0d69dd338cad33dc61870675cbedb8664e019e403f73a1ddcf8471d69df405"
192
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "schema": "buildchain.v4.publication-rehearsal-parity/v1",
3
+ "source": {
4
+ "branch": "dev/v3/v3.0",
5
+ "commit": "6b96bdad8d9f8ccf9275f27d9370a226a9c78465",
6
+ "runtime": "packages/core/publication-rehearsal-runtime.js"
7
+ },
8
+ "target": {
9
+ "branch": "dev/v4/v4.0",
10
+ "commit": "bc12cd0ff18a7e1d918777ea093c169349952d34",
11
+ "capsuleContract": "packages/core/v4-publication-rehearsal-capsule.js",
12
+ "runtime": "packages/core/v4-publication-rehearsal.js",
13
+ "providerBindings": "packages/core/v4-publication-rehearsal-provider-bindings.js"
14
+ },
15
+ "sharedProductionCore": {
16
+ "planner": "compileReleaseTailDeclaration",
17
+ "initializer": "createReleaseTailTransaction",
18
+ "executor": "executeReleaseTailTransaction",
19
+ "version": "buildchain.release-tail/v1"
20
+ },
21
+ "stageCapsuleBoundary": {
22
+ "contract": "buildchain-v4-stage-capsule/v1",
23
+ "purpose": "pure platform-stage build checkpoint reuse",
24
+ "publicationEffects": false,
25
+ "publicationAuthority": false
26
+ },
27
+ "matrix": [
28
+ {
29
+ "invariant": "capsule-purpose",
30
+ "v3": "publication rehearsal",
31
+ "v4": "publication rehearsal distinct from Stage Capsule",
32
+ "parity": "safety-strengthened"
33
+ },
34
+ {
35
+ "invariant": "content-addressed-inputs",
36
+ "v3": "capsule, declaration, transaction, files, data-only provider bindings, policy and observations",
37
+ "v4": "capsule, source, candidate, manifest, config, provider bindings, provider policy, expected observations and core version",
38
+ "parity": "safety-strengthened"
39
+ },
40
+ {
41
+ "invariant": "provider-request-binding",
42
+ "v3": "provider binding payload is capsule-rooted and every input path is in files",
43
+ "v4": "providerBindingsRoot covers canonical bindings and every request byte is inventory-rooted before adapters",
44
+ "parity": "exact"
45
+ },
46
+ {
47
+ "invariant": "shared-release-tail-core",
48
+ "v3": "shared planner and executor",
49
+ "v4": "same production planner, initializer and executor",
50
+ "parity": "exact"
51
+ },
52
+ {
53
+ "invariant": "effect-default",
54
+ "v3": "simulate and replay local defaults",
55
+ "v4": "provider policy is rooted and effect-disabled by default",
56
+ "parity": "safety-strengthened"
57
+ },
58
+ {
59
+ "invariant": "authorized-provider-rehearsal",
60
+ "v3": "provider observations are recorded without authority",
61
+ "v4": "exact capsule-bound rehearsal-only authority plus request and readback transcript",
62
+ "parity": "safety-strengthened"
63
+ },
64
+ {
65
+ "invariant": "release-authority",
66
+ "v3": "externalPublicationClaimed false",
67
+ "v4": "productionAuthority false and releasePassport null",
68
+ "parity": "exact"
69
+ },
70
+ {
71
+ "invariant": "tamper-response",
72
+ "v3": "capsule and file mismatch fail closed",
73
+ "v4": "every named identity root and core version mismatch fails closed",
74
+ "parity": "safety-strengthened"
75
+ },
76
+ {
77
+ "invariant": "portability",
78
+ "v3": "platform-independent local capsule root",
79
+ "v4": "byte-identical offline linux, macos and windows vector",
80
+ "parity": "exact"
81
+ }
82
+ ],
83
+ "matrixRoot": "sha256:521694ce2cc1d5b383eaa6b84f1b6926ef8ce8f33085e02507e611e9f9b6e784"
84
+ }
@@ -26,6 +26,7 @@
26
26
  {
27
27
  "path": "tests/dev-alpha-candidate-patrol.test.mjs",
28
28
  "count": 37,
29
+ "targetAdditionalCount": 4,
29
30
  "result": "exact"
30
31
  },
31
32
  {
@@ -0,0 +1,150 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-v4-tail-reseal-parity",
4
+ "sourceAuthority": {
5
+ "branch": "dev/v3/v3.0",
6
+ "capturedCommit": "6b96bdad8d9f8ccf9275f27d9370a226a9c78465",
7
+ "implementation": "scripts/release-candidate-tail-reseal.mjs",
8
+ "workflow": ".github/workflows/.build.yml",
9
+ "tests": "tests/release-candidate-tail-reseal.test.mjs"
10
+ },
11
+ "target": {
12
+ "branch": "dev/v4/v4.0",
13
+ "publicReusableWorkflow": "kungfu-systems/buildchain/.github/workflows/v4-tail-reseal.yml@v4-alpha",
14
+ "requestSchema": "contracts/v4-tail-reseal-v1.schema.json",
15
+ "planner": "packages/core/v4-tail-reseal.js",
16
+ "admission": "packages/core/v4-tail-reseal-github.js",
17
+ "receipt": "packages/core/v4-tail-reseal-receipt.js",
18
+ "cli": "buildchain tail-reseal"
19
+ },
20
+ "authority": {
21
+ "productionAuthority": "v4",
22
+ "stageCapsuleEffectAuthority": "none",
23
+ "signingAuthority": "explicit-live-release-tail",
24
+ "credentialAuthority": "lease-bound-secret-island",
25
+ "runtimePersistence": "floating-only",
26
+ "v3BehaviorChange": false
27
+ },
28
+ "allowedDispositions": [
29
+ "implemented",
30
+ "superseded-equivalent",
31
+ "missing-before-closeout"
32
+ ],
33
+ "invariants": [
34
+ {
35
+ "id": "TR-01",
36
+ "claim": "The exact captured v3 retained-candidate script, workflow and tests are rooted as parity authority.",
37
+ "disposition": "implemented",
38
+ "implementationEvidence": ["architecture/v4-tail-reseal-parity.json"],
39
+ "verificationEvidence": ["tests/v4-tail-reseal-parity.test.mjs"]
40
+ },
41
+ {
42
+ "id": "TR-02",
43
+ "claim": "One exact failed run binds four byte-addressed platform payloads, manifests, archives and Stage Capsules.",
44
+ "disposition": "implemented",
45
+ "implementationEvidence": [
46
+ "contracts/v4-tail-reseal-v1.schema.json",
47
+ "packages/core/v4-tail-reseal-github.js"
48
+ ],
49
+ "verificationEvidence": [
50
+ "contracts/fixtures/v4-tail-reseal-v1/valid.json",
51
+ "tests/v4-tail-reseal.test.mjs"
52
+ ]
53
+ },
54
+ {
55
+ "id": "TR-03",
56
+ "claim": "A fresh runner downloads retained archives and verifies every manifest and payload byte before any tail effect.",
57
+ "disposition": "implemented",
58
+ "implementationEvidence": [
59
+ "scripts/v4-tail-reseal.mjs",
60
+ ".github/workflows/v4-tail-reseal.yml"
61
+ ],
62
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
63
+ },
64
+ {
65
+ "id": "TR-04",
66
+ "claim": "Install, build, verify, package and platform-matrix remain explicitly skipped under effect-free Stage Capsule reuse.",
67
+ "disposition": "implemented",
68
+ "implementationEvidence": ["packages/core/v4-tail-reseal.js"],
69
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
70
+ },
71
+ {
72
+ "id": "TR-05",
73
+ "claim": "Only macOS signing-finalization may change bytes; every other platform stays byte-identical and provider-effect-free.",
74
+ "disposition": "implemented",
75
+ "implementationEvidence": [
76
+ "packages/core/v4-tail-reseal-receipt.js",
77
+ "scripts/v4-tail-reseal.mjs"
78
+ ],
79
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
80
+ },
81
+ {
82
+ "id": "TR-06",
83
+ "claim": "The macOS effect is fenced by exact Warrant lineage, credential authority, release-tail transaction and idempotency key.",
84
+ "disposition": "implemented",
85
+ "implementationEvidence": [
86
+ "packages/core/v4-tail-reseal.js",
87
+ ".github/workflows/v4-tail-reseal.yml"
88
+ ],
89
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
90
+ },
91
+ {
92
+ "id": "TR-07",
93
+ "claim": "Source, platform, archive, manifest, signer, Warrant, credential, retention and prior-failure drift fails closed.",
94
+ "disposition": "implemented",
95
+ "implementationEvidence": [
96
+ "packages/core/v4-tail-reseal.js",
97
+ "packages/core/v4-tail-reseal-github.js"
98
+ ],
99
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
100
+ },
101
+ {
102
+ "id": "TR-08",
103
+ "claim": "Expired retention or credential leases invalidate reuse and require a normal candidate rebuild.",
104
+ "disposition": "implemented",
105
+ "implementationEvidence": ["packages/core/v4-tail-reseal.js"],
106
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
107
+ },
108
+ {
109
+ "id": "TR-09",
110
+ "claim": "Successful reseal emits the ordinary v4 Release Candidate Passport with its original floating-consumer policy receipt.",
111
+ "disposition": "implemented",
112
+ "implementationEvidence": [
113
+ "packages/core/v4-tail-reseal-receipt.js",
114
+ ".github/workflows/v4-tail-reseal.yml"
115
+ ],
116
+ "verificationEvidence": ["tests/v4-tail-reseal.test.mjs"]
117
+ },
118
+ {
119
+ "id": "TR-10",
120
+ "claim": "The reusable workflow resolves job.workflow_sha as runtime evidence and exposes no persisted SHA, variable indirection or private self-dogfood path.",
121
+ "disposition": "implemented",
122
+ "implementationEvidence": [".github/workflows/v4-tail-reseal.yml"],
123
+ "verificationEvidence": ["tests/v4-tail-reseal-parity.test.mjs"]
124
+ },
125
+ {
126
+ "id": "TR-11",
127
+ "claim": "Node API, CLI, schema, deterministic fixture, generated references and macOS bounded qualification project one contract.",
128
+ "disposition": "implemented",
129
+ "implementationEvidence": [
130
+ "package.json",
131
+ "bin/buildchain.mjs",
132
+ "scripts/v4-tail-reseal.mjs",
133
+ "docs/v4-tail-reseal.md"
134
+ ],
135
+ "verificationEvidence": [
136
+ "tests/command-registry.test.mjs",
137
+ "tests/v4-tail-reseal.test.mjs",
138
+ "tests/v4-tail-reseal-parity.test.mjs"
139
+ ]
140
+ },
141
+ {
142
+ "id": "TR-12",
143
+ "claim": "Independent review, protected merge and exact post-merge public readback remain external closeout evidence.",
144
+ "disposition": "missing-before-closeout",
145
+ "implementationEvidence": [],
146
+ "verificationEvidence": []
147
+ }
148
+ ],
149
+ "matrixRoot": "sha256:126ec51c12a9dedeb9b9e187202781e3895856af1927b399ba3902f3940750ad"
150
+ }
@@ -11,6 +11,7 @@ import { runLifecycle } from "../scripts/run-lifecycle-core.mjs";
11
11
  import { runReleasePropagationCli } from "../scripts/release-propagation.mjs";
12
12
  import { runReleaseGovernanceCli } from "../scripts/reconcile-release-governance.mjs";
13
13
  import { runReleaseTailCli } from "../scripts/release-tail.mjs";
14
+ import { runV4TailResealCli } from "../scripts/v4-tail-reseal.mjs";
14
15
  import { runPublicationArtifactCli } from "../scripts/publication-artifact.mjs";
15
16
  import { runPublicationPackageCli } from "../scripts/publication-package.mjs";
16
17
  import { runPublicationReproducibilityCli } from "../scripts/publication-reproducibility.mjs";
@@ -109,6 +110,8 @@ import {
109
110
  dispatchTrustReleaseCommand,
110
111
  } from "./internal/trust-release-cli.mjs";
111
112
  import { dispatchRegisteredCommand } from "./internal/command-registry.mjs";
113
+ import { runCompatibilityFactsCli } from "./internal/compatibility-facts-cli.mjs";
114
+ import { runAdopterDeliveryCli } from "./internal/adopter-delivery-cli.mjs";
112
115
 
113
116
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
114
117
  const embeddedPackageVersion = process.env.BUILDCHAIN_EMBEDDED_PACKAGE_VERSION || "";
@@ -987,6 +990,9 @@ async function runKfdCli(args = []) {
987
990
  async function runBuildFactsCli(args = []) {
988
991
  const [subcommand = "", ...factArgs] = args;
989
992
  const cwd = path.resolve(readFlag(factArgs, "cwd", process.cwd()));
993
+ if (subcommand === "compatibility") {
994
+ return runCompatibilityFactsCli({ args: factArgs, cwd, packageRoot: root });
995
+ }
990
996
  if (subcommand === "module") {
991
997
  const fact = collectModuleBuildFacts({
992
998
  cwd,
@@ -1060,7 +1066,7 @@ async function runBuildFactsCli(args = []) {
1060
1066
  }
1061
1067
  return;
1062
1068
  }
1063
- throw new Error("usage: buildchain facts <module|aggregate|verify> ...");
1069
+ throw new Error("usage: buildchain facts <module|aggregate|verify|compatibility> ...");
1064
1070
  }
1065
1071
 
1066
1072
  function appendJsonLine(filePath, value) {
@@ -1670,7 +1676,15 @@ async function handleReleaseGovernanceCommand(args) {
1670
1676
  }
1671
1677
 
1672
1678
  async function handleReleaseTailCommand(args) {
1673
- runReleaseTailCli(args);
1679
+ await runReleaseTailCli(args);
1680
+ }
1681
+
1682
+ async function handleTailResealCommand(args) {
1683
+ await runV4TailResealCli(args);
1684
+ }
1685
+
1686
+ async function handleNextDevelopmentCommand(args) {
1687
+ runScript("next-development-transition.mjs", args);
1674
1688
  }
1675
1689
 
1676
1690
  async function handleGitHubGovernanceCommand(args) {
@@ -1737,6 +1751,10 @@ async function handleArchitectureCommand(args) {
1737
1751
  runScript("v4-architecture.mjs", args);
1738
1752
  }
1739
1753
 
1754
+ async function handleAdopterDeliveryCommand(args) {
1755
+ await runAdopterDeliveryCli(args);
1756
+ }
1757
+
1740
1758
  const BUILDCHAIN_COMMAND_HANDLERS = Object.freeze({
1741
1759
  "help": handleHelpCommand,
1742
1760
  "version": handleVersionCommand,
@@ -1769,12 +1787,15 @@ const BUILDCHAIN_COMMAND_HANDLERS = Object.freeze({
1769
1787
  "release-propagation": handleReleasePropagationCommand,
1770
1788
  "release-governance": handleReleaseGovernanceCommand,
1771
1789
  "release-tail": handleReleaseTailCommand,
1790
+ "tail-reseal": handleTailResealCommand,
1791
+ "next-development": handleNextDevelopmentCommand,
1772
1792
  "github-governance": handleGitHubGovernanceCommand,
1773
1793
  "badges": handleBadgesCommand,
1774
1794
  "homebrew": handleHomebrewCommand,
1775
1795
  "build-contract": handleBuildContractCommand,
1776
1796
  "publish-source": handlePublishSourceCommand,
1777
1797
  "architecture": handleArchitectureCommand,
1798
+ "adopter-delivery": handleAdopterDeliveryCommand,
1778
1799
  });
1779
1800
 
1780
1801
  async function main(argv = process.argv.slice(2)) {
@@ -0,0 +1,70 @@
1
+ import {
2
+ loadV4PublishedAdopterDeliveryAuthority,
3
+ qualifyV4AdopterDeliveryBootstrap,
4
+ runV4AdopterDeliveryGate,
5
+ verifyV4AdopterDeliveryReadback,
6
+ } from "../../packages/core/v4-adopter-delivery.js";
7
+ import {
8
+ printJson,
9
+ readFlag,
10
+ readJsonInput,
11
+ writeJsonFile,
12
+ } from "./cli-options.mjs";
13
+
14
+ function emit(args, value) {
15
+ writeJsonFile(readFlag(args, "output", ""), value);
16
+ printJson(value);
17
+ }
18
+
19
+ export async function runAdopterDeliveryCli(args = []) {
20
+ const [subcommand = "", ...commandArgs] = args;
21
+ if (subcommand === "run") {
22
+ const input = readJsonInput(readFlag(commandArgs, "input", ""), {
23
+ label: "adopter delivery input",
24
+ });
25
+ emit(commandArgs, runV4AdopterDeliveryGate(input));
26
+ return;
27
+ }
28
+ if (subcommand === "verify") {
29
+ const input = readJsonInput(readFlag(commandArgs, "input", ""), {
30
+ label: "adopter delivery input",
31
+ });
32
+ const readback = readJsonInput(readFlag(commandArgs, "readback", ""), {
33
+ label: "adopter delivery readback",
34
+ });
35
+ emit(commandArgs, verifyV4AdopterDeliveryReadback({ input, readback }));
36
+ return;
37
+ }
38
+ if (subcommand === "bootstrap") {
39
+ const request = readJsonInput(readFlag(commandArgs, "input", ""), {
40
+ label: "adopter delivery bootstrap input",
41
+ });
42
+ emit(commandArgs, qualifyV4AdopterDeliveryBootstrap(request));
43
+ return;
44
+ }
45
+ if (subcommand === "archive") {
46
+ const request = readJsonInput(readFlag(commandArgs, "input", ""), {
47
+ label: "published archive input",
48
+ });
49
+ const authority = await loadV4PublishedAdopterDeliveryAuthority(request);
50
+ try {
51
+ emit(commandArgs, {
52
+ schemaVersion: authority.schemaVersion,
53
+ contract: authority.contract,
54
+ packages: authority.packages,
55
+ moduleCoordinates: authority.moduleCoordinates,
56
+ authorityRoot: authority.authorityRoot,
57
+ qualifying: authority.qualifying,
58
+ selfCertified: authority.selfCertified,
59
+ releaseAuthorized: authority.releaseAuthorized,
60
+ finalAuthority: authority.finalAuthority,
61
+ });
62
+ } finally {
63
+ await authority.dispose();
64
+ }
65
+ return;
66
+ }
67
+ throw new Error(
68
+ "usage: buildchain adopter-delivery <run|verify|bootstrap|archive> --input <json-or-path> [--readback <json-or-path>] [--output <path>]",
69
+ );
70
+ }
@@ -33,12 +33,15 @@ const BUILDCHAIN_COMMAND_REGISTRY = Object.freeze([
33
33
  { id: "release-propagation", aliases: [] },
34
34
  { id: "release-governance", aliases: [] },
35
35
  { id: "release-tail", aliases: [] },
36
+ { id: "tail-reseal", aliases: [] },
37
+ { id: "next-development", aliases: [] },
36
38
  { id: "github-governance", aliases: [] },
37
39
  { id: "badges", aliases: [] },
38
40
  { id: "homebrew", aliases: [] },
39
41
  { id: "build-contract", aliases: [] },
40
42
  { id: "publish-source", aliases: [] },
41
43
  { id: "architecture", aliases: [] },
44
+ { id: "adopter-delivery", aliases: [] },
42
45
  ]);
43
46
 
44
47
  function buildCommandLookup(registry = BUILDCHAIN_COMMAND_REGISTRY) {