@kungfu-tech/buildchain 2.12.9-alpha.1 → 2.13.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/actions/run-lifecycle/README.md +5 -0
  2. package/bin/buildchain.mjs +62 -0
  3. package/dist/site/buildchain-contract.json +33 -23
  4. package/dist/site/buildchain-site.json +72 -36
  5. package/dist/site/capability-registry.json +3 -3
  6. package/dist/site/cli-registry.json +24 -0
  7. package/dist/site/controller-registry.json +11 -3
  8. package/dist/site/kfd-claims.json +64 -13
  9. package/dist/site/kfd-upstream-aggregate.json +1 -1
  10. package/dist/site/manual-registry.json +9 -9
  11. package/dist/site/node-api-registry.json +19 -6
  12. package/dist/site/page-registry.json +59 -23
  13. package/dist/site/public-surface-audit.json +47 -10
  14. package/dist/site/publication-registry.json +4 -4
  15. package/dist/site/release-provenance.json +1 -0
  16. package/dist/site/site-manifest.json +13 -13
  17. package/dist/site/workflow-registry.json +7 -4
  18. package/docs/MAP.md +1 -0
  19. package/docs/artifact-verification-envelope.md +113 -0
  20. package/docs/cli.md +22 -0
  21. package/docs/install.md +1 -3
  22. package/docs/publish-transaction.md +1 -1
  23. package/docs/release-candidate.md +5 -0
  24. package/docs/release-governance.md +7 -5
  25. package/docs/release-propagation.md +3 -0
  26. package/docs/reusable-build-surface.md +13 -0
  27. package/docs/versioning.md +1 -0
  28. package/package.json +2 -1
  29. package/packages/core/README.md +13 -0
  30. package/packages/core/artifact-passport.js +6 -1
  31. package/packages/core/artifact-verification-envelope.js +386 -0
  32. package/packages/core/buildchain-config.js +6 -2
  33. package/packages/core/controller-evidence.js +2 -3
  34. package/packages/core/index.js +10 -0
  35. package/packages/core/release-line-bootstrap.js +24 -0
  36. package/scripts/check-inventory.mjs +5 -0
  37. package/scripts/generate-site-bundle.mjs +4 -0
  38. package/scripts/release-candidate-resolver.mjs +52 -29
  39. package/scripts/run-lifecycle-core.mjs +50 -6
@@ -18,6 +18,11 @@ When `command` is provided, it overrides `buildchain.toml` for that invocation.
18
18
  When `command` is empty, the action loads `buildchain.toml` and runs the named
19
19
  stage.
20
20
 
21
+ `timeout-minutes` defaults to 120 and bounds either command source. A
22
+ stage-specific `timeout_minutes` in `buildchain.toml` takes precedence. Timeout
23
+ errors identify the lifecycle stage and platform so a hung self-hosted build can
24
+ be diagnosed after the runner is released.
25
+
21
26
  The action writes both a full manifest and a compact summary. It also exposes
22
27
  the summary as outputs for reusable workflow callers:
23
28
 
@@ -41,6 +41,10 @@ import {
41
41
  explainArtifactPassport,
42
42
  verifyArtifactPassport,
43
43
  } from "../packages/core/artifact-passport.js";
44
+ import {
45
+ projectArtifactVerificationEnvelopeToKfx,
46
+ verifyArtifactVerificationEnvelope,
47
+ } from "../packages/core/artifact-verification-envelope.js";
44
48
  import {
45
49
  checkBadgeBundleBlock,
46
50
  checkReadmeBadgeBlock,
@@ -163,6 +167,14 @@ function usage() {
163
167
  [--passport <file-or-url>] [--locator-config <json>]
164
168
  [--repository <owner/repo>] [--tag <tag>]
165
169
  [--npm-registry <url>] [--json]
170
+ buildchain verify artifact-envelope <file-or-json> [--assessment-time <epoch>]
171
+ [--expected-root <sha256:...>] [--expected-issuer <issuer>]
172
+ [--expected-publisher <publisher>]
173
+ [--expected-contract <version>] [--json]
174
+ buildchain project kfx-admission <file-or-json> [--assessment-time <epoch>]
175
+ [--expected-root <sha256:...>] [--expected-issuer <issuer>]
176
+ [--expected-publisher <publisher>]
177
+ [--expected-contract <version>] [--json]
166
178
  buildchain verify infra-contract-evidence-bundle <file> [--json]
167
179
  buildchain verify observability-log <jsonl> [--min-events <n>]
168
180
  [--require-phase <csv>]
@@ -257,6 +269,8 @@ Examples:
257
269
  buildchain verify publication-admission admission.json --registry-json publication-authority-registry.json --runner-json runner.json --control-plane-audit-json control-plane.json --expected-json expected.json --json
258
270
  buildchain audit publication-control-plane --repository kungfu-systems/buildchain --branch release/v2/v2.12
259
271
  buildchain verify artifact ./dist/buildchain-x86_64-unknown-linux-gnu.tar.gz --passport .buildchain/release-passport/buildchain.release.json
272
+ buildchain verify artifact-envelope .buildchain/kfx/artifact-verification-envelope.json --json
273
+ buildchain project kfx-admission .buildchain/kfx/artifact-verification-envelope.json --json
260
274
  buildchain verify infra-contract-evidence-bundle .buildchain/infra-contract-evidence-bundle.json
261
275
  buildchain verify observability-log .buildchain/logs/events.jsonl --min-events 4 --require-phase build
262
276
  buildchain infra-contract --mode plan --source-sha <sha>
@@ -302,6 +316,17 @@ function readRepeatedFlag(args, name) {
302
316
  return values;
303
317
  }
304
318
 
319
+ function artifactEnvelopeOptions(args) {
320
+ const assessmentTime = readFlag(args, "assessment-time", "");
321
+ return {
322
+ ...(assessmentTime ? { assessmentTime: Number(assessmentTime) } : {}),
323
+ expectedEnvelopeRoot: readFlag(args, "expected-root", ""),
324
+ expectedIssuer: readFlag(args, "expected-issuer", ""),
325
+ expectedPublisher: readFlag(args, "expected-publisher", ""),
326
+ expectedContractVersion: readFlag(args, "expected-contract", ""),
327
+ };
328
+ }
329
+
305
330
  function readAttributes(args) {
306
331
  const attributes = {};
307
332
  for (const value of readRepeatedFlag(args, "attribute")) {
@@ -1696,6 +1721,23 @@ async function main(argv = process.argv.slice(2)) {
1696
1721
  return;
1697
1722
  }
1698
1723
 
1724
+ if (command === "project") {
1725
+ const [subcommand = "", location = "", ...projectArgs] = args;
1726
+ if (subcommand !== "kfx-admission" || !location) {
1727
+ throw new Error("usage: buildchain project kfx-admission <file-or-json>");
1728
+ }
1729
+ const projection = projectArtifactVerificationEnvelopeToKfx({
1730
+ envelope: readJsonInput(location, { label: "artifact verification envelope" }),
1731
+ ...artifactEnvelopeOptions(projectArgs),
1732
+ });
1733
+ if (readBooleanFlag(projectArgs, "json")) {
1734
+ printJson(projection);
1735
+ } else {
1736
+ process.stdout.write(`KFX admission envelope: ${projection.envelopeRoot}\n`);
1737
+ }
1738
+ return;
1739
+ }
1740
+
1699
1741
  if (command === "verify") {
1700
1742
  const [subcommand = "", location = "", ...verifyArgs] = args;
1701
1743
  if (subcommand === "publication-admission") {
@@ -1755,6 +1797,26 @@ async function main(argv = process.argv.slice(2)) {
1755
1797
  process.exitCode = report.ok ? 0 : 1;
1756
1798
  return;
1757
1799
  }
1800
+ if (subcommand === "artifact-envelope") {
1801
+ if (!location) {
1802
+ throw new Error("usage: buildchain verify artifact-envelope <file-or-json>");
1803
+ }
1804
+ const report = verifyArtifactVerificationEnvelope({
1805
+ envelope: readJsonInput(location, { label: "artifact verification envelope" }),
1806
+ ...artifactEnvelopeOptions(verifyArgs),
1807
+ });
1808
+ if (readBooleanFlag(verifyArgs, "json")) {
1809
+ printJson(report);
1810
+ } else {
1811
+ process.stdout.write(`artifact verification envelope: ${report.outcome}\n`);
1812
+ process.stdout.write(`root: ${report.envelopeRoot || "unresolved"}\n`);
1813
+ for (const entry of report.issues) {
1814
+ process.stdout.write(`- ${entry.level}: ${entry.code}: ${entry.message}\n`);
1815
+ }
1816
+ }
1817
+ process.exitCode = report.ok ? 0 : 1;
1818
+ return;
1819
+ }
1758
1820
  if (subcommand === "observability-log") {
1759
1821
  if (!location) {
1760
1822
  throw new Error("usage: buildchain verify observability-log <jsonl>");
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "2.12.9-alpha.1",
7
+ "version": "2.13.0-alpha.0",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -50,7 +50,7 @@
50
50
  "retryable GitHub fallback fetches use a bounded attempt budget before exact source SHA and tree verification"
51
51
  ],
52
52
  "breakingDigest": "sha256:a6a35370d6b0d0f46e1b2712dcc01961fe53c2febde95409a27a485c10a36650",
53
- "auditDigest": "sha256:16d2f926174dd25fdb7f44d152b3d96808c0eccda2f2b5540a988d12539da30e"
53
+ "auditDigest": "sha256:07f01d270d7f5712be067697f652b5843a07748696c0d2b8b2020639108c669d"
54
54
  },
55
55
  {
56
56
  "contractVersion": 1,
@@ -89,7 +89,7 @@
89
89
  "alpha and stable channel selections use separate consumer contract locks by default"
90
90
  ],
91
91
  "breakingDigest": "sha256:c4597dfa89e1a58f1023905092b849644f5c080abf150aeba9c7e1cd5ed43962",
92
- "auditDigest": "sha256:ced442c3c5617448c52668e0e42dec98476e6f09728c37e08a13cffcd207dbf2"
92
+ "auditDigest": "sha256:6ad0e430ea0f68ee6756cbc5a9b89f2d14738bb842488c25e888eb808a3136e1"
93
93
  },
94
94
  {
95
95
  "contractVersion": 1,
@@ -159,7 +159,7 @@
159
159
  "GitHub Release passport and evidence publication is delegated to promote-buildchain-ref after the semver release transaction completes"
160
160
  ],
161
161
  "breakingDigest": "sha256:6dbae32ce3d7aab3be6957065105af574794581847b7637314dad45f5349c919",
162
- "auditDigest": "sha256:3de1fbbaad4c5b09cf958bed1aeba4fd9a3e101baa96076088c9c4a91c2d9784"
162
+ "auditDigest": "sha256:3d3eec3ea3ed1b2621056f551a20543fb2b01eab985ac70c15a304e7a4bac7cc"
163
163
  },
164
164
  {
165
165
  "contractVersion": 1,
@@ -437,7 +437,7 @@
437
437
  "README badge block checks and writes are generated from machine-readable repository facts"
438
438
  ],
439
439
  "breakingDigest": "sha256:90a73892b2d6c214048448d5f45df75639bdf7b7e8fefd9c596e04b087407bcc",
440
- "auditDigest": "sha256:6b388928ae928d679c36bfac7b45987ee7b6761b8ac141b72e4f60155a7110ec"
440
+ "auditDigest": "sha256:5bbdc589ebfe1677f0f62de0561d2c3d4cba1e35616f2b952b695f9f0e4756b3"
441
441
  },
442
442
  {
443
443
  "contractVersion": 1,
@@ -527,7 +527,7 @@
527
527
  "manual entries carry source file digests so downstream sites and agents can detect stale hand-written documentation"
528
528
  ],
529
529
  "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2",
530
- "auditDigest": "sha256:2802068f68b5de5017053ba96d936c3c27d8931c4577828916b6337f790f7dc8"
530
+ "auditDigest": "sha256:7c9ecc33a15ecee16159175770f04ad8c9b7712e4c244b5fd9478c5eaa03cab7"
531
531
  },
532
532
  {
533
533
  "contractVersion": 1,
@@ -549,7 +549,7 @@
549
549
  "agents can discover supported Node APIs without importing internal file paths"
550
550
  ],
551
551
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
552
- "auditDigest": "sha256:c8026ded876e5eb3fb4e709747768f95328a80edc36fd148a0929287605b09f3"
552
+ "auditDigest": "sha256:5bb037f6e40d185df0573fa0323e8f9337d2c809d172afeecf1935dd24101e53"
553
553
  },
554
554
  {
555
555
  "contractVersion": 1,
@@ -600,7 +600,7 @@
600
600
  "controllerDescriptor": {
601
601
  "contract": "buildchain.controller-descriptor/v1",
602
602
  "digest": "sha256:373723a73d188194d389dee04c394d3b79cb0c016a370f2f5d0f60979a02ed48",
603
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
603
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
604
604
  "inputClassifications": {
605
605
  "buildchain-ref": {
606
606
  "classification": "included",
@@ -713,6 +713,7 @@
713
713
  "expected-artifacts-json",
714
714
  "gate-profile-aggregate-json",
715
715
  "install-command",
716
+ "lifecycle-timeout-minutes",
716
717
  "linux-container-image",
717
718
  "linux-container-preset",
718
719
  "node-version",
@@ -745,8 +746,8 @@
745
746
  ],
746
747
  "controllerDescriptor": {
747
748
  "contract": "buildchain.controller-descriptor/v1",
748
- "digest": "sha256:ce2ada5daf86cbe6e58327c190fdfe07510952cc8820cf445eb4342daae4da18",
749
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
749
+ "digest": "sha256:367be236280f2597ffefc49680feb106b4cf9e8f5fb9420713351f075a168c4a",
750
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
750
751
  "inputClassifications": {
751
752
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN": {
752
753
  "classification": "redacted",
@@ -876,6 +877,10 @@
876
877
  "classification": "digest-only",
877
878
  "source": "workflow-call-input"
878
879
  },
880
+ "lifecycle-timeout-minutes": {
881
+ "classification": "included",
882
+ "source": "workflow-call-input"
883
+ },
879
884
  "linux-container-image": {
880
885
  "classification": "digest-only",
881
886
  "source": "workflow-call-input"
@@ -1001,7 +1006,7 @@
1001
1006
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
1002
1007
  ],
1003
1008
  "breakingDigest": "sha256:e264a79f9f399038c2fcfd21e4168c68c2e1485ee5c651c02242a02b622ac2be",
1004
- "auditDigest": "sha256:16d2f926174dd25fdb7f44d152b3d96808c0eccda2f2b5540a988d12539da30e"
1009
+ "auditDigest": "sha256:07f01d270d7f5712be067697f652b5843a07748696c0d2b8b2020639108c669d"
1005
1010
  },
1006
1011
  {
1007
1012
  "contractVersion": 1,
@@ -1074,6 +1079,7 @@
1074
1079
  "expected-artifacts-json",
1075
1080
  "gate-profile-aggregate-json",
1076
1081
  "install-command",
1082
+ "lifecycle-timeout-minutes",
1077
1083
  "linux-container-image",
1078
1084
  "linux-container-preset",
1079
1085
  "node-version",
@@ -1106,8 +1112,8 @@
1106
1112
  ],
1107
1113
  "controllerDescriptor": {
1108
1114
  "contract": "buildchain.controller-descriptor/v1",
1109
- "digest": "sha256:0ed17d03e410ca1b7726422716522a5e9096eee7badb197401291d53198518ea",
1110
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
1115
+ "digest": "sha256:2e113607af3cb0a17b4da64b8758652a4bee4a162656ce7256a8e06de3d4cf2f",
1116
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
1111
1117
  "inputClassifications": {
1112
1118
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN": {
1113
1119
  "classification": "redacted",
@@ -1249,6 +1255,10 @@
1249
1255
  "classification": "digest-only",
1250
1256
  "source": "workflow-call-input"
1251
1257
  },
1258
+ "lifecycle-timeout-minutes": {
1259
+ "classification": "included",
1260
+ "source": "workflow-call-input"
1261
+ },
1252
1262
  "linux-container-image": {
1253
1263
  "classification": "digest-only",
1254
1264
  "source": "workflow-call-input"
@@ -1374,7 +1384,7 @@
1374
1384
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
1375
1385
  ],
1376
1386
  "breakingDigest": "sha256:d40dd05d7e07473d4b2dc1b62fbb0ed6f06449b4d3a7c44a2e8014313e3c0273",
1377
- "auditDigest": "sha256:ced442c3c5617448c52668e0e42dec98476e6f09728c37e08a13cffcd207dbf2"
1387
+ "auditDigest": "sha256:6ad0e430ea0f68ee6756cbc5a9b89f2d14738bb842488c25e888eb808a3136e1"
1378
1388
  },
1379
1389
  {
1380
1390
  "contractVersion": 1,
@@ -1433,7 +1443,7 @@
1433
1443
  "controllerDescriptor": {
1434
1444
  "contract": "buildchain.controller-descriptor/v1",
1435
1445
  "digest": "sha256:29569f4b754595792a16742d1c4c63838b54601674a2cb6c96261a72c962dece",
1436
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
1446
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
1437
1447
  "inputClassifications": {
1438
1448
  "artifact-name": {
1439
1449
  "classification": "included",
@@ -1603,7 +1613,7 @@
1603
1613
  "controllerDescriptor": {
1604
1614
  "contract": "buildchain.controller-descriptor/v1",
1605
1615
  "digest": "sha256:f08c4970f33c059f8e0b43110f0063172fb1015ac914bdb0c8e9646692fb9f06",
1606
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
1616
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
1607
1617
  "inputClassifications": {
1608
1618
  "artifact-path": {
1609
1619
  "classification": "digest-only",
@@ -1835,7 +1845,7 @@
1835
1845
  "controllerDescriptor": {
1836
1846
  "contract": "buildchain.controller-descriptor/v1",
1837
1847
  "digest": "sha256:6b132790b9798e8a5dfbe095701d8e024c160a08bc7c4bd477ee79feef7a9cfd",
1838
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
1848
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
1839
1849
  "inputClassifications": {
1840
1850
  "artifact-name": {
1841
1851
  "classification": "included",
@@ -2016,7 +2026,7 @@
2016
2026
  "controllerDescriptor": {
2017
2027
  "contract": "buildchain.controller-descriptor/v1",
2018
2028
  "digest": "sha256:0613ea545fe2d630f34e665c8e6fe99df3f5333d75051a7176e9cf991e494f59",
2019
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
2029
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
2020
2030
  "inputClassifications": {
2021
2031
  "artifact-name": {
2022
2032
  "classification": "included",
@@ -2287,7 +2297,7 @@
2287
2297
  "controllerDescriptor": {
2288
2298
  "contract": "buildchain.controller-descriptor/v1",
2289
2299
  "digest": "sha256:c5dfeb63bbe3507e3c58f74e2a5792e6558002e3aafab6453cc8b8837db2a729",
2290
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
2300
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
2291
2301
  "inputClassifications": {
2292
2302
  "BUILDCHAIN_ISSUE_APP_ID": {
2293
2303
  "classification": "redacted",
@@ -2550,7 +2560,7 @@
2550
2560
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
2551
2561
  ],
2552
2562
  "breakingDigest": "sha256:46238f8fc3c20924decc57ecad142a462fc4739c6bc21409d5cd2457fc1c3cdd",
2553
- "auditDigest": "sha256:3de1fbbaad4c5b09cf958bed1aeba4fd9a3e101baa96076088c9c4a91c2d9784"
2563
+ "auditDigest": "sha256:3d3eec3ea3ed1b2621056f551a20543fb2b01eab985ac70c15a304e7a4bac7cc"
2554
2564
  },
2555
2565
  {
2556
2566
  "contractVersion": 1,
@@ -2608,7 +2618,7 @@
2608
2618
  "controllerDescriptor": {
2609
2619
  "contract": "buildchain.controller-descriptor/v1",
2610
2620
  "digest": "sha256:9b9f9a2320c4349903d72ee46e329211b5538ed5ebebaa93559df4eafb835997",
2611
- "registryDigest": "sha256:22be9d05109396f2b5c44a74fb0f67e4a554c462662c5a41e44e466c4d90ed04",
2621
+ "registryDigest": "sha256:710205201c2f18c442bdda7247d70e34da81c9bdb151658af93be73b29f1d90f",
2612
2622
  "inputClassifications": {
2613
2623
  "buildchain-ref": {
2614
2624
  "classification": "included",
@@ -2675,9 +2685,9 @@
2675
2685
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
2676
2686
  ],
2677
2687
  "breakingDigest": "sha256:d7a1f15990ce8bd13149474888232c7d4451dd2a49bebf4d4ce1336695da430e",
2678
- "auditDigest": "sha256:e7d0cc13b9d6f19e7cd77b650693f0d615b919796d075041d74876e6ca58716f"
2688
+ "auditDigest": "sha256:d94cab26784b13d57920b7cd6acc1db3b5569d0db0a8771f0932884b9b02493d"
2679
2689
  }
2680
2690
  ],
2681
2691
  "compatibilityDigest": "sha256:af162b86ab4506e9b5f1d3c59b41f3fd57fbad79ff4d749a7f12ff16460517f8",
2682
- "contractDigest": "sha256:9b3c0ab5cf0cd35c8117acd085389554be823e6ac49b076335f6c4581fee484d"
2692
+ "contractDigest": "sha256:94eae2beada1653ee57a21b440cb8b3b1a29da07b9723c691dcea919ae121ffa"
2683
2693
  }