@kungfu-tech/buildchain 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/promote-buildchain-ref/README.md +13 -0
- package/bin/buildchain.mjs +8 -0
- package/dist/site/agent-index.json +2 -1
- package/dist/site/artifact-schemas.json +1 -0
- package/dist/site/buildchain-contract.json +298 -0
- package/dist/site/release-provenance.json +2 -0
- package/docs/MAP.md +9 -0
- package/docs/cli.md +39 -0
- package/docs/migration-inventory.md +11 -0
- package/docs/release-candidate.md +38 -1
- package/docs/release-governance.md +18 -0
- package/docs/release-passport.md +126 -0
- package/docs/reusable-build-surface.md +79 -3
- package/docs/site-bundle-contract.md +6 -0
- package/docs/versioning.md +1 -1
- package/package.json +4 -2
- package/packages/core/buildchain-contract.js +524 -0
- package/packages/core/index.js +23 -0
- package/packages/core/kfd-gate.js +1064 -4
- package/packages/core/release-passport.js +298 -0
- package/scripts/buildchain-contract-lock.mjs +170 -0
- package/scripts/check-inventory.mjs +105 -3
- package/scripts/ensure-github-release.mjs +5 -5
- package/scripts/generate-site-bundle.mjs +4 -0
- package/scripts/release-candidate-resolver.mjs +1 -1
|
@@ -214,6 +214,19 @@ contract-world witness JSON paths when released artifacts must prove
|
|
|
214
214
|
byte-for-byte KFD contract surfaces. Buildchain imports the KFD metadata from
|
|
215
215
|
`@kungfu-tech/kfd`, freezes the witness, verifies artifact bytes, and writes the
|
|
216
216
|
result under the KFD-provided `kfd-1` passport section.
|
|
217
|
+
Set `release-passport-kfd-2-claim-jsons` to newline-separated KFD-2 public
|
|
218
|
+
release trust claim JSON paths when a release makes additional human/agent
|
|
219
|
+
visible claims. Buildchain requires each public claim to bind declared sources,
|
|
220
|
+
machine-readable evidence, hashes, artifact coordinates, verification results,
|
|
221
|
+
audit boundary, responsibility state, and residual risk. Unbound claims fail
|
|
222
|
+
passport verification; prose-only claims downgrade the KFD-2 audit.
|
|
223
|
+
Set `release-passport-kfd-3-prebuild-witness-jsons` to newline-separated KFD-3
|
|
224
|
+
collaboration-interface pre-build witness paths, then provide artifact-side
|
|
225
|
+
evidence with `release-passport-kfd-3-artifact-witness-jsons` or a
|
|
226
|
+
product-owned `release-passport-kfd-3-artifact-verify-command` such as
|
|
227
|
+
`kungfu agent verify --json`. Buildchain compares declared shipped public
|
|
228
|
+
surfaces with artifact-exposed public surfaces and writes the result under the
|
|
229
|
+
KFD-provided `kfd-3` passport section.
|
|
217
230
|
When present, the passport includes the aggregate build summary, platform
|
|
218
231
|
artifact manifests, npm publish evidence, dist-tag promotion evidence, the
|
|
219
232
|
release-state ref, trusted publishing metadata, and the Buildchain transaction
|
package/bin/buildchain.mjs
CHANGED
|
@@ -77,6 +77,10 @@ function usage() {
|
|
|
77
77
|
[--platform-manifest-json <json-or-path>]...
|
|
78
78
|
[--dist-tag-evidence-json <json-or-path>]
|
|
79
79
|
[--kfd-1-witness-json <json-or-path>]...
|
|
80
|
+
[--kfd-2-claim-json <json-or-path>]...
|
|
81
|
+
[--kfd-3-prebuild-witness-json <json-or-path>]...
|
|
82
|
+
[--kfd-3-artifact-witness-json <json-or-path>]...
|
|
83
|
+
[--kfd-3-artifact-verify-cmd <command>]
|
|
80
84
|
[--release-extra-json <json-or-path>]
|
|
81
85
|
[--publish-json <json-or-path>] [--output-dir <dir>] [--json]
|
|
82
86
|
buildchain verify release-passport <file-or-url> [--json]
|
|
@@ -736,6 +740,10 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
736
740
|
platformManifestJsons: readRepeatedFlag(collectArgs, "platform-manifest-json"),
|
|
737
741
|
distTagEvidenceJson: readFlag(collectArgs, "dist-tag-evidence-json", ""),
|
|
738
742
|
kfd1WitnessJsons: readRepeatedFlag(collectArgs, "kfd-1-witness-json"),
|
|
743
|
+
kfd2ClaimJsons: readRepeatedFlag(collectArgs, "kfd-2-claim-json"),
|
|
744
|
+
kfd3PrebuildWitnessJsons: readRepeatedFlag(collectArgs, "kfd-3-prebuild-witness-json"),
|
|
745
|
+
kfd3ArtifactWitnessJsons: readRepeatedFlag(collectArgs, "kfd-3-artifact-witness-json"),
|
|
746
|
+
kfd3ArtifactVerifyCommand: readFlag(collectArgs, "kfd-3-artifact-verify-cmd", ""),
|
|
739
747
|
releaseJsonExtra: readFlag(collectArgs, "release-extra-json", ""),
|
|
740
748
|
publishJson: readFlag(collectArgs, "publish-json", ""),
|
|
741
749
|
workflow,
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"release-model.json",
|
|
8
8
|
"cli-registry.json",
|
|
9
9
|
"workflow-registry.json",
|
|
10
|
-
"artifact-schemas.json"
|
|
10
|
+
"artifact-schemas.json",
|
|
11
|
+
"buildchain-contract.json"
|
|
11
12
|
],
|
|
12
13
|
"instruction": "Use this bundle as the package-owned fact source for Buildchain pages. Do not infer current release mechanics from prose alone."
|
|
13
14
|
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"contract": "kungfu-buildchain-runtime-contract-world",
|
|
4
|
+
"product": {
|
|
5
|
+
"name": "Buildchain",
|
|
6
|
+
"package": "@kungfu-tech/buildchain",
|
|
7
|
+
"version": "2.8.1",
|
|
8
|
+
"repository": "https://github.com/kungfu-systems/buildchain"
|
|
9
|
+
},
|
|
10
|
+
"majorLine": "v2",
|
|
11
|
+
"compatibilityPolicy": "major-compatible",
|
|
12
|
+
"surfaces": [
|
|
13
|
+
{
|
|
14
|
+
"contractVersion": 1,
|
|
15
|
+
"stability": "stable",
|
|
16
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
17
|
+
"id": "reusable-build",
|
|
18
|
+
"kind": "workflow",
|
|
19
|
+
"path": ".github/workflows/.build.yml",
|
|
20
|
+
"publicRef": "kungfu-systems/buildchain/.github/workflows/.build.yml@v2",
|
|
21
|
+
"requiredInputs": [],
|
|
22
|
+
"requiredOutputs": [
|
|
23
|
+
"buildchain-runtime-sha",
|
|
24
|
+
"publish-source-sha",
|
|
25
|
+
"build-summary-artifact",
|
|
26
|
+
"release-candidate-artifact"
|
|
27
|
+
],
|
|
28
|
+
"breakingDefaults": {
|
|
29
|
+
"buildchainRefDefault": "workflow-shell-ref-or-v2",
|
|
30
|
+
"promoteOnlyHeavyBuildPolicy": "pr-stage-only"
|
|
31
|
+
},
|
|
32
|
+
"optionalInputs": [
|
|
33
|
+
"buildchain-ref",
|
|
34
|
+
"runner-preset",
|
|
35
|
+
"platforms-json",
|
|
36
|
+
"release-candidate",
|
|
37
|
+
"artifact-transfer-mode",
|
|
38
|
+
"buildchain-contract-lock-path",
|
|
39
|
+
"buildchain-contract-drift-issue-mode"
|
|
40
|
+
],
|
|
41
|
+
"guarantees": [
|
|
42
|
+
"runtime floating refs are resolved to immutable SHAs before matrix jobs",
|
|
43
|
+
"publish source locks are verified before heavy build jobs",
|
|
44
|
+
"release-candidate builds do not publish registry artifacts",
|
|
45
|
+
"contract drift is checked before heavy build jobs for stable floating refs"
|
|
46
|
+
],
|
|
47
|
+
"breakingDigest": "sha256:6303aa2c2cb8c2cef4301ceea95cc3c426c2aa81d98714aa9bdf2471d63faee1",
|
|
48
|
+
"auditDigest": "sha256:93f8e59720cdfc8de2d04c1e76933932a28dfbaec80c26a5cf4266c85199322c"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"contractVersion": 1,
|
|
52
|
+
"stability": "stable",
|
|
53
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
54
|
+
"id": "release-candidate-promote",
|
|
55
|
+
"kind": "workflow",
|
|
56
|
+
"path": ".github/workflows/release-candidate-promote.yml",
|
|
57
|
+
"publicRef": "kungfu-systems/buildchain/.github/workflows/release-candidate-promote.yml@v2",
|
|
58
|
+
"requiredInputs": [
|
|
59
|
+
"channel"
|
|
60
|
+
],
|
|
61
|
+
"requiredOutputs": [
|
|
62
|
+
"promoted-sha",
|
|
63
|
+
"built-source-sha",
|
|
64
|
+
"release-candidate-artifact"
|
|
65
|
+
],
|
|
66
|
+
"breakingDefaults": {
|
|
67
|
+
"promoteOnlyReleaseCandidate": true,
|
|
68
|
+
"requiredStatusCheck": "check"
|
|
69
|
+
},
|
|
70
|
+
"optionalInputs": [
|
|
71
|
+
"buildchain-ref",
|
|
72
|
+
"release-candidate-workflow-file",
|
|
73
|
+
"release-candidate-workflow-name",
|
|
74
|
+
"publish-required-artifacts-json",
|
|
75
|
+
"release-passport-kfd-1-witness-jsons",
|
|
76
|
+
"release-passport-kfd-2-claim-jsons",
|
|
77
|
+
"release-passport-kfd-3-prebuild-witness-jsons",
|
|
78
|
+
"release-passport-kfd-3-artifact-witness-jsons",
|
|
79
|
+
"release-passport-kfd-3-artifact-verify-command",
|
|
80
|
+
"buildchain-contract-lock-path",
|
|
81
|
+
"buildchain-contract-drift-issue-mode"
|
|
82
|
+
],
|
|
83
|
+
"guarantees": [
|
|
84
|
+
"promotion reuses PR-stage release-candidate artifacts",
|
|
85
|
+
"promotion does not run the heavy native build matrix",
|
|
86
|
+
"built source and promotion channel SHA are recorded separately",
|
|
87
|
+
"contract drift is checked before release-candidate resolution and publish",
|
|
88
|
+
"publish-gate source locks are created by the wrapper and enforced by promote-buildchain-ref before publish side effects"
|
|
89
|
+
],
|
|
90
|
+
"breakingDigest": "sha256:1c27595adaa8fbc334b3f7f66605e4544cb8c60ce81a9bb7ee94d6ede93c65ac",
|
|
91
|
+
"auditDigest": "sha256:4fddfd83cd8a90c45c1356561f38985b5a29f1cdb04ca969639867b6ee6869d0"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"contractVersion": 1,
|
|
95
|
+
"stability": "stable",
|
|
96
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
97
|
+
"id": "promote-buildchain-ref-action",
|
|
98
|
+
"kind": "action",
|
|
99
|
+
"path": "actions/promote-buildchain-ref/action.yml",
|
|
100
|
+
"publicRef": "kungfu-systems/buildchain/actions/promote-buildchain-ref@v2",
|
|
101
|
+
"requiredInputs": [
|
|
102
|
+
"token",
|
|
103
|
+
"sha",
|
|
104
|
+
"target-ref"
|
|
105
|
+
],
|
|
106
|
+
"requiredOutputs": [
|
|
107
|
+
"sha"
|
|
108
|
+
],
|
|
109
|
+
"breakingDefaults": {
|
|
110
|
+
"requireGovernance": false,
|
|
111
|
+
"releasePassport": true
|
|
112
|
+
},
|
|
113
|
+
"optionalInputs": [
|
|
114
|
+
"publish-transaction",
|
|
115
|
+
"publish-required-artifacts-json",
|
|
116
|
+
"promote-only-release-candidate",
|
|
117
|
+
"release-passport-kfd-1-witness-jsons",
|
|
118
|
+
"release-passport-kfd-2-claim-jsons",
|
|
119
|
+
"release-passport-kfd-3-prebuild-witness-jsons",
|
|
120
|
+
"release-passport-kfd-3-artifact-witness-jsons",
|
|
121
|
+
"release-passport-kfd-3-artifact-verify-command"
|
|
122
|
+
],
|
|
123
|
+
"guarantees": [
|
|
124
|
+
"protected release refs and durable release-state are finalized by Buildchain",
|
|
125
|
+
"release passport finalization is idempotent after publish side effects",
|
|
126
|
+
"publish transactions can require a resolved publish-gate source lock to prevent floating-ref drift"
|
|
127
|
+
],
|
|
128
|
+
"breakingDigest": "sha256:fca97ba00248ed436695f12f8fc44404458af462e666aa7b69b4315b32705bdd",
|
|
129
|
+
"auditDigest": "sha256:014233a4add8a01fbccc40c86821c54d3aa12cd3b1158423ac88cb0e45a352a8"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"contractVersion": 1,
|
|
133
|
+
"stability": "stable",
|
|
134
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
135
|
+
"id": "report-buildchain-issue-action",
|
|
136
|
+
"kind": "action",
|
|
137
|
+
"path": "actions/report-buildchain-issue/action.yml",
|
|
138
|
+
"publicRef": "kungfu-systems/buildchain/actions/report-buildchain-issue@v2",
|
|
139
|
+
"requiredInputs": [
|
|
140
|
+
"token"
|
|
141
|
+
],
|
|
142
|
+
"requiredOutputs": [
|
|
143
|
+
"ok",
|
|
144
|
+
"action",
|
|
145
|
+
"issue-url",
|
|
146
|
+
"fingerprint"
|
|
147
|
+
],
|
|
148
|
+
"breakingDefaults": {
|
|
149
|
+
"failOnError": false,
|
|
150
|
+
"mode": "create-or-comment"
|
|
151
|
+
},
|
|
152
|
+
"optionalInputs": [
|
|
153
|
+
"report-kind",
|
|
154
|
+
"target-repository",
|
|
155
|
+
"body-file",
|
|
156
|
+
"comment-cooldown-hours"
|
|
157
|
+
],
|
|
158
|
+
"guarantees": [
|
|
159
|
+
"issue reporting is fail-soft by default",
|
|
160
|
+
"GitHub API 429 and 5xx failures are retried",
|
|
161
|
+
"missing issue permissions produce a copyable summary fallback"
|
|
162
|
+
],
|
|
163
|
+
"breakingDigest": "sha256:575a2cb02cdb2e61bb2e84d5bbaaf64b430aa5d7936645660b592de4549d81b0",
|
|
164
|
+
"auditDigest": "sha256:512ccfeb7deedd950da87b112d25aa8667e081775b3b604f121374d25420eec1"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"contractVersion": 1,
|
|
168
|
+
"stability": "stable",
|
|
169
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
170
|
+
"id": "release-passport-schema",
|
|
171
|
+
"kind": "schema",
|
|
172
|
+
"path": "packages/core/release-passport.js",
|
|
173
|
+
"requiredInputs": [
|
|
174
|
+
"buildchain.release.json"
|
|
175
|
+
],
|
|
176
|
+
"requiredOutputs": [
|
|
177
|
+
"check-report.json"
|
|
178
|
+
],
|
|
179
|
+
"breakingDefaults": {
|
|
180
|
+
"schemaVersion": 1,
|
|
181
|
+
"contract": "kungfu-buildchain-release-passport"
|
|
182
|
+
},
|
|
183
|
+
"guarantees": [
|
|
184
|
+
"release passport verification fails closed for malformed required evidence",
|
|
185
|
+
"release-state SHA is recorded as a durable audit entrance"
|
|
186
|
+
],
|
|
187
|
+
"breakingDigest": "sha256:b627e1b2ece9b6049517a942c5139e342e6077cdd3d8962d61cef8481b1f70ad",
|
|
188
|
+
"auditDigest": "sha256:9668f3e01cfe8ce5b94ebdda24aeeaddbd609d8f4cc7cca33d82cbc59aae66f5"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"contractVersion": 1,
|
|
192
|
+
"stability": "stable",
|
|
193
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
194
|
+
"id": "kfd-1-release-gate",
|
|
195
|
+
"kind": "schema",
|
|
196
|
+
"path": "packages/core/kfd-gate.js",
|
|
197
|
+
"requiredInputs": [
|
|
198
|
+
"KFD-1 witness JSON"
|
|
199
|
+
],
|
|
200
|
+
"requiredOutputs": [
|
|
201
|
+
"kfd-1 release gate evidence"
|
|
202
|
+
],
|
|
203
|
+
"breakingDefaults": {
|
|
204
|
+
"witnessContract": "kungfu-buildchain-kfd-1-witness-set",
|
|
205
|
+
"releaseGateContract": "kungfu-buildchain-kfd-1-release-gate"
|
|
206
|
+
},
|
|
207
|
+
"guarantees": [
|
|
208
|
+
"KFD-1 witnesses must include at least one artifact byte surface",
|
|
209
|
+
"artifact bytes are sha256 checked before passport finalization succeeds",
|
|
210
|
+
"KFD self contract witnesses record source/artifact hashes, self-hosting boundary, and responsibility state"
|
|
211
|
+
],
|
|
212
|
+
"breakingDigest": "sha256:f46c1f67b94957ad956cf70db59a73fd5690bd67c91edf9c2d0eb8f3d1e3cf8d",
|
|
213
|
+
"auditDigest": "sha256:6a99ee108c385837ee9f1dbb75848f6ea434b6474977e6e567ae81f8fc9a555c"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"contractVersion": 1,
|
|
217
|
+
"stability": "stable",
|
|
218
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
219
|
+
"id": "kfd-2-release-trust-passport-audit",
|
|
220
|
+
"kind": "schema",
|
|
221
|
+
"path": "packages/core/release-passport.js",
|
|
222
|
+
"requiredInputs": [
|
|
223
|
+
"public release claim evidence"
|
|
224
|
+
],
|
|
225
|
+
"requiredOutputs": [
|
|
226
|
+
"kfd-2 release trust passport audit"
|
|
227
|
+
],
|
|
228
|
+
"breakingDefaults": {
|
|
229
|
+
"releaseTrustPassportContract": "kungfu-buildchain-kfd-2-release-trust-passport-audit"
|
|
230
|
+
},
|
|
231
|
+
"guarantees": [
|
|
232
|
+
"public release claims must bind declared sources, machine evidence, hashes, artifacts, verification, audit boundary, responsibility, and residual risk",
|
|
233
|
+
"unbound public claims fail release passport verification",
|
|
234
|
+
"prose-only public claims downgrade the release trust passport audit"
|
|
235
|
+
],
|
|
236
|
+
"breakingDigest": "sha256:f0b636eb925ddbf45ff1a8872454ab7b4dd98857cac12bb75217830130e62a16",
|
|
237
|
+
"auditDigest": "sha256:9668f3e01cfe8ce5b94ebdda24aeeaddbd609d8f4cc7cca33d82cbc59aae66f5"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"contractVersion": 1,
|
|
241
|
+
"stability": "stable",
|
|
242
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
243
|
+
"id": "kfd-3-collaboration-interface-release-gate",
|
|
244
|
+
"kind": "schema",
|
|
245
|
+
"path": "packages/core/kfd-gate.js",
|
|
246
|
+
"requiredInputs": [
|
|
247
|
+
"KFD-3 prebuild witness JSON",
|
|
248
|
+
"KFD-3 artifact witness JSON or verify command"
|
|
249
|
+
],
|
|
250
|
+
"requiredOutputs": [
|
|
251
|
+
"kfd-3 collaboration-interface release gate evidence"
|
|
252
|
+
],
|
|
253
|
+
"breakingDefaults": {
|
|
254
|
+
"prebuildWitnessContract": "kungfu-buildchain-kfd-3-collaboration-interface-prebuild-witness",
|
|
255
|
+
"artifactWitnessContract": "kungfu-buildchain-kfd-3-collaboration-interface-artifact-witness",
|
|
256
|
+
"releaseGateContract": "kungfu-buildchain-kfd-3-collaboration-interface-release-gate"
|
|
257
|
+
},
|
|
258
|
+
"guarantees": [
|
|
259
|
+
"KFD-3 pre-build witnesses must declare participant-facing public surfaces",
|
|
260
|
+
"artifact witnesses must not expose undeclared public participant-facing surfaces",
|
|
261
|
+
"collaborationInterface.digest mismatches fail passport verification",
|
|
262
|
+
"KFD repository self-verification can declare docs, schemas, standards metadata, package exports, and site-consumption contracts",
|
|
263
|
+
"KFD-3 passports expose releaseStatus, witness hashes, declared capability verification, reverse audit boundary, residual risk, and responsibility state"
|
|
264
|
+
],
|
|
265
|
+
"breakingDigest": "sha256:33654f3444c893754aacc42dde3051f0a371bd17c6ef7c657c579a07159cd7c1",
|
|
266
|
+
"auditDigest": "sha256:6a99ee108c385837ee9f1dbb75848f6ea434b6474977e6e567ae81f8fc9a555c"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"contractVersion": 1,
|
|
270
|
+
"stability": "stable",
|
|
271
|
+
"additiveChanges": "optional inputs, optional outputs, diagnostics, and documentation may be added within the same major line",
|
|
272
|
+
"id": "buildchain-cli",
|
|
273
|
+
"kind": "cli",
|
|
274
|
+
"path": "bin/buildchain.mjs",
|
|
275
|
+
"requiredInputs": [],
|
|
276
|
+
"requiredOutputs": [],
|
|
277
|
+
"breakingDefaults": {
|
|
278
|
+
"binary": "buildchain",
|
|
279
|
+
"moduleSystem": "esm"
|
|
280
|
+
},
|
|
281
|
+
"optionalInputs": [
|
|
282
|
+
"validate",
|
|
283
|
+
"lifecycle",
|
|
284
|
+
"collect github-release",
|
|
285
|
+
"verify release-passport",
|
|
286
|
+
"release-propagation",
|
|
287
|
+
"infra-contract"
|
|
288
|
+
],
|
|
289
|
+
"guarantees": [
|
|
290
|
+
"CLI commands are stable within the major line unless the contract major changes"
|
|
291
|
+
],
|
|
292
|
+
"breakingDigest": "sha256:097db3e67509bedda8c6548bf1edfbfcf57f7b5510520b6a7b7e078d7ec087c8",
|
|
293
|
+
"auditDigest": "sha256:478e656104272675d3be3391158251472e0c2515b3113376ef0e52757b47ace0"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"compatibilityDigest": "sha256:ca668f3f73ab0d84db0d489efccf6cd556704b069990a37a0c6c77a6519f754b",
|
|
297
|
+
"contractDigest": "sha256:f76f0c5dfd89f5a27ce2a00c2cc15779baa22dc2ee2b13dd69e62ee7ffda5731"
|
|
298
|
+
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
".": "./packages/core/index.js",
|
|
12
12
|
"./core": "./packages/core/index.js",
|
|
13
13
|
"./artifact-passport": "./packages/core/artifact-passport.js",
|
|
14
|
+
"./buildchain-contract": "./packages/core/buildchain-contract.js",
|
|
14
15
|
"./diagnostics": "./packages/core/diagnostics.js",
|
|
15
16
|
"./issue-reporting": "./packages/core/issue-reporting.js",
|
|
16
17
|
"./logging": "./packages/core/logging.js",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"./site/workflow-registry.json": "./dist/site/workflow-registry.json",
|
|
25
26
|
"./site/release-model.json": "./dist/site/release-model.json",
|
|
26
27
|
"./site/artifact-schemas.json": "./dist/site/artifact-schemas.json",
|
|
28
|
+
"./site/buildchain-contract.json": "./dist/site/buildchain-contract.json",
|
|
27
29
|
"./site/product-mechanism.json": "./dist/site/product-mechanism.json",
|
|
28
30
|
"./site/release-provenance.json": "./dist/site/release-provenance.json",
|
|
29
31
|
"./site/agent-index.json": "./dist/site/agent-index.json",
|
package/docs/MAP.md
CHANGED
|
@@ -34,6 +34,9 @@ running artifact), *use* (consume / extend) - and a **status**:
|
|
|
34
34
|
| How does publish evidence, recovery, and finalization work? | [`publish-transaction.md`](publish-transaction.md) | verify | stable |
|
|
35
35
|
| How do I publish or verify release passport artifacts? | [`release-passport.md`](release-passport.md) | use | stable |
|
|
36
36
|
| How do I gate release artifacts with KFD-1 contract-world witnesses? | [`release-passport.md`](release-passport.md#kfd-1-contract-world-release-gate) | verify/use | stable |
|
|
37
|
+
| How do I audit public KFD-2 release trust claims? | [`release-passport.md`](release-passport.md#kfd-2-release-trust-passport-audit) + [`cli.md`](cli.md) | verify/use | stable |
|
|
38
|
+
| How do I gate KFD-3 collaboration-interface releases? | [`release-passport.md`](release-passport.md#kfd-3-collaboration-interface-release-gate) + [`cli.md`](cli.md) | verify/use | stable |
|
|
39
|
+
| How do I keep `@v2` floating refs while detecting Buildchain contract drift? | [`reusable-build-surface.md`](reusable-build-surface.md#floating-ref-contract-lock) | verify/use | stable |
|
|
37
40
|
| How do I propagate finalized upstream releases to downstream package/site PRs? | [`release-propagation.md`](release-propagation.md) | use | preview |
|
|
38
41
|
| How do I prove a PR-stage reusable build is the artifact source promoted later? | [`release-candidate.md`](release-candidate.md) + [`reusable-build-surface.md`](reusable-build-surface.md) | verify | stable |
|
|
39
42
|
| Why are binary release assets archived by platform, and where is the single bundle? | [`binary-distribution.md`](binary-distribution.md) | verify | stable |
|
|
@@ -93,6 +96,12 @@ running artifact), *use* (consume / extend) - and a **status**:
|
|
|
93
96
|
[`release-propagation.md`](release-propagation.md).
|
|
94
97
|
- **KFD-1 contract worlds / byte-for-byte release gates** ->
|
|
95
98
|
[`release-passport.md`](release-passport.md#kfd-1-contract-world-release-gate).
|
|
99
|
+
- **KFD-2 public release trust claim audit** ->
|
|
100
|
+
[`release-passport.md`](release-passport.md#kfd-2-release-trust-passport-audit).
|
|
101
|
+
- **KFD-3 collaboration-interface / agent-facing control surface closure** ->
|
|
102
|
+
[`release-passport.md`](release-passport.md#kfd-3-collaboration-interface-release-gate).
|
|
103
|
+
- **floating `@v2` / contract lock / compatible drift issue** ->
|
|
104
|
+
[`reusable-build-surface.md`](reusable-build-surface.md#floating-ref-contract-lock).
|
|
96
105
|
- **GitHub Release passport / binary assets / artifact evidence / agent release checks** ->
|
|
97
106
|
[`release-passport.md`](release-passport.md),
|
|
98
107
|
[`binary-distribution.md`](binary-distribution.md), and [`cli.md`](cli.md).
|
package/docs/cli.md
CHANGED
|
@@ -261,6 +261,9 @@ buildchain collect github-release \
|
|
|
261
261
|
--platform-manifest-json .buildchain/artifacts/win32-x64/manifest.json \
|
|
262
262
|
--dist-tag-evidence-json .buildchain/release-evidence/v2.3.2/dist-tag-evidence.json \
|
|
263
263
|
--kfd-1-witness-json .buildchain/kfd-1/contract-world.witness.json \
|
|
264
|
+
--kfd-2-claim-json .buildchain/kfd-2/release-claims.json \
|
|
265
|
+
--kfd-3-prebuild-witness-json .buildchain/kfd-3/collaboration-interface.prebuild.json \
|
|
266
|
+
--kfd-3-artifact-verify-cmd "kungfu agent verify --json" \
|
|
264
267
|
--release-extra-json '{"channel":"release","targetRef":"release/v2/v2.3"}' \
|
|
265
268
|
--output-dir .buildchain/release-passport
|
|
266
269
|
```
|
|
@@ -286,6 +289,42 @@ the KFD-provided top-level key currently named `kfd-1`. Consumers should not
|
|
|
286
289
|
duplicate this by running repository-specific scripts or invoking the Kungfu
|
|
287
290
|
SDK from their release workflow.
|
|
288
291
|
|
|
292
|
+
For the KFD repository, KFD-1 witnesses may be self-hosted standard-contract
|
|
293
|
+
witnesses: docs, schemas, standards metadata, package exports, and
|
|
294
|
+
site-consumption entrypoints are checked from source hashes to packaged artifact
|
|
295
|
+
hashes, and the passport records schema IDs, self-hosting boundary, result, and
|
|
296
|
+
responsibility state.
|
|
297
|
+
|
|
298
|
+
`--kfd-2-claim-json` attaches explicit public release claims to the KFD-2
|
|
299
|
+
release trust passport audit. Buildchain also derives KFD-2 claims from KFD-1
|
|
300
|
+
and KFD-3 gate evidence. Public claims must bind declared sources,
|
|
301
|
+
machine-readable evidence, hashes, artifact coordinates, verification results,
|
|
302
|
+
audit boundary, responsibility state, and residual risk. Unbound claims fail
|
|
303
|
+
passport verification; prose-only claims downgrade the KFD-2 audit and emit a
|
|
304
|
+
warning.
|
|
305
|
+
|
|
306
|
+
`--kfd-3-prebuild-witness-json` attaches a KFD-3 collaboration-interface
|
|
307
|
+
release gate. The product remains the source of truth: it emits a pre-build
|
|
308
|
+
witness that contains or points to its KFD-3 collaboration interface, declared
|
|
309
|
+
participant-facing public surfaces, and registry digest. Buildchain freezes
|
|
310
|
+
that declaration before publication. The artifact side is supplied either by
|
|
311
|
+
`--kfd-3-artifact-witness-json` or by a product-owned command such as
|
|
312
|
+
`--kfd-3-artifact-verify-cmd "kungfu agent verify --json"`. Buildchain then
|
|
313
|
+
checks closure: every declared shipped public surface must be present in the
|
|
314
|
+
artifact witness, and every artifact-exposed participant-facing public surface
|
|
315
|
+
must have been declared. The generated passport writes this evidence under the
|
|
316
|
+
KFD-provided top-level key currently named `kfd-3`.
|
|
317
|
+
|
|
318
|
+
This gate is useful for agent-facing products because it turns KFD-3 from prose
|
|
319
|
+
into release evidence. A package cannot claim KFD-3 collaboration-interface
|
|
320
|
+
support merely because the docs mention it; the release passport must show the
|
|
321
|
+
frozen declaration, the artifact-side witness digest, and a passing closure
|
|
322
|
+
comparison.
|
|
323
|
+
For the KFD repository itself, the witness can declare docs, schemas, standards
|
|
324
|
+
metadata, package exports, and site-consumption contracts as grouped public
|
|
325
|
+
surfaces; the artifact witness must expose the same enumerable package/site
|
|
326
|
+
surfaces or verification fails closed.
|
|
327
|
+
|
|
289
328
|
`--impact-json` supplies the surface-aware impact ledger. Production release
|
|
290
329
|
passports (`release/*`) and major publish-gate passports require
|
|
291
330
|
`surfaceImpacts[]`; alpha, local, and legacy passport contexts keep it
|
|
@@ -30,6 +30,13 @@ and the legacy `.release-new-version.yml` path is not the modern publish
|
|
|
30
30
|
surface. New publish integrations should use `.build.yml`, `buildchain.toml`,
|
|
31
31
|
`lifecycle.publish`, and publish transaction evidence.
|
|
32
32
|
|
|
33
|
+
Release templates that previously performed direct publishing or deployment are
|
|
34
|
+
now fail-closed when retained for compatibility discovery. They do not call
|
|
35
|
+
legacy publish actions, `npm publish`, or deploy providers directly. Callers must
|
|
36
|
+
migrate to `release-candidate-promote.yml@v2` or a project-owned
|
|
37
|
+
`lifecycle.publish` command behind a publish-gate source lock, so floating
|
|
38
|
+
`@v2` consumers cannot bypass source-lock drift protection.
|
|
39
|
+
|
|
33
40
|
## Migrated Actions
|
|
34
41
|
|
|
35
42
|
No standalone `action-*` repository is shipped as a Buildchain action anymore.
|
|
@@ -73,6 +80,10 @@ These legacy workflow entrypoints are intentionally not shipped from the root
|
|
|
73
80
|
| Previous workflow | Reason |
|
|
74
81
|
| --- | --- |
|
|
75
82
|
| `.batch-pull-request.yml` | retired PR orchestration helper; v2.5 dev integration governance will use a new protected-dev PR protocol instead |
|
|
83
|
+
| `.release-new-version.yml` | retained as a fail-closed compatibility stub; direct publish model replaced by source-locked release-candidate promotion |
|
|
84
|
+
| `.release-elastic-beanstalk.yml` | retained as a fail-closed compatibility stub; deploy side effects must move behind project lifecycle publish and publish-gate source locks |
|
|
85
|
+
| `.sam-release.yml` | retained as a fail-closed compatibility stub; deploy side effects must move behind project lifecycle publish and publish-gate source locks |
|
|
86
|
+
| `.wheel-release.yml` | retained as a fail-closed compatibility stub; package publish side effects must move behind project lifecycle publish and publish-gate source locks |
|
|
76
87
|
|
|
77
88
|
## Buildchain-Native Actions
|
|
78
89
|
|
|
@@ -68,7 +68,12 @@ build summary by the configured `artifact-name` before promotion. It also
|
|
|
68
68
|
downloads payload artifacts from the same PR-stage run, validates the required
|
|
69
69
|
payload count, passes downloaded platform manifests into the release passport,
|
|
70
70
|
and either forwards an explicit `publish-required-artifacts-json` value or
|
|
71
|
-
generates one before calling `promote-buildchain-ref`.
|
|
71
|
+
generates one before calling `promote-buildchain-ref`. Before that call, the
|
|
72
|
+
wrapper creates or updates `publish-gate/{alpha,release,major}` to the
|
|
73
|
+
promotion channel commit and passes that ref, target SHA, and `locked=true` to
|
|
74
|
+
the promote action with `require-publish-source-lock: "true"`. Consumers using
|
|
75
|
+
floating `@v2` therefore get publish-side source-lock drift protection without
|
|
76
|
+
copying resolver or promote YAML. The default npm path
|
|
72
77
|
generates that requirement list from the downloaded `.tgz` payloads themselves:
|
|
73
78
|
Buildchain reads `package/package.json` inside each tarball for the real scoped
|
|
74
79
|
package name and version, computes npm-style `sha512-...` integrity over the
|
|
@@ -76,3 +81,35 @@ tarball bytes, marks `publish-package-main` as `role: main`, and marks every
|
|
|
76
81
|
other package as `role: platform`. Consumer workflows therefore stay
|
|
77
82
|
declarative and do not need their own artifact download or publish-evidence
|
|
78
83
|
generation scripts.
|
|
84
|
+
|
|
85
|
+
When `github-release: true`, the wrapper also owns the GitHub Release side of
|
|
86
|
+
the publish model. Once the release transaction is complete, it creates or
|
|
87
|
+
updates the exact-tag GitHub Release, applies prerelease/latest metadata from
|
|
88
|
+
the semver tag, and uploads the publish evidence file together with the
|
|
89
|
+
generated release passport assets. This keeps npm/registry publication,
|
|
90
|
+
Buildchain release passport persistence, and `release.published` propagation in
|
|
91
|
+
one declarative reusable workflow.
|
|
92
|
+
|
|
93
|
+
Products that publish KFD release trust evidence can keep that path declarative
|
|
94
|
+
too. Pass KFD-1 self contract witnesses, KFD-2 public claim files, and KFD-3
|
|
95
|
+
pre-build/artifact evidence into the wrapper:
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
jobs:
|
|
99
|
+
promote:
|
|
100
|
+
uses: kungfu-systems/buildchain/.github/workflows/release-candidate-promote.yml@v2
|
|
101
|
+
with:
|
|
102
|
+
channel: alpha
|
|
103
|
+
artifact-name: libnode
|
|
104
|
+
github-release: true
|
|
105
|
+
release-passport-kfd-1-witness-jsons: .buildchain/kfd-1/standard-contract.witness.json
|
|
106
|
+
release-passport-kfd-2-claim-jsons: .buildchain/kfd-2/release-claims.json
|
|
107
|
+
release-passport-kfd-3-prebuild-witness-jsons: .buildchain/kfd-3/collaboration-interface.prebuild.json
|
|
108
|
+
release-passport-kfd-3-artifact-verify-command: kungfu agent verify --json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Buildchain forwards those declarations into `promote-buildchain-ref`, verifies
|
|
112
|
+
KFD-1 source/artifact contract surfaces, audits KFD-2 public release claims, and
|
|
113
|
+
compares KFD-3 declared shipped public surfaces with artifact-exposed public
|
|
114
|
+
surfaces. The release passport records the results under `kfd-1`, `kfd-2`, and
|
|
115
|
+
the KFD-provided `kfd-3` section.
|
|
@@ -425,6 +425,24 @@ consumer repository still owns registry truth: npm, PyPI, OCI, S3, Conan, CMake
|
|
|
425
425
|
packaging, download pages, dist-tags, and similar side effects must be
|
|
426
426
|
implemented by project lifecycle commands that emit Buildchain publish evidence.
|
|
427
427
|
|
|
428
|
+
Every Buildchain publish model that can run registry side effects must bind the
|
|
429
|
+
publish entrypoint to an immutable `publish-gate/*` source lock. The reusable
|
|
430
|
+
`release-candidate-promote.yml@v2` wrapper creates or updates that gate ref and
|
|
431
|
+
passes `require-publish-source-lock`, `publish-source-ref`,
|
|
432
|
+
`publish-source-sha`, and `publish-source-locked` to
|
|
433
|
+
`promote-buildchain-ref`. Direct action callers must pass the same four inputs
|
|
434
|
+
from the reusable build outputs. Workflows that only collect passports or run
|
|
435
|
+
dry-run package checks do not move publish refs and are not publish-gate
|
|
436
|
+
publication models.
|
|
437
|
+
|
|
438
|
+
The same wrapper is the declarative GitHub Release publication entrypoint for
|
|
439
|
+
semver releases. Consumers set `github-release: true`; after the publish
|
|
440
|
+
transaction reaches `complete`, Buildchain creates or updates the exact-tag
|
|
441
|
+
GitHub Release and uploads the generated `buildchain.release.json`,
|
|
442
|
+
release-passport assets, and publish evidence. Semver prerelease tags are marked
|
|
443
|
+
`prerelease=true` and `make_latest=false`; stable semver tags are marked latest.
|
|
444
|
+
This is the supported path for downstream `release.published` propagation.
|
|
445
|
+
|
|
428
446
|
Buildchain also does not maintain bare exact tags such as `1.0.0`. The supported
|
|
429
447
|
exact release and alpha refs are v-prefixed:
|
|
430
448
|
|