@kungfu-tech/buildchain 2.12.9-alpha.0 → 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 (37) 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 +66 -30
  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 +7 -7
  11. package/dist/site/node-api-registry.json +19 -6
  12. package/dist/site/page-registry.json +55 -19
  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 +11 -11
  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/release-candidate.md +5 -0
  22. package/docs/release-governance.md +7 -0
  23. package/docs/release-propagation.md +3 -0
  24. package/docs/reusable-build-surface.md +13 -0
  25. package/docs/versioning.md +1 -0
  26. package/package.json +2 -1
  27. package/packages/core/README.md +13 -0
  28. package/packages/core/artifact-passport.js +6 -1
  29. package/packages/core/artifact-verification-envelope.js +386 -0
  30. package/packages/core/buildchain-config.js +6 -2
  31. package/packages/core/controller-evidence.js +2 -3
  32. package/packages/core/index.js +10 -0
  33. package/packages/core/release-line-bootstrap.js +24 -0
  34. package/scripts/check-inventory.mjs +5 -0
  35. package/scripts/generate-site-bundle.mjs +4 -0
  36. package/scripts/release-candidate-resolver.mjs +52 -29
  37. package/scripts/run-lifecycle-core.mjs +50 -6
@@ -3,11 +3,11 @@
3
3
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
4
4
  "status": "passed",
5
5
  "summary": {
6
- "cliCommandCount": 79,
6
+ "cliCommandCount": 81,
7
7
  "workflowCount": 47,
8
8
  "actionCount": 4,
9
- "sitePageCount": 49,
10
- "docCommandRefCount": 246,
9
+ "sitePageCount": 50,
10
+ "docCommandRefCount": 250,
11
11
  "failureCount": 0
12
12
  },
13
13
  "enumerated": {
@@ -302,6 +302,11 @@
302
302
  "source": "bin/buildchain.mjs",
303
303
  "usage": "buildchain npm dry-run [--cwd <dir>] [--expected-tag <tag>] [--registry <url>]"
304
304
  },
305
+ {
306
+ "id": "project",
307
+ "source": "bin/buildchain.mjs",
308
+ "usage": "buildchain project kfx-admission <file-or-json> [--assessment-time <epoch>]"
309
+ },
305
310
  {
306
311
  "id": "publication-artifact",
307
312
  "source": "bin/buildchain.mjs",
@@ -377,6 +382,11 @@
377
382
  "source": "bin/buildchain.mjs",
378
383
  "usage": "buildchain verify artifact <file|dir|url|npm:...|oci:...|github-release:...>"
379
384
  },
385
+ {
386
+ "id": "verify-artifact-envelope",
387
+ "source": "bin/buildchain.mjs",
388
+ "usage": "buildchain verify artifact-envelope <file-or-json> [--assessment-time <epoch>]"
389
+ },
380
390
  {
381
391
  "id": "verify-infra-contract-evidence-bundle",
382
392
  "source": "bin/buildchain.mjs",
@@ -464,6 +474,7 @@
464
474
  "expected-artifacts-json",
465
475
  "gate-profile-aggregate-json",
466
476
  "install-command",
477
+ "lifecycle-timeout-minutes",
467
478
  "linux-container-image",
468
479
  "linux-container-preset",
469
480
  "node-version",
@@ -494,7 +505,7 @@
494
505
  "verify-command",
495
506
  "working-directory"
496
507
  ],
497
- "inputCount": 58,
508
+ "inputCount": 59,
498
509
  "secrets": [
499
510
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
500
511
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1066,6 +1077,7 @@
1066
1077
  "expected-artifacts-json",
1067
1078
  "gate-profile-aggregate-json",
1068
1079
  "install-command",
1080
+ "lifecycle-timeout-minutes",
1069
1081
  "linux-container-image",
1070
1082
  "linux-container-preset",
1071
1083
  "node-version",
@@ -1096,7 +1108,7 @@
1096
1108
  "verify-command",
1097
1109
  "working-directory"
1098
1110
  ],
1099
- "inputCount": 61,
1111
+ "inputCount": 62,
1100
1112
  "secrets": [
1101
1113
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
1102
1114
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1940,9 +1952,10 @@
1940
1952
  "required",
1941
1953
  "sample-process-tree",
1942
1954
  "stage",
1943
- "summary-path"
1955
+ "summary-path",
1956
+ "timeout-minutes"
1944
1957
  ],
1945
- "inputCount": 20
1958
+ "inputCount": 21
1946
1959
  },
1947
1960
  {
1948
1961
  "id": "validate-config",
@@ -2024,6 +2037,10 @@
2024
2037
  "id": "fixture:web-surface-shaped",
2025
2038
  "category": "fixture"
2026
2039
  },
2040
+ {
2041
+ "id": "manual:artifact-verification-envelope",
2042
+ "category": "manual"
2043
+ },
2027
2044
  {
2028
2045
  "id": "manual:binary-distribution",
2029
2046
  "category": "manual"
@@ -3059,6 +3076,16 @@
3059
3076
  "path": "docs/cli.md",
3060
3077
  "command": "buildchain npm dry-run"
3061
3078
  },
3079
+ {
3080
+ "id": "project",
3081
+ "path": "docs/artifact-verification-envelope.md",
3082
+ "command": "buildchain project kfx-admission envelope"
3083
+ },
3084
+ {
3085
+ "id": "project",
3086
+ "path": "docs/cli.md",
3087
+ "command": "buildchain project kfx-admission envelope"
3088
+ },
3062
3089
  {
3063
3090
  "id": "publication-artifact-manifest",
3064
3091
  "path": "docs/cli.md",
@@ -3269,6 +3296,16 @@
3269
3296
  "path": "README.md",
3270
3297
  "command": "buildchain validate --require-version-state npx"
3271
3298
  },
3299
+ {
3300
+ "id": "verify-artifact-envelope",
3301
+ "path": "docs/artifact-verification-envelope.md",
3302
+ "command": "buildchain verify artifact-envelope envelope"
3303
+ },
3304
+ {
3305
+ "id": "verify-artifact-envelope",
3306
+ "path": "docs/cli.md",
3307
+ "command": "buildchain verify artifact-envelope envelope"
3308
+ },
3272
3309
  {
3273
3310
  "id": "verify-artifact",
3274
3311
  "path": "docs/cli.md",
@@ -3390,9 +3427,9 @@
3390
3427
  "cliRegistryPath": "dist/site/cli-registry.json",
3391
3428
  "workflowRegistryPath": "dist/site/workflow-registry.json",
3392
3429
  "pageRegistryPath": "dist/site/page-registry.json",
3393
- "cliRegistryDigest": "a6daf4822365bf576425777230246046ebca67b3f8dcfea61fc7a61773776185",
3394
- "workflowRegistryDigest": "f7906cff65097a4dc0a7e3eb8a13a52415fadae6b6d019646a52867d94903998",
3395
- "pageRegistryDigest": "18046faf40798c07c6056d61beae2c1eda19d51e1545aa245f3c18692d18b9a0"
3430
+ "cliRegistryDigest": "ff1772371ec74271c21b6723dad0745a080347be8feef36a37e3948ebd19993d",
3431
+ "workflowRegistryDigest": "c496f3c91b98409ecadf252ac087e620bb95c02222690ec4543013d0740190d1",
3432
+ "pageRegistryDigest": "246e694c72df3166277b128d60bf18bf58c15583d0b70f5652dd4f342510fcdc"
3396
3433
  },
3397
3434
  "comparison": {
3398
3435
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-16T01:31:41.801Z",
5
- "publishedAt": "2026-07-16T01:31:41.801Z",
4
+ "generatedAt": "2026-07-15T16:38:35.118Z",
5
+ "publishedAt": "2026-07-15T16:38:35.118Z",
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": "6ad6f3a62b05b6713d1345285ee9442bf4faa894",
22
+ "sourceRevision": "aa454f78402e4e89a05592f8714e2d0f55f10c86",
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.9-alpha.0",
35
+ "version": "2.13.0-alpha.0",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -13,6 +13,7 @@
13
13
  "./build-facts": "./packages/core/build-facts.js",
14
14
  "./core": "./packages/core/index.js",
15
15
  "./artifact-passport": "./packages/core/artifact-passport.js",
16
+ "./artifact-verification-envelope": "./packages/core/artifact-verification-envelope.js",
16
17
  "./buildchain-contract": "./packages/core/buildchain-contract.js",
17
18
  "./controller-evidence": "./packages/core/controller-evidence.js",
18
19
  "./diagnostics": "./packages/core/diagnostics.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-07-16T01:31:41.801Z",
5
- "publishedAt": "2026-07-16T01:31:41.801Z",
4
+ "generatedAt": "2026-07-15T16:38:35.118Z",
5
+ "publishedAt": "2026-07-15T16:38:35.118Z",
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": "6ad6f3a62b05b6713d1345285ee9442bf4faa894",
22
+ "sourceRevision": "aa454f78402e4e89a05592f8714e2d0f55f10c86",
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.9-alpha.0",
40
+ "version": "2.13.0-alpha.0",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -53,7 +53,7 @@
53
53
  "path": "docs/MAP.md",
54
54
  "plane": "use",
55
55
  "exists": true,
56
- "digest": "sha256:91dc800bafc31bc149680c86272827936c94e0f025d547bbabc10d58fe5f128e"
56
+ "digest": "sha256:ce439062d4ed9d8213499e607825afdcf8a65f825343a657d0438f3e229a0af0"
57
57
  },
58
58
  {
59
59
  "id": "install",
@@ -93,7 +93,7 @@
93
93
  "path": "docs/release-candidate.md",
94
94
  "plane": "verify",
95
95
  "exists": true,
96
- "digest": "sha256:6a20c6e3e483327d5ccbe70271f7fb4752731bd0523eeddb96f27b2b6ebf1cf8"
96
+ "digest": "sha256:554613c963f57cc391acbd072bf73e1a2543d9bd1371087d4411577cccbf817c"
97
97
  },
98
98
  {
99
99
  "id": "release-propagation",
@@ -101,7 +101,7 @@
101
101
  "path": "docs/release-propagation.md",
102
102
  "plane": "use",
103
103
  "exists": true,
104
- "digest": "sha256:c8085445fcd0ffd6a55197ac2db1e34fa4aaa94df9107e8e7b216b925fc3bddc"
104
+ "digest": "sha256:55895694a32b76dfaf5ed0eb9e32f1e10bd859fb590d6f4504d36692ebe61ea9"
105
105
  },
106
106
  {
107
107
  "id": "readme-badges",
@@ -189,7 +189,7 @@
189
189
  "path": "docs/cli.md",
190
190
  "plane": "use",
191
191
  "exists": true,
192
- "digest": "sha256:3b3ac97c353f7549229f1102cca38236e734ec8d08c219d4a6e5ef2a48fc0e16"
192
+ "digest": "sha256:ef5be4484da8628b9e027f00fe0fdb5b295665ed23eeceefac48e63581f12c0c"
193
193
  },
194
194
  {
195
195
  "id": "build-facts",
@@ -221,7 +221,7 @@
221
221
  "path": "docs/reusable-build-surface.md",
222
222
  "plane": "use",
223
223
  "exists": true,
224
- "digest": "sha256:6916d88ae0f25fa129308354b04d339552b72796d4d7d7938015e0e2f4dcaa6a"
224
+ "digest": "sha256:a2092c8064332cec9a4be852b24d94f90625cb45f885c4c3208f7068a643a3f0"
225
225
  },
226
226
  {
227
227
  "id": "publish-transaction",
@@ -237,7 +237,7 @@
237
237
  "path": "docs/release-governance.md",
238
238
  "plane": "why",
239
239
  "exists": true,
240
- "digest": "sha256:cce9f80add3c746fe28d8ebf5afb809348694741cb75d19154ed3057a9374c0d"
240
+ "digest": "sha256:03108f05a608cb0849e7a668fe23671b62863907ce02a70bc6522eb8074f3e63"
241
241
  },
242
242
  {
243
243
  "id": "release-flow",
@@ -261,7 +261,7 @@
261
261
  "path": "docs/versioning.md",
262
262
  "plane": "why",
263
263
  "exists": true,
264
- "digest": "sha256:400027d5e34d5c22752f7664bb9ca9ce99c04e7be298183d0303f3fb04fa7747"
264
+ "digest": "sha256:280d30e15552ab6a362cb121a7a1cafc3b907913cdc7d4d8a9e8e1930d856f7e"
265
265
  },
266
266
  {
267
267
  "id": "web-surface-deployments",
@@ -61,6 +61,7 @@
61
61
  "expected-artifacts-json",
62
62
  "gate-profile-aggregate-json",
63
63
  "install-command",
64
+ "lifecycle-timeout-minutes",
64
65
  "linux-container-image",
65
66
  "linux-container-preset",
66
67
  "node-version",
@@ -91,7 +92,7 @@
91
92
  "verify-command",
92
93
  "working-directory"
93
94
  ],
94
- "inputCount": 58,
95
+ "inputCount": 59,
95
96
  "secrets": [
96
97
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
97
98
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -717,6 +718,7 @@
717
718
  "expected-artifacts-json",
718
719
  "gate-profile-aggregate-json",
719
720
  "install-command",
721
+ "lifecycle-timeout-minutes",
720
722
  "linux-container-image",
721
723
  "linux-container-preset",
722
724
  "node-version",
@@ -747,7 +749,7 @@
747
749
  "verify-command",
748
750
  "working-directory"
749
751
  ],
750
- "inputCount": 61,
752
+ "inputCount": 62,
751
753
  "secrets": [
752
754
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
753
755
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1680,9 +1682,10 @@
1680
1682
  "required",
1681
1683
  "sample-process-tree",
1682
1684
  "stage",
1683
- "summary-path"
1685
+ "summary-path",
1686
+ "timeout-minutes"
1684
1687
  ],
1685
- "inputCount": 20,
1688
+ "inputCount": 21,
1686
1689
  "capabilityGroup": "reusable-build",
1687
1690
  "status": "active"
1688
1691
  },
package/docs/MAP.md CHANGED
@@ -81,6 +81,7 @@ replace them.
81
81
  | How does publish evidence, recovery, and finalization work? | [`publish-transaction.md`](publish-transaction.md) | verify | stable |
82
82
  | How do I collect and verify module/product build facts from Git source, version files, and outputs? | [`build-facts.md`](build-facts.md) + [`cli.md`](cli.md) | use/verify | stable |
83
83
  | How do I publish or verify release passport artifacts? | [`release-passport.md`](release-passport.md) | use | stable |
84
+ | How do I seal exact artifact, identity, lifecycle, and KFD assessment roots for KFX admission? | [`artifact-verification-envelope.md`](artifact-verification-envelope.md) | verify/use | preview |
84
85
  | How is product publication authority sealed to an exact workflow, runner, control plane, nonce, and artifact? | [`publication-authority.md`](publication-authority.md) | verify | preview |
85
86
  | 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 |
86
87
  | How do I declare, render, and audit product KFD-2 release trust claims? | [`kfd-support.md`](kfd-support.md#kfd-2) + [`release-passport.md`](release-passport.md#kfd-2-release-trust-passport-audit) + [`cli.md`](cli.md) | verify/use | stable |
@@ -0,0 +1,113 @@
1
+ # Artifact Verification Envelope
2
+
3
+ Buildchain can turn a passing exact-artifact passport verification into one
4
+ sealed, versioned input for Kungfu KFX admission. The envelope carries the
5
+ public verification result together with exact package, source, dependency,
6
+ build-plan, toolchain, artifact, qualification, and verifier roots; issuer and
7
+ publisher identity; lifecycle and revocation facts; and an existing ADR-0052
8
+ KFD assessment.
9
+
10
+ The envelope does not create a second KFD evaluator. It validates and binds an
11
+ assessment produced by the Kungfu KFD lifecycle. It also does not claim that an
12
+ artifact is malware-free, universally safe, fit for every workspace, or
13
+ authorized as a Product System component.
14
+
15
+ ## Public API
16
+
17
+ Import the dedicated package subpath:
18
+
19
+ ```js
20
+ import {
21
+ projectArtifactVerificationEnvelopeToKfx,
22
+ sealArtifactVerificationReport,
23
+ verifyArtifactVerificationEnvelope,
24
+ } from "@kungfu-tech/buildchain/artifact-verification-envelope";
25
+ ```
26
+
27
+ `verifyArtifactPassport` also accepts an optional `verificationEnvelope`
28
+ object. Existing callers that omit it receive the unchanged
29
+ `kungfu-buildchain-artifact-verification` v1 result.
30
+
31
+ ```js
32
+ const attestation = await verifyArtifactPassport({
33
+ subject: "dist/example.kfx",
34
+ passportLocation: "dist/buildchain.release.json",
35
+ verificationEnvelope: {
36
+ bindings,
37
+ kfdAssessment,
38
+ issuedAt,
39
+ expiresAt,
40
+ revocation,
41
+ },
42
+ });
43
+ ```
44
+
45
+ The result keeps the artifact-verification v1 fields that existing consumers
46
+ understand and adds:
47
+
48
+ - `bindings`: the schema-closed `kungfu.kfx-trust-inputs/v1` exact roots and
49
+ identities;
50
+ - `issuedAt`, `expiresAt`, `revoked`, and a root-bound `revocation` fact;
51
+ - `kfdAssessment`: the pinned fresh `kungfu.trust.assessment/v1` lifecycle
52
+ result;
53
+ - `envelope`: the envelope contract, canonicalization version, and exact
54
+ content root.
55
+
56
+ `projectArtifactVerificationEnvelopeToKfx` returns the same sealed report as
57
+ `attestation`, its exact `bindings` as `trustInputs`, and its existing
58
+ `kfdAssessment`. A consumer does not reconstruct fields, recompute the KFD
59
+ decision, or inspect private Buildchain structures.
60
+
61
+ The read-only CLI uses those same functions for portable verification and
62
+ projection:
63
+
64
+ ```bash
65
+ buildchain verify artifact-envelope envelope.json \
66
+ --assessment-time 150 \
67
+ --expected-root sha256:... \
68
+ --expected-issuer buildchain.libkungfu.dev \
69
+ --expected-publisher kungfu-systems \
70
+ --expected-contract buildchain.release/v1 \
71
+ --json
72
+
73
+ buildchain project kfx-admission envelope.json \
74
+ --assessment-time 150 \
75
+ --json
76
+ ```
77
+
78
+ The projection's `envelopeRoot` is the same root returned by the Node verifier.
79
+ The CLI never adds consumer-side bindings or KFD conclusions.
80
+
81
+ ## Canonicalization and roots
82
+
83
+ The v1 envelope uses `buildchain-stable-json/v1`: object keys are sorted
84
+ recursively, array order is retained, and the root is lowercase SHA-256 with a
85
+ `sha256:` prefix. `envelope.root` is excluded from its own root basis.
86
+
87
+ The KFD report hash is independently recomputed over the report with
88
+ `report_hash` removed. The envelope is accepted only when:
89
+
90
+ - the base artifact passport verification passes;
91
+ - `bindings.artifactRoot` equals both the exact subject digest and the matched
92
+ passport artifact digest;
93
+ - every binding root is canonical lowercase SHA-256;
94
+ - `bindings.qualificationRoot` equals the recomputed KFD `report_hash`;
95
+ - the assessment key matches the report and its lifecycle state is `fresh`;
96
+ - the report binds purpose, query proof, contract world, policy, and at least
97
+ one fact-surface root;
98
+ - lifecycle bounds are active and revocation facts are internally consistent;
99
+ - any caller-pinned envelope root, issuer, publisher, or contract version
100
+ matches exactly.
101
+
102
+ ## Fail-closed behavior
103
+
104
+ `verifyArtifactVerificationEnvelope` returns a machine-readable check report.
105
+ It rejects sibling artifacts, root tampering, identity drift, invalid contract
106
+ versions, expired or revoked envelopes, stale assessments, altered KFD report
107
+ content, and missing fact-surface bindings. Callers may pin expected authority
108
+ fields without changing the envelope.
109
+
110
+ The canonical root detects changed serialized content; authenticity still
111
+ depends on the pinned Buildchain verifier and release passport authority. The
112
+ envelope is supply-chain and evidence input. Kungfu Product and Workspace
113
+ policy retain operation, capability, and System-role authority.
package/docs/cli.md CHANGED
@@ -674,6 +674,28 @@ files, directories, and URLs are digestable directly; remote package, OCI,
674
674
  object storage, and deployment subjects should provide a digest or resolve to a
675
675
  locator that records one.
676
676
 
677
+ Seal an exact artifact verification with the Node API, then verify or project
678
+ the resulting KFX admission envelope without reconstructing its roots:
679
+
680
+ ```bash
681
+ buildchain verify artifact-envelope envelope.json \
682
+ --assessment-time 150 \
683
+ --expected-root sha256:... \
684
+ --expected-issuer buildchain.libkungfu.dev \
685
+ --expected-publisher kungfu-systems \
686
+ --expected-contract buildchain.release/v1 \
687
+ --json
688
+
689
+ buildchain project kfx-admission envelope.json \
690
+ --assessment-time 150 \
691
+ --json
692
+ ```
693
+
694
+ Both commands call the public artifact-verification-envelope verifier. The
695
+ projected `attestation`, `trustInputs`, and `kfdAssessment` are direct copies of
696
+ the sealed envelope, and `envelopeRoot` stays identical across Node and CLI.
697
+ See [`artifact-verification-envelope.md`](artifact-verification-envelope.md).
698
+
677
699
  Verify infra-contract lifecycle evidence bundles:
678
700
 
679
701
  ```bash
@@ -82,6 +82,11 @@ other package as `role: platform`. Consumer workflows therefore stay
82
82
  declarative and do not need their own artifact download or publish-evidence
83
83
  generation scripts.
84
84
 
85
+ Because a channel merge can trigger promotion before its PR-stage matrix has
86
+ finished uploading evidence, the resolver waits up to ten minutes for the exact
87
+ merged PR's successful workflow run and paired artifacts. Polling remains bound
88
+ to the PR/head identity; timeout or a sibling run still fails closed.
89
+
85
90
  By default, the wrapper forwards GitHub Release publication to the underlying
86
91
  `promote-buildchain-ref` semver model. Once the release transaction is complete,
87
92
  the action creates or updates the public GitHub Release, applies
@@ -94,6 +94,13 @@ The implementation is intentionally stricter than a local release script:
94
94
  release source tree against that tested alpha tree;
95
95
  - generated version-state commits are verified before refs move.
96
96
 
97
+ Exact publication planning installs the checked-out promotion source's declared
98
+ dependencies before version-state verification. This keeps the pre-authority
99
+ version plan on the same package-manager boundary as the later promotion job,
100
+ including repositories whose verification commands import production packages.
101
+ The planning pass may materialize and verify declared derived files locally,
102
+ but dry-run never creates Git blobs, trees, commits, refs, or tags.
103
+
97
104
  Promotion intents are serialized globally per caller repository with
98
105
  `cancel-in-progress: false`. A queued intent re-reads its protected target ref
99
106
  before checkout, dependency installation, release-candidate resolution, or any
@@ -194,6 +194,9 @@ downstream repository, writes the exact lock, and opens or updates a PR. It does
194
194
  not publish the downstream release directly. The downstream repository keeps its
195
195
  normal Buildchain governance: the PR updates source-of-truth facts, then
196
196
  downstream alpha or release publication runs through its own protected channel.
197
+ The workflow stages the declared lock path before checking the index, so the
198
+ first propagation creates a PR even when the lock did not previously exist; a
199
+ byte-identical rerun is an explicit successful no-op.
197
200
  For unreleased runtime validation, keep the caller's reusable workflow reference
198
201
  on `@v2` and pass a temporary train ref through `buildchain-ref`.
199
202
 
@@ -903,6 +903,18 @@ with:
903
903
  verify-command: ctest --test-dir build --output-on-failure
904
904
  ```
905
905
 
906
+ Every native and container matrix job is bounded by
907
+ `lifecycle-timeout-minutes`, which defaults to 120 minutes. The same input is
908
+ the fallback deadline for each install, build, and verify action, so a hung
909
+ command fails with the lifecycle name and matrix platform before it can occupy
910
+ a self-hosted runner indefinitely. A stage-level `timeout_minutes` in
911
+ `buildchain.toml` remains the more specific override for that stage.
912
+
913
+ ```yaml
914
+ with:
915
+ lifecycle-timeout-minutes: 90
916
+ ```
917
+
906
918
  The reusable build workflow samples the build lifecycle by default and carries
907
919
  the generated summary into the final verify diagnostics. Callers can override
908
920
  the sidecar path or disable sampling:
@@ -932,6 +944,7 @@ For custom workflows, use the action directly:
932
944
  with:
933
945
  stage: build
934
946
  required: "true"
947
+ timeout-minutes: "90"
935
948
  artifact-name: libnode-linux-x64-${{ github.sha }}
936
949
  artifact-paths: |
937
950
  dist
@@ -61,6 +61,7 @@ repository changes are patch".
61
61
 
62
62
  | Date | Action | Line | Faces | Class | Rationale | PR |
63
63
  | --- | --- | --- | --- | --- | --- | --- |
64
+ | 2026-07-15 | open-minor | `v2.13` | artifact-verification-envelope, package-subpaths | additive | The public envelope seals exact artifact, provenance, identity, lifecycle, revocation, and existing KFD assessment roots into one consumer-ready KFX admission input, with a dedicated Node API export and fail-closed verifier. | |
64
65
  | 2026-07-11 | open-minor | `v2.12` | channel-build-router, channel-selection-protocol | additive | The public `build.yml` reusable workflow lets consumers declare one build job while Buildchain selects generic major alpha for development/prerelease intent and stable major for production release intent, with explicit overrides, separate locks, and fail-closed ambiguity handling. | |
65
66
  | 2026-07-08 | open-minor | `v2.9` | build-facts-contract | additive | Build Facts add a public CLI command family, Node API export, config protocol, module/product fact contracts, release-passport evidence section, and Kungfu legacy buildinfo projection from the same source facts. | |
66
67
  | 2026-07-06 | open-minor | `v2.8` | kfd-1-contract-world-release-gate, kfd-2-release-trust-passport-audit, kfd-3-collaboration-interface-trust-proof, publish-source-lock-enforcement, required-check-protection | additive | KFD release gates add KFD-1 self contract verification, KFD-2 public release trust claim audit, KFD-3 collaboration-interface trust proofs, publish-side source-lock enforcement for promote-only wrappers, and protected channel required checks repaired to bind GitHub Actions check runs instead of legacy commit status contexts. | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.12.9-alpha.0",
3
+ "version": "2.13.0-alpha.0",
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",
@@ -16,6 +16,7 @@
16
16
  "./build-facts": "./packages/core/build-facts.js",
17
17
  "./core": "./packages/core/index.js",
18
18
  "./artifact-passport": "./packages/core/artifact-passport.js",
19
+ "./artifact-verification-envelope": "./packages/core/artifact-verification-envelope.js",
19
20
  "./buildchain-contract": "./packages/core/buildchain-contract.js",
20
21
  "./controller-evidence": "./packages/core/controller-evidence.js",
21
22
  "./diagnostics": "./packages/core/diagnostics.js",
@@ -16,6 +16,8 @@ Current shared surfaces:
16
16
  `@kungfu-tech/buildchain/build-facts`;
17
17
  - release passport creation and verification through
18
18
  `@kungfu-tech/buildchain/release-passport`.
19
+ - sealed exact-root and KFD assessment inputs for KFX admission through
20
+ `@kungfu-tech/buildchain/artifact-verification-envelope`.
19
21
  - managed KFD / Release Passport badge bundle facts and README marker blocks
20
22
  through `@kungfu-tech/buildchain/badges`.
21
23
  - publication artifact manifests, source bundles, and publication artifact
@@ -66,6 +68,17 @@ const fact = collectModuleBuildFacts({ moduleId: "native-core" });
66
68
  writeBuildFacts({ fact, output: ".buildchain/facts/native-core.json" });
67
69
  ```
68
70
 
71
+ KFX producers can seal one passing artifact verification with exact roots,
72
+ identity, lifecycle, revocation, and an existing ADR-0052 assessment. Consumers
73
+ verify or project the same envelope instead of reconstructing bindings:
74
+
75
+ ```js
76
+ import {
77
+ projectArtifactVerificationEnvelopeToKfx,
78
+ verifyArtifactVerificationEnvelope,
79
+ } from "@kungfu-tech/buildchain/artifact-verification-envelope";
80
+ ```
81
+
69
82
  Publication repositories can produce site-consumable paper/report facts without
70
83
  becoming web-surface repositories. When `[publication.archive]` is configured,
71
84
  the same API also maintains the append-only publication registry used by site
@@ -3,6 +3,7 @@ import fs from "node:fs";
3
3
  import http from "node:http";
4
4
  import https from "node:https";
5
5
  import path from "node:path";
6
+ import { sealArtifactVerificationReport } from "./artifact-verification-envelope.js";
6
7
  import { readJsonFromLocation, sha256File, verifyReleasePassport } from "./release-passport.js";
7
8
 
8
9
  export const ARTIFACT_VERIFICATION_CONTRACT = "kungfu-buildchain-artifact-verification";
@@ -708,6 +709,7 @@ export async function verifyArtifactPassport({
708
709
  subjectDigest = "",
709
710
  subjectKind = "",
710
711
  npmRegistryBaseUrl = "",
712
+ verificationEnvelope = undefined,
711
713
  } = {}) {
712
714
  const resolvedSubject = await resolveArtifactSubject(subject, { cwd, subjectDigest, subjectKind, npmRegistryBaseUrl });
713
715
  const issues = [];
@@ -789,7 +791,7 @@ export async function verifyArtifactPassport({
789
791
  }
790
792
  const ok = passportReport.ok && Boolean(match);
791
793
  const outcome = ok ? "pass" : "fail";
792
- return {
794
+ const report = {
793
795
  schemaVersion: 1,
794
796
  contract: ARTIFACT_VERIFICATION_CONTRACT,
795
797
  outcome,
@@ -817,6 +819,9 @@ export async function verifyArtifactPassport({
817
819
  : undefined,
818
820
  issues,
819
821
  };
822
+ return verificationEnvelope
823
+ ? sealArtifactVerificationReport({ report, ...verificationEnvelope })
824
+ : report;
820
825
  }
821
826
 
822
827
  export async function explainArtifactPassport(options = {}) {