@kungfu-tech/buildchain 4.0.2-alpha.8 → 4.0.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.
Files changed (157) hide show
  1. package/AGENTS.md +10 -1
  2. package/CONTRIBUTING.md +24 -0
  3. package/README.md +2 -2
  4. package/actions/promote-buildchain-ref/README.md +1 -1
  5. package/actions/v4-release-candidate-promote/README.md +28 -0
  6. package/architecture/agent-change-map.md +64 -7
  7. package/architecture/ci-lane-change-budget.json +366 -0
  8. package/architecture/internal-capabilities.json +53 -8
  9. package/architecture/maintainability-debt.json +147 -93
  10. package/architecture/maintainability-policy.json +32 -28
  11. package/architecture/release-tail-contract-inventory.json +6 -6
  12. package/architecture/v4-architecture-constitution.md +23 -20
  13. package/architecture/v4-cross-platform-adopter-qualification.json +1 -1
  14. package/architecture/v4-delivery-authority-parity.json +2 -2
  15. package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +1 -1
  16. package/architecture/v4-floating-consumer-policy.json +2 -2
  17. package/architecture/v4-next-development-parity.json +5 -5
  18. package/architecture/v4-partial-mutation-recovery-qualification.json +4 -1
  19. package/architecture/v4-platform-stage-checkpoints.json +1 -1
  20. package/architecture/v4-provider-operation-journal-contract.json +5 -2
  21. package/architecture/v4-publication-facade-patches.json +64 -0
  22. package/architecture/v4-release-activation-shadow-domain.json +5 -2
  23. package/architecture/v4-release-topology.json +74 -39
  24. package/architecture/v4-rust-wasm-production-authority.json +58 -0
  25. package/architecture/v4-stable-publication-fence.json +5 -2
  26. package/architecture/v4-stage-capsule-qualification.json +2 -2
  27. package/architecture/v4-tail-reseal-parity.json +8 -6
  28. package/architecture/v4-universal-workflow-bootstrap.json +171 -0
  29. package/architecture/v4-universal-workflow-fault-campaign.json +72 -0
  30. package/architecture/v4-universal-workflow-train-admission.json +40 -0
  31. package/architecture/workflow-taxonomy.json +1451 -0
  32. package/bin/buildchain.mjs +7 -7
  33. package/contracts/buildchain-v2-residuals-v1.json +57 -48
  34. package/contracts/dev-delivery-authority-v2.schema.json +16 -2
  35. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  36. package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
  37. package/dist/site/buildchain-contract.json +93 -48
  38. package/dist/site/buildchain-site.json +222 -69
  39. package/dist/site/capability-registry.json +4 -4
  40. package/dist/site/controller-registry.json +50 -13
  41. package/dist/site/kfd-claims.json +2585 -1000
  42. package/dist/site/kfd-upstream-aggregate.json +1 -1
  43. package/dist/site/manual-registry.json +13 -13
  44. package/dist/site/node-api-registry.json +120 -115
  45. package/dist/site/page-registry.json +204 -51
  46. package/dist/site/public-surface-audit.json +3205 -1219
  47. package/dist/site/publication-authority-registry.json +1124 -362
  48. package/dist/site/publication-registry.json +4 -4
  49. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
  50. package/dist/site/site-manifest.json +17 -17
  51. package/dist/site/workflow-registry.json +5061 -1659
  52. package/docs/MAP.md +1 -0
  53. package/docs/auditable-demo.md +1 -1
  54. package/docs/cli.md +21 -8
  55. package/docs/dev-delivery-warrant.md +1 -1
  56. package/docs/engineering-housekeeper.md +3 -3
  57. package/docs/kfd-support.md +26 -2
  58. package/docs/next-development-transition.md +2 -2
  59. package/docs/node-api-reference.md +190 -190
  60. package/docs/publication-authority.md +2 -2
  61. package/docs/release-candidate.md +3 -3
  62. package/docs/release-flow.md +67 -19
  63. package/docs/release-governance.md +8 -8
  64. package/docs/release-passport.md +27 -2
  65. package/docs/reusable-build-surface.md +16 -0
  66. package/docs/v4-adopter-delivery.md +2 -2
  67. package/docs/v4-production-release.md +71 -8
  68. package/docs/v4-rust-wasm-production-authority.md +58 -0
  69. package/docs/v4-stage-capsule.md +2 -2
  70. package/docs/v4-tail-reseal.md +1 -1
  71. package/docs/workflow-catalog.md +154 -0
  72. package/docs/workflow-path-migration.md +109 -0
  73. package/package.json +10 -6
  74. package/packages/core/artifact-verification-envelope.js +5 -5
  75. package/packages/core/buildchain-contract.js +1 -1
  76. package/packages/core/buildchain-kfd-claims.js +2 -2
  77. package/packages/core/buildchain-publication-authority.js +42 -26
  78. package/packages/core/buildchain-v4-domain.wasm +0 -0
  79. package/packages/core/ci-lane-change-budget.js +14 -1
  80. package/packages/core/controller-evidence.js +4 -1
  81. package/packages/core/dev-delivery-candidate-identity.js +40 -6
  82. package/packages/core/dev-delivery-warrant-state.js +3 -4
  83. package/packages/core/dev-delivery-warrant.js +12 -2
  84. package/packages/core/github-governance-authority.js +4 -4
  85. package/packages/core/kfd-adopter-manifest.js +46 -47
  86. package/packages/core/next-development-projection.js +2 -2
  87. package/packages/core/paper-agent-entry.js +30 -4
  88. package/packages/core/paper-fleet.js +1 -1
  89. package/packages/core/paper-runtime-channels.js +348 -0
  90. package/packages/core/paper-scaffold-content.js +10 -0
  91. package/packages/core/paper.js +37 -71
  92. package/packages/core/release-line-dry-run.js +1 -1
  93. package/packages/core/release-passport-contract.js +5 -5
  94. package/packages/core/release-passport.js +5 -4
  95. package/packages/core/release-tail-provider-plane.js +68 -1048
  96. package/packages/core/v4-canonical-contracts.js +10 -75
  97. package/packages/core/v4-domain-wasm-artifact.js +7 -0
  98. package/packages/core/v4-domain-wasm.js +216 -0
  99. package/packages/core/v4-floating-consumer-evidence.js +1 -1
  100. package/packages/core/v4-floating-consumer-policy.js +1 -1
  101. package/packages/core/v4-partial-mutation-recovery-qualification.js +9 -386
  102. package/packages/core/v4-product-publication.js +19 -349
  103. package/packages/core/v4-protected-publication-source.js +19 -21
  104. package/packages/core/v4-provider-operation-journal.js +18 -487
  105. package/packages/core/v4-provider-readback-idempotency.js +12 -97
  106. package/packages/core/v4-release-activation-shadow.js +13 -500
  107. package/packages/core/v4-release-invocation.js +28 -389
  108. package/packages/core/v4-stable-publication-fence.js +13 -342
  109. package/packages/core/v4-universal-workflow-bootstrap.js +586 -0
  110. package/scripts/binary-publication-evidence.mjs +135 -0
  111. package/scripts/build-contract-core.mjs +1 -14
  112. package/scripts/build-v4-domain-wasm.mjs +189 -0
  113. package/scripts/check-action-bundles.mjs +12 -2
  114. package/scripts/check-ci-lane-change-budget.mjs +4 -1
  115. package/scripts/check-core-mechanism-inventory.mjs +4 -3
  116. package/scripts/check-inventory.mjs +35 -44
  117. package/scripts/check-maintainability.mjs +16 -113
  118. package/scripts/check-v4-floating-consumer-policy-contract.mjs +2 -2
  119. package/scripts/check-v4-public-dogfood-contract.mjs +22 -9
  120. package/scripts/check-v4-release-topology.mjs +90 -33
  121. package/scripts/check-v4-runtime-semantic-closure.mjs +4 -1
  122. package/scripts/check-v4-universal-workflow-bootstrap.mjs +266 -0
  123. package/scripts/check-workflow-taxonomy.mjs +6 -0
  124. package/scripts/copy-v4-domain-wasm.mjs +14 -0
  125. package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
  126. package/scripts/dev-delivery-authority.mjs +8 -8
  127. package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
  128. package/scripts/dev-delivery-warrant-options.mjs +14 -9
  129. package/scripts/dev-delivery-warrant-store.mjs +73 -7
  130. package/scripts/dev-delivery-warrant-transition.mjs +109 -0
  131. package/scripts/dev-delivery-warrant.mjs +76 -99
  132. package/scripts/dev-pr-auto-merge.mjs +15 -15
  133. package/scripts/generate-channel-build-workflow.mjs +7 -2
  134. package/scripts/generate-channel-promotion-workflow.mjs +7 -5
  135. package/scripts/generate-site-bundle.mjs +11 -11
  136. package/scripts/generate-v4-universal-workflow-facades.mjs +458 -0
  137. package/scripts/generate-workflow-taxonomy.mjs +25 -0
  138. package/scripts/github-output.mjs +31 -0
  139. package/scripts/maintainability-metrics.mjs +16 -5
  140. package/scripts/maintainability-public-surface.mjs +115 -0
  141. package/scripts/next-development-review.mjs +307 -0
  142. package/scripts/paper-work-fleet-cli.mjs +2 -0
  143. package/scripts/release-asset-client.mjs +91 -0
  144. package/scripts/release-candidate-resolver.mjs +9 -9
  145. package/scripts/source-verification-evidence.mjs +344 -0
  146. package/scripts/stable-candidate-qualification.mjs +1 -1
  147. package/scripts/universal-facade-maintainability.mjs +82 -0
  148. package/scripts/v4-product-publication-intent.mjs +13 -6
  149. package/scripts/v4-publication-settlement.mjs +211 -0
  150. package/scripts/v4-universal-workflow-backflow.mjs +212 -0
  151. package/scripts/v4-universal-workflow-engine.mjs +618 -0
  152. package/scripts/v4-universal-workflow-self-dogfood.mjs +205 -0
  153. package/scripts/verify-version-state-delta.mjs +173 -0
  154. package/scripts/workflow-taxonomy.mjs +507 -0
  155. package/templates/native-dev-delivery.yml +4 -7
  156. package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
  157. package/templates/universal-buildchain-bootstrap.yml +28 -0
@@ -204,9 +204,9 @@ function runDoctor({ cwd = process.cwd(), requirePublishSourceLock = false } = {
204
204
  };
205
205
  }
206
206
 
207
- function runScript(scriptName, args) {
207
+ function runScript(scriptName, args, runner = process.execPath) {
208
208
  const scriptPath = path.join(root, "scripts", scriptName);
209
- const result = spawnSync(process.execPath, [scriptPath, ...args], {
209
+ const result = spawnSync(runner, [scriptPath, ...args], {
210
210
  cwd: process.cwd(),
211
211
  env: process.env,
212
212
  stdio: "inherit",
@@ -1378,13 +1378,11 @@ async function handleDoctorCommand(args) {
1378
1378
  }
1379
1379
  }
1380
1380
  return;
1381
-
1382
1381
  }
1383
-
1384
1382
  async function handleDevCommand(args) {
1385
1383
  const [subcommand = "", ...devArgs] = args;
1386
- if (subcommand === "pr-admit") {
1387
- runScript("dev-pr-auto-merge.mjs", devArgs);
1384
+ const directScript = { deliver: ["dev-delivery-request.sh", "/bin/bash"], "pr-admit": ["dev-pr-auto-merge.mjs", process.execPath] }[subcommand]; if (directScript) {
1385
+ runScript(directScript[0], devArgs, directScript[1]);
1388
1386
  return;
1389
1387
  }
1390
1388
  if (subcommand === "warrant") {
@@ -1404,11 +1402,13 @@ async function handleDevCommand(args) {
1404
1402
  return;
1405
1403
  }
1406
1404
  if (subcommand !== "merge-queue") {
1407
- throw new Error("usage: buildchain dev <pr-admit|merge-queue|warrant|authority|proof|two-phase> [options]");
1405
+ throw new Error("usage: buildchain dev <deliver|pr-admit|merge-queue|warrant|authority|proof|two-phase> [options]");
1408
1406
  }
1409
1407
  runScript("dev-merge-queue.mjs", devArgs);
1410
1408
  return;
1411
1409
 
1410
+
1411
+
1412
1412
  }
1413
1413
 
1414
1414
  async function handleLogCommand(args) {
@@ -16,33 +16,6 @@
16
16
  "owner": "buildchain-maintainers",
17
17
  "sunsetCondition": "Remove after every known caller migrates to the lifecycle version command."
18
18
  },
19
- {
20
- "path": ".github/workflows/.release-docker.yml",
21
- "token": "workflows v2 Docker release path is retired",
22
- "expectedOccurrences": 1,
23
- "classification": "retired-path-tombstone",
24
- "callerStatus": "fail-closed",
25
- "owner": "buildchain-maintainers",
26
- "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
27
- },
28
- {
29
- "path": ".github/workflows/.release-elastic-beanstalk.yml",
30
- "token": "workflows v2 Elastic Beanstalk release path is retired",
31
- "expectedOccurrences": 1,
32
- "classification": "retired-path-tombstone",
33
- "callerStatus": "fail-closed",
34
- "owner": "buildchain-maintainers",
35
- "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
36
- },
37
- {
38
- "path": ".github/workflows/.release-new-version.yml",
39
- "token": "default: \"v2\"",
40
- "expectedOccurrences": 1,
41
- "classification": "retired-input-tombstone",
42
- "callerStatus": "fail-closed-unused-input",
43
- "owner": "buildchain-maintainers",
44
- "sunsetCondition": "Remove with the retired workflow input compatibility surface."
45
- },
46
19
  {
47
20
  "path": ".github/workflows/.release-verify.yml",
48
21
  "token": "workflows v2",
@@ -52,15 +25,6 @@
52
25
  "owner": "buildchain-maintainers",
53
26
  "sunsetCondition": "Remove each message with its corresponding retired input or path."
54
27
  },
55
- {
56
- "path": ".github/workflows/.sam-release.yml",
57
- "token": "workflows v2 SAM release path is retired",
58
- "expectedOccurrences": 1,
59
- "classification": "retired-path-tombstone",
60
- "callerStatus": "fail-closed",
61
- "owner": "buildchain-maintainers",
62
- "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
63
- },
64
28
  {
65
29
  "path": ".github/workflows/.sam-verify.yml",
66
30
  "token": "kungfu-systems/buildchain/actions/bump-version@v2",
@@ -88,15 +52,6 @@
88
52
  "owner": "buildchain-maintainers",
89
53
  "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
90
54
  },
91
- {
92
- "path": ".github/workflows/.wheel-release.yml",
93
- "token": "workflows v2 wheel release path is retired",
94
- "expectedOccurrences": 1,
95
- "classification": "retired-path-tombstone",
96
- "callerStatus": "fail-closed",
97
- "owner": "buildchain-maintainers",
98
- "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
99
- },
100
55
  {
101
56
  "path": ".github/workflows/.wheel-verify.yml",
102
57
  "token": "kungfu-systems/buildchain/actions/publish-prebuilt@v2",
@@ -116,7 +71,7 @@
116
71
  "sunsetCondition": "Remove after wheel consumers migrate to the lifecycle version command."
117
72
  },
118
73
  {
119
- "path": ".github/workflows/candidate-lab.yml",
74
+ "path": ".github/workflows/self-build-candidate-lab.yml",
120
75
  "token": "default: \"v2\"",
121
76
  "expectedOccurrences": 1,
122
77
  "classification": "legacy-compatibility-ref",
@@ -125,13 +80,67 @@
125
80
  "sunsetCondition": "Remove after the legacy workflows comparison lane is formally retired."
126
81
  },
127
82
  {
128
- "path": ".github/workflows/schedule-purge-artifacts.yml",
129
- "token": "not shipped in buildchain v2",
83
+ "path": ".github/workflows/.release-minor-bump-compat.yml",
84
+ "token": "kungfu-systems/buildchain/actions/bump-version@v2",
85
+ "expectedOccurrences": 1,
86
+ "classification": "legacy-compatibility-action",
87
+ "callerStatus": "legacy-reusable",
88
+ "owner": "buildchain-maintainers",
89
+ "sunsetCondition": "Remove after every known caller migrates to the lifecycle version command."
90
+ },
91
+ {
92
+ "path": ".github/workflows/.build-release-verify-compat.yml",
93
+ "token": "workflows v2",
94
+ "expectedOccurrences": 3,
95
+ "classification": "retired-path-tombstone",
96
+ "callerStatus": "fail-closed",
97
+ "owner": "buildchain-maintainers",
98
+ "sunsetCondition": "Remove each message with its corresponding retired input or path."
99
+ },
100
+ {
101
+ "path": ".github/workflows/.build-sam-verify-compat.yml",
102
+ "token": "kungfu-systems/buildchain/actions/bump-version@v2",
103
+ "expectedOccurrences": 3,
104
+ "classification": "legacy-compatibility-action",
105
+ "callerStatus": "legacy-reusable",
106
+ "owner": "buildchain-maintainers",
107
+ "sunsetCondition": "Remove after SAM consumers migrate to the lifecycle version command."
108
+ },
109
+ {
110
+ "path": ".github/workflows/.build-sam-verify-compat.yml",
111
+ "token": "aws-actions/setup-sam@v2",
112
+ "expectedOccurrences": 1,
113
+ "classification": "third-party-action-version",
114
+ "callerStatus": "legacy-reusable",
115
+ "owner": "aws-actions/setup-sam maintainers",
116
+ "sunsetCondition": "Upgrade through normal dependency review when a compatible successor is adopted."
117
+ },
118
+ {
119
+ "path": ".github/workflows/.release-page-sync-retired.yml",
120
+ "token": "retired in workflows v2",
130
121
  "expectedOccurrences": 1,
131
122
  "classification": "retired-path-tombstone",
132
123
  "callerStatus": "fail-closed",
133
124
  "owner": "buildchain-maintainers",
134
125
  "sunsetCondition": "Remove only after the compatibility workflow entry itself is removed."
126
+ },
127
+ {
128
+ "path": ".github/workflows/.build-wheel-verify-compat.yml",
129
+ "token": "kungfu-systems/buildchain/actions/publish-prebuilt@v2",
130
+ "expectedOccurrences": 1,
131
+ "classification": "legacy-compatibility-action",
132
+ "callerStatus": "legacy-reusable",
133
+ "owner": "buildchain-maintainers",
134
+ "sunsetCondition": "Remove after wheel consumers migrate to the publication authority path."
135
+ },
136
+ {
137
+ "path": ".github/workflows/.build-wheel-verify-compat.yml",
138
+ "token": "kungfu-systems/buildchain/actions/bump-version@v2",
139
+ "expectedOccurrences": 3,
140
+ "classification": "legacy-compatibility-action",
141
+ "callerStatus": "legacy-reusable",
142
+ "owner": "buildchain-maintainers",
143
+ "sunsetCondition": "Remove after wheel consumers migrate to the lifecycle version command."
135
144
  }
136
145
  ]
137
146
  }
@@ -558,8 +558,6 @@
558
558
  "repository",
559
559
  "protectedBase",
560
560
  "pullRequestNumber",
561
- "assignmentRoot",
562
- "initiativeRoot",
563
561
  "sourceIdentityRoot",
564
562
  "deliveryClass",
565
563
  "candidateId",
@@ -576,10 +574,26 @@
576
574
  "qualification",
577
575
  "terminal"
578
576
  ],
577
+ "oneOf": [
578
+ {
579
+ "required": ["sourceRoot"],
580
+ "not": {
581
+ "anyOf": [
582
+ { "required": ["assignmentRoot"] },
583
+ { "required": ["initiativeRoot"] }
584
+ ]
585
+ }
586
+ },
587
+ {
588
+ "required": ["assignmentRoot", "initiativeRoot"],
589
+ "not": { "required": ["sourceRoot"] }
590
+ }
591
+ ],
579
592
  "properties": {
580
593
  "repository": { "type": "string" },
581
594
  "protectedBase": { "type": "string" },
582
595
  "pullRequestNumber": { "type": "integer", "minimum": 1 },
596
+ "sourceRoot": { "$ref": "#/$defs/root" },
583
597
  "assignmentRoot": { "$ref": "#/$defs/root" },
584
598
  "initiativeRoot": { "$ref": "#/$defs/root" },
585
599
  "sourceIdentityRoot": { "$ref": "#/$defs/root" },
@@ -22,7 +22,7 @@
22
22
  "ref": "v4-alpha",
23
23
  "sha": "dddddddddddddddddddddddddddddddddddddddd",
24
24
  "contractRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
25
- "consumerPolicyReceiptRoot": "sha256:8d8e55a4ae07a57a2a262e138f55148b05916c364b3d086530e1392c982b886f"
25
+ "consumerPolicyReceiptRoot": "sha256:402e7aadc3358f89554d3279bd30c4f7a41807c49748d4882117971b31ff3e40"
26
26
  },
27
27
  "warrant": {
28
28
  "candidateId": "candidate-alpha-2",
@@ -69,6 +69,7 @@
69
69
  "stage-capsule-quarantine",
70
70
  "stage-capsule-resume-observation",
71
71
  "stage-capsule-resume-plan",
72
+ "source-verification-evidence",
72
73
  "stage-capsule-artifact-manifest",
73
74
  "stage-capsule-artifact-content",
74
75
  "stage-capsule-fault-campaign",