@kungfu-tech/buildchain 4.0.8 → 4.0.9-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/AGENTS.md +12 -19
  2. package/CONTRIBUTING.md +6 -9
  3. package/README.md +11 -1
  4. package/architecture/agent-change-map.md +11 -4
  5. package/architecture/build-environments.json +71 -0
  6. package/architecture/build-orchestration.json +18 -0
  7. package/architecture/ci-lane-change-budget.json +34 -2
  8. package/architecture/internal-capabilities.json +17 -4
  9. package/architecture/maintainability-debt.json +34 -123
  10. package/architecture/maintainability-policy.json +19 -210
  11. package/architecture/release-topology.json +6 -5
  12. package/architecture/universal-workflow-bootstrap.json +5 -4
  13. package/architecture/universal-workflow-train-admission.json +2 -2
  14. package/bin/buildchain.mjs +1 -1
  15. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  16. package/dist/site/buildchain-contract.json +41 -1131
  17. package/dist/site/buildchain-site.json +39 -144
  18. package/dist/site/capability-registry.json +1 -1
  19. package/dist/site/cli-registry.json +1 -1
  20. package/dist/site/controller-registry.json +30 -868
  21. package/dist/site/kfd-claims.json +132 -394
  22. package/dist/site/kfd-upstream-aggregate.json +1 -1
  23. package/dist/site/manual-registry.json +6 -6
  24. package/dist/site/node-api-registry.json +34 -34
  25. package/dist/site/page-registry.json +30 -135
  26. package/dist/site/public-surface-audit.json +81 -401
  27. package/dist/site/publication-registry.json +2 -2
  28. package/dist/site/site-manifest.json +8 -8
  29. package/dist/site/workflow-registry.json +135 -391
  30. package/docs/MAP.md +5 -4
  31. package/docs/cli-reference.md +1 -1
  32. package/docs/getting-started.md +8 -7
  33. package/docs/node-api-reference.md +79 -79
  34. package/docs/reusable-build-surface.md +159 -1430
  35. package/docs/runtime-train-validation.md +45 -172
  36. package/package.json +1 -1
  37. package/packages/core/build-configuration.js +117 -0
  38. package/packages/core/buildchain-config.js +2 -0
  39. package/packages/core/buildchain-contract.js +14 -44
  40. package/packages/core/controller-evidence.js +2 -9
  41. package/scripts/buildchain-cli-help.mjs +1 -1
  42. package/scripts/check-floating-consumer-policy-contract.mjs +4 -7
  43. package/scripts/check-inventory.mjs +81 -54
  44. package/scripts/check-universal-workflow-bootstrap.mjs +12 -2
  45. package/scripts/generate-channel-build-workflow.mjs +50 -410
  46. package/scripts/generate-site-bundle.mjs +2 -1
  47. package/scripts/generate-universal-workflow-facades.mjs +1 -0
  48. package/scripts/init-repo.mjs +25 -26
  49. package/scripts/resolve-build-configuration.mjs +105 -0
  50. package/scripts/universal-workflow-self-dogfood.mjs +8 -1
  51. package/scripts/verify-golden-path.mjs +3 -3
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "repositoryBudgets": {
28
28
  "baselineRevision": "9569f69c2cb609372b8a3d65ce5dec8fb7b34a84",
29
- "maxHandMaintainedSourceFiles": 510,
29
+ "maxHandMaintainedSourceFiles": 512,
30
30
  "maxHandMaintainedSourceLines": 175456,
31
31
  "maxWorkflowFiles": 80,
32
32
  "maxWorkflowLines": 26791,
@@ -193,8 +193,8 @@
193
193
  "governance": "legacy-debt-sunset-2026q4"
194
194
  },
195
195
  "packages/core/buildchain-config.js": {
196
- "maxLines": 1885,
197
- "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. Publication rehearsal remains effect-disabled. Adopter delivery adds only a closed public contract, exact selectors and repository-relative input, readback, bootstrap, archive and result paths; this exact wiring ceiling cannot grow implicitly.",
196
+ "maxLines": 1887,
197
+ "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. Publication rehearsal remains effect-disabled. Adopter delivery adds only a closed public contract, exact selectors and repository-relative input, readback, bootstrap, archive and result paths; this exact wiring ceiling cannot grow implicitly. TOML build configuration delegates to a strict normalizer through one import and one call; this exact two-line increase accompanies removal of duplicate workflow and router implementations.",
198
198
  "governance": "legacy-debt-sunset-2026q4"
199
199
  },
200
200
  "scripts/check-internal-architecture.mjs": {
@@ -772,101 +772,7 @@
772
772
  "id": ".build",
773
773
  "path": ".github/workflows/.build.yml",
774
774
  "reusable": true,
775
- "inputs": [
776
- "artifact-compression-level",
777
- "artifact-finalization-command",
778
- "artifact-finalization-on-platform",
779
- "artifact-name",
780
- "artifact-name-template",
781
- "artifact-paths",
782
- "artifact-relay-s3-bucket",
783
- "artifact-relay-s3-download-role-arn",
784
- "artifact-relay-s3-oidc-audience",
785
- "artifact-relay-s3-prefix",
786
- "artifact-relay-s3-region",
787
- "artifact-relay-s3-role-arn",
788
- "artifact-relay-s3-upload-role-arn",
789
- "artifact-retention-days",
790
- "artifact-signing-request-upload-no-proxy",
791
- "artifact-transfer-mode",
792
- "aws-codebuild-project",
793
- "aws-ec2-macos-runner-label",
794
- "aws-ec2-windows-runner-label",
795
- "build-command",
796
- "buildchain-contract-compatibility-policy",
797
- "buildchain-contract-drift-issue-mode",
798
- "buildchain-contract-expected-channel",
799
- "buildchain-contract-expected-major",
800
- "buildchain-contract-lock-path",
801
- "buildchain-expected-channel",
802
- "buildchain-expected-major",
803
- "buildchain-ref",
804
- "buildchain-repository",
805
- "buildchain-visible-workflow",
806
- "cache-dependency-lock-root",
807
- "cache-policy-root",
808
- "cache-toolchain-root",
809
- "cargo-registry-index",
810
- "checkout-cache-fallback",
811
- "checkout-cache-fetch-attempts",
812
- "checkout-cache-github-timeout-seconds",
813
- "checkout-cache-mirror-url-template",
814
- "checkout-cache-mode",
815
- "checkout-cache-reference-repository-template",
816
- "checkout-cache-timeout-seconds",
817
- "checkout-history-mode",
818
- "compiler-cache-platforms-json",
819
- "compiler-cache-provider",
820
- "compiler-cache-required",
821
- "control-runner-json",
822
- "credential-island-caller-owned",
823
- "credential-island-environment",
824
- "credential-island-macos-app-path",
825
- "credential-island-macos-platform-id",
826
- "expected-artifacts-json",
827
- "fail-fast",
828
- "gate-profile-aggregate-json",
829
- "github-artifact-attestation-platform-id",
830
- "github-artifact-attestation-signer-sha",
831
- "github-artifact-attestation-subject-path",
832
- "install-command",
833
- "kfd-agent-hub",
834
- "lifecycle-timeout-minutes",
835
- "linux-container-image",
836
- "linux-container-preset",
837
- "node-version",
838
- "platforms-json",
839
- "pre-upload-transport-smoke-artifact-root",
840
- "pre-upload-transport-smoke-scenario-path",
841
- "process-sample-interval-ms",
842
- "process-summary-path",
843
- "publish-anchor-request-json",
844
- "publish-channel",
845
- "publish-refs-json",
846
- "publish-registry",
847
- "publish-source-ref",
848
- "release-candidate",
849
- "release-candidate-family-evidence-json",
850
- "requested-parallelism",
851
- "require-build",
852
- "require-install",
853
- "require-trusted-event",
854
- "require-verify",
855
- "runner-preset",
856
- "rust-toolchain",
857
- "rustup-dist-server",
858
- "rustup-update-root",
859
- "sample-process-tree",
860
- "self-hosted-offline-fallback",
861
- "setup-node",
862
- "setup-rust",
863
- "shifu-cache-profile-digest",
864
- "shifu-cache-profile-ref",
865
- "untrusted-policy",
866
- "verify-command",
867
- "verify-substage-evidence-path",
868
- "working-directory"
869
- ],
775
+ "inputs": ["config-path"],
870
776
  "secrets": [
871
777
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
872
778
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -926,7 +832,7 @@
926
832
  "v4-consumer-policy-receipt-root"
927
833
  ]
928
834
  },
929
- "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.",
835
+ "rationale": "Project configuration moves to typed TOML; ordinary build calls expose only config-path, derive exact runtime identity, and share owner-scoped composite steps. The protected PR review must approve this deliberate breaking successor.",
930
836
  "governance": "legacy-debt-sunset-2026q4"
931
837
  },
932
838
  "workflow:build": {
@@ -935,104 +841,7 @@
935
841
  "id": "build",
936
842
  "path": ".github/workflows/build.yml",
937
843
  "reusable": true,
938
- "inputs": [
939
- "artifact-compression-level",
940
- "artifact-finalization-command",
941
- "artifact-finalization-on-platform",
942
- "artifact-name",
943
- "artifact-name-template",
944
- "artifact-paths",
945
- "artifact-relay-s3-bucket",
946
- "artifact-relay-s3-download-role-arn",
947
- "artifact-relay-s3-oidc-audience",
948
- "artifact-relay-s3-prefix",
949
- "artifact-relay-s3-region",
950
- "artifact-relay-s3-role-arn",
951
- "artifact-relay-s3-upload-role-arn",
952
- "artifact-retention-days",
953
- "artifact-signing-request-upload-no-proxy",
954
- "artifact-transfer-mode",
955
- "aws-codebuild-project",
956
- "aws-ec2-macos-runner-label",
957
- "aws-ec2-windows-runner-label",
958
- "build-command",
959
- "buildchain-alpha-contract-lock-path",
960
- "buildchain-channel",
961
- "buildchain-contract-compatibility-policy",
962
- "buildchain-contract-drift-issue-mode",
963
- "buildchain-contract-expected-channel",
964
- "buildchain-contract-expected-major",
965
- "buildchain-contract-lock-path",
966
- "buildchain-expected-channel",
967
- "buildchain-expected-major",
968
- "buildchain-ref",
969
- "buildchain-repository",
970
- "buildchain-stable-contract-lock-path",
971
- "buildchain-visible-workflow",
972
- "cache-dependency-lock-root",
973
- "cache-policy-root",
974
- "cache-toolchain-root",
975
- "cargo-registry-index",
976
- "checkout-cache-fallback",
977
- "checkout-cache-fetch-attempts",
978
- "checkout-cache-github-timeout-seconds",
979
- "checkout-cache-mirror-url-template",
980
- "checkout-cache-mode",
981
- "checkout-cache-reference-repository-template",
982
- "checkout-cache-timeout-seconds",
983
- "checkout-history-mode",
984
- "compiler-cache-platforms-json",
985
- "compiler-cache-provider",
986
- "compiler-cache-required",
987
- "control-runner-json",
988
- "credential-island-caller-owned",
989
- "credential-island-environment",
990
- "credential-island-macos-app-path",
991
- "credential-island-macos-platform-id",
992
- "expected-artifacts-json",
993
- "fail-fast",
994
- "gate-profile-aggregate-json",
995
- "github-artifact-attestation-platform-id",
996
- "github-artifact-attestation-signer-sha",
997
- "github-artifact-attestation-subject-path",
998
- "install-command",
999
- "kfd-agent-hub",
1000
- "lifecycle-timeout-minutes",
1001
- "linux-container-image",
1002
- "linux-container-preset",
1003
- "node-version",
1004
- "platforms-json",
1005
- "pre-upload-transport-smoke-artifact-root",
1006
- "pre-upload-transport-smoke-scenario-path",
1007
- "process-sample-interval-ms",
1008
- "process-summary-path",
1009
- "publish-anchor-request-json",
1010
- "publish-channel",
1011
- "publish-refs-json",
1012
- "publish-registry",
1013
- "publish-source-ref",
1014
- "release-candidate",
1015
- "release-candidate-family-evidence-json",
1016
- "requested-parallelism",
1017
- "require-build",
1018
- "require-install",
1019
- "require-trusted-event",
1020
- "require-verify",
1021
- "runner-preset",
1022
- "rust-toolchain",
1023
- "rustup-dist-server",
1024
- "rustup-update-root",
1025
- "sample-process-tree",
1026
- "self-hosted-offline-fallback",
1027
- "setup-node",
1028
- "setup-rust",
1029
- "shifu-cache-profile-digest",
1030
- "shifu-cache-profile-ref",
1031
- "untrusted-policy",
1032
- "verify-command",
1033
- "verify-substage-evidence-path",
1034
- "working-directory"
1035
- ],
844
+ "inputs": ["config-path"],
1036
845
  "secrets": [
1037
846
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
1038
847
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1095,7 +904,7 @@
1095
904
  "v4-consumer-policy-receipt-root"
1096
905
  ]
1097
906
  },
1098
- "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.",
907
+ "rationale": "Project configuration moves to typed TOML; ordinary build calls expose only config-path, derive exact runtime identity, and share owner-scoped composite steps. The protected PR review must approve this deliberate breaking successor.",
1099
908
  "governance": "legacy-debt-sunset-2026q4"
1100
909
  },
1101
910
  "workflow:paper-release-sealed": {
@@ -1904,12 +1713,12 @@
1904
1713
  },
1905
1714
  "approvedWorkflowDebtTransitions": {
1906
1715
  ".github/workflows/.build.yml": {
1907
- "maxLines": 3341,
1908
- "maxJobs": 14,
1909
- "maxSteps": 194,
1910
- "maxStepsPerJob": 44,
1911
- "maxDecisions": 113,
1912
- "rationale": "Pure release-candidate channel and summary-name computation runs in the exact checked-out Buildchain runtime script. Jobs, steps, decisions, permissions, credentials, outputs, uploads, publication authority and failure behavior are unchanged; YAML lines fall from 3370 to 3341 and cannot grow implicitly.",
1716
+ "maxLines": 2244,
1717
+ "maxJobs": 15,
1718
+ "maxSteps": 170,
1719
+ "maxStepsPerJob": 32,
1720
+ "maxDecisions": 87,
1721
+ "rationale": "TOML-only ordinary build replaces 94 inputs with one locator and six shared owner-scoped composites. A read-only configuration job derives an exact rooted plan before admission. The public facade delegates once; this exact reduced surface cannot grow implicitly.",
1913
1722
  "governance": "stage2-workflow-yaml-reduction"
1914
1723
  },
1915
1724
  ".github/workflows/.release-candidate-promote.yml": {
@@ -1940,12 +1749,12 @@
1940
1749
  "governance": "legacy-debt-sunset-2026q4"
1941
1750
  },
1942
1751
  ".github/workflows/build.yml": {
1943
- "maxLines": 1218,
1944
- "maxJobs": 7,
1945
- "maxSteps": 16,
1946
- "maxStepsPerJob": 6,
1947
- "maxDecisions": 7,
1948
- "rationale": "The generated channel router forwards the two historical contract-channel aliases into the reusable build workflow without adding a second normalization or build authority. These exact generated ceilings cannot grow implicitly.",
1752
+ "maxLines": 190,
1753
+ "maxJobs": 1,
1754
+ "maxSteps": 0,
1755
+ "maxStepsPerJob": 0,
1756
+ "maxDecisions": 0,
1757
+ "rationale": "TOML-only ordinary build replaces 94 inputs with one locator and six shared owner-scoped composites. A read-only configuration job derives an exact rooted plan before admission. The public facade delegates once; this exact reduced surface cannot grow implicitly.",
1949
1758
  "governance": "legacy-debt-sunset-2026q4"
1950
1759
  },
1951
1760
  ".github/workflows/release-candidate-promote.yml": {
@@ -152,6 +152,7 @@
152
152
  "packages/core/adopter-delivery-json.js",
153
153
  "packages/core/adopter-delivery-passport.js",
154
154
  "packages/core/artifact-verification-envelope.js",
155
+ "packages/core/build-configuration.js",
155
156
  "packages/core/buildchain-channel-identity.js",
156
157
  "packages/core/buildchain-compatibility-authority.js",
157
158
  "packages/core/buildchain-compatibility-fact.js",
@@ -212,7 +213,7 @@
212
213
  "scripts/release-finalization-review.mjs",
213
214
  "scripts/verify-version-state-delta.mjs"
214
215
  ],
215
- "root": "sha256:7a51840f34c85125fc7b65c6b1881d59e62ea05ad8265f7c8f3a66a3d11539f7"
216
+ "root": "sha256:5301e4d5f49b4700ef4a7f69de5a8ba2bd42261364a1492e813633228f7f4c0f"
216
217
  },
217
218
  "rustWasmAuthority": {
218
219
  "loader": "packages/core/domain-wasm.js",
@@ -352,11 +353,11 @@
352
353
  ],
353
354
  "metrics": {
354
355
  "workflowCount": 35,
355
- "jobCount": 91,
356
- "reusableEdgeCount": 23,
357
- "mutationRelevantNodeCount": 76,
356
+ "jobCount": 86,
357
+ "reusableEdgeCount": 21,
358
+ "mutationRelevantNodeCount": 72,
358
359
  "contentsWriteJobCount": 14,
359
- "oidcWriteJobCount": 15
360
+ "oidcWriteJobCount": 12
360
361
  },
361
362
  "semanticMetrics": {
362
363
  "workflowCount": 5,
@@ -116,7 +116,6 @@
116
116
  "bootstrapGovernedWorkflows": [
117
117
  ".github/workflows/.auditable-demo.yml",
118
118
  ".github/workflows/.binary-release-assets.yml",
119
- ".github/workflows/.build.yml",
120
119
  ".github/workflows/.bump-minor-version.yml",
121
120
  ".github/workflows/.declarative-auditable-demo.yml",
122
121
  ".github/workflows/.gate-profile.yml",
@@ -129,7 +128,6 @@
129
128
  ".github/workflows/.web-surface.yml",
130
129
  ".github/workflows/.wheel-verify.yml",
131
130
  ".github/workflows/bootstrap.yml",
132
- ".github/workflows/build.yml",
133
131
  ".github/workflows/buildchain-patrol.yml",
134
132
  ".github/workflows/check.yml",
135
133
  ".github/workflows/dev-alpha-candidate-patrol.yml",
@@ -160,7 +158,6 @@
160
158
  "compatibilityFacadeGenerator": "scripts/generate-universal-workflow-facades.mjs",
161
159
  "facadeSourceRevision": "06a2d9f7d5753c5c9b2bf0e7f0e3220fc18cc183",
162
160
  "channelGeneratedFacades": [
163
- ".github/workflows/build.yml",
164
161
  ".github/workflows/release-candidate-promote.yml"
165
162
  ],
166
163
  "staticBootstrap": "implemented",
@@ -172,5 +169,9 @@
172
169
  "postMigrationWorkflows": [
173
170
  ".github/workflows/public-release-oci-compose-preview.yml"
174
171
  ]
175
- }
172
+ },
173
+ "configurationGovernedWorkflows": [
174
+ ".github/workflows/.build.yml",
175
+ ".github/workflows/build.yml"
176
+ ]
176
177
  }
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "contractRoots": [
26
26
  "sha256:19034e431506e219bec09851b0adb0e5ee6d1798528d2369f3f60b3f1bf2a8bf",
27
- "sha256:20d48eff5e9eac02d552a1cbdb76f01e2b5addec798260ab43c0102ebf630f4b",
28
27
  "sha256:348955860bd0c5f5486c48be2e6c8553b50afa0be96699eff1b3dba914e7f80d",
29
28
  "sha256:5e922ecc5f5b7b17a67ccd73be1eb73ae9db886a9da439dbef942b5e2d80062b",
30
- "sha256:b5d0050d17f2302e337dbbc9ad9bc07012d41b575cbca59123af5ae9df157579",
29
+ "sha256:639d7e151d7cccbdaab34ca7e2e5dfe10c5705e5a4d559f87fd4e688b291590b",
30
+ "sha256:803309167edeb5f2db25e3b7aa5d83d813d8b0912fdec2f1d307b9812d1564cf",
31
31
  "sha256:bab725233283c317972f383bcdd7c72725a1b46d96aa732e117f042b4bd313e9",
32
32
  "sha256:bbc0b1317f612b81ba3e462eab5a5ed2e0549ced6918fdc9b58b3dd14dc3db19"
33
33
  ],
@@ -1344,7 +1344,7 @@ async function handleInitCommand(args) {
1344
1344
  force: readBooleanFlag(args, "force"),
1345
1345
  packageManager: readFlag(args, "package-manager", ""),
1346
1346
  runnerPreset: readFlag(args, "runner-preset", "github-hosted"),
1347
- artifactName: readFlag(args, "artifact-name", "{repo}-{version}-{platform}"),
1347
+ artifactName: readFlag(args, "artifact-name", ""),
1348
1348
  });
1349
1349
  printJson(result);
1350
1350
  return;
@@ -22,7 +22,7 @@
22
22
  "ref": "v4-alpha",
23
23
  "sha": "dddddddddddddddddddddddddddddddddddddddd",
24
24
  "contractRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
25
- "consumerPolicyReceiptRoot": "sha256:acee2edcda59dfaf5fc0dd5877b7a20405fc6e0fa419abdd279a68aef32a0e5c"
25
+ "consumerPolicyReceiptRoot": "sha256:f80e32e2fcba14a942ead6eea5d34f7d208b9c1fa6012977a35f901a1081c9c0"
26
26
  },
27
27
  "warrant": {
28
28
  "candidateId": "candidate-alpha-2",