@kungfu-tech/buildchain 2.14.0 → 2.14.1-alpha.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.
@@ -3,11 +3,11 @@
3
3
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
4
4
  "status": "passed",
5
5
  "summary": {
6
- "cliCommandCount": 82,
6
+ "cliCommandCount": 83,
7
7
  "workflowCount": 47,
8
8
  "actionCount": 4,
9
9
  "sitePageCount": 50,
10
- "docCommandRefCount": 253,
10
+ "docCommandRefCount": 256,
11
11
  "failureCount": 0
12
12
  },
13
13
  "enumerated": {
@@ -307,6 +307,11 @@
307
307
  "source": "bin/buildchain.mjs",
308
308
  "usage": "buildchain npm dry-run [--cwd <dir>] [--expected-tag <tag>] [--registry <url>]"
309
309
  },
310
+ {
311
+ "id": "portable-cache",
312
+ "source": "bin/buildchain.mjs",
313
+ "usage": "buildchain portable-cache plan --manifest <file-or-json> [--output <file>]"
314
+ },
310
315
  {
311
316
  "id": "project",
312
317
  "source": "bin/buildchain.mjs",
@@ -1228,6 +1233,7 @@
1228
1233
  "cadence",
1229
1234
  "capabilities",
1230
1235
  "dry-run",
1236
+ "landing-mode",
1231
1237
  "max-actions",
1232
1238
  "merge-method",
1233
1239
  "mode",
@@ -1237,7 +1243,7 @@
1237
1243
  "same-repository-only",
1238
1244
  "target-branch"
1239
1245
  ],
1240
- "inputCount": 15,
1246
+ "inputCount": 16,
1241
1247
  "secrets": [
1242
1248
  "github-token"
1243
1249
  ],
@@ -1332,6 +1338,7 @@
1332
1338
  "buildchain-ref",
1333
1339
  "buildchain-repository",
1334
1340
  "dry-run",
1341
+ "landing-mode",
1335
1342
  "max-merges",
1336
1343
  "merge-method",
1337
1344
  "ready-label",
@@ -1340,18 +1347,20 @@
1340
1347
  "same-repository-only",
1341
1348
  "target-branch"
1342
1349
  ],
1343
- "inputCount": 12,
1350
+ "inputCount": 13,
1344
1351
  "secrets": [
1345
1352
  "github-token"
1346
1353
  ],
1347
1354
  "secretCount": 1,
1348
1355
  "outputs": [
1356
+ "action-count",
1357
+ "enqueued-count",
1349
1358
  "evaluated-count",
1350
1359
  "final-base-sha",
1351
1360
  "merged-count",
1352
1361
  "skipped-count"
1353
1362
  ],
1354
- "outputCount": 4
1363
+ "outputCount": 6
1355
1364
  },
1356
1365
  {
1357
1366
  "id": "npm-publish",
@@ -1481,6 +1490,7 @@
1481
1490
  "buildchain-ref",
1482
1491
  "buildchain-repository",
1483
1492
  "dry-run",
1493
+ "landing-mode",
1484
1494
  "max-actions",
1485
1495
  "merge-method",
1486
1496
  "ready-label",
@@ -1489,7 +1499,7 @@
1489
1499
  "same-repository-only",
1490
1500
  "target-branch"
1491
1501
  ],
1492
- "inputCount": 12,
1502
+ "inputCount": 13,
1493
1503
  "secrets": [
1494
1504
  "github-token"
1495
1505
  ],
@@ -3110,6 +3120,21 @@
3110
3120
  "path": "docs/cli.md",
3111
3121
  "command": "buildchain npm dry-run"
3112
3122
  },
3123
+ {
3124
+ "id": "portable-cache",
3125
+ "path": "docs/cli.md",
3126
+ "command": "buildchain portable-cache plan"
3127
+ },
3128
+ {
3129
+ "id": "portable-cache",
3130
+ "path": "docs/cli.md",
3131
+ "command": "buildchain portable-cache receipt"
3132
+ },
3133
+ {
3134
+ "id": "portable-cache",
3135
+ "path": "docs/cli.md",
3136
+ "command": "buildchain portable-cache plan"
3137
+ },
3113
3138
  {
3114
3139
  "id": "project",
3115
3140
  "path": "docs/artifact-verification-envelope.md",
@@ -3461,9 +3486,9 @@
3461
3486
  "cliRegistryPath": "dist/site/cli-registry.json",
3462
3487
  "workflowRegistryPath": "dist/site/workflow-registry.json",
3463
3488
  "pageRegistryPath": "dist/site/page-registry.json",
3464
- "cliRegistryDigest": "b07ed2241d34696ad0500c3431b2106b1499a0d4372a77385a8c0e0698421d76",
3465
- "workflowRegistryDigest": "62b7ca87803c461e1e1436a477c3b6b70103eed84dbf14d855d383e810d7d71e",
3466
- "pageRegistryDigest": "1bec2a9ecc289aed2e3dd4e646989b1335d090b8445e04170c25955e638011ee"
3489
+ "cliRegistryDigest": "b469949f77ed7777f23fe68c54daf6d2c20d3afc97f3bbd5a178a91202a068d0",
3490
+ "workflowRegistryDigest": "283dac6adfcebb463db63545d2c00686daa317f1603f5ac13c9d5c5c3c91592f",
3491
+ "pageRegistryDigest": "77061e79d575aa965482dad26280a0262d09aadc92c87038065a3591c7072045"
3467
3492
  },
3468
3493
  "comparison": {
3469
3494
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-16T23:48:23.239Z",
5
- "publishedAt": "2026-07-16T23:48:23.239Z",
4
+ "generatedAt": "2026-07-17T00:51:57.848Z",
5
+ "publishedAt": "2026-07-17T00:51:57.848Z",
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": "1886767b1d8621d17dc8de5bcf94dcec12d090fe",
22
+ "sourceRevision": "5073d72855cd9136112a1866398f072ac3a065bb",
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.14.0",
35
+ "version": "2.14.1-alpha.1",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -25,6 +25,7 @@
25
25
  "./readme-badges": "./packages/core/readme-badges.js",
26
26
  "./public-surface-audit": "./packages/core/public-surface-audit.js",
27
27
  "./logging": "./packages/core/logging.js",
28
+ "./portable-dev-cache": "./packages/core/portable-dev-cache.js",
28
29
  "./publication-artifact": "./packages/core/publication-artifact.js",
29
30
  "./publication-package": "./packages/core/publication-package.js",
30
31
  "./publication-authority": "./packages/core/publication-authority.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-07-16T23:48:23.239Z",
5
- "publishedAt": "2026-07-16T23:48:23.239Z",
4
+ "generatedAt": "2026-07-17T00:51:57.848Z",
5
+ "publishedAt": "2026-07-17T00:51:57.848Z",
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": "1886767b1d8621d17dc8de5bcf94dcec12d090fe",
22
+ "sourceRevision": "5073d72855cd9136112a1866398f072ac3a065bb",
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.14.0",
40
+ "version": "2.14.1-alpha.1",
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:a9a9594c0bd9584b145a8f41847db83e297c1c4d1b8b2d7c4bf8d10264ab1cef"
56
+ "digest": "sha256:308bc83b7403f407ac1be13d7c19000fa249f4bedf0c9c90b2f701e5163471a3"
57
57
  },
58
58
  {
59
59
  "id": "install",
@@ -189,7 +189,7 @@
189
189
  "path": "docs/cli.md",
190
190
  "plane": "use",
191
191
  "exists": true,
192
- "digest": "sha256:a7a31bbec048acbc9759324c5421c7ea0734f394f8d6705b63d70654867fdfa6"
192
+ "digest": "sha256:9ecf8c220b5ff02ee5719cb877d4b2b159c3d683af288630eae0013d9d906373"
193
193
  },
194
194
  {
195
195
  "id": "build-facts",
@@ -237,7 +237,7 @@
237
237
  "path": "docs/release-governance.md",
238
238
  "plane": "why",
239
239
  "exists": true,
240
- "digest": "sha256:5cf4bf4332119531f6aaa1c123d7f64e6af4a61611c4e4a33d40bd9fb46448cf"
240
+ "digest": "sha256:5e0e6ef6720b51bb156da54390850688ef9a538908afb22484011364102e48eb"
241
241
  },
242
242
  {
243
243
  "id": "release-flow",
@@ -879,6 +879,7 @@
879
879
  "cadence",
880
880
  "capabilities",
881
881
  "dry-run",
882
+ "landing-mode",
882
883
  "max-actions",
883
884
  "merge-method",
884
885
  "mode",
@@ -888,7 +889,7 @@
888
889
  "same-repository-only",
889
890
  "target-branch"
890
891
  ],
891
- "inputCount": 15,
892
+ "inputCount": 16,
892
893
  "secrets": [
893
894
  "github-token"
894
895
  ],
@@ -1001,6 +1002,7 @@
1001
1002
  "buildchain-ref",
1002
1003
  "buildchain-repository",
1003
1004
  "dry-run",
1005
+ "landing-mode",
1004
1006
  "max-merges",
1005
1007
  "merge-method",
1006
1008
  "ready-label",
@@ -1009,18 +1011,20 @@
1009
1011
  "same-repository-only",
1010
1012
  "target-branch"
1011
1013
  ],
1012
- "inputCount": 12,
1014
+ "inputCount": 13,
1013
1015
  "secrets": [
1014
1016
  "github-token"
1015
1017
  ],
1016
1018
  "secretCount": 1,
1017
1019
  "outputs": [
1020
+ "action-count",
1021
+ "enqueued-count",
1018
1022
  "evaluated-count",
1019
1023
  "final-base-sha",
1020
1024
  "merged-count",
1021
1025
  "skipped-count"
1022
1026
  ],
1023
- "outputCount": 4,
1027
+ "outputCount": 6,
1024
1028
  "surface": "dev-governance",
1025
1029
  "capabilityGroup": "governance-versioning",
1026
1030
  "status": "active"
@@ -1162,6 +1166,7 @@
1162
1166
  "buildchain-ref",
1163
1167
  "buildchain-repository",
1164
1168
  "dry-run",
1169
+ "landing-mode",
1165
1170
  "max-actions",
1166
1171
  "merge-method",
1167
1172
  "ready-label",
@@ -1170,7 +1175,7 @@
1170
1175
  "same-repository-only",
1171
1176
  "target-branch"
1172
1177
  ],
1173
- "inputCount": 12,
1178
+ "inputCount": 13,
1174
1179
  "secrets": [
1175
1180
  "github-token"
1176
1181
  ],
package/docs/MAP.md CHANGED
@@ -103,6 +103,7 @@ replace them.
103
103
  | How do I use one build job that follows alpha during development and stable for releases? | [`reusable-build-surface.md`](reusable-build-surface.md#automatic-channel-router) | use | preview |
104
104
  | How do self-hosted runners relay large artifacts through S3 before GitHub artifacts? | [`reusable-build-surface.md`](reusable-build-surface.md#artifact-transfer-relay) | use | stable |
105
105
  | How do self-hosted runners reuse local Git checkout caches without weakening source locks? | [`reusable-build-surface.md`](reusable-build-surface.md#locked-source-checkout-cache) | use | stable |
106
+ | How do ephemeral GitHub-hosted runners share exact dependency or compiler caches without fixed-runner affinity? | [`cli.md`](cli.md#commands) | use/verify | preview |
106
107
  | How do I validate an unreleased Buildchain runtime train while keeping `@v2`? | [`runtime-train-validation.md`](runtime-train-validation.md) | use | stable |
107
108
  | How do I automatically qualify alpha candidates and publish the newest non-revoked qualified candidate at a fixed window? | [`stable-candidate-patrol.md`](stable-candidate-patrol.md) | use | preview |
108
109
  | How do I deploy a site/app preview, staging, or production surface? | [`web-surface-deployments.md`](web-surface-deployments.md) | use | stable |
package/docs/cli.md CHANGED
@@ -78,6 +78,7 @@ import { createReleasePropagationPlan } from "@kungfu-tech/buildchain/release-pr
78
78
  import { planReleaseLineBootstrap } from "@kungfu-tech/buildchain/release-line-bootstrap";
79
79
  import { collectPublicSurfaceReverseAudit } from "@kungfu-tech/buildchain/public-surface-audit";
80
80
  import { createBuildchainLayoutDiscovery } from "@kungfu-tech/buildchain/buildchain-layout";
81
+ import { createPortableDevCachePlan } from "@kungfu-tech/buildchain/portable-dev-cache";
81
82
  import contractWorld from "@kungfu-tech/buildchain/site/buildchain-contract.json" with { type: "json" };
82
83
  import capabilityRegistry from "@kungfu-tech/buildchain/site/capability-registry.json" with { type: "json" };
83
84
  import manualRegistry from "@kungfu-tech/buildchain/site/manual-registry.json" with { type: "json" };
@@ -110,6 +111,42 @@ not sufficient. The same contract is available through
110
111
  `buildchain init` writes a starter `.buildchain/buildchain.toml` and a reusable workflow
111
112
  caller at `.github/workflows/build.yml`.
112
113
 
114
+ `buildchain portable-cache plan` turns a consumer-owned, secret-free manifest
115
+ into GitHub Actions cache inputs without letting each consumer invent key or
116
+ restore-prefix semantics. The exact key binds source SHA and the consumer plan
117
+ digest; the compatible restore prefix still requires the same provider schema,
118
+ layer, roots, runner image, platform/architecture, toolchain, dependency lock,
119
+ and build profile.
120
+
121
+ ```bash
122
+ buildchain portable-cache plan \
123
+ --manifest .buildchain/portable-cache.json \
124
+ --output .buildchain/portable-cache-plan.json \
125
+ --github-output "$GITHUB_OUTPUT"
126
+ ```
127
+
128
+ The emitted `cache-key`, `restore-keys`, and `cache-paths` values are intended
129
+ for pinned `actions/cache/restore` and `actions/cache/save` actions. After
130
+ restore and a consumer validation probe, seal the provider result:
131
+
132
+ ```bash
133
+ buildchain portable-cache receipt \
134
+ --plan .buildchain/portable-cache-plan.json \
135
+ --matched-key "$CACHE_MATCHED_KEY" \
136
+ --cache-hit "$CACHE_HIT" \
137
+ --validation-status pass \
138
+ --cold-fallback-status passed \
139
+ --output .buildchain/portable-cache-receipt.json
140
+ ```
141
+
142
+ The receipt distinguishes `exact`, `compatible`, `miss`, and `corrupt`.
143
+ Unknown or contradictory provider evidence fails closed. A miss or corruption
144
+ requires the consumer's audited cold path; a cache never substitutes for the
145
+ consumer's current build or tests. Roots must be workspace-relative or under
146
+ `~/`, and manifests cannot carry credentials, absolute host paths, or escape
147
+ segments. `cold-fallback-status=passed` qualifies a miss only after the current
148
+ source has completed its normal build and test path.
149
+
113
150
  Supported presets:
114
151
 
115
152
  - `--type package` for Node package repositories with pnpm, npm, or yarn.
@@ -435,9 +435,21 @@ The workflow defaults are conservative. A PR is skipped unless it targets the
435
435
  configured dev line, is not a draft, has the ready label, has no block label,
436
436
  comes from the same repository, uses an allowed work-branch prefix, has a
437
437
  current approval, is mergeable, and has the configured required checks passing.
438
- After each merge, the next PR is re-evaluated before it can move the protected
439
- dev branch. This prevents one merge from silently making the next candidate
440
- stale or conflicting.
438
+ `landing-mode: auto` reads the target branch's native merge-queue state. When a
439
+ queue exists, Buildchain never calls the direct merge endpoint: it admits at
440
+ most one PR against the observed target-branch SHA and immutable PR head, then
441
+ calls GraphQL `enqueuePullRequest` with `expectedHeadOid`. GitHub's
442
+ `merge_group` checks remain the final authority for the projected merge.
443
+
444
+ The admission receipt records the expected and observed base/head SHAs, policy
445
+ checks, decision, reason, and active predecessor. Buildchain re-reads the base,
446
+ head, mergeability, and native queue immediately before enqueueing. Base or
447
+ head drift fails closed, an active queue entry blocks admission, and a rejected
448
+ ready predecessor leaves its PR open while later PRs receive
449
+ `blocked-by-predecessor`. Workflow concurrency serializes Buildchain-owned
450
+ admission runs; GitHub still owns the atomic queue and protected-ref update.
451
+ Repositories may explicitly select `landing-mode: direct` only when the target
452
+ branch has no native queue. Queue presence always disables the direct path.
441
453
 
442
454
  The canonical consumer required check context is `check / check`, matching the
443
455
  reusable workflow call plus its `check` job. Buildchain's own `Verify` workflow
@@ -497,6 +509,7 @@ jobs:
497
509
  ready-label: ready
498
510
  block-labels: blocked,do-not-merge
499
511
  max-merges: 1
512
+ landing-mode: auto
500
513
  dry-run: ${{ inputs.dry-run || false }}
501
514
  ```
502
515
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.14.0",
3
+ "version": "2.14.1-alpha.1",
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",
@@ -28,6 +28,7 @@
28
28
  "./readme-badges": "./packages/core/readme-badges.js",
29
29
  "./public-surface-audit": "./packages/core/public-surface-audit.js",
30
30
  "./logging": "./packages/core/logging.js",
31
+ "./portable-dev-cache": "./packages/core/portable-dev-cache.js",
31
32
  "./publication-artifact": "./packages/core/publication-artifact.js",
32
33
  "./publication-package": "./packages/core/publication-package.js",
33
34
  "./publication-authority": "./packages/core/publication-authority.js",
@@ -51,6 +51,12 @@ export {
51
51
  writeReleaseTransaction,
52
52
  } from "./publish-transaction.js";
53
53
 
54
+ export {
55
+ createPortableDevCachePlan,
56
+ createPortableDevCacheReceipt,
57
+ verifyPortableDevCachePlan,
58
+ } from "./portable-dev-cache.js";
59
+
54
60
  export {
55
61
  explainReleaseLineDryRun,
56
62
  formatReleaseLineDryRun,