@kungfu-tech/buildchain 4.1.0-alpha.1 → 4.1.0-alpha.3
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/dist/site/buildchain-contract.json +2 -2
- package/dist/site/buildchain-site.json +6 -6
- package/dist/site/kfd-claims.json +2 -2
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/page-registry.json +2 -2
- package/dist/site/public-surface-audit.json +2 -2
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +4 -4
- package/dist/site/workflow-registry.json +4 -4
- package/docs/runtime-entry.md +12 -1
- package/package.json +1 -1
- package/packages/core/build/verification/actions.js +1 -0
- package/packages/core/dev-delivery/commands/dev-delivery-request.sh +2 -1
- package/packages/core/publication/authority/actions.js +8 -3
- package/packages/core/publication/authority/admission.js +0 -11
- package/packages/core/publication/authority/assembly.js +1 -1
- package/packages/core/publication/authority/control-plane.js +2 -2
- package/packages/core/publication/authority/request.js +7 -2
- package/packages/core/publication/authority/verification.js +1 -1
- package/packages/core/release/version-state.js +12 -0
- package/packages/core/runtime/entry/github.js +3 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"product": {
|
|
5
5
|
"name": "Buildchain",
|
|
6
6
|
"package": "@kungfu-tech/buildchain",
|
|
7
|
-
"version": "4.1.0-alpha.
|
|
7
|
+
"version": "4.1.0-alpha.3",
|
|
8
8
|
"repository": "https://github.com/kungfu-systems/buildchain"
|
|
9
9
|
},
|
|
10
10
|
"majorLine": "v4",
|
|
@@ -2404,5 +2404,5 @@
|
|
|
2404
2404
|
"compatibilityFactCutRoot": "sha256:58f33e498596505a26b6fc3c7ae5acef847ff699eee6c7e17a7b318a40bdf0d6",
|
|
2405
2405
|
"compatibilityProofRegistryRoot": "sha256:2f6477405c7891b754b33ad6515d55618bd320e7cdc59330d7cc645e17201e72",
|
|
2406
2406
|
"compatibilityDigest": "sha256:b1088f1c224329b16cd23c285bc69334aa1ee102e5b44d5c09aaf156d76821b6",
|
|
2407
|
-
"contractDigest": "sha256:
|
|
2407
|
+
"contractDigest": "sha256:5a95358562ed88a5d474e04e09dc6cf90cf76654c955c567c3290b8f25c234b6"
|
|
2408
2408
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-bundle",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-11T11:19:20.000Z",
|
|
5
|
+
"publishedAt": "2026-09-11T11:19:20.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "47b84ced56948e43530e933b4ba0a25a19a6ceeb",
|
|
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": "4.1.0-alpha.
|
|
40
|
+
"version": "4.1.0-alpha.3",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"source": {
|
|
@@ -4607,7 +4607,7 @@
|
|
|
4607
4607
|
],
|
|
4608
4608
|
"maturity": "stable",
|
|
4609
4609
|
"sourcePath": "docs/runtime-entry.md",
|
|
4610
|
-
"digest": "sha256:
|
|
4610
|
+
"digest": "sha256:474d9c7ad8718e2248e5792aa1aa1b64cf0bac2da368dfadf7a38d1b5982fab0",
|
|
4611
4611
|
"headings": [
|
|
4612
4612
|
{
|
|
4613
4613
|
"level": 1,
|
|
@@ -4620,7 +4620,7 @@
|
|
|
4620
4620
|
"anchor": "consumer-build-and-recovery"
|
|
4621
4621
|
}
|
|
4622
4622
|
],
|
|
4623
|
-
"markdown": "---\nstatus: draft\nperiod: ongoing\ntheme: unified-runtime-entry\ndoc_type: implementation-contract\nsource_level: user-consensus\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-11\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-11\n visible_context: Explicit user-approved runtime selection, recovery and alpha publication requirements.\n invisible_context_boundary: This contract does not claim implementation or hosted qualification is complete.\n---\n\n# Runtime entry contract\n\nConsumers persist a public workflow reference at `@v4` or `@v4-alpha`.\nGitHub resolves that entry to a commit. The entry selects execution runtime X\nfrom an explicit transient parameter, the selected contract lock, or the entry\ncommit default, in that order. The entry commit and runtime commit may differ.\n\n`actions/runtime/environment/prepare` is the sole runtime preparation owner.\nSelection is resolved once per execution. Each executing job prepares that\nselected runtime through the same implementation. Business workflows and\nactions cannot acquire, replace, reselect or install their own Buildchain\nruntime. All business composites, JavaScript modules, WASM and resources come\nfrom X. Runtime identity is retained as provenance; subsequent business nodes\ndo not compare Buildchain SHAs or require equality with the workflow commit.\n\nA runtime failure can start a recovery execution through the same public\nentry with a transient repaired train branch or tag. The new execution selects\nruntime Y and retains the original task, source and evidence. Valid completed\nresults can be reused; provider effects require readback before further writes.\nSwitching runtimes does not automatically qualify all previous results for reuse.\nNeither the persisted caller nor its contract lock needs a train rewrite.\n\nAn entry failure is repaired by publishing and adopting a corrected entry and\nstarting a complete run. Recovering an invalid entry is not a runtime feature.\nBuildchain self-dogfood uses exactly the same consumer contract and has no\nrepository-specific execution or recovery route.\n\nSource checkouts are separate business inputs. Building Buildchain itself may\ncheck out its source, but that source cannot implicitly replace the selected\nexecution runtime. Source, artifact and publication-effect checks retain their\nbusiness meaning; they do not reintroduce downstream Buildchain SHA checks.\n\nAcceptance requires a complete workflow/action acquisition inventory, enforced\nsingle preparation ownership, different entry/runtime execution, train recovery,\nplatform and multi-job qualification, and validation of the published consumer\nentry. A source test or a successful package import alone is insufficient.\n\n## Consumer build and recovery\n\n```yaml\non:\n push:\n workflow_dispatch:\n inputs:\n runtime-ref:\n description: Optional repaired train for this execution\n default: \"\"\n type: string\n resume-run-id:\n description: Original failed build run to recover\n default: \"\"\n type: string\njobs:\n build:\n uses: kungfu-systems/buildchain/.github/workflows/build.yml@v4\n with:\n runtime-ref: ${{ inputs.runtime-ref || '' }}\n resume-run-id: ${{ inputs.resume-run-id || '' }}\n```\n\nOrdinary executions use `.buildchain/contract-lock.json`; the alpha entry defaults\nto `.buildchain/alpha-contract-lock.json`. `contract-lock` selects another relative\nlock path. A missing default lock falls back to the entry commit; an invalid lock\nor an unreadable source fails preparation. A supplied runtime parameter overrides\nthe lock and requires a
|
|
4623
|
+
"markdown": "---\nstatus: draft\nperiod: ongoing\ntheme: unified-runtime-entry\ndoc_type: implementation-contract\nsource_level: user-consensus\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-11\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-11\n visible_context: Explicit user-approved runtime selection, recovery and alpha publication requirements.\n invisible_context_boundary: This contract does not claim implementation or hosted qualification is complete.\n---\n\n# Runtime entry contract\n\nConsumers persist a public workflow reference at `@v4` or `@v4-alpha`.\nGitHub resolves that entry to a commit. The entry selects execution runtime X\nfrom an explicit transient parameter, the selected contract lock, or the entry\ncommit default, in that order. The entry commit and runtime commit may differ.\n\n`actions/runtime/environment/prepare` is the sole runtime preparation owner.\nSelection is resolved once per execution. Each executing job prepares that\nselected runtime through the same implementation. Business workflows and\nactions cannot acquire, replace, reselect or install their own Buildchain\nruntime. All business composites, JavaScript modules, WASM and resources come\nfrom X. Runtime identity is retained as provenance; subsequent business nodes\ndo not compare Buildchain SHAs or require equality with the workflow commit.\n\nA runtime failure can start a recovery execution through the same public\nentry with a transient repaired train branch or tag. The new execution selects\nruntime Y and retains the original task, source and evidence. Valid completed\nresults can be reused; provider effects require readback before further writes.\nSwitching runtimes does not automatically qualify all previous results for reuse.\nNeither the persisted caller nor its contract lock needs a train rewrite.\n\nAn entry failure is repaired by publishing and adopting a corrected entry and\nstarting a complete run. Recovering an invalid entry is not a runtime feature.\nBuildchain self-dogfood uses exactly the same consumer contract and has no\nrepository-specific execution or recovery route.\n\nSource checkouts are separate business inputs. Building Buildchain itself may\ncheck out its source, but that source cannot implicitly replace the selected\nexecution runtime. Source, artifact and publication-effect checks retain their\nbusiness meaning; they do not reintroduce downstream Buildchain SHA checks.\n\nAcceptance requires a complete workflow/action acquisition inventory, enforced\nsingle preparation ownership, different entry/runtime execution, train recovery,\nplatform and multi-job qualification, and validation of the published consumer\nentry. A source test or a successful package import alone is insufficient.\n\n## Consumer build and recovery\n\n```yaml\non:\n push:\n workflow_dispatch:\n inputs:\n runtime-ref:\n description: Optional repaired train for this execution\n default: \"\"\n type: string\n resume-run-id:\n description: Original failed build run to recover\n default: \"\"\n type: string\njobs:\n build:\n uses: kungfu-systems/buildchain/.github/workflows/build.yml@v4\n with:\n runtime-ref: ${{ inputs.runtime-ref || '' }}\n resume-run-id: ${{ inputs.resume-run-id || '' }}\n```\n\nOrdinary executions use `.buildchain/contract-lock.json`; the alpha entry defaults\nto `.buildchain/alpha-contract-lock.json`. `contract-lock` selects another relative\nlock path. A missing default lock falls back to the entry commit; an invalid lock\nor an unreadable source fails preparation. A supplied runtime parameter overrides\nthe lock and requires caller repository write authority. For `workflow_dispatch`,\nGitHub enforces repository Actions write permission before creating the run,\nincluding calls using installation tokens. The entry uses that authorization;\nan installation bot does not need to be a human repository collaborator.\nOther event types retain the entry's write, maintain or admin collaborator check.\nSee GitHub's [workflow dispatch authorization](https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event).\nBranches and tags are resolved to an immutable commit during selection.\n\nFor a Buildchain runtime fault, dispatch the same consumer workflow with\n`runtime-ref: train/v4/v4.1/<repair>` and the original `resume-run-id`. The entry\nretains the original source commit and rejects unrelated workflows or fork runs.\nInstall hydrates the new workspace; completed build outputs are restored only\nwhen source, configuration, platform, tools, artifact producer and all retained\nbytes qualify. The remaining verification runs with the repaired runtime.\nExisting provider effects use their transaction evidence and live readbacks.\nA failed-job rerun cannot supply new inputs; recovery therefore starts a new run.\n\n`runtime-selection` is an internal reusable-workflow transport for an already\nselected runtime. Components forward it unchanged instead of resolving another\nreference. Consumers normally supply `runtime-ref` or a lock, not this transport.\n\nNested components preserve the selected runtime and contract metadata without\nre-reading the lock or comparing the runtime SHA. The internal transport carries\na trusted entry output; consumer source binding and override authorization remain\nentry concerns. Recovery selectors request `actions: read` to read the original\nrun in private repositories as well as public repositories.\n\nBusiness adapters also keep the runtime installation directory separate from the\nconsumer workspace. Queue reconciliation, npm preview, runner qualification and\nbinary packaging read consumer source from the workspace while executing selected\nruntime code. Directory equality is not an admission rule; source SHA and artifact\ncontainment checks still apply. The architecture gate parses business JavaScript\nand rejects direct or aliased runtime/source directory equality comparisons.\n\nPublication authority adapters take runtime repository and revision provenance\nfrom the prepared entry selection. Consumer requests provide source, artifact\nand effect authority; they do not supply or readmit a Buildchain SHA. Governance\nand sealed publication evidence retain the selected runtime as provenance while\nvalidating their own source, policy and provider bindings."
|
|
4624
4624
|
},
|
|
4625
4625
|
{
|
|
4626
4626
|
"id": "manual:runtime-train-validation",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
22
22
|
"path": "dist/site/public-surface-audit.json",
|
|
23
23
|
"status": "passed",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "4d6268c7dd75edc6f6af2a9bf9e6fba6bacf65ca0b552ddcae356cf63a80b988",
|
|
25
25
|
"summary": {
|
|
26
26
|
"cliCommandCount": 117,
|
|
27
27
|
"workflowCount": 67,
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
247
247
|
"path": "dist/site/public-surface-audit.json",
|
|
248
248
|
"status": "passed",
|
|
249
|
-
"sha256": "
|
|
249
|
+
"sha256": "4d6268c7dd75edc6f6af2a9bf9e6fba6bacf65ca0b552ddcae356cf63a80b988",
|
|
250
250
|
"summary": {
|
|
251
251
|
"cliCommandCount": 117,
|
|
252
252
|
"workflowCount": 67,
|
|
@@ -4541,7 +4541,7 @@
|
|
|
4541
4541
|
],
|
|
4542
4542
|
"maturity": "stable",
|
|
4543
4543
|
"sourcePath": "docs/runtime-entry.md",
|
|
4544
|
-
"digest": "sha256:
|
|
4544
|
+
"digest": "sha256:474d9c7ad8718e2248e5792aa1aa1b64cf0bac2da368dfadf7a38d1b5982fab0",
|
|
4545
4545
|
"headings": [
|
|
4546
4546
|
{
|
|
4547
4547
|
"level": 1,
|
|
@@ -4554,7 +4554,7 @@
|
|
|
4554
4554
|
"anchor": "consumer-build-and-recovery"
|
|
4555
4555
|
}
|
|
4556
4556
|
],
|
|
4557
|
-
"markdown": "---\nstatus: draft\nperiod: ongoing\ntheme: unified-runtime-entry\ndoc_type: implementation-contract\nsource_level: user-consensus\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-11\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-11\n visible_context: Explicit user-approved runtime selection, recovery and alpha publication requirements.\n invisible_context_boundary: This contract does not claim implementation or hosted qualification is complete.\n---\n\n# Runtime entry contract\n\nConsumers persist a public workflow reference at `@v4` or `@v4-alpha`.\nGitHub resolves that entry to a commit. The entry selects execution runtime X\nfrom an explicit transient parameter, the selected contract lock, or the entry\ncommit default, in that order. The entry commit and runtime commit may differ.\n\n`actions/runtime/environment/prepare` is the sole runtime preparation owner.\nSelection is resolved once per execution. Each executing job prepares that\nselected runtime through the same implementation. Business workflows and\nactions cannot acquire, replace, reselect or install their own Buildchain\nruntime. All business composites, JavaScript modules, WASM and resources come\nfrom X. Runtime identity is retained as provenance; subsequent business nodes\ndo not compare Buildchain SHAs or require equality with the workflow commit.\n\nA runtime failure can start a recovery execution through the same public\nentry with a transient repaired train branch or tag. The new execution selects\nruntime Y and retains the original task, source and evidence. Valid completed\nresults can be reused; provider effects require readback before further writes.\nSwitching runtimes does not automatically qualify all previous results for reuse.\nNeither the persisted caller nor its contract lock needs a train rewrite.\n\nAn entry failure is repaired by publishing and adopting a corrected entry and\nstarting a complete run. Recovering an invalid entry is not a runtime feature.\nBuildchain self-dogfood uses exactly the same consumer contract and has no\nrepository-specific execution or recovery route.\n\nSource checkouts are separate business inputs. Building Buildchain itself may\ncheck out its source, but that source cannot implicitly replace the selected\nexecution runtime. Source, artifact and publication-effect checks retain their\nbusiness meaning; they do not reintroduce downstream Buildchain SHA checks.\n\nAcceptance requires a complete workflow/action acquisition inventory, enforced\nsingle preparation ownership, different entry/runtime execution, train recovery,\nplatform and multi-job qualification, and validation of the published consumer\nentry. A source test or a successful package import alone is insufficient.\n\n## Consumer build and recovery\n\n```yaml\non:\n push:\n workflow_dispatch:\n inputs:\n runtime-ref:\n description: Optional repaired train for this execution\n default: \"\"\n type: string\n resume-run-id:\n description: Original failed build run to recover\n default: \"\"\n type: string\njobs:\n build:\n uses: kungfu-systems/buildchain/.github/workflows/build.yml@v4\n with:\n runtime-ref: ${{ inputs.runtime-ref || '' }}\n resume-run-id: ${{ inputs.resume-run-id || '' }}\n```\n\nOrdinary executions use `.buildchain/contract-lock.json`; the alpha entry defaults\nto `.buildchain/alpha-contract-lock.json`. `contract-lock` selects another relative\nlock path. A missing default lock falls back to the entry commit; an invalid lock\nor an unreadable source fails preparation. A supplied runtime parameter overrides\nthe lock and requires a
|
|
4557
|
+
"markdown": "---\nstatus: draft\nperiod: ongoing\ntheme: unified-runtime-entry\ndoc_type: implementation-contract\nsource_level: user-consensus\nconfidence: high\nsensitivity: public\nevidence_grade: B\nreview_state: unreviewed\nlast_reviewed: 2026-09-11\nai_provenance:\n model_family: GPT-6\n product: Codex\n generated_at: 2026-09-11\n visible_context: Explicit user-approved runtime selection, recovery and alpha publication requirements.\n invisible_context_boundary: This contract does not claim implementation or hosted qualification is complete.\n---\n\n# Runtime entry contract\n\nConsumers persist a public workflow reference at `@v4` or `@v4-alpha`.\nGitHub resolves that entry to a commit. The entry selects execution runtime X\nfrom an explicit transient parameter, the selected contract lock, or the entry\ncommit default, in that order. The entry commit and runtime commit may differ.\n\n`actions/runtime/environment/prepare` is the sole runtime preparation owner.\nSelection is resolved once per execution. Each executing job prepares that\nselected runtime through the same implementation. Business workflows and\nactions cannot acquire, replace, reselect or install their own Buildchain\nruntime. All business composites, JavaScript modules, WASM and resources come\nfrom X. Runtime identity is retained as provenance; subsequent business nodes\ndo not compare Buildchain SHAs or require equality with the workflow commit.\n\nA runtime failure can start a recovery execution through the same public\nentry with a transient repaired train branch or tag. The new execution selects\nruntime Y and retains the original task, source and evidence. Valid completed\nresults can be reused; provider effects require readback before further writes.\nSwitching runtimes does not automatically qualify all previous results for reuse.\nNeither the persisted caller nor its contract lock needs a train rewrite.\n\nAn entry failure is repaired by publishing and adopting a corrected entry and\nstarting a complete run. Recovering an invalid entry is not a runtime feature.\nBuildchain self-dogfood uses exactly the same consumer contract and has no\nrepository-specific execution or recovery route.\n\nSource checkouts are separate business inputs. Building Buildchain itself may\ncheck out its source, but that source cannot implicitly replace the selected\nexecution runtime. Source, artifact and publication-effect checks retain their\nbusiness meaning; they do not reintroduce downstream Buildchain SHA checks.\n\nAcceptance requires a complete workflow/action acquisition inventory, enforced\nsingle preparation ownership, different entry/runtime execution, train recovery,\nplatform and multi-job qualification, and validation of the published consumer\nentry. A source test or a successful package import alone is insufficient.\n\n## Consumer build and recovery\n\n```yaml\non:\n push:\n workflow_dispatch:\n inputs:\n runtime-ref:\n description: Optional repaired train for this execution\n default: \"\"\n type: string\n resume-run-id:\n description: Original failed build run to recover\n default: \"\"\n type: string\njobs:\n build:\n uses: kungfu-systems/buildchain/.github/workflows/build.yml@v4\n with:\n runtime-ref: ${{ inputs.runtime-ref || '' }}\n resume-run-id: ${{ inputs.resume-run-id || '' }}\n```\n\nOrdinary executions use `.buildchain/contract-lock.json`; the alpha entry defaults\nto `.buildchain/alpha-contract-lock.json`. `contract-lock` selects another relative\nlock path. A missing default lock falls back to the entry commit; an invalid lock\nor an unreadable source fails preparation. A supplied runtime parameter overrides\nthe lock and requires caller repository write authority. For `workflow_dispatch`,\nGitHub enforces repository Actions write permission before creating the run,\nincluding calls using installation tokens. The entry uses that authorization;\nan installation bot does not need to be a human repository collaborator.\nOther event types retain the entry's write, maintain or admin collaborator check.\nSee GitHub's [workflow dispatch authorization](https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event).\nBranches and tags are resolved to an immutable commit during selection.\n\nFor a Buildchain runtime fault, dispatch the same consumer workflow with\n`runtime-ref: train/v4/v4.1/<repair>` and the original `resume-run-id`. The entry\nretains the original source commit and rejects unrelated workflows or fork runs.\nInstall hydrates the new workspace; completed build outputs are restored only\nwhen source, configuration, platform, tools, artifact producer and all retained\nbytes qualify. The remaining verification runs with the repaired runtime.\nExisting provider effects use their transaction evidence and live readbacks.\nA failed-job rerun cannot supply new inputs; recovery therefore starts a new run.\n\n`runtime-selection` is an internal reusable-workflow transport for an already\nselected runtime. Components forward it unchanged instead of resolving another\nreference. Consumers normally supply `runtime-ref` or a lock, not this transport.\n\nNested components preserve the selected runtime and contract metadata without\nre-reading the lock or comparing the runtime SHA. The internal transport carries\na trusted entry output; consumer source binding and override authorization remain\nentry concerns. Recovery selectors request `actions: read` to read the original\nrun in private repositories as well as public repositories.\n\nBusiness adapters also keep the runtime installation directory separate from the\nconsumer workspace. Queue reconciliation, npm preview, runner qualification and\nbinary packaging read consumer source from the workspace while executing selected\nruntime code. Directory equality is not an admission rule; source SHA and artifact\ncontainment checks still apply. The architecture gate parses business JavaScript\nand rejects direct or aliased runtime/source directory equality comparisons.\n\nPublication authority adapters take runtime repository and revision provenance\nfrom the prepared entry selection. Consumer requests provide source, artifact\nand effect authority; they do not supply or readmit a Buildchain SHA. Governance\nand sealed publication evidence retain the selected runtime as provenance while\nvalidating their own source, policy and provider bindings."
|
|
4558
4558
|
},
|
|
4559
4559
|
{
|
|
4560
4560
|
"id": "manual:runtime-train-validation",
|
|
@@ -10831,8 +10831,8 @@
|
|
|
10831
10831
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
10832
10832
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
10833
10833
|
"cliRegistryDigest": "e43fdb0289df88871f3f0febbe04dcb9311a252a2b1df9b3a83a2d10c9d4a70f",
|
|
10834
|
-
"workflowRegistryDigest": "
|
|
10835
|
-
"pageRegistryDigest": "
|
|
10834
|
+
"workflowRegistryDigest": "df23a5fb26121ce1707ec4b255aa61eca74e8e3a8b910e93ee6855f1d658e97e",
|
|
10835
|
+
"pageRegistryDigest": "3b91511808536de5ab38b69f63072b8b2c462a14961418ea871740443bc16ab7"
|
|
10836
10836
|
},
|
|
10837
10837
|
"comparison": {
|
|
10838
10838
|
"missingCliRegistry": [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-11T11:19:20.000Z",
|
|
5
|
+
"publishedAt": "2026-09-11T11:19:20.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "47b84ced56948e43530e933b4ba0a25a19a6ceeb",
|
|
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": "4.1.0-alpha.
|
|
35
|
+
"version": "4.1.0-alpha.3",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-09-
|
|
5
|
-
"publishedAt": "2026-09-
|
|
4
|
+
"generatedAt": "2026-09-11T11:19:20.000Z",
|
|
5
|
+
"publishedAt": "2026-09-11T11:19:20.000Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "47b84ced56948e43530e933b4ba0a25a19a6ceeb",
|
|
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": "4.1.0-alpha.
|
|
40
|
+
"version": "4.1.0-alpha.3",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -1044,7 +1044,7 @@
|
|
|
1044
1044
|
"status": "preview",
|
|
1045
1045
|
"owner": "buildchain-workflows",
|
|
1046
1046
|
"maturity": "preview",
|
|
1047
|
-
"introducedVersion": "4.1.0-alpha.
|
|
1047
|
+
"introducedVersion": "4.1.0-alpha.3",
|
|
1048
1048
|
"compatibilityPromise": "current-contract-only",
|
|
1049
1049
|
"deprecationReplacement": "",
|
|
1050
1050
|
"sunsetCondition": "explicit-contract-change-review",
|
|
@@ -2475,7 +2475,7 @@
|
|
|
2475
2475
|
"status": "preview",
|
|
2476
2476
|
"owner": "buildchain-workflows",
|
|
2477
2477
|
"maturity": "preview",
|
|
2478
|
-
"introducedVersion": "4.1.0-alpha.
|
|
2478
|
+
"introducedVersion": "4.1.0-alpha.3",
|
|
2479
2479
|
"compatibilityPromise": "current-contract-only",
|
|
2480
2480
|
"deprecationReplacement": "",
|
|
2481
2481
|
"sunsetCondition": "explicit-contract-change-review",
|
|
@@ -2505,7 +2505,7 @@
|
|
|
2505
2505
|
"status": "preview",
|
|
2506
2506
|
"owner": "buildchain-workflows",
|
|
2507
2507
|
"maturity": "preview",
|
|
2508
|
-
"introducedVersion": "4.1.0-alpha.
|
|
2508
|
+
"introducedVersion": "4.1.0-alpha.3",
|
|
2509
2509
|
"compatibilityPromise": "current-contract-only",
|
|
2510
2510
|
"deprecationReplacement": "",
|
|
2511
2511
|
"sunsetCondition": "explicit-contract-change-review",
|
|
@@ -2535,7 +2535,7 @@
|
|
|
2535
2535
|
"status": "preview",
|
|
2536
2536
|
"owner": "buildchain-workflows",
|
|
2537
2537
|
"maturity": "preview",
|
|
2538
|
-
"introducedVersion": "4.1.0-alpha.
|
|
2538
|
+
"introducedVersion": "4.1.0-alpha.3",
|
|
2539
2539
|
"compatibilityPromise": "current-contract-only",
|
|
2540
2540
|
"deprecationReplacement": "",
|
|
2541
2541
|
"sunsetCondition": "explicit-contract-change-review",
|
package/docs/runtime-entry.md
CHANGED
|
@@ -81,7 +81,12 @@ Ordinary executions use `.buildchain/contract-lock.json`; the alpha entry defaul
|
|
|
81
81
|
to `.buildchain/alpha-contract-lock.json`. `contract-lock` selects another relative
|
|
82
82
|
lock path. A missing default lock falls back to the entry commit; an invalid lock
|
|
83
83
|
or an unreadable source fails preparation. A supplied runtime parameter overrides
|
|
84
|
-
the lock and requires
|
|
84
|
+
the lock and requires caller repository write authority. For `workflow_dispatch`,
|
|
85
|
+
GitHub enforces repository Actions write permission before creating the run,
|
|
86
|
+
including calls using installation tokens. The entry uses that authorization;
|
|
87
|
+
an installation bot does not need to be a human repository collaborator.
|
|
88
|
+
Other event types retain the entry's write, maintain or admin collaborator check.
|
|
89
|
+
See GitHub's [workflow dispatch authorization](https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event).
|
|
85
90
|
Branches and tags are resolved to an immutable commit during selection.
|
|
86
91
|
|
|
87
92
|
For a Buildchain runtime fault, dispatch the same consumer workflow with
|
|
@@ -109,3 +114,9 @@ binary packaging read consumer source from the workspace while executing selecte
|
|
|
109
114
|
runtime code. Directory equality is not an admission rule; source SHA and artifact
|
|
110
115
|
containment checks still apply. The architecture gate parses business JavaScript
|
|
111
116
|
and rejects direct or aliased runtime/source directory equality comparisons.
|
|
117
|
+
|
|
118
|
+
Publication authority adapters take runtime repository and revision provenance
|
|
119
|
+
from the prepared entry selection. Consumer requests provide source, artifact
|
|
120
|
+
and effect authority; they do not supply or readmit a Buildchain SHA. Governance
|
|
121
|
+
and sealed publication evidence retain the selected runtime as provenance while
|
|
122
|
+
validating their own source, policy and provider bindings.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "4.1.0-alpha.
|
|
3
|
+
"version": "4.1.0-alpha.3",
|
|
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",
|
|
@@ -65,11 +65,12 @@ qualified_base="$(jq -r --argjson number "$number" '.pull_requests[] | select(.n
|
|
|
65
65
|
for revision in "$source_head" "$qualified_base"; do
|
|
66
66
|
git cat-file -e "$revision^{commit}" 2>/dev/null || git fetch --no-tags origin "$revision"
|
|
67
67
|
done
|
|
68
|
-
affected_paths="$(git diff --name-only --no-renames "$qualified_base...$source_head" | jq -Rsc 'split("\n") | map(select(length > 0)) | sort')"
|
|
68
|
+
affected_paths="$(git diff --name-only --no-renames "$qualified_base...$source_head" | jq -Rsc 'split("\n") | map(rtrimstr("\r")) | map(select(length > 0)) | sort')"
|
|
69
69
|
[ "$(jq length <<<"$affected_paths")" -gt 0 ] || { echo "buildchain dev deliver: PR has no source changes" >&2; exit 1; }
|
|
70
70
|
|
|
71
71
|
paths_at_head() {
|
|
72
72
|
while IFS= read -r item; do
|
|
73
|
+
item="${item%$'\r'}"
|
|
73
74
|
if git cat-file -e "$source_head:$item" 2>/dev/null; then printf '%s\n' "$item"; fi
|
|
74
75
|
done | jq -Rsc 'split("\n") | map(select(length > 0)) | sort'
|
|
75
76
|
}
|
|
@@ -12,6 +12,7 @@ const parse = (value) => (value ? JSON.parse(value) : undefined);
|
|
|
12
12
|
function context(core, env) {
|
|
13
13
|
const request = publicationAuthorityRequest(
|
|
14
14
|
JSON.parse(core.getInput("request-json", { required: true })),
|
|
15
|
+
JSON.parse(env.BUILDCHAIN_RUNTIME_SELECTION),
|
|
15
16
|
);
|
|
16
17
|
return {
|
|
17
18
|
request: { ...request, callerRepository: env.GITHUB_REPOSITORY },
|
|
@@ -22,12 +23,16 @@ function context(core, env) {
|
|
|
22
23
|
export function inspectPublicationAuthorityAction(core, env) {
|
|
23
24
|
admitPublicationAuthorityRequest(context(core, env).request);
|
|
24
25
|
}
|
|
25
|
-
export function verifyPublicationGovernanceAction(
|
|
26
|
+
export function verifyPublicationGovernanceAction(
|
|
27
|
+
core,
|
|
28
|
+
env,
|
|
29
|
+
{ verify = verifyLivePublicationGovernance } = {},
|
|
30
|
+
) {
|
|
26
31
|
const { request, workspace, runtimeRoot } = context(core, env);
|
|
27
|
-
return
|
|
32
|
+
return verify({
|
|
28
33
|
repository: request.evidenceRepository || env.GITHUB_REPOSITORY,
|
|
29
34
|
targetRef: request.targetRef,
|
|
30
|
-
runtimeSha: request.
|
|
35
|
+
runtimeSha: request.runtimeSha,
|
|
31
36
|
runtimeRoot,
|
|
32
37
|
outputRoot: path.join(workspace, ".buildchain/publication-authority"),
|
|
33
38
|
token: core.getInput("token", { required: true }),
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { requireValue } from "../../runtime/action-process.mjs";
|
|
2
2
|
|
|
3
|
-
export function requireImmutableAuthority(request) {
|
|
4
|
-
requireValue(
|
|
5
|
-
/^[0-9a-f]{40}$/i.test(request.buildchainRef || ""),
|
|
6
|
-
"Publication authority requires an exact 40-character GitHub commit SHA",
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
3
|
export function requireSealedInputs(request) {
|
|
10
4
|
const names = [
|
|
11
5
|
"admissionJson",
|
|
@@ -21,10 +15,6 @@ export function requireSealedInputs(request) {
|
|
|
21
15
|
);
|
|
22
16
|
}
|
|
23
17
|
export function requireManagedInputs(request) {
|
|
24
|
-
requireValue(
|
|
25
|
-
request.buildchainRepository === "kungfu-systems/buildchain",
|
|
26
|
-
"Automatic publication admission requires the canonical Buildchain authority repository",
|
|
27
|
-
);
|
|
28
18
|
requireValue(
|
|
29
19
|
/^[0-9a-f]{40}$/i.test(request.sourceSha),
|
|
30
20
|
"Automatic publication admission requires an exact source SHA",
|
|
@@ -107,7 +97,6 @@ export function requireManagedInputs(request) {
|
|
|
107
97
|
|
|
108
98
|
export function admitPublicationAuthorityRequest(request) {
|
|
109
99
|
if (request.dryRun) return;
|
|
110
|
-
requireImmutableAuthority(request);
|
|
111
100
|
if (request.autoAdmission) requireManagedInputs(request);
|
|
112
101
|
else requireSealedInputs(request);
|
|
113
102
|
}
|
|
@@ -53,7 +53,7 @@ export async function assemblePublicationAdmission(
|
|
|
53
53
|
repository: request.evidenceRepository,
|
|
54
54
|
sourceSha: request.sourceSha,
|
|
55
55
|
sourceTreeSha,
|
|
56
|
-
runtimeSha: request.
|
|
56
|
+
runtimeSha: request.runtimeSha,
|
|
57
57
|
publicationVersion: request.publicationVersion,
|
|
58
58
|
});
|
|
59
59
|
const bundle = sealManagedPublicationAdmission({
|
|
@@ -11,10 +11,10 @@ export function publicationControlPlaneRequest(request) {
|
|
|
11
11
|
candidate = kind === "release-candidate";
|
|
12
12
|
return {
|
|
13
13
|
repository: request.evidenceRepository,
|
|
14
|
-
workflowRepository: request.
|
|
14
|
+
workflowRepository: request.runtimeRepository,
|
|
15
15
|
branch: request.targetRef,
|
|
16
16
|
sourceSha: request.sourceSha,
|
|
17
|
-
workflowRef: request.
|
|
17
|
+
workflowRef: request.runtimeSha,
|
|
18
18
|
publisherWorkflowPath: request.publisherWorkflowPath,
|
|
19
19
|
requiredStatusCheck: request.requiredStatusCheck || "",
|
|
20
20
|
workflowPath: request.authorityWorkflowPath || defaults[kind],
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
export function publicationAuthorityRequest(input) {
|
|
2
|
-
|
|
1
|
+
export function publicationAuthorityRequest(input, selectedRuntime) {
|
|
2
|
+
const request = Object.fromEntries(
|
|
3
3
|
Object.entries(input).map(([key, value]) => [
|
|
4
4
|
key.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase()),
|
|
5
5
|
value,
|
|
6
6
|
]),
|
|
7
7
|
);
|
|
8
|
+
return {
|
|
9
|
+
...request,
|
|
10
|
+
runtimeRepository: selectedRuntime.repository,
|
|
11
|
+
runtimeSha: selectedRuntime.sha,
|
|
12
|
+
};
|
|
8
13
|
}
|
|
9
14
|
export function requireAuthorityValue(value, label) {
|
|
10
15
|
if (value === undefined || value === null || value === "")
|
|
@@ -29,7 +29,7 @@ export async function verifySealedAdmission(
|
|
|
29
29
|
kind: request.autoAdmissionKind,
|
|
30
30
|
evidenceRoot: path.join(workspace, ".buildchain/publication-evidence"),
|
|
31
31
|
sourceTreeSha,
|
|
32
|
-
runtimeSha: request.
|
|
32
|
+
runtimeSha: request.runtimeSha,
|
|
33
33
|
admission,
|
|
34
34
|
gateAggregate,
|
|
35
35
|
});
|
|
@@ -329,6 +329,18 @@ function runVersionVerification({
|
|
|
329
329
|
if (!command && (!runLifecycleVerify || !lifecycleVerify) && !lifecycleVersionState) {
|
|
330
330
|
return changedFiles;
|
|
331
331
|
}
|
|
332
|
+
const lifecycleInstall = getLifecycleStage(loadedConfig, "install");
|
|
333
|
+
if (lifecycleVersionState && lifecycleInstall) {
|
|
334
|
+
// Source generators own their dependencies. Install against the original
|
|
335
|
+
// manifests before materializing the next version, independently of runtime X.
|
|
336
|
+
runLifecycleStage({
|
|
337
|
+
cwd,
|
|
338
|
+
loadedConfig,
|
|
339
|
+
name: "install",
|
|
340
|
+
stage: lifecycleInstall,
|
|
341
|
+
env: extraEnv,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
332
344
|
applyLocalVersionState(cwd, changedFiles);
|
|
333
345
|
const lifecycleEnv = { BUILDCHAIN_VERSION: version, ...(extraEnv || {}) };
|
|
334
346
|
if (lifecycleVersionState) {
|
|
@@ -39,6 +39,9 @@ export function runtimeEntryProvider(
|
|
|
39
39
|
readJson(repository, sha, "architecture/runtime-entry.json"),
|
|
40
40
|
authorize: async ({ origin }) => {
|
|
41
41
|
if (origin !== "runtime-parameter") return;
|
|
42
|
+
// GitHub already authorizes workflow_dispatch using repository Actions
|
|
43
|
+
// write permission, including installation tokens without a collaborator.
|
|
44
|
+
if (eventName === "workflow_dispatch") return;
|
|
42
45
|
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
|
|
43
46
|
...parts(sourceRepository),
|
|
44
47
|
username: actor,
|