@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
|
@@ -58,7 +58,7 @@ const WORKFLOW_AND_ACTION_FILES = Object.freeze([
|
|
|
58
58
|
".github/workflows/.build.yml",
|
|
59
59
|
".github/workflows/.release-candidate-promote.yml",
|
|
60
60
|
".github/workflows/release-candidate-promote.yml",
|
|
61
|
-
".github/workflows/
|
|
61
|
+
".github/workflows/self-release-promote.yml",
|
|
62
62
|
".github/workflows/github-artifact-attestation.yml",
|
|
63
63
|
"actions/github-artifact-attestation/action.yml",
|
|
64
64
|
"actions/github-artifact-attestation/index.js",
|
|
@@ -446,7 +446,7 @@ export function createBuildchainKfdSurfaceRegistry({ root = process.cwd() } = {}
|
|
|
446
446
|
{
|
|
447
447
|
name: "Buildchain standalone binary distribution",
|
|
448
448
|
artifactPath: "dist/binary",
|
|
449
|
-
evidencePath: ".github/workflows/binary-distribution.yml",
|
|
449
|
+
evidencePath: ".github/workflows/self-build-binary-distribution.yml",
|
|
450
450
|
distribution: normalizeKfd3DistributionDeclaration({
|
|
451
451
|
registrar: "shifu",
|
|
452
452
|
tasks: ["binary:build"],
|
|
@@ -4,47 +4,47 @@ import path from "node:path";
|
|
|
4
4
|
import { createPublicationAuthorityRegistry } from "./publication-authority.js";
|
|
5
5
|
|
|
6
6
|
const DESCRIPTORS = Object.freeze([
|
|
7
|
+
[".github/workflows/public-release-oci-compose-preview.yml", "product-publication", true, ["oci-compose-preview"], "caller-secrets", "none", "fixed", "caller-bound"],
|
|
7
8
|
[".github/workflows/.auditable-demo.yml", "non-publication-oidc"],
|
|
8
9
|
[".github/workflows/.declarative-auditable-demo.yml", "governance-write"],
|
|
9
10
|
[".github/workflows/.build.yml", "non-publication-oidc"],
|
|
10
11
|
[".github/workflows/.release-candidate-promote.yml", "product-publication", true, ["npm-publish", "github-release", "channel-ref"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
11
12
|
[".github/workflows/.publication-authority.yml", "evidence-publication"],
|
|
12
13
|
[".github/workflows/.release-verify.yml", "governance-write"],
|
|
13
|
-
[".github/workflows/.sam-release.yml", "retired-deny"],
|
|
14
14
|
[".github/workflows/.sam-verify.yml", "retired-deny"],
|
|
15
15
|
[".github/workflows/.sync-remote-git.yml", "governance-write"],
|
|
16
16
|
[".github/workflows/.web-surface.yml", "product-publication", true, ["web-production"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
|
|
17
|
-
[".github/workflows/.wheel-release.yml", "retired-deny"],
|
|
18
17
|
[".github/workflows/.wheel-verify.yml", "retired-deny"],
|
|
19
18
|
[".github/workflows/.binary-release-assets.yml", "product-publication", true, ["github-release"], "github-token", "buildchain-release-assets"],
|
|
20
|
-
[".github/workflows/binary-distribution.yml", "evidence-publication"],
|
|
21
|
-
[".github/workflows/
|
|
19
|
+
[".github/workflows/self-build-binary-distribution.yml", "evidence-publication"],
|
|
20
|
+
[".github/workflows/self-release-binary-assets.yml", "governance-write"],
|
|
22
21
|
[".github/workflows/artifact-signing-authority.yml", "evidence-publication"],
|
|
23
|
-
[".github/workflows/
|
|
24
|
-
[".github/workflows/build-
|
|
22
|
+
[".github/workflows/self-build-demo-dogfood.yml", "governance-write"],
|
|
23
|
+
[".github/workflows/self-build-fixture.yml", "non-publication-oidc"],
|
|
25
24
|
[".github/workflows/build.yml", "non-publication-oidc"],
|
|
26
|
-
[".github/workflows/
|
|
27
|
-
[".github/workflows/
|
|
28
|
-
[".github/workflows/
|
|
29
|
-
[".github/workflows/
|
|
30
|
-
[".github/workflows/
|
|
25
|
+
[".github/workflows/bootstrap.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
|
|
26
|
+
[".github/workflows/self-build-alpha-dogfood.yml", "non-publication-oidc"],
|
|
27
|
+
[".github/workflows/self-ops-dev-delivery.yml", "governance-write"],
|
|
28
|
+
[".github/workflows/self-ops-patrol-daily.yml", "governance-write"],
|
|
29
|
+
[".github/workflows/self-ops-patrol-monthly.yml", "governance-write"],
|
|
30
|
+
[".github/workflows/self-ops-patrol-weekly.yml", "governance-write"],
|
|
31
31
|
[".github/workflows/buildchain-patrol.yml", "governance-write"],
|
|
32
|
-
[".github/workflows/
|
|
33
|
-
[".github/workflows/
|
|
34
|
-
[".github/workflows/
|
|
32
|
+
[".github/workflows/self-ops-promotion-recovery.yml", "governance-write"],
|
|
33
|
+
[".github/workflows/self-release-promote.yml", "governance-write"],
|
|
34
|
+
[".github/workflows/self-ops-stable-candidate-patrol.yml", "governance-write"],
|
|
35
35
|
[".github/workflows/dev-qualification-patrol.yml", "governance-write"],
|
|
36
36
|
[".github/workflows/dev-alpha-candidate-patrol.yml", "governance-write"],
|
|
37
37
|
[".github/workflows/dev-delivery-warrant-close.yml", "governance-write"],
|
|
38
38
|
[".github/workflows/dev-delivery-warrant-cancel.yml", "governance-write"],
|
|
39
|
-
[".github/workflows/
|
|
39
|
+
[".github/workflows/self-ops-merge-queue.yml", "governance-write"],
|
|
40
40
|
[".github/workflows/dev-pr-auto-merge.yml", "governance-write"],
|
|
41
|
-
[".github/workflows/
|
|
42
|
-
[".github/workflows/
|
|
43
|
-
[".github/workflows/
|
|
41
|
+
[".github/workflows/self-ops-housekeeping-daily.yml", "governance-write"],
|
|
42
|
+
[".github/workflows/self-ops-housekeeping-monthly.yml", "governance-write"],
|
|
43
|
+
[".github/workflows/self-ops-housekeeping-weekly.yml", "governance-write"],
|
|
44
44
|
[".github/workflows/engineering-housekeeper.yml", "governance-write"],
|
|
45
|
-
[".github/workflows/
|
|
45
|
+
[".github/workflows/self-ops-governance-audit.yml", "governance-write"],
|
|
46
46
|
[".github/workflows/github-artifact-attestation.yml", "evidence-publication", true, ["github-artifact-attestation"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
|
|
47
|
-
[".github/workflows/npm-
|
|
47
|
+
[".github/workflows/self-release-npm-dry-run.yml", "dry-run-only"],
|
|
48
48
|
[".github/workflows/paper-release-sealed.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
49
49
|
[".github/workflows/paper-release.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
50
50
|
[".github/workflows/patrol-daily.yml", "governance-write"],
|
|
@@ -53,16 +53,18 @@ const DESCRIPTORS = Object.freeze([
|
|
|
53
53
|
[".github/workflows/patrol-weekly.yml", "governance-write"],
|
|
54
54
|
[".github/workflows/publication-artifact.yml", "evidence-publication"],
|
|
55
55
|
[".github/workflows/release-candidate-promote.yml", "product-publication", true, ["npm-publish", "github-release", "channel-ref"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
56
|
-
[".github/workflows/release-line-
|
|
56
|
+
[".github/workflows/self-release-line-open.yml", "governance-write"],
|
|
57
57
|
[".github/workflows/release-propagation.yml", "governance-write"],
|
|
58
58
|
[".github/workflows/release-tail.yml", "product-publication", true, ["artifact.publish", "signed-channel.commit", "release.activate", "released-evidence.synthesize"], "caller-secrets", "caller-bound", "caller-bound", "fixed"],
|
|
59
|
-
[".github/workflows/release-verify.yml", "governance-write"],
|
|
59
|
+
[".github/workflows/self-build-release-verify-compat.yml", "governance-write"],
|
|
60
60
|
[".github/workflows/stable-candidate-patrol.yml", "governance-write"],
|
|
61
|
-
[".github/workflows/
|
|
61
|
+
[".github/workflows/universal-bootstrap-recovery.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
|
|
62
|
+
[".github/workflows/self-ops-bootstrap-dogfood.yml", "product-publication", true, ["universal-candidate-execution"], "caller-secrets", "none", "fixed", "caller-bound"],
|
|
63
|
+
[".github/workflows/self-release-tail-dogfood.yml", "product-publication", true, ["artifact.publish", "signed-channel.commit", "release.activate", "released-evidence.synthesize"], "caller-secrets", "none", "fixed", "fixed"],
|
|
62
64
|
]);
|
|
63
65
|
|
|
64
|
-
export function buildchainPublicationAuthorityDescriptors() {
|
|
65
|
-
|
|
66
|
+
export function buildchainPublicationAuthorityDescriptors({ root = process.cwd() } = {}) {
|
|
67
|
+
const descriptors = DESCRIPTORS.map(([
|
|
66
68
|
workflowPath,
|
|
67
69
|
authorityClass,
|
|
68
70
|
publicationCapable = false,
|
|
@@ -84,6 +86,21 @@ export function buildchainPublicationAuthorityDescriptors() {
|
|
|
84
86
|
environmentMode,
|
|
85
87
|
runnerPolicy: publicationCapable ? "qualified-measured" : "unqualified",
|
|
86
88
|
}));
|
|
89
|
+
const taxonomyPath = path.join(root, "architecture/workflow-taxonomy.json");
|
|
90
|
+
if (!fs.existsSync(taxonomyPath)) return descriptors;
|
|
91
|
+
const taxonomy = JSON.parse(fs.readFileSync(taxonomyPath, "utf8"));
|
|
92
|
+
for (const entry of taxonomy.entries) {
|
|
93
|
+
if (!entry.compatibility) continue;
|
|
94
|
+
const previous = descriptors.find((item) => item.workflowPath === entry.compatibility.path);
|
|
95
|
+
if (!previous) continue;
|
|
96
|
+
const prefix = entry.role === "component" ? "." : `${entry.role}-`;
|
|
97
|
+
const workflowPath = `.github/workflows/${prefix}${entry.category}-${entry.purpose}.yml`;
|
|
98
|
+
if (fs.readFileSync(path.join(root, workflowPath), "utf8") !== fs.readFileSync(path.join(root, entry.compatibility.path), "utf8")) {
|
|
99
|
+
throw new Error(`publication authority alias differs from canonical workflow: ${workflowPath}`);
|
|
100
|
+
}
|
|
101
|
+
descriptors.push({ ...previous, workflowPath, publisherWorkflowPath: previous.publisherWorkflowPath === previous.workflowPath ? workflowPath : previous.publisherWorkflowPath });
|
|
102
|
+
}
|
|
103
|
+
return descriptors;
|
|
87
104
|
}
|
|
88
105
|
export function createBuildchainPublicationAuthorityRegistry({ root = process.cwd() } = {}) {
|
|
89
106
|
const workflowsDir = path.join(root, ".github", "workflows");
|
|
@@ -94,7 +111,7 @@ export function createBuildchainPublicationAuthorityRegistry({ root = process.cw
|
|
|
94
111
|
text: fs.readFileSync(path.join(workflowsDir, name), "utf8"),
|
|
95
112
|
}));
|
|
96
113
|
return createPublicationAuthorityRegistry({
|
|
97
|
-
descriptors: buildchainPublicationAuthorityDescriptors(),
|
|
114
|
+
descriptors: buildchainPublicationAuthorityDescriptors({ root }),
|
|
98
115
|
workflows,
|
|
99
116
|
});
|
|
100
117
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DomainWasmFault, invokeDomainWasm } from "./domain-wasm.js";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
3
|
+
export const CANONICAL_JSON_CONTRACT = "buildchain-canonical-json/v1";
|
|
4
|
+
export const EVENT_ENVELOPE_CONTRACT = "buildchain-v4-event-envelope/v1";
|
|
5
|
+
export const RECEIPT_ENVELOPE_CONTRACT = "buildchain-v4-receipt-envelope/v1";
|
|
6
|
+
export const CONTRACT_FAULT_CONTRACT = "buildchain-v4-contract-fault/v1";
|
|
7
7
|
|
|
8
8
|
const ROOT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
|
|
9
9
|
const CLOCK_PATTERN = /^(?!0000)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u;
|
|
@@ -28,6 +28,7 @@ const ROOT_DOMAINS = new Set([
|
|
|
28
28
|
"stage-capsule-quarantine",
|
|
29
29
|
"stage-capsule-resume-observation",
|
|
30
30
|
"stage-capsule-resume-plan",
|
|
31
|
+
"source-verification-evidence",
|
|
31
32
|
"stage-capsule-artifact-manifest",
|
|
32
33
|
"stage-capsule-artifact-content",
|
|
33
34
|
"stage-capsule-fault-campaign",
|
|
@@ -57,6 +58,7 @@ const ROOT_DOMAINS = new Set([
|
|
|
57
58
|
"partial-mutation-recovery-checkpoint",
|
|
58
59
|
"partial-mutation-recovery-plan",
|
|
59
60
|
"v4-product-required-artifacts",
|
|
61
|
+
"oci-publication-family",
|
|
60
62
|
"v4-product-publication-intent",
|
|
61
63
|
"v4-product-publication-operation",
|
|
62
64
|
"v4-product-publication-plan",
|
|
@@ -85,17 +87,17 @@ const FAULT_CLASSES = new Set([
|
|
|
85
87
|
const RETRY_DECISIONS = new Set(["stop", "reread", "redecide", "reselect"]);
|
|
86
88
|
const RECEIPT_OUTCOMES = new Set(["accepted", "rejected", "noop"]);
|
|
87
89
|
|
|
88
|
-
export class
|
|
90
|
+
export class ContractFault extends Error {
|
|
89
91
|
constructor(code, path, message) {
|
|
90
92
|
super(message);
|
|
91
|
-
this.name = "
|
|
93
|
+
this.name = "ContractFault";
|
|
92
94
|
this.code = code;
|
|
93
95
|
this.path = path;
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
function fault(code, path, message) {
|
|
98
|
-
throw new
|
|
100
|
+
throw new ContractFault(code, path, message);
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
function exactKeys(value, keys, path) {
|
|
@@ -110,98 +112,32 @@ function exactKeys(value, keys, path) {
|
|
|
110
112
|
fault("invalid-envelope-shape", path, `${path} keys are not canonical`);
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
function
|
|
114
|
-
if (value === null || typeof value === "boolean") return value;
|
|
115
|
-
if (typeof value === "string") {
|
|
116
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
117
|
-
const code = value.charCodeAt(index);
|
|
118
|
-
if (code >= 0xd800 && code <= 0xdbff) {
|
|
119
|
-
const next = value.charCodeAt(index + 1);
|
|
120
|
-
if (!(next >= 0xdc00 && next <= 0xdfff))
|
|
121
|
-
fault(
|
|
122
|
-
"unsupported-string",
|
|
123
|
-
path,
|
|
124
|
-
`${path} contains an unpaired surrogate`,
|
|
125
|
-
);
|
|
126
|
-
index += 1;
|
|
127
|
-
} else if (code >= 0xdc00 && code <= 0xdfff) {
|
|
128
|
-
fault(
|
|
129
|
-
"unsupported-string",
|
|
130
|
-
path,
|
|
131
|
-
`${path} contains an unpaired surrogate`,
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return value;
|
|
136
|
-
}
|
|
137
|
-
if (typeof value === "number") {
|
|
138
|
-
if (!Number.isSafeInteger(value) || Object.is(value, -0))
|
|
139
|
-
fault(
|
|
140
|
-
"unsupported-number",
|
|
141
|
-
path,
|
|
142
|
-
`${path} must be a safe base-10 integer and must not be negative zero`,
|
|
143
|
-
);
|
|
144
|
-
return value;
|
|
145
|
-
}
|
|
146
|
-
if (!value || typeof value !== "object")
|
|
147
|
-
fault("unsupported-json-value", path, `${path} is not a JSON value`);
|
|
148
|
-
if (active.has(value))
|
|
149
|
-
fault("cyclic-json-value", path, `${path} contains a cycle`);
|
|
150
|
-
active.add(value);
|
|
115
|
+
function wasm(operation, payload) {
|
|
151
116
|
try {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
);
|
|
156
|
-
const prototype = Object.getPrototypeOf(value);
|
|
157
|
-
if (prototype !== Object.prototype && prototype !== null)
|
|
158
|
-
fault("unsupported-json-value", path, `${path} must be a plain object`);
|
|
159
|
-
const result = Object.create(null);
|
|
160
|
-
for (const key of Object.keys(value).sort((left, right) =>
|
|
161
|
-
left < right ? -1 : left > right ? 1 : 0,
|
|
162
|
-
)) {
|
|
163
|
-
if (!ASCII_KEY_PATTERN.test(key))
|
|
164
|
-
fault(
|
|
165
|
-
"unsupported-object-key",
|
|
166
|
-
`${path}/${key}`,
|
|
167
|
-
"object keys must be non-empty printable ASCII",
|
|
168
|
-
);
|
|
169
|
-
result[key] = canonicalize(value[key], `${path}/${key}`, active);
|
|
117
|
+
return invokeDomainWasm(operation, payload);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
if (error instanceof DomainWasmFault) {
|
|
120
|
+
fault(error.code, error.path, error.message);
|
|
170
121
|
}
|
|
171
|
-
|
|
172
|
-
} finally {
|
|
173
|
-
active.delete(value);
|
|
122
|
+
throw error;
|
|
174
123
|
}
|
|
175
124
|
}
|
|
176
125
|
|
|
177
|
-
export function
|
|
178
|
-
return Buffer.from(
|
|
179
|
-
`${JSON.stringify(canonicalize(value, "$", new Set()))}\n`,
|
|
180
|
-
"utf8",
|
|
181
|
-
);
|
|
126
|
+
export function domainCanonicalBytes(value) {
|
|
127
|
+
return Buffer.from(wasm("canonical-json", value).canonicalUtf8, "utf8");
|
|
182
128
|
}
|
|
183
129
|
|
|
184
|
-
export function
|
|
185
|
-
|
|
186
|
-
fault(
|
|
187
|
-
"unsupported-root-domain",
|
|
188
|
-
"$.domain",
|
|
189
|
-
`unsupported root domain: ${domain}`,
|
|
190
|
-
);
|
|
191
|
-
const hash = crypto.createHash("sha256");
|
|
192
|
-
hash.update(domain, "ascii");
|
|
193
|
-
hash.update(Buffer.from([0]));
|
|
194
|
-
hash.update(v4CanonicalBytes(value));
|
|
195
|
-
return `sha256:${hash.digest("hex")}`;
|
|
130
|
+
export function domainContentRoot(domain, value) {
|
|
131
|
+
return wasm("content-root", { domain, value }).root;
|
|
196
132
|
}
|
|
197
133
|
|
|
198
|
-
export function
|
|
134
|
+
export function validateRoot(value, path = "$.root") {
|
|
199
135
|
if (typeof value !== "string" || !ROOT_PATTERN.test(value))
|
|
200
136
|
fault("invalid-root", path, `${path} must be a lowercase sha256 root`);
|
|
201
137
|
return value;
|
|
202
138
|
}
|
|
203
139
|
|
|
204
|
-
export function
|
|
140
|
+
export function validateClock(value, path = "$.clock") {
|
|
205
141
|
if (typeof value !== "string" || !CLOCK_PATTERN.test(value))
|
|
206
142
|
fault(
|
|
207
143
|
"invalid-clock",
|
|
@@ -214,13 +150,13 @@ export function validateV4Clock(value, path = "$.clock") {
|
|
|
214
150
|
return value;
|
|
215
151
|
}
|
|
216
152
|
|
|
217
|
-
export function
|
|
153
|
+
export function validateContractFault(value, path = "$.fault") {
|
|
218
154
|
exactKeys(
|
|
219
155
|
value,
|
|
220
156
|
["schema", "code", "class", "path", "message", "retry"],
|
|
221
157
|
path,
|
|
222
158
|
);
|
|
223
|
-
if (value.schema !==
|
|
159
|
+
if (value.schema !== CONTRACT_FAULT_CONTRACT)
|
|
224
160
|
fault("invalid-fault", `${path}/schema`, "unsupported fault schema");
|
|
225
161
|
if (!ASCII_TOKEN_PATTERN.test(value.code))
|
|
226
162
|
fault("invalid-fault", `${path}/code`, "fault code must be an ASCII token");
|
|
@@ -236,28 +172,28 @@ export function validateV4ContractFault(value, path = "$.fault") {
|
|
|
236
172
|
`${path}/retry`,
|
|
237
173
|
"fault retry decision is unsupported",
|
|
238
174
|
);
|
|
239
|
-
|
|
175
|
+
domainCanonicalBytes(value);
|
|
240
176
|
return value;
|
|
241
177
|
}
|
|
242
178
|
|
|
243
|
-
export function
|
|
179
|
+
export function validateEventEnvelope(value) {
|
|
244
180
|
exactKeys(
|
|
245
181
|
value,
|
|
246
182
|
["schema", "eventId", "eventType", "occurredAt", "subjectRoot", "payload"],
|
|
247
183
|
"$",
|
|
248
184
|
);
|
|
249
|
-
if (value.schema !==
|
|
185
|
+
if (value.schema !== EVENT_ENVELOPE_CONTRACT)
|
|
250
186
|
fault("invalid-event", "$/schema", "unsupported event schema");
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
187
|
+
validateRoot(value.eventId, "$/eventId");
|
|
188
|
+
validateRoot(value.subjectRoot, "$/subjectRoot");
|
|
189
|
+
validateClock(value.occurredAt, "$/occurredAt");
|
|
254
190
|
if (!ASCII_TOKEN_PATTERN.test(value.eventType))
|
|
255
191
|
fault("invalid-event", "$/eventType", "event type must be an ASCII token");
|
|
256
|
-
|
|
192
|
+
domainCanonicalBytes(value.payload);
|
|
257
193
|
return value;
|
|
258
194
|
}
|
|
259
195
|
|
|
260
|
-
export function
|
|
196
|
+
export function validateReceiptEnvelope(value) {
|
|
261
197
|
exactKeys(
|
|
262
198
|
value,
|
|
263
199
|
[
|
|
@@ -272,7 +208,7 @@ export function validateV4ReceiptEnvelope(value) {
|
|
|
272
208
|
],
|
|
273
209
|
"$",
|
|
274
210
|
);
|
|
275
|
-
if (value.schema !==
|
|
211
|
+
if (value.schema !== RECEIPT_ENVELOPE_CONTRACT)
|
|
276
212
|
fault("invalid-receipt", "$/schema", "unsupported receipt schema");
|
|
277
213
|
if (!ASCII_TOKEN_PATTERN.test(value.receiptType))
|
|
278
214
|
fault(
|
|
@@ -280,15 +216,15 @@ export function validateV4ReceiptEnvelope(value) {
|
|
|
280
216
|
"$/receiptType",
|
|
281
217
|
"receipt type must be an ASCII token",
|
|
282
218
|
);
|
|
283
|
-
|
|
284
|
-
|
|
219
|
+
validateClock(value.recordedAt, "$/recordedAt");
|
|
220
|
+
validateRoot(value.eventRoot, "$/eventRoot");
|
|
285
221
|
if (value.priorStateRoot !== null)
|
|
286
|
-
|
|
222
|
+
validateRoot(value.priorStateRoot, "$/priorStateRoot");
|
|
287
223
|
if (value.nextStateRoot !== null)
|
|
288
|
-
|
|
224
|
+
validateRoot(value.nextStateRoot, "$/nextStateRoot");
|
|
289
225
|
if (!RECEIPT_OUTCOMES.has(value.outcome))
|
|
290
226
|
fault("invalid-receipt", "$/outcome", "receipt outcome is unsupported");
|
|
291
|
-
if (value.fault !== null)
|
|
227
|
+
if (value.fault !== null) validateContractFault(value.fault);
|
|
292
228
|
if ((value.outcome === "rejected") !== (value.fault !== null))
|
|
293
229
|
fault(
|
|
294
230
|
"invalid-receipt",
|
|
@@ -298,6 +234,6 @@ export function validateV4ReceiptEnvelope(value) {
|
|
|
298
234
|
return value;
|
|
299
235
|
}
|
|
300
236
|
|
|
301
|
-
export function
|
|
237
|
+
export function contractDomains() {
|
|
302
238
|
return [...ROOT_DOMAINS];
|
|
303
239
|
}
|
|
@@ -10,6 +10,7 @@ const AUTHORITY_CLASSES = new Set([
|
|
|
10
10
|
"post-merge-advisory",
|
|
11
11
|
"diagnostic",
|
|
12
12
|
"evidence",
|
|
13
|
+
"governed-delegation",
|
|
13
14
|
"release",
|
|
14
15
|
]);
|
|
15
16
|
const TRIGGER_CLASSES = new Set([
|
|
@@ -196,7 +197,19 @@ export function evaluateCiLaneChangeBudget({
|
|
|
196
197
|
}
|
|
197
198
|
const declarations = new Map();
|
|
198
199
|
const diagnostics = [];
|
|
199
|
-
|
|
200
|
+
const familyDeclarations = (policy.declarationFamilies || []).flatMap(
|
|
201
|
+
({ laneIds, ...declaration }) => {
|
|
202
|
+
if (!Array.isArray(laneIds) || laneIds.length === 0)
|
|
203
|
+
throw new Error("CI lane declaration family requires laneIds");
|
|
204
|
+
if (new Set(laneIds).size !== laneIds.length)
|
|
205
|
+
throw new Error("CI lane declaration family laneIds must be unique");
|
|
206
|
+
return laneIds.map((laneId) => ({ ...declaration, laneId }));
|
|
207
|
+
},
|
|
208
|
+
);
|
|
209
|
+
for (const declaration of [
|
|
210
|
+
...(policy.declarations || []),
|
|
211
|
+
...familyDeclarations,
|
|
212
|
+
]) {
|
|
200
213
|
const laneId = String(declaration?.laneId || "").trim();
|
|
201
214
|
if (!laneId) throw new Error("CI lane declaration laneId is required");
|
|
202
215
|
if (declarations.has(laneId))
|
|
@@ -196,6 +196,9 @@ function descriptorDigest(descriptor) {
|
|
|
196
196
|
|
|
197
197
|
export function createControllerRegistry({ workflows = [] } = {}) {
|
|
198
198
|
const workflowById = new Map(workflows.map((entry) => [entry.id, entry]));
|
|
199
|
+
for (const entry of workflows) {
|
|
200
|
+
if (entry.taxonomy && !entry.taxonomy.compatibilityAlias && !workflowById.has(entry.taxonomy.id)) workflowById.set(entry.taxonomy.id, entry);
|
|
201
|
+
}
|
|
199
202
|
const controllers = CONTROLLER_SPECS.map((spec) => {
|
|
200
203
|
const workflow = workflowById.get(spec.workflowId);
|
|
201
204
|
if (!workflow) throw new Error(`controller ${spec.id} requires workflow descriptor ${spec.workflowId}`);
|
|
@@ -215,7 +218,7 @@ export function createControllerRegistry({ workflows = [] } = {}) {
|
|
|
215
218
|
contract: BUILDCHAIN_CONTROLLER_DESCRIPTOR_CONTRACT,
|
|
216
219
|
id: spec.id,
|
|
217
220
|
version: spec.version,
|
|
218
|
-
workflow: { id: workflow.id, path: workflow.path },
|
|
221
|
+
workflow: { id: workflow.id, path: workflow.path, ...(workflow.taxonomy?.contractPath ? { contractPath: workflow.taxonomy.contractPath } : {}) },
|
|
219
222
|
inputs,
|
|
220
223
|
expected: {
|
|
221
224
|
stages: spec.stages.map((id) => ({ id, required: !optionalStages.has(id) })),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { adopterDeliveryGateDigest } from "./adopter-delivery-json.js";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT =
|
|
4
4
|
"kungfu-buildchain-v4-cross-platform-adopter-report/v1";
|
|
5
|
-
export const
|
|
5
|
+
export const CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT =
|
|
6
6
|
"kungfu-buildchain-v4-cross-platform-adopter-qualification/v1";
|
|
7
|
-
export const
|
|
7
|
+
export const CROSS_PLATFORM_ADOPTER_PLATFORMS = Object.freeze([
|
|
8
8
|
"linux-x64",
|
|
9
9
|
"macos-arm64",
|
|
10
10
|
"windows-x64",
|
|
11
11
|
]);
|
|
12
|
-
export const
|
|
12
|
+
export const CROSS_PLATFORM_NEUTRAL_DRIVER = "ledger-specification-driver";
|
|
13
13
|
|
|
14
14
|
const SHA = /^[0-9a-f]{40}$/u;
|
|
15
15
|
const ROOT = /^sha256:[0-9a-f]{64}$/u;
|
|
@@ -36,7 +36,7 @@ function same(left, right) {
|
|
|
36
36
|
return adopterDeliveryGateDigest(left) === adopterDeliveryGateDigest(right);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function
|
|
39
|
+
export function summarizeBaselineCapabilityInventory(inventory) {
|
|
40
40
|
exactKeys(
|
|
41
41
|
inventory,
|
|
42
42
|
[
|
|
@@ -197,7 +197,7 @@ function validateExecutionEvidence(execution) {
|
|
|
197
197
|
execution.retryRun.readbackRoot &&
|
|
198
198
|
execution.bootstrap?.status === "passed" &&
|
|
199
199
|
ROOT.test(execution.bootstrap?.resultRoot || "") &&
|
|
200
|
-
execution.neutralDriver?.id ===
|
|
200
|
+
execution.neutralDriver?.id === CROSS_PLATFORM_NEUTRAL_DRIVER &&
|
|
201
201
|
execution.neutralDriver?.status === "passed" &&
|
|
202
202
|
execution.neutralDriver?.kfdDependencyPresent === false;
|
|
203
203
|
if (!complete)
|
|
@@ -219,7 +219,7 @@ function validateAuthorityCeiling(authority) {
|
|
|
219
219
|
fail("qualification report must not grant production or release authority");
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
export function
|
|
222
|
+
export function validateCrossPlatformAdopterReport(report) {
|
|
223
223
|
exactKeys(
|
|
224
224
|
report,
|
|
225
225
|
[
|
|
@@ -237,10 +237,10 @@ export function validateV4CrossPlatformAdopterReport(report) {
|
|
|
237
237
|
);
|
|
238
238
|
if (
|
|
239
239
|
report.schemaVersion !== 1 ||
|
|
240
|
-
report.contract !==
|
|
240
|
+
report.contract !== CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT
|
|
241
241
|
)
|
|
242
242
|
fail("platform report contract is unsupported");
|
|
243
|
-
if (!
|
|
243
|
+
if (!CROSS_PLATFORM_ADOPTER_PLATFORMS.includes(report.platform))
|
|
244
244
|
fail(`undeclared platform ${report.platform}`);
|
|
245
245
|
if (!CONSUMER.test(report.consumer || ""))
|
|
246
246
|
fail("consumer must be a stable lowercase identity");
|
|
@@ -256,18 +256,18 @@ export function validateV4CrossPlatformAdopterReport(report) {
|
|
|
256
256
|
return structuredClone(report);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
export function
|
|
259
|
+
export function createCrossPlatformAdopterReport(input) {
|
|
260
260
|
const body = structuredClone(input);
|
|
261
261
|
const report = {
|
|
262
262
|
schemaVersion: 1,
|
|
263
|
-
contract:
|
|
263
|
+
contract: CROSS_PLATFORM_ADOPTER_REPORT_CONTRACT,
|
|
264
264
|
...body,
|
|
265
265
|
};
|
|
266
266
|
report.reportRoot = adopterDeliveryGateDigest(report);
|
|
267
|
-
return
|
|
267
|
+
return validateCrossPlatformAdopterReport(report);
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
export function
|
|
270
|
+
export function qualifyCrossPlatformAdopters({ reports, consumers }) {
|
|
271
271
|
if (!Array.isArray(reports) || reports.length === 0)
|
|
272
272
|
fail("at least one raw platform report is required");
|
|
273
273
|
if (
|
|
@@ -277,9 +277,9 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
|
|
|
277
277
|
new Set(consumers).size !== consumers.length
|
|
278
278
|
)
|
|
279
279
|
fail("required consumers must be unique stable lowercase identities");
|
|
280
|
-
const normalized = reports.map(
|
|
280
|
+
const normalized = reports.map(validateCrossPlatformAdopterReport);
|
|
281
281
|
const expectedKeys = consumers.flatMap((consumer) =>
|
|
282
|
-
|
|
282
|
+
CROSS_PLATFORM_ADOPTER_PLATFORMS.map(
|
|
283
283
|
(platform) => `${consumer}:${platform}`,
|
|
284
284
|
),
|
|
285
285
|
);
|
|
@@ -310,14 +310,14 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
|
|
|
310
310
|
const orderedReports = expectedKeys.map((key) => reportByKey.get(key));
|
|
311
311
|
const body = {
|
|
312
312
|
schemaVersion: 1,
|
|
313
|
-
contract:
|
|
313
|
+
contract: CROSS_PLATFORM_ADOPTER_QUALIFICATION_CONTRACT,
|
|
314
314
|
sourceBinding: {
|
|
315
315
|
runtimeSha: reference.runtimeSha,
|
|
316
316
|
inventoryRoot: reference.inventoryRoot,
|
|
317
317
|
sourceCuts: structuredClone(reference.sourceCuts),
|
|
318
318
|
},
|
|
319
319
|
consumers: [...consumers],
|
|
320
|
-
platforms: [...
|
|
320
|
+
platforms: [...CROSS_PLATFORM_ADOPTER_PLATFORMS],
|
|
321
321
|
capabilityMatrix: structuredClone(normalized[0].capabilityMatrix),
|
|
322
322
|
reports: orderedReports.map(({ consumer, platform, reportRoot }) => ({
|
|
323
323
|
consumer,
|
|
@@ -325,8 +325,8 @@ export function qualifyV4CrossPlatformAdopters({ reports, consumers }) {
|
|
|
325
325
|
reportRoot,
|
|
326
326
|
})),
|
|
327
327
|
neutralDriver: {
|
|
328
|
-
id:
|
|
329
|
-
platformCoverage: [...
|
|
328
|
+
id: CROSS_PLATFORM_NEUTRAL_DRIVER,
|
|
329
|
+
platformCoverage: [...CROSS_PLATFORM_ADOPTER_PLATFORMS],
|
|
330
330
|
status: "passed",
|
|
331
331
|
},
|
|
332
332
|
authority: {
|