@kungfu-tech/buildchain 4.0.0 → 4.0.1-alpha.2
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/AGENTS.md +13 -5
- package/actions/promote-buildchain-ref/README.md +11 -6
- package/architecture/internal-capabilities.json +11 -2
- package/architecture/maintainability-policy.json +149 -17
- package/architecture/v4-floating-consumer-policy.json +75 -0
- package/architecture/v4-floating-consumer-policy.md +32 -0
- package/architecture/v4-runtime-ref-resume-authority.json +64 -0
- package/architecture/v4-stage-capsule-qualification.json +2 -2
- package/bin/internal/trust-release-release-handlers.mjs +5 -0
- package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +53 -0
- package/contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json +15 -0
- package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +105 -0
- package/contracts/v4-runtime-ref-resume-authority-v1.schema.json +235 -0
- package/dist/site/buildchain-contract.json +101 -31
- package/dist/site/buildchain-site.json +73 -27
- package/dist/site/capability-registry.json +3 -3
- package/dist/site/controller-registry.json +62 -6
- package/dist/site/kfd-claims.json +68 -13
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +6 -6
- package/dist/site/node-api-registry.json +799 -127
- package/dist/site/page-registry.json +63 -17
- package/dist/site/public-surface-audit.json +49 -17
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +2 -0
- package/dist/site/site-manifest.json +10 -10
- package/dist/site/workflow-registry.json +46 -18
- package/docs/MAP.md +2 -0
- package/docs/dev-delivery-warrant.md +19 -1
- package/docs/lifecycle-protocol.md +41 -0
- package/docs/node-api-reference.md +207 -134
- package/docs/reusable-build-surface.md +41 -0
- package/docs/runtime-train-validation.md +10 -0
- package/docs/v4-runtime-ref-resume-authority.md +69 -0
- package/docs/versioning.md +1 -0
- package/package.json +6 -4
- package/packages/core/artifact-signing.js +61 -0
- package/packages/core/buildchain-config.js +66 -1
- package/packages/core/dev-delivery-proof.js +37 -3
- package/packages/core/dev-delivery-warrant.js +3 -3
- package/packages/core/index.js +2 -0
- package/packages/core/publication-authority.js +5 -5
- package/packages/core/release-candidate.js +79 -19
- package/packages/core/release-passport.js +239 -33
- package/packages/core/v4-floating-consumer-evidence.js +324 -0
- package/packages/core/v4-floating-consumer-policy.js +446 -0
- package/packages/core/v4-floating-consumer-release-passport.js +126 -0
- package/packages/core/v4-runtime-ref-resume-authority.js +625 -0
- package/packages/core/v4-runtime-selector-persistence.js +228 -0
- package/packages/core/workflow-yaml-contract.js +48 -0
- package/scripts/audit-publication-control-plane.mjs +31 -31
- package/scripts/check-inventory.mjs +1 -1
- package/scripts/check-v4-floating-consumer-policy-contract.mjs +198 -0
- package/scripts/check-v4-public-dogfood-contract.mjs +6 -11
- package/scripts/dev-delivery-source-proof-reuse.mjs +631 -0
- package/scripts/dev-pr-auto-merge.mjs +37 -48
- package/scripts/dev-pr-delivery-warrant.mjs +205 -2
- package/scripts/dev-pr-prequeue-guard.mjs +399 -0
- package/scripts/ensure-github-release.mjs +3 -3
- package/scripts/generate-channel-build-workflow.mjs +3 -0
- package/scripts/generate-channel-promotion-workflow.mjs +112 -12
- package/scripts/generate-release-candidate-passport.mjs +41 -33
- package/scripts/init-repo.mjs +5 -1
- package/scripts/inspect-artifact-signing-requests.mjs +6 -0
- package/scripts/npm-publish-transaction.mjs +101 -89
- package/scripts/resume-from-candidate-run.mjs +11 -14
- package/scripts/seal-artifact-signing-requests.mjs +6 -0
- package/scripts/site-capability-metadata.mjs +2 -0
- package/scripts/v4-consumer-policy.mjs +231 -0
package/AGENTS.md
CHANGED
|
@@ -109,12 +109,20 @@ called only by the public reusable workflow and tests. `version-state`,
|
|
|
109
109
|
`publish`, provider, signing, release, credential, AWS, and production-reuse
|
|
110
110
|
effects remain excluded.
|
|
111
111
|
|
|
112
|
+
Buildchain v4 workflow calls persisted in tracked source use only `@v4` or
|
|
113
|
+
`@v4-alpha` and retain matching stable and alpha contract locks.
|
|
114
|
+
A source-persisted exact commit SHA, exact default, repository-variable indirection, nested
|
|
115
|
+
composite indirection, missing lock, or stale selected lock fails consumer
|
|
116
|
+
admission. Exact resolved SHAs remain evidence and runtime data, never a durable
|
|
117
|
+
selector.
|
|
118
|
+
|
|
112
119
|
If public workflow recursion prevents candidate validation, publish the exact
|
|
113
|
-
candidate at `train/v4/v4.0/<capability
|
|
114
|
-
|
|
115
|
-
never solve recursion with an internal exception.
|
|
116
|
-
|
|
117
|
-
the
|
|
120
|
+
candidate at `train/v4/v4.0/<capability>`, keep the thin caller on `@v4-alpha`,
|
|
121
|
+
and pass the train only through the trusted non-persistent runtime input. Fix
|
|
122
|
+
failures in the train/public contract; never solve recursion with an internal exception.
|
|
123
|
+
Never use a persisted train/SHA selector. After qualification and protected
|
|
124
|
+
merge, the durable caller remains on the floating channel with refreshed dual
|
|
125
|
+
contract locks. `pnpm run check` and protected Verify run
|
|
118
126
|
`scripts/check-v4-public-dogfood-contract.mjs`; changing this rule, its gate, or
|
|
119
127
|
the protected caller requires independent `@kungfu-origin` review.
|
|
120
128
|
|
|
@@ -156,8 +156,10 @@ trusted channel workflow:
|
|
|
156
156
|
|
|
157
157
|
```yaml
|
|
158
158
|
- uses: kungfu-systems/buildchain/actions/promote-buildchain-ref@v3
|
|
159
|
+
env:
|
|
160
|
+
BUILDCHAIN_TAG_UPDATE_TOKEN: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}
|
|
159
161
|
with:
|
|
160
|
-
token: ${{
|
|
162
|
+
token: ${{ github.token }}
|
|
161
163
|
generated-ref-update-token: ${{ github.token }}
|
|
162
164
|
sha: ${{ github.sha }}
|
|
163
165
|
target-ref: release/v3/v3.0
|
|
@@ -511,11 +513,14 @@ governance semantics:
|
|
|
511
513
|
with either the `verification-command` input or `buildchain.toml`
|
|
512
514
|
`lifecycle.verify` before any tags or channel refs move.
|
|
513
515
|
|
|
514
|
-
The reusable promotion workflow keeps governance reads,
|
|
515
|
-
and generated ref updates on the run-scoped
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
516
|
+
The reusable promotion workflow keeps governance reads, provider finalization,
|
|
517
|
+
generated status checks, and generated ref updates on the run-scoped
|
|
518
|
+
`github.token`. It exposes `BUILDCHAIN_PROMOTION_TOKEN` only through the
|
|
519
|
+
step-scoped `BUILDCHAIN_TAG_UPDATE_TOKEN` environment variable and the
|
|
520
|
+
`generated-pull-request-token`: the former creates or moves public release tags,
|
|
521
|
+
while the latter lists or creates the
|
|
522
|
+
same-repository recovery PR when branch protection rejects generated bookkeeping.
|
|
523
|
+
Protected branch
|
|
519
524
|
review and check rules guard human channel merges, while the reusable build trust
|
|
520
525
|
gate checks the source-lock channel HEAD and merged same-repository PR lineage
|
|
521
526
|
before heavy build runners start. This action still independently rechecks PR
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"scripts/v4-bridge-evidence.mjs",
|
|
49
49
|
"scripts/v4-host-adapter.mjs",
|
|
50
50
|
"crates/buildchain-v4-bridge/src/main.rs",
|
|
51
|
+
"packages/core/v4-runtime-ref-resume-authority.js",
|
|
52
|
+
"packages/core/v4-runtime-selector-persistence.js",
|
|
51
53
|
"packages/core/v4-provider-operation-journal.js",
|
|
52
54
|
"packages/core/v4-stage-capsule.js",
|
|
53
55
|
"packages/core/v4-stage-capsule-store.js",
|
|
@@ -431,6 +433,8 @@
|
|
|
431
433
|
"packages/core/v4-stable-publication-fence.js",
|
|
432
434
|
"packages/core/v4-partial-mutation-recovery-qualification.js",
|
|
433
435
|
"packages/core/v4-adopter-delivery-parity.js",
|
|
436
|
+
"packages/core/v4-runtime-ref-resume-authority.js",
|
|
437
|
+
"packages/core/v4-runtime-selector-persistence.js",
|
|
434
438
|
"packages/core/v4-stage-capsule.js",
|
|
435
439
|
"packages/core/v4-stage-capsule-store.js",
|
|
436
440
|
"packages/core/v4-stage-capsule-local-store.js",
|
|
@@ -463,7 +467,8 @@
|
|
|
463
467
|
"tests/v4-stage-capsule-store.test.mjs",
|
|
464
468
|
"tests/v4-platform-stage-checkpoints.test.mjs",
|
|
465
469
|
"tests/v4-stage-capsule-qualification.test.mjs",
|
|
466
|
-
"tests/v4-adopter-delivery-parity.test.mjs"
|
|
470
|
+
"tests/v4-adopter-delivery-parity.test.mjs",
|
|
471
|
+
"tests/v4-runtime-ref-resume-authority.test.mjs"
|
|
467
472
|
],
|
|
468
473
|
"contracts": [
|
|
469
474
|
"architecture/v4-architecture-constitution.md",
|
|
@@ -481,6 +486,7 @@
|
|
|
481
486
|
"architecture/v4-platform-stage-checkpoints.json",
|
|
482
487
|
"architecture/v4-stage-capsule-qualification.json",
|
|
483
488
|
"architecture/v4-adopter-delivery-parity.json",
|
|
489
|
+
"architecture/v4-runtime-ref-resume-authority.json",
|
|
484
490
|
"contracts/v4-host-contract-v1.schema.json",
|
|
485
491
|
"contracts/v4-provider-operation-journal-v1.schema.json",
|
|
486
492
|
"contracts/v4-release-activation-shadow-v1.schema.json",
|
|
@@ -495,7 +501,10 @@
|
|
|
495
501
|
"contracts/fixtures/v4-release-activation-shadow-v1/shared.json",
|
|
496
502
|
"contracts/fixtures/v4-stable-publication-fence-v1/shared.json",
|
|
497
503
|
"contracts/fixtures/v4-partial-mutation-recovery-v1/shared.json",
|
|
498
|
-
"
|
|
504
|
+
"contracts/v4-runtime-ref-resume-authority-v1.schema.json",
|
|
505
|
+
"contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json",
|
|
506
|
+
"docs/v4-stage-capsule.md",
|
|
507
|
+
"docs/v4-runtime-ref-resume-authority.md"
|
|
499
508
|
]
|
|
500
509
|
}
|
|
501
510
|
]
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"enforcementRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
6
6
|
"repositoryBudgets": {
|
|
7
7
|
"baselineRevision": "c70e6ac28431888b24fefc218246cc69f8dde85a",
|
|
8
|
-
"maxHandMaintainedSourceFiles":
|
|
9
|
-
"maxHandMaintainedSourceLines":
|
|
8
|
+
"maxHandMaintainedSourceFiles": 353,
|
|
9
|
+
"maxHandMaintainedSourceLines": 136936,
|
|
10
10
|
"maxWorkflowFiles": 71,
|
|
11
|
-
"maxWorkflowLines":
|
|
12
|
-
"latestTransition": "The v4
|
|
13
|
-
"rationale": "
|
|
11
|
+
"maxWorkflowLines": 24190,
|
|
12
|
+
"latestTransition": "The v4 promotion surface now admits one rooted transient exact-runtime authorization, rejects persisted selector authority, and carries fresh-attempt Stage Capsule reuse lineage into the final Release Passport.",
|
|
13
|
+
"rationale": "The existing dev queue Warrant admission, adopter compatibility port, and exact source-proof reuse remain included unchanged. Two bounded runtime-resume modules, one provider authorization adapter, rooted schema and fixtures, workflow admission gates, action and Passport plumbing, capability metadata, and negative tests account for this transition's exact growth. Exact SHAs remain transient, failed jobs are never rerun, unaffected sealed platform capsules are reused by identity, and v3 behavior remains unchanged. These exact 353-file, 136936-source-line and 24190-workflow-line ceilings cannot grow implicitly."
|
|
14
14
|
},
|
|
15
15
|
"sourceBudgets": {
|
|
16
16
|
"newFileLines": 600,
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"existingDebtPolicy": "no-widening"
|
|
20
20
|
},
|
|
21
21
|
"approvedNewFileTransitions": {
|
|
22
|
+
"scripts/dev-delivery-source-proof-reuse.mjs": {
|
|
23
|
+
"maxLines": 631,
|
|
24
|
+
"rationale": "The bounded source-proof driver seals one exact PR qualification and verifies either the reviewed two-parent merge or GitHub's exact linear replay by base ancestry, commit count and every intermediate tree. Unknown, nonlinear, extra-commit or tree-drift compositions still fail closed to the full lifecycle, and this exact file ceiling cannot grow implicitly."
|
|
25
|
+
},
|
|
26
|
+
"scripts/dev-pr-prequeue-guard.mjs": {
|
|
27
|
+
"maxLines": 399,
|
|
28
|
+
"rationale": "The bounded guard keeps latest-base delta attribution, rooted source-proof reuse classification, synthetic merge composition readback, stable pre-enqueue failures, and the final base, head, queue, and Warrant compare-and-swap outside the legacy Dev PR controller; it cannot mutate the frozen source head or authorize landing by itself, and this exact file ceiling cannot grow implicitly."
|
|
29
|
+
},
|
|
22
30
|
"scripts/v4-architecture.mjs": {
|
|
23
31
|
"maxLines": 610,
|
|
24
32
|
"rationale": "The v4 architecture validator adds only the bounded production-authority, fallback, rollback, writer-runtime, and legacy-retirement checks required for the final release cutover. This exact reviewed ceiling cannot grow implicitly."
|
|
@@ -56,12 +64,24 @@
|
|
|
56
64
|
"maxFunctionLines": 255,
|
|
57
65
|
"maxFunctionComplexity": 33,
|
|
58
66
|
"rationale": "The one versioned transaction authority keeps strict declaration normalization, deterministic effect planning, atomic checkpoints, rooted observations and receipts, and bounded recovery in one independently tested audit surface; this exact preview ceiling cannot grow implicitly."
|
|
67
|
+
},
|
|
68
|
+
"packages/core/v4-runtime-ref-resume-authority.js": {
|
|
69
|
+
"maxLines": 625,
|
|
70
|
+
"rationale": "The reviewed v4 authority keeps exact-runtime authorization, source and lock binding, fresh-attempt Stage Capsule reuse, floating-ref movement, final readback, and Passport lineage verification in one bounded public module; persistence scanning is separately owned and this exact ceiling cannot grow implicitly."
|
|
71
|
+
},
|
|
72
|
+
"packages/core/v4-runtime-selector-persistence.js": {
|
|
73
|
+
"maxLines": 228,
|
|
74
|
+
"rationale": "The isolated source scanner rejects persisted exact, train, authority, variable, secret, and environment selector authority while inventorying OIDC, IAM, and external authority metadata without reading credentials; this exact ceiling cannot grow implicitly."
|
|
59
75
|
}
|
|
60
76
|
},
|
|
61
77
|
"approvedExistingDebtTransitions": {
|
|
62
78
|
"packages/core/index.js": {
|
|
63
|
-
"maxLines":
|
|
64
|
-
"rationale": "The public facade forwards the reviewed declarative release-tail
|
|
79
|
+
"maxLines": 699,
|
|
80
|
+
"rationale": "The public facade forwards the reviewed runtime-resume authority beside the existing declarative release-tail and v4 governance APIs without adding a second implementation or execution path; this exact post-integration ceiling cannot grow implicitly."
|
|
81
|
+
},
|
|
82
|
+
"actions/promote-buildchain-ref/index.js": {
|
|
83
|
+
"maxFunctionLines": 276,
|
|
84
|
+
"rationale": "The existing action entrypoint forwards one optional rooted v4 runtime-resume evidence document into the already audited durable Passport operation; this one-line terminal widening is exact and cannot grow implicitly."
|
|
65
85
|
},
|
|
66
86
|
"actions/promote-buildchain-ref/lib.js": {
|
|
67
87
|
"maxLines": 6952,
|
|
@@ -72,8 +92,9 @@
|
|
|
72
92
|
"rationale": "The runtime entrypoint now binds every compatibility command and alias, including the upstream paper command, through the tested command registry; this exact post-integration wiring ceiling cannot grow implicitly."
|
|
73
93
|
},
|
|
74
94
|
"packages/core/release-passport.js": {
|
|
75
|
-
"maxLines":
|
|
76
|
-
"
|
|
95
|
+
"maxLines": 2958,
|
|
96
|
+
"maxFunctionLines": 304,
|
|
97
|
+
"rationale": "Responsibility-owned validators preserve issue ordering, byte-stable reports, upstream release evidence, consumer-policy certification, and the new rooted runtime A+B resume lineage. The optional attachment is normalized and independently reverified before inclusion; these exact post-integration ceilings cannot grow implicitly."
|
|
77
98
|
},
|
|
78
99
|
"packages/core/buildchain-contract.js": {
|
|
79
100
|
"maxLines": 1095,
|
|
@@ -85,6 +106,10 @@
|
|
|
85
106
|
"maxLines": 1368,
|
|
86
107
|
"rationale": "The publication authority now declares the alpha/v4/v4.0 and release/v4/v4.0 protected channels required for the v4 public train. This exact two-line channel transition cannot grow implicitly."
|
|
87
108
|
},
|
|
109
|
+
"packages/core/buildchain-config.js": {
|
|
110
|
+
"maxLines": 1806,
|
|
111
|
+
"rationale": "Artifact signing configuration admits only the Buildchain-owned JIT profile with exact safe archive-relative target paths while rejecting credentials, entitlement files, wildcard paths, incompatible artifact kinds, and incomplete declarations; this exact wiring ceiling cannot grow implicitly."
|
|
112
|
+
},
|
|
88
113
|
"scripts/check-internal-architecture.mjs": {
|
|
89
114
|
"maxFunctionComplexity": 37,
|
|
90
115
|
"rationale": "Ownership coverage and zero-cycle enforcement were added to the pre-existing architecture traversal; this exact guard complexity ceiling cannot grow implicitly."
|
|
@@ -136,6 +161,44 @@
|
|
|
136
161
|
}
|
|
137
162
|
},
|
|
138
163
|
"approvedPublicSurfaceTransitions": {
|
|
164
|
+
"workflow:check": {
|
|
165
|
+
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
166
|
+
"contract": {
|
|
167
|
+
"id": "check",
|
|
168
|
+
"path": ".github/workflows/check.yml",
|
|
169
|
+
"reusable": true,
|
|
170
|
+
"inputs": [
|
|
171
|
+
"buildchain-ref",
|
|
172
|
+
"buildchain-repository",
|
|
173
|
+
"mode",
|
|
174
|
+
"node-version",
|
|
175
|
+
"require-version-state",
|
|
176
|
+
"source-proof-closure-paths-json",
|
|
177
|
+
"source-proof-dependency-paths-json",
|
|
178
|
+
"source-proof-policy-paths-json",
|
|
179
|
+
"source-proof-required-contexts-json",
|
|
180
|
+
"source-proof-reuse",
|
|
181
|
+
"upload-artifacts",
|
|
182
|
+
"working-directory"
|
|
183
|
+
],
|
|
184
|
+
"secrets": [],
|
|
185
|
+
"outputs": [
|
|
186
|
+
"controller-plan-artifact",
|
|
187
|
+
"controller-plan-digest",
|
|
188
|
+
"controller-plan-json",
|
|
189
|
+
"controller-receipt-artifact",
|
|
190
|
+
"controller-receipt-digest",
|
|
191
|
+
"controller-receipt-json",
|
|
192
|
+
"controller-receipt-status",
|
|
193
|
+
"source-proof-decision-root",
|
|
194
|
+
"source-proof-producer-run-id",
|
|
195
|
+
"source-proof-reuse-reason",
|
|
196
|
+
"source-proof-reused",
|
|
197
|
+
"source-proof-root"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"rationale": "Add an opt-in merge-group fast path that accepts only an unexpired artifact from a successful same-workflow pull-request run and recomputes exact source, base, patch, runtime, plan, policy, closure, dependency, required-context, controller-receipt, and two-parent merge-group bindings. Existing callers remain on the full lifecycle by default, while any missing evidence, API failure, mismatch, grouped composition, or malformed proof also runs the full lifecycle."
|
|
201
|
+
},
|
|
139
202
|
"action:promote-buildchain-ref": {
|
|
140
203
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
141
204
|
"contract": {
|
|
@@ -210,6 +273,9 @@
|
|
|
210
273
|
"release-passport-platform-manifest-paths",
|
|
211
274
|
"release-passport-product-name",
|
|
212
275
|
"release-passport-promotion-routing-json",
|
|
276
|
+
"release-passport-v4-consumer-policy-certification-json",
|
|
277
|
+
"release-passport-v4-consumer-policy-certification-root",
|
|
278
|
+
"release-passport-v4-runtime-resume-evidence-json",
|
|
213
279
|
"release-tail-state-path",
|
|
214
280
|
"require-governance",
|
|
215
281
|
"require-publication-qualification",
|
|
@@ -226,7 +292,7 @@
|
|
|
226
292
|
"secrets": [],
|
|
227
293
|
"outputs": []
|
|
228
294
|
},
|
|
229
|
-
"rationale": "The promote action
|
|
295
|
+
"rationale": "The promote action preserves the independently rooted v4 consumer-policy certification and now accepts one optional verified runtime-resume evidence document for final Release Passport construction; v3 behavior remains unchanged."
|
|
230
296
|
},
|
|
231
297
|
"cli:architecture": {
|
|
232
298
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
@@ -339,6 +405,7 @@
|
|
|
339
405
|
"path": ".github/workflows/dev-pr-auto-merge.yml",
|
|
340
406
|
"reusable": true,
|
|
341
407
|
"inputs": [
|
|
408
|
+
"active-lease-context",
|
|
342
409
|
"affected-paths-json",
|
|
343
410
|
"allowed-head-prefixes",
|
|
344
411
|
"assignment-root",
|
|
@@ -389,7 +456,7 @@
|
|
|
389
456
|
"warrant-state-root"
|
|
390
457
|
]
|
|
391
458
|
},
|
|
392
|
-
"rationale": "Extend targeted exact-head admission with an optional rooted Project Cut replay proof
|
|
459
|
+
"rationale": "Extend targeted exact-head admission with an optional rooted Project Cut replay proof and the exact active-lease status context needed to read back the same fenced Warrant before enqueue, while independent approval, required checks, native queue admission, and exact integration proof remain authoritative."
|
|
393
460
|
},
|
|
394
461
|
"workflow:stable-candidate-patrol": {
|
|
395
462
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
@@ -435,6 +502,59 @@
|
|
|
435
502
|
},
|
|
436
503
|
"rationale": "The existing release-propagation command adds one policy-reporting Site upstream entry and exact non-force Work branch executor while preserving plan, lock, pickup, and Work Control compatibility."
|
|
437
504
|
},
|
|
505
|
+
"workflow:publication-artifact": {
|
|
506
|
+
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
507
|
+
"contract": {
|
|
508
|
+
"id": "publication-artifact",
|
|
509
|
+
"path": ".github/workflows/publication-artifact.yml",
|
|
510
|
+
"reusable": true,
|
|
511
|
+
"inputs": [
|
|
512
|
+
"artifact-name",
|
|
513
|
+
"artifact-paths",
|
|
514
|
+
"artifact-retention-days",
|
|
515
|
+
"build-command",
|
|
516
|
+
"buildchain-alpha-contract-lock-path",
|
|
517
|
+
"buildchain-contract-compatibility-policy",
|
|
518
|
+
"buildchain-contract-drift-issue-mode",
|
|
519
|
+
"buildchain-contract-lock-path",
|
|
520
|
+
"buildchain-ref",
|
|
521
|
+
"buildchain-repository",
|
|
522
|
+
"buildchain-stable-contract-lock-path",
|
|
523
|
+
"node-version",
|
|
524
|
+
"package-name",
|
|
525
|
+
"prepare-paper-package",
|
|
526
|
+
"publish-dist-tag",
|
|
527
|
+
"setup-node",
|
|
528
|
+
"target-ref",
|
|
529
|
+
"toolchain-command",
|
|
530
|
+
"toolchain-digest",
|
|
531
|
+
"toolchain-image",
|
|
532
|
+
"toolchain-type",
|
|
533
|
+
"verify-command",
|
|
534
|
+
"working-directory"
|
|
535
|
+
],
|
|
536
|
+
"secrets": [],
|
|
537
|
+
"outputs": [
|
|
538
|
+
"controller-plan-artifact",
|
|
539
|
+
"controller-plan-digest",
|
|
540
|
+
"controller-plan-json",
|
|
541
|
+
"controller-receipt-artifact",
|
|
542
|
+
"controller-receipt-digest",
|
|
543
|
+
"controller-receipt-json",
|
|
544
|
+
"controller-receipt-status",
|
|
545
|
+
"package-name",
|
|
546
|
+
"package-version",
|
|
547
|
+
"publication-artifact-name",
|
|
548
|
+
"publication-manifest-json",
|
|
549
|
+
"publication-manifest-path",
|
|
550
|
+
"publication-passport-path",
|
|
551
|
+
"publication-registry-path",
|
|
552
|
+
"publish-dist-tag",
|
|
553
|
+
"runtime-sha"
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"rationale": "The publication workflow adds consumer-owned stable and alpha lock inputs so its earliest semantic v4 admission gate can bind the persisted floating selector before controller or package execution; its outputs and v3 behavior remain unchanged."
|
|
557
|
+
},
|
|
438
558
|
"workflow:.build": {
|
|
439
559
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
440
560
|
"contract": {
|
|
@@ -469,6 +589,7 @@
|
|
|
469
589
|
"buildchain-expected-major",
|
|
470
590
|
"buildchain-ref",
|
|
471
591
|
"buildchain-repository",
|
|
592
|
+
"buildchain-visible-workflow",
|
|
472
593
|
"cache-dependency-lock-root",
|
|
473
594
|
"cache-policy-root",
|
|
474
595
|
"cache-toolchain-root",
|
|
@@ -587,10 +708,12 @@
|
|
|
587
708
|
"release-manifest-json",
|
|
588
709
|
"runner-preset",
|
|
589
710
|
"runner-routing-json",
|
|
590
|
-
"trusted-event"
|
|
711
|
+
"trusted-event",
|
|
712
|
+
"v4-consumer-policy-receipt-json",
|
|
713
|
+
"v4-consumer-policy-receipt-root"
|
|
591
714
|
]
|
|
592
715
|
},
|
|
593
|
-
"rationale": "The reusable build surface
|
|
716
|
+
"rationale": "The reusable build surface carries one internal visible-workflow coordinate into the earliest semantic v4 consumer admission gate and emits the source/runtime/dual-lock-bound receipt; build, install, and release authority remain downstream of that gate."
|
|
594
717
|
},
|
|
595
718
|
"workflow:build": {
|
|
596
719
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
@@ -629,6 +752,7 @@
|
|
|
629
752
|
"buildchain-ref",
|
|
630
753
|
"buildchain-repository",
|
|
631
754
|
"buildchain-stable-contract-lock-path",
|
|
755
|
+
"buildchain-visible-workflow",
|
|
632
756
|
"cache-dependency-lock-root",
|
|
633
757
|
"cache-policy-root",
|
|
634
758
|
"cache-toolchain-root",
|
|
@@ -750,10 +874,12 @@
|
|
|
750
874
|
"release-manifest-json",
|
|
751
875
|
"runner-preset",
|
|
752
876
|
"runner-routing-json",
|
|
753
|
-
"trusted-event"
|
|
877
|
+
"trusted-event",
|
|
878
|
+
"v4-consumer-policy-receipt-json",
|
|
879
|
+
"v4-consumer-policy-receipt-root"
|
|
754
880
|
]
|
|
755
881
|
},
|
|
756
|
-
"rationale": "The generated channel router forwards the
|
|
882
|
+
"rationale": "The generated channel router forwards the visible-workflow coordinate and semantic v4 policy receipt while retaining floating v4 or v4-alpha selectors, dual consumer locks, and trusted nonpersistent runtime override routing."
|
|
757
883
|
},
|
|
758
884
|
|
|
759
885
|
"workflow:paper-release-sealed": {
|
|
@@ -927,6 +1053,7 @@
|
|
|
927
1053
|
"branch-protection-bypass-apps",
|
|
928
1054
|
"branch-protection-bypass-teams",
|
|
929
1055
|
"branch-protection-bypass-users",
|
|
1056
|
+
"buildchain-alpha-contract-lock-path",
|
|
930
1057
|
"buildchain-contract-compatibility-policy",
|
|
931
1058
|
"buildchain-contract-drift-issue-mode",
|
|
932
1059
|
"buildchain-contract-lock-path",
|
|
@@ -934,6 +1061,7 @@
|
|
|
934
1061
|
"buildchain-expected-major",
|
|
935
1062
|
"buildchain-ref",
|
|
936
1063
|
"buildchain-repository",
|
|
1064
|
+
"buildchain-stable-contract-lock-path",
|
|
937
1065
|
"channel",
|
|
938
1066
|
"declarative-release-tail",
|
|
939
1067
|
"dry-run",
|
|
@@ -952,6 +1080,8 @@
|
|
|
952
1080
|
"promotion-publication-channel",
|
|
953
1081
|
"promotion-router-ref",
|
|
954
1082
|
"promotion-router-sha",
|
|
1083
|
+
"promotion-runtime-authorization-json",
|
|
1084
|
+
"promotion-runtime-authorization-root",
|
|
955
1085
|
"promotion-runtime-ref",
|
|
956
1086
|
"promotion-runtime-sha",
|
|
957
1087
|
"promotion-shell-ref",
|
|
@@ -1017,6 +1147,7 @@
|
|
|
1017
1147
|
"release-passport-output-dir",
|
|
1018
1148
|
"release-passport-platform-manifest-paths",
|
|
1019
1149
|
"release-passport-product-name",
|
|
1150
|
+
"release-passport-v4-runtime-resume-evidence-json",
|
|
1020
1151
|
"release-propagation-config-path",
|
|
1021
1152
|
"required-artifact-count",
|
|
1022
1153
|
"required-status-check",
|
|
@@ -1078,7 +1209,7 @@
|
|
|
1078
1209
|
"release-tail-transaction-state"
|
|
1079
1210
|
]
|
|
1080
1211
|
},
|
|
1081
|
-
"rationale": "The advanced promotion workflow preserves
|
|
1212
|
+
"rationale": "The advanced promotion workflow preserves exact contract-lock and channel bindings while adding a trusted transient runtime authorization plus expected root and an optional final Passport resume attachment. Candidate, target tree, policy, scanner, dual-lock, provider and fresh-attempt lineage remain independently bound, and incomplete or mismatched evidence fails closed before heavy work."
|
|
1082
1213
|
},
|
|
1083
1214
|
"workflow:release-candidate-promote": {
|
|
1084
1215
|
"fromRevision": "5308189b09bcb5a1314195412f2807a40d678838",
|
|
@@ -1172,6 +1303,7 @@
|
|
|
1172
1303
|
"release-passport-output-dir",
|
|
1173
1304
|
"release-passport-platform-manifest-paths",
|
|
1174
1305
|
"release-passport-product-name",
|
|
1306
|
+
"release-passport-v4-runtime-resume-evidence-json",
|
|
1175
1307
|
"release-propagation-config-path",
|
|
1176
1308
|
"required-artifact-count",
|
|
1177
1309
|
"required-status-check",
|
|
@@ -1245,7 +1377,7 @@
|
|
|
1245
1377
|
"release-tail-transaction-state"
|
|
1246
1378
|
]
|
|
1247
1379
|
},
|
|
1248
|
-
"rationale": "The generated v4 promotion router
|
|
1380
|
+
"rationale": "The generated v4 promotion router preserves the opt-in declarative release-tail contract and exact contract-lock routing while forwarding one optional verified runtime-resume attachment through both existing channel jobs without changing default legacy publication behavior."
|
|
1249
1381
|
}
|
|
1250
1382
|
},
|
|
1251
1383
|
"approvedExtractedDebt": {
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"contract": "kungfu-buildchain-v4-floating-consumer-policy/v1",
|
|
4
|
+
"policyVersion": "2026-08-14",
|
|
5
|
+
"scope": {
|
|
6
|
+
"repository": "kungfu-systems/buildchain",
|
|
7
|
+
"majorLine": "v4",
|
|
8
|
+
"persistedSelectors": ["v4", "v4-alpha"],
|
|
9
|
+
"publicWorkflowEntrypoints": [
|
|
10
|
+
".github/workflows/.build.yml",
|
|
11
|
+
".github/workflows/publication-artifact.yml",
|
|
12
|
+
".github/workflows/release-candidate-promote.yml",
|
|
13
|
+
".github/workflows/v4-stage-capsule-canary.yml"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"contractLocks": {
|
|
17
|
+
"stable": {
|
|
18
|
+
"selector": "v4",
|
|
19
|
+
"path": ".buildchain/contract-lock.json"
|
|
20
|
+
},
|
|
21
|
+
"alpha": {
|
|
22
|
+
"selector": "v4-alpha",
|
|
23
|
+
"path": ".buildchain/alpha-contract-lock.json"
|
|
24
|
+
},
|
|
25
|
+
"selectedLockMustBindResolvedWorkflowShell": true,
|
|
26
|
+
"bothRootsRequiredInReceipt": true
|
|
27
|
+
},
|
|
28
|
+
"sourcePolicy": {
|
|
29
|
+
"directExactSha": "deny",
|
|
30
|
+
"exactDefault": "deny",
|
|
31
|
+
"repositoryVariableIndirection": "deny",
|
|
32
|
+
"inputOrEnvironmentIndirection": "deny",
|
|
33
|
+
"nestedCompositeIndirection": "deny",
|
|
34
|
+
"unknownSyntax": "deny",
|
|
35
|
+
"missingCallerCheckout": "deny"
|
|
36
|
+
},
|
|
37
|
+
"runtimeEscapeBoundary": {
|
|
38
|
+
"persistedSelectorOverride": false,
|
|
39
|
+
"trustedNonPersistentInput": true,
|
|
40
|
+
"requiresSeparateAuthority": true,
|
|
41
|
+
"requiresReadback": true,
|
|
42
|
+
"receiptReuse": false
|
|
43
|
+
},
|
|
44
|
+
"receipt": {
|
|
45
|
+
"schema": "contracts/v4-floating-consumer-policy-receipt-v1.schema.json",
|
|
46
|
+
"bindings": [
|
|
47
|
+
"caller-repository",
|
|
48
|
+
"caller-source-sha",
|
|
49
|
+
"invoked-workflow",
|
|
50
|
+
"visible-selector-class",
|
|
51
|
+
"channel",
|
|
52
|
+
"stable-contract-lock-root",
|
|
53
|
+
"alpha-contract-lock-root",
|
|
54
|
+
"resolved-workflow-shell-sha",
|
|
55
|
+
"resolved-runtime-sha",
|
|
56
|
+
"policy-version",
|
|
57
|
+
"policy-root",
|
|
58
|
+
"scanner-root",
|
|
59
|
+
"source-scan-root"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"enforcement": {
|
|
63
|
+
"earliestConsumerAdmissionRequired": true,
|
|
64
|
+
"heavyJobsTransitivelyGated": true,
|
|
65
|
+
"externalCertificationRequired": true,
|
|
66
|
+
"releasePassportRequired": true,
|
|
67
|
+
"oldRuntimeSelfAuthorization": false
|
|
68
|
+
},
|
|
69
|
+
"authority": {
|
|
70
|
+
"v3BehaviorChange": false,
|
|
71
|
+
"providerEffects": false,
|
|
72
|
+
"credentials": false,
|
|
73
|
+
"productionMutation": false
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Architecture Decision: v4 Floating Consumer Admission
|
|
2
|
+
|
|
3
|
+
Status: accepted for the v4 shadow and protected-delivery line on 2026-08-14.
|
|
4
|
+
|
|
5
|
+
Buildchain v4 consumers persist only the public `v4` and `v4-alpha` selectors.
|
|
6
|
+
They commit both `.buildchain/contract-lock.json` and
|
|
7
|
+
`.buildchain/alpha-contract-lock.json`; the selected lock binds the exact commit
|
|
8
|
+
behind the visible workflow selector. An exact SHA remains evidence, not a
|
|
9
|
+
source selector.
|
|
10
|
+
|
|
11
|
+
Every declared public v4 entrypoint runs consumer admission after immutable
|
|
12
|
+
source/runtime checkout and before package setup, matrix expansion, build, or
|
|
13
|
+
publication work. Downstream jobs depend on that admission. The scanner uses
|
|
14
|
+
the shared workflow YAML semantic layer and follows local composite action
|
|
15
|
+
manifests, so block scalar text is not mistaken for a `uses` node and nested
|
|
16
|
+
indirection cannot hide a selector.
|
|
17
|
+
|
|
18
|
+
The rooted receipt binds the caller repository and source SHA, invoked workflow,
|
|
19
|
+
selector class and channel, visible workflow-shell SHA, actual runtime SHA, both
|
|
20
|
+
contract-lock roots, and the policy/scanner/source-scan roots. A trusted manual
|
|
21
|
+
train or SHA may replace only the actual runtime coordinate; it does not rewrite
|
|
22
|
+
the tracked selector or the lock-to-shell binding.
|
|
23
|
+
|
|
24
|
+
Release-candidate Passport construction requires the receipt for v4 runtimes.
|
|
25
|
+
Promotion independently certifies it, and final Release Passport construction
|
|
26
|
+
requires that certification to match the caller source and actual runtime.
|
|
27
|
+
Missing, rejected, stale, root-mismatched, or old-runtime evidence fails closed.
|
|
28
|
+
|
|
29
|
+
The normative machine declaration is
|
|
30
|
+
[`v4-floating-consumer-policy.json`](v4-floating-consumer-policy.json). v3
|
|
31
|
+
behavior, provider effects, credentials, and production mutation authority are
|
|
32
|
+
outside this decision.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"contract": "kungfu-buildchain-v4-runtime-ref-resume-authority/v1",
|
|
4
|
+
"schemaAuthority": "contracts/v4-runtime-ref-resume-authority-v1.schema.json",
|
|
5
|
+
"fixtureAuthority": "contracts/fixtures/v4-runtime-ref-resume-authority-v1/scenario.json",
|
|
6
|
+
"runtimeAuthority": "packages/core/v4-runtime-ref-resume-authority.js",
|
|
7
|
+
"mode": "v4-only",
|
|
8
|
+
"transientSelection": {
|
|
9
|
+
"trustedEvent": "workflow_dispatch",
|
|
10
|
+
"actorPermissions": ["write", "maintain", "admin"],
|
|
11
|
+
"approvedRefs": [
|
|
12
|
+
"v4",
|
|
13
|
+
"v4-alpha",
|
|
14
|
+
"train/v4/v4.N/*",
|
|
15
|
+
"authority/v4/v4.N/*"
|
|
16
|
+
],
|
|
17
|
+
"exactShaRequiresApprovedRefReachability": true,
|
|
18
|
+
"operatorReasonRequired": true,
|
|
19
|
+
"sourceTreeBound": true,
|
|
20
|
+
"consumerPolicyReceiptBound": true,
|
|
21
|
+
"dualContractLockRootsBound": true,
|
|
22
|
+
"providerReadbackRooted": true
|
|
23
|
+
},
|
|
24
|
+
"persistence": {
|
|
25
|
+
"exactShaDefault": "deny",
|
|
26
|
+
"trainOrAuthorityDefault": "deny",
|
|
27
|
+
"repositoryVariableIndirection": "deny",
|
|
28
|
+
"secretIndirection": "deny",
|
|
29
|
+
"environmentIndirection": "deny",
|
|
30
|
+
"oidcIamAndExternalAuthorityInventory": "metadata-only"
|
|
31
|
+
},
|
|
32
|
+
"resume": {
|
|
33
|
+
"freshAttemptRequired": true,
|
|
34
|
+
"failedJobRerun": false,
|
|
35
|
+
"floatingRefMovementRequired": true,
|
|
36
|
+
"buildAndResumeRuntimeMustDiffer": true,
|
|
37
|
+
"sealedCapsuleIdentity": [
|
|
38
|
+
"source-sha",
|
|
39
|
+
"source-tree-sha",
|
|
40
|
+
"platform",
|
|
41
|
+
"build-runtime-sha",
|
|
42
|
+
"consumer-policy-receipt-root",
|
|
43
|
+
"capsule-root",
|
|
44
|
+
"identity-root",
|
|
45
|
+
"artifact-digest"
|
|
46
|
+
],
|
|
47
|
+
"validUnaffectedPlatforms": "reuse",
|
|
48
|
+
"missingPlatforms": "rebuild",
|
|
49
|
+
"staleOrAmbiguousCapsules": "reject"
|
|
50
|
+
},
|
|
51
|
+
"passport": {
|
|
52
|
+
"section": "v4RuntimeResume",
|
|
53
|
+
"recordsRuntimeAAndB": true,
|
|
54
|
+
"authorizationRootRequired": true,
|
|
55
|
+
"lineageRootRequired": true,
|
|
56
|
+
"finalPublicReadbackRootRequired": true
|
|
57
|
+
},
|
|
58
|
+
"authority": {
|
|
59
|
+
"v3BehaviorChange": false,
|
|
60
|
+
"credentialsInEvidence": false,
|
|
61
|
+
"persistentExactSha": false,
|
|
62
|
+
"providerMutation": false
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"publicConsumerDogfood": {
|
|
27
27
|
"callerWorkflow": ".github/workflows/v4-public-consumer-dogfood.yml",
|
|
28
28
|
"reusableWorkflow": "kungfu-systems/buildchain/.github/workflows/v4-stage-capsule-canary.yml",
|
|
29
|
-
"validationRef": "
|
|
29
|
+
"validationRef": "v4-alpha",
|
|
30
30
|
"invocation": "workflow_call",
|
|
31
31
|
"runtimeBinding": "job.workflow_sha",
|
|
32
32
|
"consumerSourceBinding": "github.sha",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"relativeOrSelfInvocationAllowed": false,
|
|
47
47
|
"directQualificationInvocationAllowed": false,
|
|
48
48
|
"candidateBranchOverrideAllowed": false,
|
|
49
|
-
"recursionRecovery": "
|
|
49
|
+
"recursionRecovery": "floating-selector-with-trusted-runtime-input"
|
|
50
50
|
},
|
|
51
51
|
"faultCampaign": [
|
|
52
52
|
"corrupt",
|
|
@@ -262,6 +262,11 @@ async function handleCollectCommand({ args, runScript, packageVersion }) {
|
|
|
262
262
|
collectArgs,
|
|
263
263
|
"release-evidence-json",
|
|
264
264
|
),
|
|
265
|
+
v4RuntimeResumeEvidenceJson: readFlag(
|
|
266
|
+
collectArgs,
|
|
267
|
+
"v4-runtime-resume-evidence-json",
|
|
268
|
+
"",
|
|
269
|
+
),
|
|
265
270
|
githubArtifactAttestationPolicyJsons: readRepeatedFlag(
|
|
266
271
|
collectArgs,
|
|
267
272
|
"github-artifact-attestation-policy-json",
|