@kungfu-tech/buildchain 2.12.1-alpha.1 → 2.12.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/buildchain.mjs +18 -0
- package/dist/site/buildchain-contract.json +7 -7
- package/dist/site/buildchain-site.json +44 -24
- package/dist/site/capability-registry.json +2 -2
- package/dist/site/cli-registry.json +12 -0
- package/dist/site/kfd-claims.json +108 -12
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +6 -6
- package/dist/site/node-api-registry.json +7 -7
- package/dist/site/page-registry.json +34 -14
- package/dist/site/public-surface-audit.json +58 -9
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +10 -10
- package/dist/site/workflow-registry.json +30 -3
- package/docs/binary-distribution.md +20 -1
- package/docs/cli.md +17 -0
- package/docs/kfd-support.md +44 -1
- package/docs/lifecycle-protocol.md +12 -0
- package/docs/release-governance.md +7 -0
- package/docs/reusable-build-surface.md +69 -0
- package/docs/stable-candidate-patrol.md +16 -0
- package/package.json +2 -1
- package/packages/core/buildchain-kfd-claims.js +51 -2
- package/packages/core/buildchain-layout.js +46 -0
- package/packages/core/index.js +4 -0
- package/packages/core/kfd3-surface-register.js +59 -2
- package/scripts/build-standalone-binary.mjs +2 -1
- package/scripts/check-inventory.mjs +4 -1
- package/scripts/generate-site-bundle.mjs +4 -1
- package/scripts/init-repo.mjs +1 -1
- package/scripts/locked-source-checkout.mjs +52 -12
- package/scripts/npm-publish-dry-run.mjs +1 -1
- package/scripts/publication-artifact.mjs +1 -1
- package/scripts/publication-package.mjs +1 -1
- package/scripts/release-propagation.mjs +1 -1
- package/scripts/stable-candidate-qualification.mjs +239 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
4
4
|
"status": "passed",
|
|
5
5
|
"summary": {
|
|
6
|
-
"cliCommandCount":
|
|
7
|
-
"workflowCount":
|
|
6
|
+
"cliCommandCount": 76,
|
|
7
|
+
"workflowCount": 42,
|
|
8
8
|
"actionCount": 4,
|
|
9
9
|
"sitePageCount": 46,
|
|
10
|
-
"docCommandRefCount":
|
|
10
|
+
"docCommandRefCount": 241,
|
|
11
11
|
"failureCount": 0
|
|
12
12
|
},
|
|
13
13
|
"enumerated": {
|
|
@@ -257,6 +257,11 @@
|
|
|
257
257
|
"source": "bin/buildchain.mjs",
|
|
258
258
|
"usage": "buildchain kfd upstream roles [--json]"
|
|
259
259
|
},
|
|
260
|
+
{
|
|
261
|
+
"id": "layout",
|
|
262
|
+
"source": "bin/buildchain.mjs",
|
|
263
|
+
"usage": "buildchain layout [--cwd <dir>] [--json]"
|
|
264
|
+
},
|
|
260
265
|
{
|
|
261
266
|
"id": "lifecycle",
|
|
262
267
|
"source": "bin/buildchain.mjs",
|
|
@@ -411,6 +416,7 @@
|
|
|
411
416
|
"buildchain-contract-lock-path",
|
|
412
417
|
"buildchain-ref",
|
|
413
418
|
"buildchain-repository",
|
|
419
|
+
"cargo-registry-index",
|
|
414
420
|
"checkout-cache-fallback",
|
|
415
421
|
"checkout-cache-fetch-attempts",
|
|
416
422
|
"checkout-cache-github-timeout-seconds",
|
|
@@ -438,13 +444,19 @@
|
|
|
438
444
|
"require-trusted-event",
|
|
439
445
|
"require-verify",
|
|
440
446
|
"runner-preset",
|
|
447
|
+
"rust-toolchain",
|
|
448
|
+
"rustup-dist-server",
|
|
449
|
+
"rustup-update-root",
|
|
441
450
|
"sample-process-tree",
|
|
442
451
|
"setup-node",
|
|
452
|
+
"setup-rust",
|
|
453
|
+
"shifu-cache-profile-digest",
|
|
454
|
+
"shifu-cache-profile-ref",
|
|
443
455
|
"untrusted-policy",
|
|
444
456
|
"verify-command",
|
|
445
457
|
"working-directory"
|
|
446
458
|
],
|
|
447
|
-
"inputCount":
|
|
459
|
+
"inputCount": 57
|
|
448
460
|
},
|
|
449
461
|
{
|
|
450
462
|
"id": ".bump-minor-version",
|
|
@@ -709,6 +721,7 @@
|
|
|
709
721
|
"buildchain-ref",
|
|
710
722
|
"buildchain-repository",
|
|
711
723
|
"buildchain-stable-contract-lock-path",
|
|
724
|
+
"cargo-registry-index",
|
|
712
725
|
"checkout-cache-fallback",
|
|
713
726
|
"checkout-cache-fetch-attempts",
|
|
714
727
|
"checkout-cache-github-timeout-seconds",
|
|
@@ -736,13 +749,19 @@
|
|
|
736
749
|
"require-trusted-event",
|
|
737
750
|
"require-verify",
|
|
738
751
|
"runner-preset",
|
|
752
|
+
"rust-toolchain",
|
|
753
|
+
"rustup-dist-server",
|
|
754
|
+
"rustup-update-root",
|
|
739
755
|
"sample-process-tree",
|
|
740
756
|
"setup-node",
|
|
757
|
+
"setup-rust",
|
|
758
|
+
"shifu-cache-profile-digest",
|
|
759
|
+
"shifu-cache-profile-ref",
|
|
741
760
|
"untrusted-policy",
|
|
742
761
|
"verify-command",
|
|
743
762
|
"working-directory"
|
|
744
763
|
],
|
|
745
|
-
"inputCount":
|
|
764
|
+
"inputCount": 60
|
|
746
765
|
},
|
|
747
766
|
{
|
|
748
767
|
"id": "buildchain-alpha-self-dogfood",
|
|
@@ -819,6 +838,15 @@
|
|
|
819
838
|
],
|
|
820
839
|
"inputCount": 3
|
|
821
840
|
},
|
|
841
|
+
{
|
|
842
|
+
"id": "buildchain-stable-candidate-qualification",
|
|
843
|
+
"path": ".github/workflows/buildchain-stable-candidate-qualification.yml",
|
|
844
|
+
"inputs": [
|
|
845
|
+
"candidate-sha",
|
|
846
|
+
"dry-run"
|
|
847
|
+
],
|
|
848
|
+
"inputCount": 2
|
|
849
|
+
},
|
|
822
850
|
{
|
|
823
851
|
"id": "candidate-lab",
|
|
824
852
|
"path": ".github/workflows/candidate-lab.yml",
|
|
@@ -836,12 +864,13 @@
|
|
|
836
864
|
"inputs": [
|
|
837
865
|
"buildchain-ref",
|
|
838
866
|
"buildchain-repository",
|
|
867
|
+
"mode",
|
|
839
868
|
"node-version",
|
|
840
869
|
"require-version-state",
|
|
841
870
|
"upload-artifacts",
|
|
842
871
|
"working-directory"
|
|
843
872
|
],
|
|
844
|
-
"inputCount":
|
|
873
|
+
"inputCount": 7
|
|
845
874
|
},
|
|
846
875
|
{
|
|
847
876
|
"id": "dev-pr-auto-merge",
|
|
@@ -2210,6 +2239,26 @@
|
|
|
2210
2239
|
"path": "README.md",
|
|
2211
2240
|
"command": "buildchain kfd"
|
|
2212
2241
|
},
|
|
2242
|
+
{
|
|
2243
|
+
"id": "layout",
|
|
2244
|
+
"path": "docs/binary-distribution.md",
|
|
2245
|
+
"command": "buildchain layout --json"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"id": "layout",
|
|
2249
|
+
"path": "docs/cli.md",
|
|
2250
|
+
"command": "buildchain layout --cwd"
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
"id": "layout",
|
|
2254
|
+
"path": "docs/cli.md",
|
|
2255
|
+
"command": "buildchain layout"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
"id": "layout",
|
|
2259
|
+
"path": "docs/kfd-support.md",
|
|
2260
|
+
"command": "buildchain layout --cwd"
|
|
2261
|
+
},
|
|
2213
2262
|
{
|
|
2214
2263
|
"id": "lifecycle",
|
|
2215
2264
|
"path": "docs/cli.md",
|
|
@@ -2641,9 +2690,9 @@
|
|
|
2641
2690
|
"cliRegistryPath": "dist/site/cli-registry.json",
|
|
2642
2691
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
2643
2692
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
2644
|
-
"cliRegistryDigest": "
|
|
2645
|
-
"workflowRegistryDigest": "
|
|
2646
|
-
"pageRegistryDigest": "
|
|
2693
|
+
"cliRegistryDigest": "ab57fec294efb9dde1612787bfd0d532b5bb95298b5da14a2b51a5e71b9c7dcc",
|
|
2694
|
+
"workflowRegistryDigest": "e7e3db196607ac6dbf4058552a84692c86c4e5cbcee7080c6cde9d1b71873daf",
|
|
2695
|
+
"pageRegistryDigest": "8e2240c074e8e7b08761eba80c2650e6e9b94c8a6192266bb1b5b07a8aa08d38"
|
|
2647
2696
|
},
|
|
2648
2697
|
"comparison": {
|
|
2649
2698
|
"missingCliRegistry": [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-13T04:23:40.596Z",
|
|
5
|
+
"publishedAt": "2026-07-13T04:23:40.596Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "6a389143f2635c16f68971b214f70ed1b600a329",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"package": {
|
|
34
34
|
"name": "@kungfu-tech/buildchain",
|
|
35
|
-
"version": "2.12.1-alpha.
|
|
35
|
+
"version": "2.12.1-alpha.10",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-13T04:23:40.596Z",
|
|
5
|
+
"publishedAt": "2026-07-13T04:23:40.596Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "6a389143f2635c16f68971b214f70ed1b600a329",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "2.12.1-alpha.
|
|
40
|
+
"version": "2.12.1-alpha.10",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"path": "docs/binary-distribution.md",
|
|
110
110
|
"plane": "verify",
|
|
111
111
|
"exists": true,
|
|
112
|
-
"digest": "sha256:
|
|
112
|
+
"digest": "sha256:08be4e97e1940a45a2c0aa2506012255888c23c1cbf8f5362b27c2b21089eb58"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"id": "consumer-issue-reporting",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"path": "docs/cli.md",
|
|
174
174
|
"plane": "use",
|
|
175
175
|
"exists": true,
|
|
176
|
-
"digest": "sha256:
|
|
176
|
+
"digest": "sha256:3b3ac97c353f7549229f1102cca38236e734ec8d08c219d4a6e5ef2a48fc0e16"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"id": "build-facts",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"path": "docs/kfd-support.md",
|
|
190
190
|
"plane": "verify",
|
|
191
191
|
"exists": true,
|
|
192
|
-
"digest": "sha256:
|
|
192
|
+
"digest": "sha256:ab15de33a1a9e292b6da74c00b8b96b7c46330d0553a454d1de4c24c672fc025"
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
"id": "lifecycle-protocol",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"path": "docs/lifecycle-protocol.md",
|
|
198
198
|
"plane": "use",
|
|
199
199
|
"exists": true,
|
|
200
|
-
"digest": "sha256:
|
|
200
|
+
"digest": "sha256:bef6f703a76667c731dccea6a0385b2196b5a23438ce4bc39894561530975f21"
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"id": "reusable-build-surface",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"path": "docs/reusable-build-surface.md",
|
|
206
206
|
"plane": "use",
|
|
207
207
|
"exists": true,
|
|
208
|
-
"digest": "sha256:
|
|
208
|
+
"digest": "sha256:fbc74dee3a6f2283ea69a2a9a31945ac82ccaf1d270995539f5d80235ab74614"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
"id": "publish-transaction",
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
"path": "docs/release-governance.md",
|
|
222
222
|
"plane": "why",
|
|
223
223
|
"exists": true,
|
|
224
|
-
"digest": "sha256:
|
|
224
|
+
"digest": "sha256:3ae2bbc2df394726f350e58be1a71dd0379b99b19cd6ccf15fbe3b843f3890b6"
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
"id": "release-flow",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"buildchain-contract-lock-path",
|
|
26
26
|
"buildchain-ref",
|
|
27
27
|
"buildchain-repository",
|
|
28
|
+
"cargo-registry-index",
|
|
28
29
|
"checkout-cache-fallback",
|
|
29
30
|
"checkout-cache-fetch-attempts",
|
|
30
31
|
"checkout-cache-github-timeout-seconds",
|
|
@@ -52,13 +53,19 @@
|
|
|
52
53
|
"require-trusted-event",
|
|
53
54
|
"require-verify",
|
|
54
55
|
"runner-preset",
|
|
56
|
+
"rust-toolchain",
|
|
57
|
+
"rustup-dist-server",
|
|
58
|
+
"rustup-update-root",
|
|
55
59
|
"sample-process-tree",
|
|
56
60
|
"setup-node",
|
|
61
|
+
"setup-rust",
|
|
62
|
+
"shifu-cache-profile-digest",
|
|
63
|
+
"shifu-cache-profile-ref",
|
|
57
64
|
"untrusted-policy",
|
|
58
65
|
"verify-command",
|
|
59
66
|
"working-directory"
|
|
60
67
|
],
|
|
61
|
-
"inputCount":
|
|
68
|
+
"inputCount": 57,
|
|
62
69
|
"surface": "reusable-build",
|
|
63
70
|
"capabilityGroup": "api-cli-reference",
|
|
64
71
|
"status": "active"
|
|
@@ -368,6 +375,7 @@
|
|
|
368
375
|
"buildchain-ref",
|
|
369
376
|
"buildchain-repository",
|
|
370
377
|
"buildchain-stable-contract-lock-path",
|
|
378
|
+
"cargo-registry-index",
|
|
371
379
|
"checkout-cache-fallback",
|
|
372
380
|
"checkout-cache-fetch-attempts",
|
|
373
381
|
"checkout-cache-github-timeout-seconds",
|
|
@@ -395,13 +403,19 @@
|
|
|
395
403
|
"require-trusted-event",
|
|
396
404
|
"require-verify",
|
|
397
405
|
"runner-preset",
|
|
406
|
+
"rust-toolchain",
|
|
407
|
+
"rustup-dist-server",
|
|
408
|
+
"rustup-update-root",
|
|
398
409
|
"sample-process-tree",
|
|
399
410
|
"setup-node",
|
|
411
|
+
"setup-rust",
|
|
412
|
+
"shifu-cache-profile-digest",
|
|
413
|
+
"shifu-cache-profile-ref",
|
|
400
414
|
"untrusted-policy",
|
|
401
415
|
"verify-command",
|
|
402
416
|
"working-directory"
|
|
403
417
|
],
|
|
404
|
-
"inputCount":
|
|
418
|
+
"inputCount": 60,
|
|
405
419
|
"surface": "channel-build-router",
|
|
406
420
|
"capabilityGroup": "reusable-build",
|
|
407
421
|
"status": "active"
|
|
@@ -502,6 +516,18 @@
|
|
|
502
516
|
"capabilityGroup": "governance-versioning",
|
|
503
517
|
"status": "active"
|
|
504
518
|
},
|
|
519
|
+
{
|
|
520
|
+
"id": "buildchain-stable-candidate-qualification",
|
|
521
|
+
"path": ".github/workflows/buildchain-stable-candidate-qualification.yml",
|
|
522
|
+
"inputs": [
|
|
523
|
+
"candidate-sha",
|
|
524
|
+
"dry-run"
|
|
525
|
+
],
|
|
526
|
+
"inputCount": 2,
|
|
527
|
+
"surface": "repository-patrol",
|
|
528
|
+
"capabilityGroup": "api-cli-reference",
|
|
529
|
+
"status": "repository-internal"
|
|
530
|
+
},
|
|
505
531
|
{
|
|
506
532
|
"id": "candidate-lab",
|
|
507
533
|
"path": ".github/workflows/candidate-lab.yml",
|
|
@@ -522,12 +548,13 @@
|
|
|
522
548
|
"inputs": [
|
|
523
549
|
"buildchain-ref",
|
|
524
550
|
"buildchain-repository",
|
|
551
|
+
"mode",
|
|
525
552
|
"node-version",
|
|
526
553
|
"require-version-state",
|
|
527
554
|
"upload-artifacts",
|
|
528
555
|
"working-directory"
|
|
529
556
|
],
|
|
530
|
-
"inputCount":
|
|
557
|
+
"inputCount": 7,
|
|
531
558
|
"surface": "repository-workflow",
|
|
532
559
|
"capabilityGroup": "api-cli-reference",
|
|
533
560
|
"status": "active"
|
|
@@ -38,6 +38,25 @@ Each archive is accompanied by:
|
|
|
38
38
|
- `buildchain-release-bundle.tar.gz`;
|
|
39
39
|
- `buildchain-release-bundle.json`.
|
|
40
40
|
|
|
41
|
+
## KFD-3 Distribution Declaration
|
|
42
|
+
|
|
43
|
+
Buildchain self-describes this release lane in `dist/site/kfd-claims.json` as
|
|
44
|
+
the KFD-3 surface `distribution:buildchain-standalone`. Its declaration assigns
|
|
45
|
+
registration to Shifu, names `binary:build` as the reproducible task, and lists
|
|
46
|
+
the artifact kind, platform, and path glob for all three archives. Shifu should
|
|
47
|
+
discover the registry through `buildchain layout --json`, not by copying the
|
|
48
|
+
registry path.
|
|
49
|
+
|
|
50
|
+
The repository-owned task is:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm binary:build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The release workflow still builds each target on its declared runner. The local
|
|
57
|
+
task is the stable task identity used by the KFD declaration and local smoke
|
|
58
|
+
checks; it does not replace the three-platform release matrix.
|
|
59
|
+
|
|
41
60
|
## Runner Policy
|
|
42
61
|
|
|
43
62
|
Production binary builds use GitHub-hosted runners:
|
|
@@ -69,7 +88,7 @@ offline review, mirroring, or site ingestion.
|
|
|
69
88
|
## Local Smoke
|
|
70
89
|
|
|
71
90
|
```bash
|
|
72
|
-
|
|
91
|
+
pnpm binary:build -- --version v0.0.0-local
|
|
73
92
|
node bin/buildchain.mjs collect github-release \
|
|
74
93
|
--tag v0.0.0-local \
|
|
75
94
|
--assets-dir dist/binary \
|
package/docs/cli.md
CHANGED
|
@@ -77,6 +77,7 @@ import { verifyReleasePassport } from "@kungfu-tech/buildchain/release-passport"
|
|
|
77
77
|
import { createReleasePropagationPlan } from "@kungfu-tech/buildchain/release-propagation";
|
|
78
78
|
import { planReleaseLineBootstrap } from "@kungfu-tech/buildchain/release-line-bootstrap";
|
|
79
79
|
import { collectPublicSurfaceReverseAudit } from "@kungfu-tech/buildchain/public-surface-audit";
|
|
80
|
+
import { createBuildchainLayoutDiscovery } from "@kungfu-tech/buildchain/buildchain-layout";
|
|
80
81
|
import contractWorld from "@kungfu-tech/buildchain/site/buildchain-contract.json" with { type: "json" };
|
|
81
82
|
import capabilityRegistry from "@kungfu-tech/buildchain/site/capability-registry.json" with { type: "json" };
|
|
82
83
|
import manualRegistry from "@kungfu-tech/buildchain/site/manual-registry.json" with { type: "json" };
|
|
@@ -90,6 +91,22 @@ floating-ref contract world for a runtime such as `@v2`.
|
|
|
90
91
|
|
|
91
92
|
## Commands
|
|
92
93
|
|
|
94
|
+
`buildchain layout` is the stable machine question for repository layout. Tools
|
|
95
|
+
such as Shifu should call it instead of copying `.buildchain/` path constants:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
buildchain layout --cwd /path/to/repository --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The result identifies the Buildchain version pin, repository root and config,
|
|
102
|
+
the canonical and currently resolved KFD-3 registry paths, and the KFD field
|
|
103
|
+
used to declare Shifu jurisdiction. A repository is in Shifu's distribution
|
|
104
|
+
jurisdiction only when a KFD-3 surface explicitly declares
|
|
105
|
+
`distribution.registrar="shifu"`; the presence of Buildchain configuration is
|
|
106
|
+
not sufficient. The same contract is available through
|
|
107
|
+
`createBuildchainLayoutDiscovery()` from
|
|
108
|
+
`@kungfu-tech/buildchain/buildchain-layout`.
|
|
109
|
+
|
|
93
110
|
`buildchain init` writes a starter `.buildchain/buildchain.toml` and a reusable workflow
|
|
94
111
|
caller at `.github/workflows/build.yml`.
|
|
95
112
|
|
package/docs/kfd-support.md
CHANGED
|
@@ -279,6 +279,49 @@ detect standard public surfaces, write a small product-owned registry, audit the
|
|
|
279
279
|
registry against the current artifact/source tree, generate a release-passport
|
|
280
280
|
compatible witness, and query the resulting capability map.
|
|
281
281
|
|
|
282
|
+
## Shifu Discovery and Distribution Declarations
|
|
283
|
+
|
|
284
|
+
Buildchain owns the repository-layout question; product tools must not copy its
|
|
285
|
+
internal paths. Shifu and other consumers use this sequence:
|
|
286
|
+
|
|
287
|
+
1. read the welded `.buildchain-version` pin to select Buildchain;
|
|
288
|
+
2. run `buildchain layout --cwd <repository> --json`;
|
|
289
|
+
3. read the returned `kfd.registries["kfd-3"].path`;
|
|
290
|
+
4. treat a surface as Shifu-managed only when its declaration contains
|
|
291
|
+
`distribution.registrar="shifu"`.
|
|
292
|
+
|
|
293
|
+
The layout response uses the
|
|
294
|
+
`kungfu-buildchain-layout-discovery` contract with an explicit schema version.
|
|
295
|
+
Changing or removing its fields is a public contract change. Consumers must not
|
|
296
|
+
fall back to a hard-coded registry location when the command is unavailable or
|
|
297
|
+
returns an unsupported contract.
|
|
298
|
+
|
|
299
|
+
A Shifu distribution declaration must contain at least one task and one
|
|
300
|
+
artifact. Every artifact declares `kind`, `platform`, and `pathGlob`; an
|
|
301
|
+
optional `sha256` is a lowercase 64-character hexadecimal digest. This makes
|
|
302
|
+
artifact form and platform machine-readable without asking Shifu to infer them
|
|
303
|
+
from filenames:
|
|
304
|
+
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"distribution": {
|
|
308
|
+
"registrar": "shifu",
|
|
309
|
+
"tasks": ["binary:build"],
|
|
310
|
+
"artifacts": [
|
|
311
|
+
{
|
|
312
|
+
"kind": "binary",
|
|
313
|
+
"platform": "linux",
|
|
314
|
+
"pathGlob": "dist/binary/example-x86_64-unknown-linux-gnu.tar.gz"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Buildchain validates this shape whenever a KFD-3 registry is read or written.
|
|
322
|
+
Repositories that do not declare the registrar remain outside Shifu's
|
|
323
|
+
distribution jurisdiction.
|
|
324
|
+
|
|
282
325
|
## Detected, Declared, Enforced
|
|
283
326
|
|
|
284
327
|
KFD-3 surface registration uses three states.
|
|
@@ -402,7 +445,7 @@ Buildchain dogfoods this model in two ways:
|
|
|
402
445
|
`buildchain kfd 2 trust-assessment --json` expose and validate the KFD
|
|
403
446
|
package's foundation KFD-2 trust facts against the latest KFD taxonomy;
|
|
404
447
|
- `dist/site/kfd-claims.json` declares Buildchain's own KFD-3 collaboration
|
|
405
|
-
interface;
|
|
448
|
+
interface, including a Shifu-owned standalone binary distribution surface;
|
|
406
449
|
- `buildchain kfd 3 query buildchain --json` resolves the packaged
|
|
407
450
|
Buildchain capability map from that site fact source.
|
|
408
451
|
|
|
@@ -158,6 +158,9 @@ commands = [
|
|
|
158
158
|
"pnpm run package",
|
|
159
159
|
]
|
|
160
160
|
|
|
161
|
+
[lifecycle.check]
|
|
162
|
+
command = "pnpm run check:source"
|
|
163
|
+
|
|
161
164
|
[lifecycle.verify]
|
|
162
165
|
shell = "bash"
|
|
163
166
|
script = """
|
|
@@ -167,6 +170,15 @@ git diff --check
|
|
|
167
170
|
"""
|
|
168
171
|
```
|
|
169
172
|
|
|
173
|
+
`lifecycle.check` is the repository-owned source-acceptance gate. It should
|
|
174
|
+
validate the checked-out source revision without entering the build, artifact,
|
|
175
|
+
or release lifecycle. Consumers can run it on GitHub-hosted Linux through
|
|
176
|
+
`.github/workflows/check.yml@v2` with `mode: source`; the reusable workflow runs
|
|
177
|
+
only `lifecycle.install` and `lifecycle.check`. The default `mode: verify`
|
|
178
|
+
continues to run `lifecycle.install` and `lifecycle.verify` for existing callers.
|
|
179
|
+
The reusable job name remains `check`, and `upload-artifacts: false` disables
|
|
180
|
+
evidence upload without changing the job conclusion used by branch protection.
|
|
181
|
+
|
|
170
182
|
Shared environment variables can be declared once:
|
|
171
183
|
|
|
172
184
|
```toml
|
|
@@ -412,6 +412,13 @@ Consumers that want Buildchain to own the check wrapper can call
|
|
|
412
412
|
`lifecycle.install` and `lifecycle.verify` stages and fails the `check` job when
|
|
413
413
|
either declaration is missing or the command exits non-zero.
|
|
414
414
|
|
|
415
|
+
Development pull requests that need source acceptance without product build or
|
|
416
|
+
artifact verification can opt into `mode: source`. That mode runs only
|
|
417
|
+
`lifecycle.install` and `lifecycle.check` on GitHub-hosted `ubuntu-24.04` while
|
|
418
|
+
preserving the stable `check / check` required-check context. Existing callers
|
|
419
|
+
remain on `mode: verify` by default, and callers may set
|
|
420
|
+
`upload-artifacts: false` without weakening the job conclusion.
|
|
421
|
+
|
|
415
422
|
Typical consumer wrapper:
|
|
416
423
|
|
|
417
424
|
```yaml
|
|
@@ -162,6 +162,43 @@ Artifact names, manifest paths, expected artifact checks, publish-source locks,
|
|
|
162
162
|
and aggregate summaries are the same in both jobs. The split is an execution
|
|
163
163
|
detail, not a different artifact contract.
|
|
164
164
|
|
|
165
|
+
## Native Rust Toolchains
|
|
166
|
+
|
|
167
|
+
Native lifecycle jobs can request an isolated Rust installation instead of
|
|
168
|
+
depending on a self-hosted runner user's PATH:
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
with:
|
|
172
|
+
setup-rust: true
|
|
173
|
+
rust-toolchain: "1.96.0"
|
|
174
|
+
rustup-dist-server: "https://rsproxy.cn"
|
|
175
|
+
rustup-update-root: "https://rsproxy.cn/rustup"
|
|
176
|
+
cargo-registry-index: ${{ vars.BUILDCHAIN_CARGO_REGISTRY_INDEX }}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`setup-rust` defaults to `false`, so existing consumers are unchanged. When it
|
|
180
|
+
is enabled, Buildchain installs `rust-toolchain` before the install, build, and
|
|
181
|
+
verify lifecycle stages on every native matrix platform. Windows uses the
|
|
182
|
+
official rustup bootstrap through `cmd.exe` and `curl.exe` into runner-temporary
|
|
183
|
+
Cargo and rustup homes, so it works under a restrictive PowerShell execution
|
|
184
|
+
policy and the service account does not depend on another user's PATH or mutate
|
|
185
|
+
host toolchain state. Pin an exact toolchain for release builds. Linux container jobs continue
|
|
186
|
+
to obtain Rust from their digest-pinned image contract; Buildchain does not
|
|
187
|
+
mutate that container surface.
|
|
188
|
+
|
|
189
|
+
The rustup server inputs are optional and default to Rust's official servers.
|
|
190
|
+
Consumers behind a slow cross-border link may select a trusted transport mirror;
|
|
191
|
+
rustup still verifies the selected toolchain's distribution metadata and
|
|
192
|
+
component checksums.
|
|
193
|
+
|
|
194
|
+
`cargo-registry-index` is also optional. When set, Buildchain exposes it to
|
|
195
|
+
Cargo as `CARGO_REGISTRIES_CRATES_IO_INDEX` for every native lifecycle stage,
|
|
196
|
+
so a self-hosted runner can use a repository or organization variable without
|
|
197
|
+
committing private LAN topology to public workflow YAML. The endpoint must be a
|
|
198
|
+
crates.io-compatible index whose `config.json` download contract serves the
|
|
199
|
+
matching checksum-verified crate archives. An empty value preserves Cargo's
|
|
200
|
+
normal crates.io behavior.
|
|
201
|
+
|
|
165
202
|
The container image provides `fnm` but does not preinstall Node. Buildchain uses
|
|
166
203
|
`fnm` inside the container to install the requested `node-version` before it
|
|
167
204
|
runs Buildchain runtime scripts or lifecycle actions.
|
|
@@ -289,6 +326,38 @@ also pass `buildchain-ref: v2-alpha` explicitly; official floating refs are
|
|
|
289
326
|
ordinary channel selections and are allowed on pull requests and pushes. Train
|
|
290
327
|
refs and exact SHAs remain trusted manual overrides.
|
|
291
328
|
|
|
329
|
+
## Shifu Cache Profile Passthrough
|
|
330
|
+
|
|
331
|
+
Buildchain can carry one trusted Shifu cache-profile reference and its exact
|
|
332
|
+
digest into lifecycle execution. Its contract is an opaque reference and digest
|
|
333
|
+
only. This surface is deliberately opaque:
|
|
334
|
+
Buildchain does not fetch the profile, parse JSON, select cache services,
|
|
335
|
+
rewrite bindings, decide fallback, or emit Shifu resolution evidence. Those
|
|
336
|
+
semantics remain owned by the consumer's pinned Shifu implementation.
|
|
337
|
+
|
|
338
|
+
```yaml
|
|
339
|
+
jobs:
|
|
340
|
+
build:
|
|
341
|
+
uses: kungfu-systems/buildchain/.github/workflows/build.yml@v2
|
|
342
|
+
with:
|
|
343
|
+
shifu-cache-profile-ref: ${{ vars.SHIFU_CACHE_PROFILE_REF }}
|
|
344
|
+
shifu-cache-profile-digest: ${{ vars.SHIFU_CACHE_PROFILE_DIGEST }}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
The reusable workflow passes the pair as `SHIFU_CACHE_PROFILE_REF` and
|
|
348
|
+
`SHIFU_CACHE_PROFILE_DIGEST` to install, build, and verify lifecycle commands.
|
|
349
|
+
The consumer must invoke its Shifu cache-aware execution surface. An empty pair
|
|
350
|
+
preserves existing behavior; a consumer Shifu should fail closed when exactly
|
|
351
|
+
one value is present or the resolved bytes do not match the expected digest.
|
|
352
|
+
|
|
353
|
+
Use trusted repository or organization variables rather than PR-controlled
|
|
354
|
+
files for private/LAN references. The variables must remain secret-free; any
|
|
355
|
+
credentials use a separate provider-approved secret surface and must not be
|
|
356
|
+
embedded in the profile reference. This passthrough is separate from
|
|
357
|
+
Buildchain's locked source checkout cache below: Buildchain owns checkout
|
|
358
|
+
transport and source identity, while Shifu owns post-checkout execution cache
|
|
359
|
+
bindings and receipts.
|
|
360
|
+
|
|
292
361
|
## Locked Source Checkout Cache
|
|
293
362
|
|
|
294
363
|
Self-hosted runners that build large repositories can opt into a locked checkout
|
|
@@ -43,6 +43,22 @@ alphas for that exact stable version are closed because that immutable stable
|
|
|
43
43
|
version has been consumed; their later product changes continue through the
|
|
44
44
|
next patch alpha prepared by the normal release transaction.
|
|
45
45
|
|
|
46
|
+
For Buildchain's own release line, successful Alpha Self-Dogfood starts an
|
|
47
|
+
idempotent qualification producer for the exact alpha SHA. It dispatches the
|
|
48
|
+
existing `Build Surface Fixture` at the immutable exact tag, runs the existing
|
|
49
|
+
`site-libkungfu-dev` no-apply canary with the exact SHA, and writes the declared
|
|
50
|
+
commit-status attestation only after that authoritative canary succeeds. The
|
|
51
|
+
producer creates evidence only: Patrol still owns qualification and selection,
|
|
52
|
+
and the normal source-lock PR, stable gate, transaction, and branch protections
|
|
53
|
+
remain mandatory.
|
|
54
|
+
|
|
55
|
+
Cross-repository dispatch and repository-local attestation use separate tokens.
|
|
56
|
+
The promotion token can start the no-apply consumer workflow, while the
|
|
57
|
+
repository-scoped Actions token writes the status as `github-actions[bot]` only
|
|
58
|
+
after the producer has observed the successful authoritative workflow run. The
|
|
59
|
+
stable gate still verifies the workflow identity, exact runtime SHA, target URL,
|
|
60
|
+
and allowed attestor before accepting that status.
|
|
61
|
+
|
|
46
62
|
## Repository policy
|
|
47
63
|
|
|
48
64
|
Declare the default once in `.buildchain/buildchain.toml`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "2.12.1-alpha.
|
|
3
|
+
"version": "2.12.1-alpha.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
|
|
6
6
|
"repository": "https://github.com/kungfu-systems/buildchain",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"check:site": "node scripts/generate-site-bundle.mjs --check",
|
|
85
85
|
"test:unit": "node --test tests/*.test.mjs",
|
|
86
86
|
"build": "pnpm -r --filter \"./actions/**\" build",
|
|
87
|
+
"binary:build": "node scripts/build-standalone-binary.mjs",
|
|
87
88
|
"package": "npm pack --dry-run --json --registry=https://registry.npmjs.org/",
|
|
88
89
|
"pack:check": "npm pack --dry-run --json --registry=https://registry.npmjs.org/"
|
|
89
90
|
},
|