@kungfu-tech/buildchain 4.0.2-alpha.9 → 4.0.3-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.
- package/AGENTS.md +14 -5
- package/CONTRIBUTING.md +58 -0
- package/README.md +3 -3
- package/actions/promote-buildchain-ref/README.md +1 -1
- package/actions/release-candidate-promote/README.md +31 -0
- package/architecture/agent-change-map.md +190 -126
- package/architecture/{v4-architecture-constitution.md → architecture-constitution.md} +33 -30
- package/architecture/{v3-core-mechanism-inventory.md → baseline-core-mechanism-inventory.md} +1 -1
- package/architecture/{v4-bootstrap-authority.json → bootstrap-authority.json} +3 -3
- package/architecture/{v3-v4-capability-closure.md → capability-parity-closure.md} +3 -3
- package/architecture/{v3-v4-live-capability-inventory.json → capability-parity-live-capability-inventory.json} +4 -4
- package/architecture/{v4-capability-state-machine-manifest.json → capability-state-machine-manifest.json} +2 -2
- package/architecture/{v4-capability-state-machine-manifest.schema.json → capability-state-machine-manifest.schema.json} +2 -2
- package/architecture/ci-lane-change-budget.json +384 -0
- package/architecture/{v4-cross-platform-adopter-qualification.json → cross-platform-adopter-qualification.json} +4 -4
- package/architecture/{v4-delivery-authority-parity.json → delivery-authority-parity.json} +17 -17
- package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.json → delivery-warrant-shadow-bootstrap-plan.json} +4 -4
- package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.md → delivery-warrant-shadow-bootstrap-plan.md} +7 -7
- package/architecture/{v4-floating-consumer-policy.json → floating-consumer-policy.json} +2 -2
- package/architecture/{v4-floating-consumer-policy.md → floating-consumer-policy.md} +1 -1
- package/architecture/implementation-naming.json +1273 -0
- package/architecture/internal-capabilities.json +201 -154
- package/architecture/maintainability-debt.json +205 -146
- package/architecture/maintainability-policy.json +37 -33
- package/architecture/{v4-next-development-parity.json → next-development-parity.json} +12 -12
- package/architecture/{v4-partial-mutation-recovery-qualification.json → partial-mutation-recovery-qualification.json} +8 -5
- package/architecture/{v4-platform-stage-checkpoints.json → platform-stage-checkpoints.json} +3 -3
- package/architecture/{v4-provider-operation-journal-contract.json → provider-operation-journal-contract.json} +10 -7
- package/architecture/publication-facade-patches.json +64 -0
- package/architecture/{v4-publication-rehearsal-parity.json → publication-rehearsal-parity.json} +4 -4
- package/architecture/{v4-release-activation-shadow-domain.json → release-activation-shadow-domain.json} +9 -6
- package/architecture/release-tail-contract-inventory.json +6 -6
- package/architecture/{v4-release-topology.json → release-topology.json} +163 -72
- package/architecture/{v4-release-train-parity.json → release-train-parity.json} +2 -2
- package/architecture/{v4-runtime-ref-resume-authority.json → runtime-ref-resume-authority.json} +1 -1
- package/architecture/{v4-runtime-semantic-closure.json → runtime-semantic-closure.json} +2 -2
- package/architecture/{v4-rust-libnode-bridge-evaluation.json → rust-libnode-bridge-evaluation.json} +3 -3
- package/architecture/{v4-rust-libnode-bridge-spike.md → rust-libnode-bridge-spike.md} +6 -6
- package/architecture/rust-wasm-production-authority.json +58 -0
- package/architecture/{v4-stable-publication-fence.json → stable-publication-fence.json} +7 -4
- package/architecture/{v4-stage-capsule-contract.json → stage-capsule-contract.json} +1 -1
- package/architecture/{v4-stage-capsule-qualification.json → stage-capsule-qualification.json} +8 -8
- package/architecture/{v4-stage-capsule-resume-planner.json → stage-capsule-resume-planner.json} +2 -2
- package/architecture/{v4-stage-capsule-store-contract.json → stage-capsule-store-contract.json} +4 -4
- package/architecture/{v4-tail-reseal-parity.json → tail-reseal-parity.json} +35 -33
- package/architecture/universal-workflow-bootstrap.json +176 -0
- package/architecture/universal-workflow-fault-campaign.json +72 -0
- package/architecture/universal-workflow-train-admission.json +40 -0
- package/architecture/workflow-taxonomy.json +1462 -0
- package/bin/buildchain.mjs +10 -10
- package/bin/internal/adopter-delivery-cli.mjs +9 -9
- package/contracts/buildchain-v2-residuals-v1.json +57 -48
- package/contracts/dev-delivery-authority-v2.schema.json +16 -2
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
- package/contracts/v4-canonical-contracts-v1.schema.json +1 -0
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.lock +1 -1
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.toml +1 -1
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/src/main.rs +3 -3
- package/dist/site/buildchain-contract.json +98 -53
- package/dist/site/buildchain-site.json +351 -102
- package/dist/site/capability-registry.json +7 -7
- package/dist/site/controller-registry.json +50 -13
- package/dist/site/kfd-claims.json +2773 -1052
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +14 -14
- package/dist/site/node-api-registry.json +13176 -10733
- package/dist/site/page-registry.json +332 -83
- package/dist/site/public-surface-audit.json +3227 -1222
- package/dist/site/publication-authority-registry.json +1135 -363
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +18 -9
- package/dist/site/schemas/dev-delivery-authority-v2.schema.json +16 -2
- package/dist/site/site-manifest.json +18 -18
- package/dist/site/workflow-registry.json +5367 -1931
- package/docs/MAP.md +5 -3
- package/docs/auditable-demo.md +1 -1
- package/docs/cli.md +21 -8
- package/docs/dev-delivery-warrant.md +1 -1
- package/docs/engineering-housekeeper.md +3 -3
- package/docs/kfd-support.md +26 -2
- package/docs/next-development-transition.md +26 -3
- package/docs/node-api-reference.md +618 -358
- package/docs/oci-publication.md +173 -0
- package/docs/publication-authority.md +2 -2
- package/docs/publish-transaction.md +36 -3
- package/docs/release-candidate.md +3 -3
- package/docs/release-flow.md +67 -19
- package/docs/release-governance.md +8 -8
- package/docs/release-passport.md +27 -2
- package/docs/reusable-build-surface.md +17 -1
- package/docs/v4-adopter-delivery.md +4 -4
- package/docs/v4-canonical-contracts.md +7 -7
- package/docs/v4-delivery-warrant-read-candidate.md +3 -3
- package/docs/v4-delivery-warrant-semantic-diff.md +3 -3
- package/docs/v4-production-release.md +77 -8
- package/docs/v4-publication-rehearsal.md +3 -3
- package/docs/v4-runtime-ref-resume-authority.md +2 -2
- package/docs/v4-rust-wasm-production-authority.md +58 -0
- package/docs/v4-stage-capsule.md +9 -9
- package/docs/v4-tail-reseal.md +2 -2
- package/docs/workflow-catalog.md +155 -0
- package/docs/workflow-path-migration.md +109 -0
- package/package.json +39 -24
- package/packages/compatibility/adopter-delivery.js +16 -0
- package/packages/compatibility/cross-platform-adopter-qualification.js +12 -0
- package/packages/compatibility/floating-consumer-policy.js +14 -0
- package/packages/compatibility/publication-qualification.js +11 -0
- package/packages/compatibility/publication-rehearsal.js +18 -0
- package/packages/compatibility/runtime-ref-resume-authority.js +13 -0
- package/packages/compatibility/tail-reseal-receipt.js +7 -0
- package/packages/compatibility/tail-reseal.js +11 -0
- package/packages/core/{v4-adopter-delivery-parity.js → adopter-delivery-parity.js} +12 -12
- package/packages/core/{v4-adopter-delivery.js → adopter-delivery.js} +24 -24
- package/packages/core/artifact-verification-envelope.js +5 -5
- package/packages/core/buildchain-contract.js +6 -6
- package/packages/core/buildchain-domain.wasm +0 -0
- package/packages/core/buildchain-kfd-claims.js +2 -2
- package/packages/core/buildchain-publication-authority.js +43 -26
- package/packages/core/{v4-canonical-contracts.js → canonical-contracts.js} +39 -103
- package/packages/core/ci-lane-change-budget.js +14 -1
- package/packages/core/controller-evidence.js +4 -1
- package/packages/core/{v4-cross-platform-adopter-qualification.js → cross-platform-adopter-qualification.js} +19 -19
- package/packages/core/{v4-delivery-warrant-fixture-runner.js → delivery-warrant-fixture-runner.js} +36 -32
- package/packages/core/{v4-delivery-warrant-read-candidate.js → delivery-warrant-read-candidate.js} +40 -40
- package/packages/core/{v4-delivery-warrant-semantic-diff-gate.js → delivery-warrant-semantic-diff-gate.js} +58 -59
- package/packages/core/{v4-delivery-warrant-shadow-adapter.js → delivery-warrant-shadow-adapter.js} +15 -15
- package/packages/core/dev-delivery-candidate-identity.js +40 -6
- package/packages/core/dev-delivery-execution-transfer.js +6 -6
- package/packages/core/dev-delivery-native-proof.js +12 -8
- package/packages/core/dev-delivery-warrant-legacy-recovery.js +1 -1
- package/packages/core/dev-delivery-warrant-native-compatibility.js +4 -4
- package/packages/core/dev-delivery-warrant-state.js +14 -15
- package/packages/core/dev-delivery-warrant.js +15 -5
- package/packages/core/domain-wasm-artifact.js +7 -0
- package/packages/core/domain-wasm.js +216 -0
- package/packages/core/{v4-floating-consumer-evidence.js → floating-consumer-evidence.js} +14 -14
- package/packages/core/{v4-floating-consumer-policy.js → floating-consumer-policy.js} +28 -30
- package/packages/core/{v4-floating-consumer-release-passport.js → floating-consumer-release-passport.js} +25 -25
- package/packages/core/github-governance-authority.js +4 -4
- package/packages/core/index.js +4 -8
- package/packages/core/kfd-adopter-manifest.js +46 -47
- package/packages/core/next-development-projection.js +26 -3
- package/packages/core/next-development-transition.js +5 -6
- package/packages/core/oci-compose-qualification.js +143 -0
- package/packages/core/oci-publication-bundle.js +281 -0
- package/packages/core/oci-publication-graph.js +206 -0
- package/packages/core/paper-agent-entry.js +30 -4
- package/packages/core/paper-fleet.js +1 -1
- package/packages/core/paper-runtime-channels.js +348 -0
- package/packages/core/paper-scaffold-content.js +10 -0
- package/packages/core/paper.js +37 -71
- package/packages/core/partial-mutation-recovery-qualification.js +18 -0
- package/packages/core/{v4-platform-stage-checkpoints.js → platform-stage-checkpoints.js} +37 -37
- package/packages/core/product-publication.js +59 -0
- package/packages/core/{v4-protected-publication-source.js → protected-publication-source.js} +22 -24
- package/packages/core/provider-operation-journal.js +62 -0
- package/packages/core/{v4-provider-readback-idempotency.js → provider-readback-idempotency.js} +40 -125
- package/packages/core/public-export-compatibility.js +33 -0
- package/packages/core/publication-development.js +72 -0
- package/packages/core/{v4-publication-qualification.js → publication-qualification.js} +17 -17
- package/packages/core/{v4-publication-rehearsal-capsule.js → publication-rehearsal-capsule.js} +23 -23
- package/packages/core/publication-rehearsal-projection.js +2 -2
- package/packages/core/{v4-publication-rehearsal-provider-bindings.js → publication-rehearsal-provider-bindings.js} +4 -4
- package/packages/core/publication-rehearsal-runtime.js +21 -21
- package/packages/core/{v4-publication-rehearsal.js → publication-rehearsal.js} +33 -33
- package/packages/core/publication-sealed-bundle.js +78 -13
- package/packages/core/release-activation-shadow.js +32 -0
- package/packages/core/release-candidate.js +6 -6
- package/packages/core/release-invocation.js +64 -0
- package/packages/core/release-line-dry-run.js +1 -1
- package/packages/core/release-passport-contract.js +5 -5
- package/packages/core/release-passport.js +41 -40
- package/packages/core/release-tail-product-capabilities.js +9 -0
- package/packages/core/release-tail-provider-plane.js +68 -1048
- package/packages/core/{v4-runtime-ref-resume-authority.js → runtime-ref-resume-authority.js} +36 -40
- package/packages/core/{v4-runtime-selector-persistence.js → runtime-selector-persistence.js} +7 -7
- package/packages/core/stable-publication-fence.js +28 -0
- package/packages/core/{v4-stage-capsule-local-store.js → stage-capsule-local-store.js} +56 -54
- package/packages/core/{v4-stage-capsule-qualification-campaign.js → stage-capsule-qualification-campaign.js} +37 -38
- package/packages/core/{v4-stage-capsule-qualification.js → stage-capsule-qualification.js} +28 -29
- package/packages/core/{v4-stage-capsule-resume-planner.js → stage-capsule-resume-planner.js} +29 -29
- package/packages/core/{v4-stage-capsule-store.js → stage-capsule-store.js} +59 -56
- package/packages/core/{v4-stage-capsule.js → stage-capsule.js} +45 -45
- package/packages/core/{v4-tail-reseal-contract.js → tail-reseal-contract.js} +6 -6
- package/packages/core/{v4-tail-reseal-github.js → tail-reseal-github.js} +12 -12
- package/packages/core/{v4-tail-reseal-receipt.js → tail-reseal-receipt.js} +22 -22
- package/packages/core/{v4-tail-reseal.js → tail-reseal.js} +29 -29
- package/packages/core/universal-workflow-bootstrap.js +586 -0
- package/scripts/{v4-architecture.mjs → architecture.mjs} +6 -6
- package/scripts/binary-publication-evidence.mjs +135 -0
- package/scripts/{v4-bridge-bootstrap.mjs → bridge-bootstrap.mjs} +14 -18
- package/scripts/{v4-bridge-evidence.mjs → bridge-evidence.mjs} +8 -8
- package/scripts/build-contract-core.mjs +1 -14
- package/scripts/build-domain-wasm.mjs +177 -0
- package/scripts/{v3-v4-capability-catalog.mjs → capability-parity-catalog.mjs} +19 -19
- package/scripts/check-action-bundles.mjs +12 -2
- package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs} +42 -42
- package/scripts/check-ci-lane-change-budget.mjs +4 -1
- package/scripts/check-core-mechanism-inventory.mjs +8 -4
- package/scripts/{check-v4-floating-consumer-policy-contract.mjs → check-floating-consumer-policy-contract.mjs} +10 -10
- package/scripts/check-implementation-naming.mjs +135 -0
- package/scripts/check-inventory.mjs +39 -47
- package/scripts/check-maintainability.mjs +25 -115
- package/scripts/{check-v4-public-dogfood-contract.mjs → check-public-dogfood-contract.mjs} +37 -24
- package/scripts/{check-v4-release-topology.mjs → check-release-topology.mjs} +131 -52
- package/scripts/{check-v4-runtime-semantic-closure.mjs → check-runtime-semantic-closure.mjs} +23 -17
- package/scripts/check-universal-workflow-bootstrap.mjs +266 -0
- package/scripts/check-workflow-taxonomy.mjs +6 -0
- package/scripts/{v4-consumer-policy.mjs → consumer-policy.mjs} +15 -15
- package/scripts/copy-domain-wasm.mjs +14 -0
- package/scripts/{v4-cross-platform-adopter-qualification.mjs → cross-platform-adopter-qualification.mjs} +9 -9
- package/scripts/{v4-declarative-promotion-admission.mjs → declarative-promotion-admission.mjs} +4 -4
- package/scripts/dev-delivery-authority-command-adapters.mjs +1 -1
- package/scripts/dev-delivery-authority.mjs +8 -8
- package/scripts/dev-delivery-source-proof-reuse.mjs +2 -1
- package/scripts/dev-delivery-warrant-options.mjs +15 -10
- package/scripts/dev-delivery-warrant-store.mjs +98 -13
- package/scripts/dev-delivery-warrant-transition.mjs +109 -0
- package/scripts/dev-delivery-warrant.mjs +80 -103
- package/scripts/dev-pr-auto-merge.mjs +15 -15
- package/scripts/dev-pr-delivery-warrant.mjs +1 -1
- package/scripts/generate-channel-build-workflow.mjs +7 -2
- package/scripts/generate-channel-promotion-workflow.mjs +19 -34
- package/scripts/generate-release-candidate-passport.mjs +23 -23
- package/scripts/generate-site-bundle.mjs +28 -28
- package/scripts/generate-universal-workflow-facades.mjs +498 -0
- package/scripts/generate-workflow-taxonomy.mjs +25 -0
- package/scripts/github-output.mjs +31 -0
- package/scripts/{v4-host-adapter.mjs → host-adapter.mjs} +1 -1
- package/scripts/implementation-references.mjs +25 -0
- package/scripts/init-repo.mjs +1 -1
- package/scripts/maintainability-metrics.mjs +16 -5
- package/scripts/maintainability-public-surface.mjs +115 -0
- package/scripts/next-development-review.mjs +313 -0
- package/scripts/oci-compose-preview.mjs +261 -0
- package/scripts/paper-work-fleet-cli.mjs +2 -0
- package/scripts/{v4-platform-stage-checkpoint-rehearsal.mjs → platform-stage-checkpoint-rehearsal.mjs} +17 -17
- package/scripts/{v4-product-publication-intent.mjs → product-publication-intent.mjs} +28 -13
- package/scripts/publication-candidate-kind.mjs +93 -0
- package/scripts/publication-candidate-sealer.mjs +16 -1
- package/scripts/{v4-publication-rehearsal-fixture.mjs → publication-rehearsal-fixture.mjs} +5 -5
- package/scripts/publication-settlement.mjs +211 -0
- package/scripts/release-asset-client.mjs +91 -0
- package/scripts/{v4-release-candidate-adapter.mjs → release-candidate-adapter.mjs} +4 -4
- package/scripts/release-candidate-resolver.mjs +24 -35
- package/scripts/release-tail.mjs +5 -5
- package/scripts/resume-from-candidate-run.mjs +35 -42
- package/scripts/site-capability-metadata.mjs +9 -0
- package/scripts/source-verification-evidence.mjs +344 -0
- package/scripts/stable-candidate-qualification.mjs +1 -1
- package/scripts/{v4-stage-capsule-qualification.mjs → stage-capsule-qualification.mjs} +62 -62
- package/scripts/{v4-stage-capsule-resume-rehearsal.mjs → stage-capsule-resume-rehearsal.mjs} +6 -6
- package/scripts/{v4-tail-reseal-macos-rehearsal.mjs → tail-reseal-macos-rehearsal.mjs} +9 -9
- package/scripts/{v4-tail-reseal.mjs → tail-reseal.mjs} +19 -19
- package/scripts/universal-facade-maintainability.mjs +91 -0
- package/scripts/universal-workflow-backflow.mjs +212 -0
- package/scripts/universal-workflow-engine.mjs +620 -0
- package/scripts/universal-workflow-self-dogfood.mjs +205 -0
- package/scripts/verify-version-state-delta.mjs +175 -0
- package/scripts/{v4-warrant-shadow-plan.mjs → warrant-shadow-plan.mjs} +6 -6
- package/scripts/workflow-taxonomy.mjs +507 -0
- package/templates/native-dev-delivery.yml +4 -7
- package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
- package/templates/universal-buildchain-bootstrap.yml +28 -0
- package/actions/v4-release-candidate-promote/README.md +0 -3
- package/packages/core/v4-partial-mutation-recovery-qualification.js +0 -395
- package/packages/core/v4-product-publication.js +0 -387
- package/packages/core/v4-provider-operation-journal.js +0 -531
- package/packages/core/v4-release-activation-shadow.js +0 -519
- package/packages/core/v4-release-invocation.js +0 -425
- package/packages/core/v4-stable-publication-fence.js +0 -357
- /package/architecture/{v4-adopter-delivery-parity.json → adopter-delivery-parity.json} +0 -0
- /package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json} +0 -0
- /package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json} +0 -0
- /package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.schema.json → delivery-warrant-shadow-bootstrap-plan.schema.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-fixtures.json → delivery-warrant-shadow-fixtures.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-fixtures.schema.json → delivery-warrant-shadow-fixtures.schema.json} +0 -0
- /package/architecture/{v4-exception-ledger.json → exception-ledger.json} +0 -0
- /package/architecture/{v4-exception-ledger.schema.json → exception-ledger.schema.json} +0 -0
- /package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json} +0 -0
package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs}
RENAMED
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
ensureCapabilityCutLineage,
|
|
12
12
|
git,
|
|
13
13
|
sha256,
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./capability-parity-catalog.mjs";
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const BASELINE_CAPABILITY_INVENTORY_CONTRACT =
|
|
17
17
|
"kungfu-buildchain-v3-v4-live-capability-inventory";
|
|
18
|
-
export const
|
|
18
|
+
export const BASELINE_CAPABILITY_CUTS = Object.freeze({
|
|
19
19
|
priorFamilyV3: "6b96bdad8d9f8ccf9275f27d9370a226a9c78465",
|
|
20
20
|
liveV3: "8493bf140a7f567e76aff3119f3d39ff026afc84",
|
|
21
21
|
liveV4: "97edd5b93eb67e5bf36ad55726e08231b47b70c0",
|
|
22
22
|
});
|
|
23
|
-
const INVENTORY_PATH = "architecture/
|
|
23
|
+
const INVENTORY_PATH = "architecture/capability-parity-live-capability-inventory.json";
|
|
24
24
|
const ALLOWED_DISPOSITIONS = new Set([
|
|
25
25
|
"v4-native",
|
|
26
26
|
"compatibility-adapter",
|
|
@@ -30,7 +30,7 @@ const ALLOWED_DISPOSITIONS = new Set([
|
|
|
30
30
|
const ASSIGNMENTS = Object.freeze({
|
|
31
31
|
public: "2026-08-26-buildchain-v4-public-surface-compatibility-closure",
|
|
32
32
|
runtime: "2026-08-26-buildchain-v4-runtime-semantic-closure",
|
|
33
|
-
adopter: "2026-08-26-buildchain-
|
|
33
|
+
adopter: "2026-08-26-buildchain-cross-platform-adopter-qualification",
|
|
34
34
|
stable: "2026-08-26-buildchain-v4-stable-channel-capability-closure",
|
|
35
35
|
retirement: "2026-08-26-buildchain-v4-v3-retirement-reconciliation",
|
|
36
36
|
});
|
|
@@ -93,7 +93,7 @@ function capabilityCutAvailable(root, revision) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
function ensureCapabilityCutsAvailable(root) {
|
|
96
|
-
const revisions = Object.values(
|
|
96
|
+
const revisions = Object.values(BASELINE_CAPABILITY_CUTS);
|
|
97
97
|
const missing = revisions.filter(
|
|
98
98
|
(revision) => !capabilityCutAvailable(root, revision),
|
|
99
99
|
);
|
|
@@ -114,7 +114,7 @@ function ensureCapabilityCutsAvailable(root) {
|
|
|
114
114
|
}
|
|
115
115
|
ensureCapabilityCutLineage({
|
|
116
116
|
root,
|
|
117
|
-
revision:
|
|
117
|
+
revision: BASELINE_CAPABILITY_CUTS.liveV4,
|
|
118
118
|
label: "live v4 capability cut",
|
|
119
119
|
});
|
|
120
120
|
}
|
|
@@ -233,14 +233,14 @@ function rowFromCatalogEntry(source, targetCatalog) {
|
|
|
233
233
|
const migratedId = MIGRATION_ROUTES.get(source.id);
|
|
234
234
|
const migrated = migratedId ? targetCatalog.get(migratedId) : undefined;
|
|
235
235
|
let disposition;
|
|
236
|
-
let
|
|
236
|
+
let route = null;
|
|
237
237
|
let residual = null;
|
|
238
238
|
if (direct) {
|
|
239
239
|
disposition = "v4-native";
|
|
240
|
-
|
|
240
|
+
route = { capabilityId: direct.id, evidence: direct.evidence };
|
|
241
241
|
} else if (migrated) {
|
|
242
242
|
disposition = "executable-migration";
|
|
243
|
-
|
|
243
|
+
route = { capabilityId: migrated.id, evidence: migrated.evidence };
|
|
244
244
|
} else if (PUBLIC_SURFACE_CLOSURE_IDS.has(source.id)) {
|
|
245
245
|
disposition = "owned-missing";
|
|
246
246
|
residual = {
|
|
@@ -257,7 +257,7 @@ function rowFromCatalogEntry(source, targetCatalog) {
|
|
|
257
257
|
disposition,
|
|
258
258
|
ownerAssignment,
|
|
259
259
|
sourceEvidence: source.evidence,
|
|
260
|
-
v4Route,
|
|
260
|
+
v4Route: route,
|
|
261
261
|
residual,
|
|
262
262
|
positiveProbe:
|
|
263
263
|
disposition === "owned-missing"
|
|
@@ -279,33 +279,33 @@ function sourceCut(root, commit, role) {
|
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
export function
|
|
282
|
+
export function buildBaselineCapabilityInventory({ root = process.cwd() } = {}) {
|
|
283
283
|
ensureCapabilityCutsAvailable(root);
|
|
284
284
|
git(root, [
|
|
285
285
|
"merge-base",
|
|
286
286
|
"--is-ancestor",
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
BASELINE_CAPABILITY_CUTS.priorFamilyV3,
|
|
288
|
+
BASELINE_CAPABILITY_CUTS.liveV3,
|
|
289
289
|
]);
|
|
290
|
-
const
|
|
290
|
+
const baseline = collectRevisionCatalog({
|
|
291
291
|
root,
|
|
292
|
-
revision:
|
|
293
|
-
liveV3Revision:
|
|
292
|
+
revision: BASELINE_CAPABILITY_CUTS.liveV3,
|
|
293
|
+
liveV3Revision: BASELINE_CAPABILITY_CUTS.liveV3,
|
|
294
294
|
});
|
|
295
|
-
const
|
|
295
|
+
const domain = collectRevisionCatalog({
|
|
296
296
|
root,
|
|
297
|
-
revision:
|
|
298
|
-
liveV3Revision:
|
|
297
|
+
revision: BASELINE_CAPABILITY_CUTS.liveV4,
|
|
298
|
+
liveV3Revision: BASELINE_CAPABILITY_CUTS.liveV3,
|
|
299
299
|
});
|
|
300
300
|
const rows = [
|
|
301
|
-
...[...
|
|
302
|
-
rowFromCatalogEntry(entry,
|
|
301
|
+
...[...baseline.catalog.values()].map((entry) =>
|
|
302
|
+
rowFromCatalogEntry(entry, domain.catalog),
|
|
303
303
|
),
|
|
304
304
|
...collectHistoryRows({
|
|
305
305
|
root,
|
|
306
|
-
priorRevision:
|
|
307
|
-
liveV3Revision:
|
|
308
|
-
v4Paths:
|
|
306
|
+
priorRevision: BASELINE_CAPABILITY_CUTS.priorFamilyV3,
|
|
307
|
+
liveV3Revision: BASELINE_CAPABILITY_CUTS.liveV3,
|
|
308
|
+
v4Paths: domain.paths,
|
|
309
309
|
migrationPaths: HISTORY_MIGRATION_PATHS,
|
|
310
310
|
ownerAssignment: ASSIGNMENTS.retirement,
|
|
311
311
|
}),
|
|
@@ -313,24 +313,24 @@ export function buildV3V4CapabilityInventory({ root = process.cwd() } = {}) {
|
|
|
313
313
|
const changedPaths = rows.filter((row) => row.category === "history-change");
|
|
314
314
|
const prior = sourceCut(
|
|
315
315
|
root,
|
|
316
|
-
|
|
316
|
+
BASELINE_CAPABILITY_CUTS.priorFamilyV3,
|
|
317
317
|
"previous-absorption-family-capture",
|
|
318
318
|
);
|
|
319
|
-
const
|
|
319
|
+
const baselineCut = sourceCut(
|
|
320
320
|
root,
|
|
321
|
-
|
|
321
|
+
BASELINE_CAPABILITY_CUTS.liveV3,
|
|
322
322
|
"execution-time-protected-read-only-reference",
|
|
323
323
|
);
|
|
324
|
-
const
|
|
324
|
+
const currentCut = sourceCut(
|
|
325
325
|
root,
|
|
326
|
-
|
|
326
|
+
BASELINE_CAPABILITY_CUTS.liveV4,
|
|
327
327
|
"execution-time-protected-target",
|
|
328
328
|
);
|
|
329
|
-
|
|
329
|
+
currentCut.branch = "origin/dev/v4/v4.0";
|
|
330
330
|
const inventory = {
|
|
331
331
|
schemaVersion: 1,
|
|
332
|
-
contract:
|
|
333
|
-
sourceCuts: { priorFamilyV3: prior, liveV3, liveV4 },
|
|
332
|
+
contract: BASELINE_CAPABILITY_INVENTORY_CONTRACT,
|
|
333
|
+
sourceCuts: { priorFamilyV3: prior, liveV3: baselineCut, liveV4: currentCut },
|
|
334
334
|
extraction: {
|
|
335
335
|
mode: "exact-git-object-closed-world",
|
|
336
336
|
extractor: "scripts/check-v3-v4-capability-inventory.mjs",
|
|
@@ -352,13 +352,13 @@ export function buildV3V4CapabilityInventory({ root = process.cwd() } = {}) {
|
|
|
352
352
|
residualPolicy: "exact-identity-allowlist-with-required-owner",
|
|
353
353
|
},
|
|
354
354
|
reverseHistory: {
|
|
355
|
-
fromCommit:
|
|
356
|
-
toCommit:
|
|
355
|
+
fromCommit: BASELINE_CAPABILITY_CUTS.priorFamilyV3,
|
|
356
|
+
toCommit: BASELINE_CAPABILITY_CUTS.liveV3,
|
|
357
357
|
commitCount: Number(
|
|
358
358
|
git(root, [
|
|
359
359
|
"rev-list",
|
|
360
360
|
"--count",
|
|
361
|
-
`${
|
|
361
|
+
`${BASELINE_CAPABILITY_CUTS.priorFamilyV3}..${BASELINE_CAPABILITY_CUTS.liveV3}`,
|
|
362
362
|
]),
|
|
363
363
|
),
|
|
364
364
|
changedPathCount: changedPaths.length,
|
|
@@ -378,7 +378,7 @@ export function buildV3V4CapabilityInventory({ root = process.cwd() } = {}) {
|
|
|
378
378
|
},
|
|
379
379
|
capabilities: rows,
|
|
380
380
|
};
|
|
381
|
-
|
|
381
|
+
assertBaselineCapabilityInventory(inventory);
|
|
382
382
|
return inventory;
|
|
383
383
|
}
|
|
384
384
|
|
|
@@ -448,8 +448,8 @@ function validateCoverage(inventory, rows, issues) {
|
|
|
448
448
|
}
|
|
449
449
|
if (
|
|
450
450
|
inventory?.reverseHistory?.fromCommit !==
|
|
451
|
-
|
|
452
|
-
inventory?.reverseHistory?.toCommit !==
|
|
451
|
+
BASELINE_CAPABILITY_CUTS.priorFamilyV3 ||
|
|
452
|
+
inventory?.reverseHistory?.toCommit !== BASELINE_CAPABILITY_CUTS.liveV3 ||
|
|
453
453
|
inventory?.reverseHistory?.unclassifiedPathCount !== 0
|
|
454
454
|
) {
|
|
455
455
|
issues.push(
|
|
@@ -464,11 +464,11 @@ function validateCoverage(inventory, rows, issues) {
|
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
export function
|
|
467
|
+
export function assertBaselineCapabilityInventory(inventory) {
|
|
468
468
|
const issues = [];
|
|
469
469
|
if (
|
|
470
470
|
inventory?.schemaVersion !== 1 ||
|
|
471
|
-
inventory?.contract !==
|
|
471
|
+
inventory?.contract !== BASELINE_CAPABILITY_INVENTORY_CONTRACT
|
|
472
472
|
) {
|
|
473
473
|
issues.push("inventory contract or schemaVersion is invalid");
|
|
474
474
|
}
|
|
@@ -487,7 +487,7 @@ export function assertV3V4CapabilityInventory(inventory) {
|
|
|
487
487
|
|
|
488
488
|
function main() {
|
|
489
489
|
const root = process.cwd();
|
|
490
|
-
const inventory =
|
|
490
|
+
const inventory = buildBaselineCapabilityInventory({ root });
|
|
491
491
|
const expected = canonicalInventoryJson(inventory);
|
|
492
492
|
if (process.argv.includes("--write")) {
|
|
493
493
|
fs.writeFileSync(path.join(root, INVENTORY_PATH), expected);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import crypto from "node:crypto";
|
|
3
|
+
import { projectWorkflowIdentities } from "./workflow-taxonomy.mjs";
|
|
3
4
|
import fs from "node:fs";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import process from "node:process";
|
|
@@ -14,7 +15,7 @@ const policyPath = path.join(
|
|
|
14
15
|
"ci-lane-change-budget.json",
|
|
15
16
|
);
|
|
16
17
|
|
|
17
|
-
const
|
|
18
|
+
const physicalWorkflows = fs
|
|
18
19
|
.readdirSync(workflowRoot, { withFileTypes: true })
|
|
19
20
|
.filter((entry) => entry.isFile() && /\.(?:yaml|yml)$/u.test(entry.name))
|
|
20
21
|
.map((entry) => {
|
|
@@ -26,6 +27,8 @@ const workflows = fs
|
|
|
26
27
|
})
|
|
27
28
|
.sort((left, right) => left.path.localeCompare(right.path));
|
|
28
29
|
|
|
30
|
+
const workflows = projectWorkflowIdentities(root, physicalWorkflows);
|
|
31
|
+
|
|
29
32
|
const policy = JSON.parse(fs.readFileSync(policyPath, "utf8"));
|
|
30
33
|
const baselineRevision = String(policy.baseline?.gitRevision || "").trim();
|
|
31
34
|
if (!/^[0-9a-f]{40}$/u.test(baselineRevision)) {
|
|
@@ -34,9 +34,10 @@ function registrySurfaceIds(root) {
|
|
|
34
34
|
(entry) => `cli:${entry.id}`,
|
|
35
35
|
);
|
|
36
36
|
const workflows = loadJson(root, "dist/site/workflow-registry.json");
|
|
37
|
-
const workflowIds = workflows.workflows.
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const workflowIds = workflows.workflows.flatMap((entry) => [
|
|
38
|
+
`workflow:${entry.id}`,
|
|
39
|
+
...(entry.taxonomy ? [`workflow:${entry.taxonomy.id}`] : []),
|
|
40
|
+
]);
|
|
40
41
|
const actionIds = workflows.actions.map((entry) => `action:${entry.id}`);
|
|
41
42
|
const exports = Object.keys(loadJson(root, "package.json").exports).map(
|
|
42
43
|
(entry) => `export:${entry}`,
|
|
@@ -274,7 +275,10 @@ function validateReverseScan(root, inventory, ids, ownedSources, issues) {
|
|
|
274
275
|
|
|
275
276
|
function checkCoreMechanismInventory({
|
|
276
277
|
root = process.cwd(),
|
|
277
|
-
inventory = loadJson(
|
|
278
|
+
inventory = loadJson(
|
|
279
|
+
root,
|
|
280
|
+
"architecture/baseline-core-mechanism-inventory.json",
|
|
281
|
+
),
|
|
278
282
|
} = {}) {
|
|
279
283
|
const issues = [];
|
|
280
284
|
if (
|
|
@@ -80,17 +80,17 @@ function assertPersistedSelectors() {
|
|
|
80
80
|
const selector = match[2];
|
|
81
81
|
const protectedBootstrap =
|
|
82
82
|
relative ===
|
|
83
|
-
".github/workflows/
|
|
83
|
+
".github/workflows/self-ops-promotion-recovery.yml" &&
|
|
84
84
|
match[1] === ".github/workflows/.release-candidate-promote.yml" &&
|
|
85
85
|
selector === "alpha/v4/v4.0";
|
|
86
|
-
const
|
|
86
|
+
const isCurrentMajor =
|
|
87
87
|
selector === "v4" ||
|
|
88
88
|
selector === "v4-alpha" ||
|
|
89
89
|
/^v4(?:[./-]|$)/u.test(selector) ||
|
|
90
90
|
/^[0-9a-f]{40}$/iu.test(selector) ||
|
|
91
91
|
selector.includes("${{");
|
|
92
92
|
if (
|
|
93
|
-
(
|
|
93
|
+
(isCurrentMajor || protectedBootstrap) &&
|
|
94
94
|
!["v4", "v4-alpha"].includes(selector) &&
|
|
95
95
|
!protectedBootstrap
|
|
96
96
|
) {
|
|
@@ -104,9 +104,9 @@ function assertPersistedSelectors() {
|
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
export function
|
|
107
|
+
export function checkFloatingConsumerPolicyContract() {
|
|
108
108
|
const policy = JSON.parse(
|
|
109
|
-
read("architecture/
|
|
109
|
+
read("architecture/floating-consumer-policy.json"),
|
|
110
110
|
);
|
|
111
111
|
if (policy.contract !== "kungfu-buildchain-v4-floating-consumer-policy/v1") {
|
|
112
112
|
fail("architecture policy contract is missing");
|
|
@@ -148,7 +148,7 @@ export function checkV4FloatingConsumerPolicyContract() {
|
|
|
148
148
|
"Resolve controller identities",
|
|
149
149
|
"Install Buildchain runtime dependencies",
|
|
150
150
|
]);
|
|
151
|
-
const stageCanary = read(".github/workflows/
|
|
151
|
+
const stageCanary = read(".github/workflows/public-build-stage-capsule-canary.yml");
|
|
152
152
|
if (
|
|
153
153
|
!stageCanary.includes("consumer-admission:") ||
|
|
154
154
|
!stageCanary.includes("needs: consumer-admission")
|
|
@@ -173,12 +173,12 @@ export function checkV4FloatingConsumerPolicyContract() {
|
|
|
173
173
|
["packages/core/release-candidate.js", "consumerPolicy"],
|
|
174
174
|
["packages/core/release-passport.js", "v4ConsumerPolicy"],
|
|
175
175
|
[
|
|
176
|
-
"actions/
|
|
176
|
+
"actions/release-candidate-promote/index.js",
|
|
177
177
|
"candidate.consumerPolicy?.receiptRoot",
|
|
178
178
|
],
|
|
179
179
|
[
|
|
180
|
-
"actions/
|
|
181
|
-
"
|
|
180
|
+
"actions/release-candidate-promote/index.js",
|
|
181
|
+
"createReleaseInvocation",
|
|
182
182
|
],
|
|
183
183
|
]) {
|
|
184
184
|
if (!read(relative).includes(marker)) {
|
|
@@ -205,7 +205,7 @@ if (
|
|
|
205
205
|
) {
|
|
206
206
|
try {
|
|
207
207
|
process.stdout.write(
|
|
208
|
-
`${JSON.stringify(
|
|
208
|
+
`${JSON.stringify(checkFloatingConsumerPolicyContract(), null, 2)}\n`,
|
|
209
209
|
);
|
|
210
210
|
} catch (error) {
|
|
211
211
|
console.error(error.message);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { execFileSync } from "node:child_process";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import ts from "typescript";
|
|
6
|
+
|
|
7
|
+
const ROOTS = new Set([
|
|
8
|
+
"actions",
|
|
9
|
+
"bin",
|
|
10
|
+
"crates",
|
|
11
|
+
"packages",
|
|
12
|
+
"scripts",
|
|
13
|
+
"tests",
|
|
14
|
+
]);
|
|
15
|
+
const GENERATION_PATH = /(?:^|[-_])v\d+(?:[-_]|$)/iu;
|
|
16
|
+
const PROTOCOL_VERSION_SYMBOLS = new Set([
|
|
17
|
+
"createSourceQualificationProofV2",
|
|
18
|
+
"loadedV2",
|
|
19
|
+
]);
|
|
20
|
+
const GENERATION_SYMBOL =
|
|
21
|
+
/(?:^|_)V\d+(?:_|$)|V\d+(?=[A-Z]|$)|^v\d+(?=[A-Z]|$)/u;
|
|
22
|
+
|
|
23
|
+
export function inspectImplementationName(file, source) {
|
|
24
|
+
const issues = [];
|
|
25
|
+
if (!ROOTS.has(file.split("/")[0])) return issues;
|
|
26
|
+
for (const component of file.split("/")) {
|
|
27
|
+
if (GENERATION_PATH.test(component))
|
|
28
|
+
issues.push(`${file}: implementation path contains a product generation`);
|
|
29
|
+
}
|
|
30
|
+
if (file.endsWith(".rs")) {
|
|
31
|
+
for (const match of source.matchAll(
|
|
32
|
+
/\b(?:fn|struct|enum|mod|const|let)\s+([A-Za-z_][A-Za-z0-9_]*)/gu,
|
|
33
|
+
))
|
|
34
|
+
if (
|
|
35
|
+
GENERATION_SYMBOL.test(match[1]) ||
|
|
36
|
+
/(?:^|_)v\d+(?:_|$)/u.test(match[1])
|
|
37
|
+
)
|
|
38
|
+
issues.push(`${file}: ${match[1]} must describe its responsibility`);
|
|
39
|
+
}
|
|
40
|
+
if (!/\.(?:[cm]?js|ts)$/u.test(file) || file.includes("/dist/"))
|
|
41
|
+
return issues;
|
|
42
|
+
const syntax = ts.createSourceFile(
|
|
43
|
+
file,
|
|
44
|
+
source,
|
|
45
|
+
ts.ScriptTarget.Latest,
|
|
46
|
+
true,
|
|
47
|
+
);
|
|
48
|
+
const visit = (node) => {
|
|
49
|
+
if (
|
|
50
|
+
(ts.isFunctionDeclaration(node) ||
|
|
51
|
+
ts.isClassDeclaration(node) ||
|
|
52
|
+
ts.isVariableDeclaration(node) ||
|
|
53
|
+
ts.isParameter(node) ||
|
|
54
|
+
ts.isMethodDeclaration(node) ||
|
|
55
|
+
ts.isBindingElement(node)) &&
|
|
56
|
+
node.name &&
|
|
57
|
+
ts.isIdentifier(node.name) &&
|
|
58
|
+
GENERATION_SYMBOL.test(node.name.text) &&
|
|
59
|
+
!PROTOCOL_VERSION_SYMBOLS.has(node.name.text) &&
|
|
60
|
+
!/_V\d+_SCHEMA$/u.test(node.name.text)
|
|
61
|
+
) {
|
|
62
|
+
const line =
|
|
63
|
+
syntax.getLineAndCharacterOfPosition(node.name.getStart()).line + 1;
|
|
64
|
+
issues.push(
|
|
65
|
+
`${file}:${line}: ${node.name.text} must describe its responsibility`,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
if (
|
|
69
|
+
(ts.isStringLiteral(node) ||
|
|
70
|
+
ts.isNoSubstitutionTemplateLiteral(node) ||
|
|
71
|
+
ts.isTemplateHead(node) ||
|
|
72
|
+
ts.isTemplateMiddle(node) ||
|
|
73
|
+
ts.isTemplateTail(node)) &&
|
|
74
|
+
/\.buildchain\/[A-Za-z0-9_./-]*\bv\d+-/u.test(node.text)
|
|
75
|
+
)
|
|
76
|
+
issues.push(
|
|
77
|
+
`${file}: runtime directory must describe its responsibility`,
|
|
78
|
+
);
|
|
79
|
+
ts.forEachChild(node, visit);
|
|
80
|
+
};
|
|
81
|
+
visit(syntax);
|
|
82
|
+
return issues;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function checkImplementationNaming(root = process.cwd()) {
|
|
86
|
+
const files = execFileSync("git", ["ls-files", "-z"], {
|
|
87
|
+
cwd: root,
|
|
88
|
+
encoding: "utf8",
|
|
89
|
+
})
|
|
90
|
+
.split("\0")
|
|
91
|
+
.filter(Boolean);
|
|
92
|
+
const issues = files.flatMap((file) => {
|
|
93
|
+
const absolute = path.join(root, file);
|
|
94
|
+
if (!fs.existsSync(absolute))
|
|
95
|
+
return [`${file}: tracked implementation is missing`];
|
|
96
|
+
const source =
|
|
97
|
+
ROOTS.has(file.split("/")[0]) && /\.(?:[cm]?js|ts|rs)$/u.test(file)
|
|
98
|
+
? fs.readFileSync(absolute, "utf8")
|
|
99
|
+
: "";
|
|
100
|
+
return inspectImplementationName(file, source);
|
|
101
|
+
});
|
|
102
|
+
const manifest = JSON.parse(
|
|
103
|
+
fs.readFileSync(path.join(root, "package.json"), "utf8"),
|
|
104
|
+
);
|
|
105
|
+
for (const name of Object.keys(manifest.scripts || {})) {
|
|
106
|
+
if (/(?:^|:)v\d+(?:[-:]|$)/iu.test(name))
|
|
107
|
+
issues.push(`package.json: script ${name} contains a product generation`);
|
|
108
|
+
}
|
|
109
|
+
const policy = JSON.parse(
|
|
110
|
+
fs.readFileSync(
|
|
111
|
+
path.join(root, "architecture/implementation-naming.json"),
|
|
112
|
+
"utf8",
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
for (const [file, identities] of Object.entries(policy.wireIdentities)) {
|
|
116
|
+
const source = fs.readFileSync(path.join(root, file), "utf8");
|
|
117
|
+
for (const previousIdentity of identities) {
|
|
118
|
+
const identity =
|
|
119
|
+
policy.implementationIdentityMigrations?.[file]?.[previousIdentity] ||
|
|
120
|
+
previousIdentity;
|
|
121
|
+
if (
|
|
122
|
+
!source.includes(JSON.stringify(identity)) &&
|
|
123
|
+
!source.includes(`'${identity}'`)
|
|
124
|
+
)
|
|
125
|
+
issues.push(
|
|
126
|
+
`${file}: published wire identity changed during implementation relocation: ${identity}`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (issues.length) throw new Error(issues.join("\n"));
|
|
131
|
+
return { checkedFiles: files.length, issues: [] };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
|
|
135
|
+
console.log(JSON.stringify(checkImplementationNaming(), null, 2));
|
|
@@ -145,39 +145,39 @@ const requiredPaths = [
|
|
|
145
145
|
".buildchain/alpha-contract-lock.json",
|
|
146
146
|
".buildchain/release-impact.json",
|
|
147
147
|
".github/actionlint.yaml",
|
|
148
|
-
".github/workflows/self-
|
|
149
|
-
".github/workflows/
|
|
150
|
-
".github/workflows/
|
|
151
|
-
".github/workflows/release-line-
|
|
148
|
+
".github/workflows/self-ops-runner-smoke.yml",
|
|
149
|
+
".github/workflows/self-release-promote.yml",
|
|
150
|
+
".github/workflows/self-ops-recovery-failure-dogfood.yml",
|
|
151
|
+
".github/workflows/self-release-line-open.yml",
|
|
152
152
|
".github/workflows/release-governance-reconcile.yml",
|
|
153
153
|
".github/workflows/dev-pr-auto-merge.yml",
|
|
154
|
-
".github/workflows/
|
|
154
|
+
".github/workflows/self-ops-dev-delivery.yml",
|
|
155
155
|
".github/workflows/buildchain-patrol.yml",
|
|
156
156
|
".github/workflows/patrol-daily.yml",
|
|
157
157
|
".github/workflows/patrol-weekly.yml",
|
|
158
158
|
".github/workflows/patrol-monthly.yml",
|
|
159
159
|
".github/workflows/patrol-observed-evidence.yml",
|
|
160
|
-
".github/workflows/
|
|
161
|
-
".github/workflows/
|
|
162
|
-
".github/workflows/
|
|
163
|
-
".github/workflows/
|
|
160
|
+
".github/workflows/self-ops-patrol-daily.yml",
|
|
161
|
+
".github/workflows/self-ops-patrol-weekly.yml",
|
|
162
|
+
".github/workflows/self-ops-patrol-monthly.yml",
|
|
163
|
+
".github/workflows/self-build-alpha-dogfood.yml",
|
|
164
164
|
".github/workflows/release-candidate-promote.yml",
|
|
165
165
|
".github/workflows/.release-candidate-promote.yml",
|
|
166
166
|
".github/workflows/release-propagation.yml",
|
|
167
|
-
".github/workflows/npm-
|
|
167
|
+
".github/workflows/self-release-npm-dry-run.yml",
|
|
168
168
|
".github/workflows/paper-release.yml",
|
|
169
|
-
".github/workflows/binary-distribution.yml",
|
|
169
|
+
".github/workflows/self-build-binary-distribution.yml",
|
|
170
170
|
".github/workflows/.binary-release-assets.yml",
|
|
171
|
-
".github/workflows/
|
|
172
|
-
".github/workflows/verify.yml",
|
|
171
|
+
".github/workflows/self-release-binary-assets.yml",
|
|
172
|
+
".github/workflows/self-build-verify.yml",
|
|
173
173
|
".github/workflows/.build.yml",
|
|
174
174
|
".github/workflows/.gate-profile.yml",
|
|
175
175
|
".github/workflows/.auditable-demo.yml",
|
|
176
176
|
".github/workflows/.declarative-auditable-demo.yml",
|
|
177
|
-
".github/workflows/
|
|
177
|
+
".github/workflows/self-build-demo-dogfood.yml",
|
|
178
178
|
".github/workflows/build.yml",
|
|
179
|
-
".github/workflows/build-
|
|
180
|
-
".github/workflows/candidate-lab.yml",
|
|
179
|
+
".github/workflows/self-build-fixture.yml",
|
|
180
|
+
".github/workflows/self-build-candidate-lab.yml",
|
|
181
181
|
"fixtures/libnode-shaped/buildchain.toml",
|
|
182
182
|
"fixtures/libnode-shaped/.github/workflows/build.yml",
|
|
183
183
|
"fixtures/libnode-shaped/package.json"
|
|
@@ -197,7 +197,7 @@ if (rootPackage.private !== false) {
|
|
|
197
197
|
throw new Error("root package must be publishable with private=false");
|
|
198
198
|
}
|
|
199
199
|
const selfDogfoodWorkflow = fs.readFileSync(
|
|
200
|
-
path.join(root, ".github/workflows/
|
|
200
|
+
path.join(root, ".github/workflows/self-build-alpha-dogfood.yml"),
|
|
201
201
|
"utf8",
|
|
202
202
|
);
|
|
203
203
|
const selfDogfoodAlphaLock = JSON.parse(
|
|
@@ -207,7 +207,7 @@ const currentBuildchainContract = JSON.parse(
|
|
|
207
207
|
fs.readFileSync(path.join(root, "dist/site/buildchain-contract.json"), "utf8"),
|
|
208
208
|
);
|
|
209
209
|
const selfDogfoodBootstrapAuthority = JSON.parse(
|
|
210
|
-
fs.readFileSync(path.join(root, "architecture/
|
|
210
|
+
fs.readFileSync(path.join(root, "architecture/bootstrap-authority.json"), "utf8"),
|
|
211
211
|
);
|
|
212
212
|
const selfDogfoodMajorResolution = resolveSelfDogfoodMajor({
|
|
213
213
|
packageVersion: rootPackage.version,
|
|
@@ -285,7 +285,7 @@ const channelPromotionWorkflow = fs.readFileSync(
|
|
|
285
285
|
"utf8",
|
|
286
286
|
);
|
|
287
287
|
const boundedAlphaRecoveryWorkflow = fs.readFileSync(
|
|
288
|
-
path.join(root, ".github/workflows/
|
|
288
|
+
path.join(root, ".github/workflows/self-ops-promotion-recovery.yml"),
|
|
289
289
|
"utf8",
|
|
290
290
|
);
|
|
291
291
|
const promotionShellRouting = parsePromotionShellRouting(
|
|
@@ -546,7 +546,8 @@ if (!coreIndexSource.includes("KFD2_RELEASE_TRUST_PASSPORT_CONTRACT")) {
|
|
|
546
546
|
if (!coreIndexSource.includes("KFD2_TRUST_PROOF_CONTRACT")) {
|
|
547
547
|
throw new Error("packages/core/index.js must export KFD-2 trust proof contract");
|
|
548
548
|
}
|
|
549
|
-
|
|
549
|
+
const publicCore = await import("../packages/core/index.js");
|
|
550
|
+
if (typeof publicCore.createSurfaceTimestampPolicy !== "function") {
|
|
550
551
|
throw new Error("packages/core/index.js must export surface manifest timestamp policy APIs");
|
|
551
552
|
}
|
|
552
553
|
for (const requiredSnippet of [
|
|
@@ -1000,11 +1001,11 @@ for (const requiredSnippet of [
|
|
|
1000
1001
|
if (commonJsSourcePattern.test(standaloneBinaryScript)) {
|
|
1001
1002
|
throw new Error("scripts/build-standalone-binary.mjs must use ESM syntax");
|
|
1002
1003
|
}
|
|
1003
|
-
const npmPublishWorkflow = fs.readFileSync(path.join(root, ".github/workflows/npm-
|
|
1004
|
-
const buildchainRefPromotionWorkflow = fs.readFileSync(path.join(root, ".github/workflows/
|
|
1005
|
-
const binaryDistributionWorkflow = fs.readFileSync(path.join(root, ".github/workflows/binary-distribution.yml"), "utf8");
|
|
1004
|
+
const npmPublishWorkflow = fs.readFileSync(path.join(root, ".github/workflows/self-release-npm-dry-run.yml"), "utf8");
|
|
1005
|
+
const buildchainRefPromotionWorkflow = fs.readFileSync(path.join(root, ".github/workflows/self-release-promote.yml"), "utf8");
|
|
1006
|
+
const binaryDistributionWorkflow = fs.readFileSync(path.join(root, ".github/workflows/self-build-binary-distribution.yml"), "utf8");
|
|
1006
1007
|
const binaryReleaseAssetsWorkflow = fs.readFileSync(path.join(root, ".github/workflows/.binary-release-assets.yml"), "utf8");
|
|
1007
|
-
const selfHostedRunnerSmokeWorkflow = fs.readFileSync(path.join(root, ".github/workflows/self-
|
|
1008
|
+
const selfHostedRunnerSmokeWorkflow = fs.readFileSync(path.join(root, ".github/workflows/self-ops-runner-smoke.yml"), "utf8");
|
|
1008
1009
|
const npmDryRunScript = fs.readFileSync(path.join(root, "scripts/npm-publish-dry-run.mjs"), "utf8");
|
|
1009
1010
|
const npmPublishTransactionScript = fs.readFileSync(path.join(root, "scripts/npm-publish-transaction.mjs"), "utf8");
|
|
1010
1011
|
const rootPackageJson = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
@@ -1043,8 +1044,8 @@ for (const requiredSnippet of [
|
|
|
1043
1044
|
"actions: write",
|
|
1044
1045
|
"uses: kungfu-systems/buildchain/.github/workflows/.release-candidate-promote.yml@v4-alpha",
|
|
1045
1046
|
"github.event.workflow_run.event == 'push'",
|
|
1046
|
-
"
|
|
1047
|
-
"
|
|
1047
|
+
"name: Classify generated product-state finalization",
|
|
1048
|
+
"selectFinalizedProductPublicationVersion",
|
|
1048
1049
|
"resume-candidate-run-id:",
|
|
1049
1050
|
"resume-expected-source-tree:",
|
|
1050
1051
|
"resume-buildchain-runtime-ref:",
|
|
@@ -1056,12 +1057,19 @@ for (const requiredSnippet of [
|
|
|
1056
1057
|
throw new Error(`buildchain ref promotion workflow missing npm transaction snippet: ${requiredSnippet}`);
|
|
1057
1058
|
}
|
|
1058
1059
|
}
|
|
1060
|
+
if (buildchainRefPromotionWorkflow.includes("workflow_run.display_title")) {
|
|
1061
|
+
throw new Error(
|
|
1062
|
+
"buildchain ref promotion must classify finalization from rooted product state, not a display title",
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1059
1065
|
const releaseCandidatePromoteWorkflow = fs.readFileSync(path.join(root, ".github/workflows/.release-candidate-promote.yml"), "utf8");
|
|
1060
1066
|
for (const requiredSnippet of [
|
|
1061
1067
|
"name: QUALIFY canonical v4 release invocation inputs",
|
|
1062
1068
|
"name: APPLY one rooted provider transaction",
|
|
1063
1069
|
"name: SETTLE terminal ReleaseReceipt projection",
|
|
1064
|
-
"uses: ./.buildchain/runtime/actions/
|
|
1070
|
+
"uses: ./.buildchain/runtime/actions/release-candidate-promote",
|
|
1071
|
+
"name: Resolve one exact product publication recovery",
|
|
1072
|
+
"selectRecoveredProductPublicationVersion",
|
|
1065
1073
|
"publisher-workflow-sha:",
|
|
1066
1074
|
"runtime-commit:",
|
|
1067
1075
|
"runtime-tree:",
|
|
@@ -1101,31 +1109,15 @@ for (const workflowFile of fs.readdirSync(workflowDir).filter((entry) => entry.e
|
|
|
1101
1109
|
}
|
|
1102
1110
|
}
|
|
1103
1111
|
for (const retiredWorkflow of [
|
|
1112
|
+
".release-docker.yml",
|
|
1104
1113
|
".release-new-version.yml",
|
|
1105
1114
|
".release-elastic-beanstalk.yml",
|
|
1106
1115
|
".sam-release.yml",
|
|
1107
1116
|
".wheel-release.yml",
|
|
1117
|
+
"schedule-purge-artifacts.yml",
|
|
1108
1118
|
]) {
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
"release path is retired",
|
|
1112
|
-
"release-candidate-promote.yml@v3",
|
|
1113
|
-
"publish-gate source-lock enforcement",
|
|
1114
|
-
]) {
|
|
1115
|
-
if (!retiredSource.includes(requiredSnippet)) {
|
|
1116
|
-
throw new Error(`${retiredWorkflow} must fail closed and point callers at the source-locked release-candidate-promote model: ${requiredSnippet}`);
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
for (const forbiddenSnippet of [
|
|
1120
|
-
"npm publish --access=public",
|
|
1121
|
-
"actions/publish-prebuilt@v2",
|
|
1122
|
-
"actions/bump-version@v2",
|
|
1123
|
-
"beanstalk-deploy@",
|
|
1124
|
-
"sam deploy",
|
|
1125
|
-
]) {
|
|
1126
|
-
if (retiredSource.includes(forbiddenSnippet)) {
|
|
1127
|
-
throw new Error(`${retiredWorkflow} must not keep retired publish side effects: ${forbiddenSnippet}`);
|
|
1128
|
-
}
|
|
1119
|
+
if (fs.existsSync(path.join(workflowDir, retiredWorkflow))) {
|
|
1120
|
+
throw new Error(`${retiredWorkflow} is fully retired and must remain deleted`);
|
|
1129
1121
|
}
|
|
1130
1122
|
}
|
|
1131
1123
|
const promoteBuildchainRefAction = fs.readFileSync(path.join(root, "actions/promote-buildchain-ref/action.yml"), "utf8");
|