@kungfu-tech/buildchain 3.0.9-alpha.8 → 4.0.0-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 +39 -0
- package/README.md +17 -13
- package/actions/promote-buildchain-ref/README.md +0 -10
- package/actions/release-tail/README.md +6 -10
- package/architecture/internal-capabilities.json +502 -0
- package/architecture/maintainability-baseline.json +59 -0
- package/architecture/maintainability-policy.json +1384 -0
- package/architecture/release-tail-contract-inventory.json +587 -0
- package/architecture/v3-core-mechanism-inventory.json +1043 -0
- package/architecture/v3-core-mechanism-inventory.md +67 -0
- package/architecture/v4-adopter-delivery-parity.json +47 -0
- package/architecture/v4-architecture-constitution.md +210 -0
- package/architecture/v4-bootstrap-authority.json +56 -0
- package/architecture/v4-canonical-contract-fixtures.json +105 -0
- package/architecture/v4-capability-state-machine-manifest.json +480 -0
- package/architecture/v4-capability-state-machine-manifest.schema.json +202 -0
- package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.json +830 -0
- package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.md +223 -0
- package/architecture/v4-delivery-warrant-shadow-bootstrap-plan.schema.json +318 -0
- package/architecture/v4-delivery-warrant-shadow-fixtures.json +227 -0
- package/architecture/v4-delivery-warrant-shadow-fixtures.schema.json +67 -0
- package/architecture/v4-exception-ledger.json +5 -0
- package/architecture/v4-exception-ledger.schema.json +56 -0
- package/architecture/v4-partial-mutation-recovery-qualification.json +65 -0
- package/architecture/v4-platform-stage-checkpoints.json +97 -0
- package/architecture/v4-provider-operation-journal-contract.json +113 -0
- package/architecture/v4-release-activation-shadow-domain.json +61 -0
- package/architecture/v4-release-train-parity.json +68 -0
- package/architecture/v4-rust-libnode-bridge-evaluation.json +107 -0
- package/architecture/v4-rust-libnode-bridge-spike.md +85 -0
- package/architecture/v4-stable-publication-fence.json +66 -0
- package/architecture/v4-stage-capsule-contract.json +90 -0
- package/architecture/v4-stage-capsule-qualification.json +99 -0
- package/architecture/v4-stage-capsule-resume-planner.json +52 -0
- package/architecture/v4-stage-capsule-store-contract.json +72 -0
- package/bin/buildchain.mjs +15 -6
- package/contracts/auditable-demo-scenario-v1.schema.json +1 -1
- package/contracts/buildchain-v2-residuals-v1.json +2 -2
- package/contracts/fixtures/v4-delivery-warrant-trace-v1/golden.json +158 -0
- package/contracts/fixtures/v4-delivery-warrant-trace-v1/property.json +380 -0
- package/contracts/fixtures/v4-delivery-warrant-trace-v1/replay.json +163 -0
- package/contracts/fixtures/v4-partial-mutation-recovery-v1/shared.json +155 -0
- package/contracts/fixtures/v4-provider-operation-journal-v1/shared.json +457 -0
- package/contracts/fixtures/v4-provider-readback-idempotency-v1/shared.json +682 -0
- package/contracts/fixtures/v4-release-activation-shadow-v1/shared.json +53 -0
- package/contracts/fixtures/v4-stable-publication-fence-v1/shared.json +56 -0
- package/contracts/fixtures/v4-stage-capsule-resume-v1/late-platform-failure.json +176 -0
- package/contracts/fixtures/v4-stage-capsule-store-v1/shared.json +132 -0
- package/contracts/fixtures/v4-stage-capsule-v1/shared.json +111 -0
- package/contracts/v4-canonical-contracts-v1.schema.json +182 -0
- package/contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json +284 -0
- package/contracts/v4-delivery-warrant-trace-v1.schema.json +215 -0
- package/contracts/v4-host-contract-v1.schema.json +135 -0
- package/contracts/v4-partial-mutation-recovery-v1.schema.json +168 -0
- package/contracts/v4-provider-operation-journal-v1.schema.json +381 -0
- package/contracts/v4-release-activation-shadow-v1.schema.json +186 -0
- package/contracts/v4-stable-publication-fence-v1.schema.json +125 -0
- package/contracts/v4-stage-capsule-resume-v1.schema.json +225 -0
- package/contracts/v4-stage-capsule-store-v1.schema.json +154 -0
- package/contracts/v4-stage-capsule-v1.schema.json +178 -0
- package/crates/buildchain-v4-bridge/Cargo.lock +213 -0
- package/crates/buildchain-v4-bridge/Cargo.toml +12 -0
- package/crates/buildchain-v4-bridge/src/main.rs +495 -0
- package/dist/site/agent-index.json +0 -3
- package/dist/site/artifact-schemas.json +0 -6
- package/dist/site/buildchain-contract.json +103 -397
- package/dist/site/buildchain-site.json +302 -270
- package/dist/site/capability-registry.json +9 -11
- package/dist/site/cli-registry.json +8 -30
- package/dist/site/controller-registry.json +48 -8
- package/dist/site/kfd-claims.json +129 -142
- package/dist/site/kfd-upstream-aggregate.json +9 -9
- package/dist/site/manual-registry.json +18 -49
- package/dist/site/node-api-registry.json +1882 -4118
- package/dist/site/page-registry.json +278 -230
- package/dist/site/public-surface-audit.json +87 -185
- package/dist/site/publication-authority-registry.json +11 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +3 -7
- package/dist/site/schemas/kfd-support-projection-v1.schema.json +106 -0
- package/dist/site/site-manifest.json +22 -38
- package/dist/site/workflow-registry.json +80 -35
- package/docs/MAP.md +8 -4
- package/docs/auditable-demo.md +2 -2
- package/docs/aws-us-elastic-runner-burst-plane.md +7 -59
- package/docs/cli-reference.md +15 -92
- package/docs/cli.md +14 -14
- package/docs/dev-alpha-candidate-patrol.md +3 -11
- package/docs/dev-delivery-warrant.md +28 -100
- package/docs/engineering-housekeeper.md +12 -4
- package/docs/getting-started.md +1 -1
- package/docs/install.md +5 -5
- package/docs/kfd-support.md +2 -7
- package/docs/lifecycle-protocol.md +2 -4
- package/docs/node-api-reference.md +414 -523
- package/docs/release-flow.md +31 -31
- package/docs/release-governance.md +16 -28
- package/docs/release-passport.md +2 -15
- package/docs/release-tail-contract.md +13 -6
- package/docs/release-tail-provider-plane.md +13 -19
- package/docs/release-train.md +4 -4
- package/docs/reusable-build-surface.md +14 -27
- package/docs/site-bundle-contract.md +1 -5
- package/docs/stable-candidate-patrol.md +7 -7
- package/docs/v4-canonical-contracts.md +92 -0
- package/docs/v4-delivery-warrant-read-candidate.md +73 -0
- package/docs/v4-delivery-warrant-semantic-diff.md +75 -0
- package/docs/v4-production-release.md +63 -0
- package/docs/v4-stage-capsule.md +193 -0
- package/docs/versioning.md +3 -3
- package/package.json +19 -17
- package/packages/core/adopter-delivery-gate.js +576 -0
- package/packages/core/adopter-delivery-json.js +66 -0
- package/packages/core/artifact-signing.js +0 -61
- package/packages/core/artifact-verification-envelope.js +5 -5
- package/packages/core/build-facts.js +12 -4
- package/packages/core/buildchain-agent-manuals.js +0 -2
- package/packages/core/buildchain-config.js +4 -69
- package/packages/core/buildchain-contract.js +232 -46
- package/packages/core/buildchain-kfd-claims.js +1 -1
- package/packages/core/channel-candidate.js +0 -8
- package/packages/core/channel-promotion-baseline.js +0 -52
- package/packages/core/controller-evidence.js +3 -4
- package/packages/core/dev-alpha-candidate-selection.js +2 -10
- package/packages/core/dev-delivery-warrant-cancellation.js +0 -1
- package/packages/core/dev-delivery-warrant-settlement.js +1 -5
- package/packages/core/dev-delivery-warrant.js +12 -52
- package/packages/core/diagnostics.js +3 -8
- package/packages/core/github-governance-authority.js +3 -1
- package/packages/core/kfd-adopter-category-driver.js +167 -0
- package/packages/core/kfd-adopter-manifest.js +47 -46
- package/packages/core/kfd-gate.js +15 -45
- package/packages/core/paper-agent-entry.js +7 -16
- package/packages/core/paper-fleet.js +2 -2
- package/packages/core/paper-repository.js +2 -3
- package/packages/core/paper-scaffold-content.js +2 -23
- package/packages/core/paper.js +11 -43
- package/packages/core/publication-reproducibility.js +4 -4
- package/packages/core/release-line-bootstrap.js +21 -8
- package/packages/core/release-passport-contract.js +5 -5
- package/packages/core/release-passport.js +20 -131
- package/packages/core/self-dogfood-version.js +48 -35
- package/packages/core/spawn-command.js +232 -8
- package/packages/core/v4-adopter-delivery-parity.js +219 -0
- package/packages/core/v4-canonical-contracts.js +284 -0
- package/packages/core/v4-delivery-warrant-fixture-runner.js +371 -0
- package/packages/core/v4-delivery-warrant-read-candidate.js +279 -0
- package/packages/core/v4-delivery-warrant-semantic-diff-gate.js +352 -0
- package/packages/core/v4-delivery-warrant-shadow-adapter.js +447 -0
- package/packages/core/v4-partial-mutation-recovery-qualification.js +395 -0
- package/packages/core/v4-platform-stage-checkpoints.js +471 -0
- package/packages/core/v4-provider-operation-journal.js +531 -0
- package/packages/core/v4-provider-readback-idempotency.js +394 -0
- package/packages/core/v4-release-activation-shadow.js +519 -0
- package/packages/core/v4-stable-publication-fence.js +357 -0
- package/packages/core/v4-stage-capsule-local-store.js +426 -0
- package/packages/core/v4-stage-capsule-qualification-campaign.js +512 -0
- package/packages/core/v4-stage-capsule-qualification.js +456 -0
- package/packages/core/v4-stage-capsule-resume-planner.js +397 -0
- package/packages/core/v4-stage-capsule-store.js +401 -0
- package/packages/core/v4-stage-capsule.js +319 -0
- package/scripts/assemble-self-publication-admission.mjs +1 -1
- package/scripts/audit-publication-control-plane.mjs +5 -5
- package/scripts/auditable-demo-bundle-verification.mjs +3 -2
- package/scripts/auditable-demo-platform.mjs +2 -2
- package/scripts/auditable-demo-renditions.mjs +1 -1
- package/scripts/auditable-demo.mjs +2 -2
- package/scripts/aws-macos-jit-controller-core.mjs +13 -346
- package/scripts/aws-macos-jit-controller-runtime.mjs +2 -210
- package/scripts/aws-macos-jit-controller.mjs +37 -275
- package/scripts/aws-macos-jit-core.mjs +3 -41
- package/scripts/aws-macos-jit.mjs +0 -12
- package/scripts/aws-windows-jit-campaign.mjs +2 -2
- package/scripts/aws-windows-jit-controller-core.mjs +1 -1
- package/scripts/aws-windows-jit-controller.mjs +3 -3
- package/scripts/build-contract-core.mjs +3 -8
- package/scripts/build-standalone-binary.mjs +3 -14
- package/scripts/buildchain-channel-router.mjs +4 -0
- package/scripts/buildchain-cli-help.mjs +7 -13
- package/scripts/buildchain-contract-lock.mjs +0 -6
- package/scripts/check-action-bundles.mjs +3 -4
- package/scripts/check-internal-architecture.mjs +7 -6
- package/scripts/check-inventory.mjs +30 -25
- package/scripts/check-v4-public-dogfood-contract.mjs +270 -0
- package/scripts/create-release-bundle.mjs +8 -4
- package/scripts/dev-alpha-candidate-patrol.mjs +1 -22
- package/scripts/dev-delivery-proof.mjs +2 -54
- package/scripts/dev-delivery-warrant.mjs +59 -77
- package/scripts/dev-pr-auto-merge.mjs +4 -30
- package/scripts/dev-pr-delivery-warrant.mjs +0 -55
- package/scripts/dispatch-artifact-signing-authority.mjs +7 -4
- package/scripts/generate-buildchain-kfd-witnesses.mjs +94 -88
- package/scripts/generate-channel-build-workflow.mjs +54 -24
- package/scripts/generate-channel-promotion-workflow.mjs +15 -6
- package/scripts/generate-site-bundle.mjs +5 -21
- package/scripts/git-fetch-process-tree.mjs +34 -1
- package/scripts/init-repo.mjs +64 -159
- package/scripts/inspect-artifact-signing-requests.mjs +0 -6
- package/scripts/locked-source-checkout.mjs +3 -4
- package/scripts/maintainability-metrics.mjs +8 -2
- package/scripts/npm-publish-dry-run.mjs +2 -2
- package/scripts/npm-publish-transaction.mjs +2 -2
- package/scripts/publication-commit-evidence.mjs +23 -69
- package/scripts/release-candidate-resolver.mjs +11 -17
- package/scripts/release-tail.mjs +3 -49
- package/scripts/resume-from-candidate-run.mjs +9 -123
- package/scripts/run-lifecycle-core.mjs +12 -13
- package/scripts/seal-artifact-signing-requests.mjs +17 -21
- package/scripts/site-capability-metadata.mjs +2 -7
- package/scripts/stable-candidate-qualification.mjs +10 -10
- package/scripts/v4-architecture.mjs +12 -2
- package/scripts/v4-bridge-bootstrap.mjs +141 -0
- package/scripts/v4-bridge-evidence.mjs +141 -0
- package/scripts/v4-host-adapter.mjs +182 -0
- package/scripts/v4-platform-stage-checkpoint-rehearsal.mjs +207 -0
- package/scripts/v4-stage-capsule-qualification.mjs +528 -0
- package/scripts/v4-stage-capsule-resume-rehearsal.mjs +57 -0
- package/scripts/v4-warrant-shadow-plan.mjs +601 -0
- package/scripts/verify-golden-path.mjs +5 -5
- package/scripts/web-surface-cloudfront-rewrite.mjs +15 -15
- package/scripts/web-surface-core.mjs +2 -8
- package/scripts/workflow-call-contract.mjs +5 -184
- package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-perspective.json +0 -16
- package/contracts/fixtures/kfd-adopter-release-v1/kfd-4-replay.json +0 -57
- package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +0 -47
- package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +0 -47
- package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +0 -40
- package/contracts/next-development-request-v1.schema.json +0 -66
- package/contracts/next-development-transition-v1.schema.json +0 -292
- package/contracts/publication-rehearsal-capsule-v1.schema.json +0 -173
- package/dist/site/schemas/publication-rehearsal-capsule-v1.schema.json +0 -269
- package/dist/site/schemas/release-tail-capabilities-v1.schema.json +0 -353
- package/dist/site/schemas/release-tail-provider-bindings-v1.schema.json +0 -94
- package/docs/next-development-transition.md +0 -119
- package/docs/publication-rehearsal.md +0 -94
- package/packages/core/buildchain-compatibility-proof.js +0 -631
- package/packages/core/dev-delivery-native-proof.js +0 -333
- package/packages/core/dev-delivery-warrant-shadow.js +0 -502
- package/packages/core/next-development-candidate-reservation.js +0 -186
- package/packages/core/next-development-controller.js +0 -726
- package/packages/core/next-development-projection.js +0 -288
- package/packages/core/next-development-transition.js +0 -738
- package/packages/core/publication-rehearsal-projection.js +0 -173
- package/packages/core/publication-rehearsal-runtime.js +0 -921
- package/scripts/aws-macos-jit-instance-rehydrate.mjs +0 -260
- package/scripts/aws-macos-jit-source-rebind.mjs +0 -724
- package/scripts/dev-delivery-native-run.mjs +0 -187
- package/scripts/dev-delivery-two-phase.mjs +0 -598
- package/scripts/generate-next-development-guidance.mjs +0 -49
- package/scripts/materialize-self-release-candidate-version.mjs +0 -137
- package/scripts/next-development-self-dogfood-harness.mjs +0 -409
- package/scripts/next-development-self-dogfood.mjs +0 -532
- package/scripts/next-development-transition.mjs +0 -47
- package/scripts/release-candidate-tail-reseal.mjs +0 -426
- package/templates/native-dev-delivery.yml +0 -82
|
@@ -21,7 +21,7 @@ export const KFD_LEGACY_SUPPORT_MATRIX_CONTRACT = "kungfu-kfd-support-matrix";
|
|
|
21
21
|
|
|
22
22
|
const BUILDCHAIN_ADOPTER_ID = "kungfu-systems/buildchain";
|
|
23
23
|
const ROOT_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
24
|
-
const SHA_PATTERN = /^[0-9a-f]{40}
|
|
24
|
+
const SHA_PATTERN = /^[0-9a-f]{40}$/;
|
|
25
25
|
const REQUIRED_DECISIONS = Object.freeze(["KFD-1", "KFD-2", "KFD-3", "KFD-4", "KFD-5", "KFD-7"]);
|
|
26
26
|
const PRODUCT_GATE_STANDARDS = Object.freeze(["kfd-4", "kfd-5", "kfd-7"]);
|
|
27
27
|
const PRODUCT_GATE_SET = new Set(PRODUCT_GATE_STANDARDS);
|
|
@@ -77,27 +77,29 @@ function verifyPublishedManifest(manifest, packageOptions, issues) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
function manifestSourceSha(manifest) {
|
|
81
|
+
const match = /^kungfu-systems\/buildchain@([0-9a-f]{40})$/.exec(text(manifest?.adopter?.artifact?.coordinate));
|
|
82
|
+
return match?.[1] || "";
|
|
83
|
+
}
|
|
83
84
|
|
|
84
|
-
function validateManifestIdentity(manifest, packageArtifactRoot,
|
|
85
|
-
if (manifest?.adopter?.id !==
|
|
85
|
+
function validateManifestIdentity(manifest, packageArtifactRoot, expectedSourceSha, issues) {
|
|
86
|
+
if (manifest?.adopter?.id !== BUILDCHAIN_ADOPTER_ID) {
|
|
87
|
+
issues.push(issue("adopter-identity", "manifest.adopter.id", `manifest adopter must be ${BUILDCHAIN_ADOPTER_ID}`));
|
|
88
|
+
}
|
|
86
89
|
const pinned = manifest?.kfdCut?.package;
|
|
87
90
|
if (pinned?.name !== kfdPackageJson.name
|
|
88
91
|
|| pinned?.version !== kfdPackageJson.version
|
|
89
92
|
|| pinned?.artifactRoot !== packageArtifactRoot) {
|
|
90
93
|
issues.push(issue("adopter-package-cut", "manifest.kfdCut.package", "manifest must bind the exact installed KFD package cut"));
|
|
91
94
|
}
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} else if (expectedSourceSha && source.sha !== expectedSourceSha) {
|
|
95
|
+
const sourceSha = manifestSourceSha(manifest);
|
|
96
|
+
if (manifest?.adopter?.artifact?.kind !== "git-commit" || !sourceSha
|
|
97
|
+
|| !ROOT_PATTERN.test(text(manifest?.adopter?.artifact?.root))) {
|
|
98
|
+
issues.push(issue("adopter-source", "manifest.adopter.artifact", "Buildchain adopter authority must bind one exact git commit and artifact root"));
|
|
99
|
+
} else if (expectedSourceSha && sourceSha !== expectedSourceSha) {
|
|
98
100
|
issues.push(issue("adopter-source", "manifest.adopter.artifact.coordinate", "manifest source does not match the requested release source"));
|
|
99
101
|
}
|
|
100
|
-
return
|
|
102
|
+
return sourceSha;
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
function validateRequiredDecisions(decisions, issues) {
|
|
@@ -129,7 +131,7 @@ function collectProductGates(gateResults, decisions, verificationCut, issues) {
|
|
|
129
131
|
for (const [index, gate] of gateResults.entries()) {
|
|
130
132
|
const validation = validateKfdProductGateResult(gate, verificationCut);
|
|
131
133
|
if (!validation.valid) {
|
|
132
|
-
issues.push(issue("adopter-gate-invalid", `gateResults[${index}]`, "
|
|
134
|
+
issues.push(issue("adopter-gate-invalid", `gateResults[${index}]`, "Buildchain product gate is invalid", {
|
|
133
135
|
gateIssues: validation.issues,
|
|
134
136
|
}));
|
|
135
137
|
}
|
|
@@ -139,16 +141,15 @@ function collectProductGates(gateResults, decisions, verificationCut, issues) {
|
|
|
139
141
|
if (gates.has(gate?.standard)) {
|
|
140
142
|
issues.push(issue("adopter-gate-duplicate", `gateResults[${index}].standard`, `${gate.standard} gate is duplicated`));
|
|
141
143
|
}
|
|
142
|
-
if (gate?.source?.repository !== verificationCut.expectedSourceRepository) issues.push(issue("adopter-gate-source", `gateResults[${index}].source.repository`, "product gate repository must match the adopter source repository"));
|
|
143
144
|
gates.set(gate?.standard, gate);
|
|
144
145
|
}
|
|
145
146
|
for (const standard of PRODUCT_GATE_STANDARDS) {
|
|
146
147
|
const gate = gates.get(standard);
|
|
147
148
|
const id = standard.toUpperCase();
|
|
148
149
|
if (!gate) {
|
|
149
|
-
issues.push(issue("adopter-gate-missing", `gateResults.${standard}`, `${id} requires its
|
|
150
|
+
issues.push(issue("adopter-gate-missing", `gateResults.${standard}`, `${id} requires its existing Buildchain product gate`));
|
|
150
151
|
} else if (!(decisions.get(id)?.verificationEvidence || []).some((entry) => entry?.root === gate.gateRoot)) {
|
|
151
|
-
issues.push(issue("adopter-gate-unbound", `manifest.decisions.${id}.verificationEvidence`, `${id} must bind the exact
|
|
152
|
+
issues.push(issue("adopter-gate-unbound", `manifest.decisions.${id}.verificationEvidence`, `${id} must bind the exact Buildchain gate root`));
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
return gates;
|
|
@@ -158,12 +159,12 @@ function projectedProductGates(gates) {
|
|
|
158
159
|
return PRODUCT_GATE_STANDARDS.map((standard) => {
|
|
159
160
|
const gate = gates.get(standard);
|
|
160
161
|
return gate
|
|
161
|
-
? { standard,
|
|
162
|
-
: { standard,
|
|
162
|
+
? { standard, sourceSha: gate.source.sha, gateRoot: gate.gateRoot, status: gate.status }
|
|
163
|
+
: { standard, sourceSha: "", gateRoot: "", status: "missing" };
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
function createGateDocument({ manifest, bundle, gates, authorityPath, packageArtifactRoot,
|
|
167
|
+
function createGateDocument({ manifest, bundle, gates, authorityPath, packageArtifactRoot, sourceSha, checkedAt, maxAgeSeconds, issues }) {
|
|
167
168
|
const gate = {
|
|
168
169
|
schemaVersion: 1,
|
|
169
170
|
contract: KFD_ADOPTER_MANIFEST_GATE_CONTRACT,
|
|
@@ -173,8 +174,10 @@ function createGateDocument({ manifest, bundle, gates, authorityPath, packageArt
|
|
|
173
174
|
contract: text(manifest?.contract),
|
|
174
175
|
manifestRoot: bundle?.roots?.manifestRoot || "",
|
|
175
176
|
},
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
source: {
|
|
178
|
+
sha: sourceSha,
|
|
179
|
+
artifactRoot: text(manifest?.adopter?.artifact?.root),
|
|
180
|
+
},
|
|
178
181
|
verificationCut: { checkedAt, maxAgeSeconds },
|
|
179
182
|
standardPackage: {
|
|
180
183
|
name: kfdPackageJson.name,
|
|
@@ -208,28 +211,28 @@ export function createKfdAdopterManifestGate({
|
|
|
208
211
|
packageArtifactRoot = "",
|
|
209
212
|
gateResults = [],
|
|
210
213
|
authorityPath = ".buildchain/kfd/adopter-manifest.json",
|
|
211
|
-
|
|
214
|
+
expectedSourceSha = "",
|
|
212
215
|
checkedAt = new Date().toISOString(),
|
|
213
216
|
maxAgeSeconds = 86400,
|
|
214
217
|
} = {}) {
|
|
215
|
-
const issues = []
|
|
218
|
+
const issues = [];
|
|
216
219
|
const bundle = verifyPublishedManifest(manifest, {
|
|
217
220
|
packageArtifactRoot,
|
|
218
221
|
verifiedAt: checkedAt,
|
|
219
222
|
maxAgeSeconds,
|
|
220
223
|
}, issues);
|
|
221
224
|
const decisions = new Map((manifest?.decisions || []).map((row) => [row.id, row]));
|
|
222
|
-
let
|
|
225
|
+
let sourceSha = manifestSourceSha(manifest);
|
|
223
226
|
if (bundle) {
|
|
224
|
-
|
|
227
|
+
sourceSha = validateManifestIdentity(manifest, packageArtifactRoot, expectedSourceSha, issues);
|
|
225
228
|
validateRequiredDecisions(decisions, issues);
|
|
226
229
|
validateWarrantWitness(decisions, issues);
|
|
227
230
|
}
|
|
228
|
-
const gates = collectProductGates(gateResults, decisions, {
|
|
229
|
-
return createGateDocument({ manifest, bundle, gates, authorityPath, packageArtifactRoot,
|
|
231
|
+
const gates = collectProductGates(gateResults, decisions, { expectedSourceSha: sourceSha || expectedSourceSha, checkedAt }, issues);
|
|
232
|
+
return createGateDocument({ manifest, bundle, gates, authorityPath, packageArtifactRoot, sourceSha, checkedAt, maxAgeSeconds, issues });
|
|
230
233
|
}
|
|
231
234
|
|
|
232
|
-
function validateGateDocument(gate,
|
|
235
|
+
function validateGateDocument(gate, issues) {
|
|
233
236
|
const copy = structuredClone(gate);
|
|
234
237
|
const root = copy.gateRoot;
|
|
235
238
|
delete copy.gateRoot;
|
|
@@ -241,13 +244,12 @@ function validateGateDocument(gate, expectation, issues) {
|
|
|
241
244
|
|| !ROOT_PATTERN.test(text(gate?.authority?.manifestRoot))) {
|
|
242
245
|
issues.push(issue("adopter-gate-authority", "authority", "adopter gate must bind the standard manifest contract and root"));
|
|
243
246
|
}
|
|
244
|
-
if (gate?.adopter?.id !== expectation.adopterId) issues.push(issue("adopter-gate-identity", "adopter.id", `adopter gate must bind ${expectation.adopterId}`));
|
|
245
247
|
if (gate?.standardPackage?.name !== kfdPackageJson.name || gate?.standardPackage?.version !== kfdPackageJson.version
|
|
246
248
|
|| ![gate?.standardPackage?.artifactRoot, gate?.standardPackage?.registryRoot, gate?.standardPackage?.verifierSetRoot].every((value) => ROOT_PATTERN.test(text(value)))) {
|
|
247
249
|
issues.push(issue("adopter-gate-package", "standardPackage", "adopter gate uses stale KFD package metadata"));
|
|
248
250
|
}
|
|
249
|
-
if (
|
|
250
|
-
issues.push(issue("adopter-gate-source", "source", "adopter gate must bind
|
|
251
|
+
if (!SHA_PATTERN.test(text(gate?.source?.sha)) || !ROOT_PATTERN.test(text(gate?.source?.artifactRoot))) {
|
|
252
|
+
issues.push(issue("adopter-gate-source", "source", "adopter gate must bind one exact Buildchain source commit and artifact root"));
|
|
251
253
|
}
|
|
252
254
|
if (gate?.decisionWitness?.rootAlgorithm !== "sha256-buildchain-stable-json-v1"
|
|
253
255
|
|| !ROOT_PATTERN.test(text(gate?.decisionWitness?.root))
|
|
@@ -257,7 +259,7 @@ function validateGateDocument(gate, expectation, issues) {
|
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
|
|
260
|
-
function validateProjectedGates(gate,
|
|
262
|
+
function validateProjectedGates(gate, expectedSourceSha, issues) {
|
|
261
263
|
const seenStandards = new Set();
|
|
262
264
|
for (const [index, productGate] of (gate.gateResults || []).entries()) {
|
|
263
265
|
if (!PRODUCT_GATE_SET.has(productGate?.standard) || productGate?.status !== "passed" || !ROOT_PATTERN.test(text(productGate?.gateRoot))) {
|
|
@@ -265,7 +267,7 @@ function validateProjectedGates(gate, expectation, expectedSourceSha, issues) {
|
|
|
265
267
|
}
|
|
266
268
|
if (seenStandards.has(productGate?.standard)) issues.push(issue("adopter-gate-result-set", `gateResults[${index}]`, "product gate standards must be unique"));
|
|
267
269
|
seenStandards.add(productGate?.standard);
|
|
268
|
-
if (productGate?.
|
|
270
|
+
if (productGate?.sourceSha !== gate?.source?.sha || (expectedSourceSha && productGate?.sourceSha !== expectedSourceSha)) {
|
|
269
271
|
issues.push(issue("adopter-gate-source", `gateResults[${index}].sourceSha`, "product gate source must match the release source"));
|
|
270
272
|
}
|
|
271
273
|
}
|
|
@@ -275,15 +277,15 @@ function validateProjectedGates(gate, expectation, expectedSourceSha, issues) {
|
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
export function validateKfdAdopterManifestGate(gate, {
|
|
278
|
-
|
|
280
|
+
expectedSourceSha = "",
|
|
279
281
|
checkedAt = gate?.checkedAt || new Date().toISOString(),
|
|
280
282
|
} = {}) {
|
|
281
|
-
const issues = []
|
|
283
|
+
const issues = [];
|
|
282
284
|
if (!gate || gate.schemaVersion !== 1 || gate.contract !== KFD_ADOPTER_MANIFEST_GATE_CONTRACT) {
|
|
283
285
|
return { valid: false, issues: [issue("adopter-gate-contract", "", `gate must use ${KFD_ADOPTER_MANIFEST_GATE_CONTRACT} v1`)] };
|
|
284
286
|
}
|
|
285
|
-
validateGateDocument(gate,
|
|
286
|
-
validateProjectedGates(gate,
|
|
287
|
+
validateGateDocument(gate, issues);
|
|
288
|
+
validateProjectedGates(gate, expectedSourceSha, issues);
|
|
287
289
|
if (gate.checkedAt !== checkedAt || gate?.verificationCut?.checkedAt !== checkedAt || !Number.isFinite(Date.parse(checkedAt))
|
|
288
290
|
|| !Number.isSafeInteger(gate?.verificationCut?.maxAgeSeconds) || gate.verificationCut.maxAgeSeconds < 0) {
|
|
289
291
|
issues.push(issue("adopter-gate-time", "verificationCut", "adopter gate verification cut does not match the requested cut"));
|
|
@@ -298,7 +300,7 @@ function legacyStatus(row) {
|
|
|
298
300
|
return row.state;
|
|
299
301
|
}
|
|
300
302
|
|
|
301
|
-
function legacyRow(row, gates
|
|
303
|
+
function legacyRow(row, gates) {
|
|
302
304
|
const key = row.id.toLowerCase();
|
|
303
305
|
const productGate = gates.get(key);
|
|
304
306
|
return {
|
|
@@ -316,7 +318,7 @@ function legacyRow(row, gates, adopterId) {
|
|
|
316
318
|
releaseQualification: { shippedSupport: false },
|
|
317
319
|
claimClass: "standard-adopter-manifest-projection",
|
|
318
320
|
knownLimitations: [...row.gaps],
|
|
319
|
-
owner:
|
|
321
|
+
owner: BUILDCHAIN_ADOPTER_ID,
|
|
320
322
|
nextGate: "Release Passport artifact binding and independent release decision",
|
|
321
323
|
declaration: { state: row.state, usage: row.usage, root: kfdProductGateDigest(decisionWitnessRow(row)) },
|
|
322
324
|
};
|
|
@@ -324,7 +326,7 @@ function legacyRow(row, gates, adopterId) {
|
|
|
324
326
|
|
|
325
327
|
export function createKfdLegacySupportMatrixProjection({ manifest, manifestGate } = {}) {
|
|
326
328
|
const validation = validateKfdAdopterManifestGate(manifestGate, {
|
|
327
|
-
|
|
329
|
+
expectedSourceSha: manifestGate?.source?.sha,
|
|
328
330
|
checkedAt: manifestGate?.checkedAt,
|
|
329
331
|
});
|
|
330
332
|
if (!validation.valid || manifest?.contract !== "kfd.adopter-conformance-manifest/v1") {
|
|
@@ -336,9 +338,9 @@ export function createKfdLegacySupportMatrixProjection({ manifest, manifestGate
|
|
|
336
338
|
verifiedAt: manifestGate.verificationCut.checkedAt,
|
|
337
339
|
maxAgeSeconds: manifestGate.verificationCut.maxAgeSeconds,
|
|
338
340
|
}, authorityIssues);
|
|
339
|
-
const
|
|
341
|
+
const sourceSha = validateManifestIdentity(manifest, manifestGate.standardPackage.artifactRoot, manifestGate.source.sha, authorityIssues);
|
|
340
342
|
const decisionRoot = kfdProductGateDigest(manifest.decisions.map(decisionWitnessRow));
|
|
341
|
-
if (!bundle ||
|
|
343
|
+
if (!bundle || sourceSha !== manifestGate.source.sha || manifest.adopter.artifact.root !== manifestGate.source.artifactRoot
|
|
342
344
|
|| bundle.roots.manifestRoot !== manifestGate.authority.manifestRoot
|
|
343
345
|
|| bundle.roots.verificationReportRoot !== manifestGate.manifestVerificationReportRoot
|
|
344
346
|
|| bundle.bundleRoot !== manifestGate.manifestBundleRoot
|
|
@@ -362,8 +364,7 @@ export function createKfdLegacySupportMatrixProjection({ manifest, manifestGate
|
|
|
362
364
|
path: manifestGate.authority.path,
|
|
363
365
|
contract: manifest.contract,
|
|
364
366
|
root: manifestGate.authority.manifestRoot,
|
|
365
|
-
gateRoot: manifestGate.gateRoot,
|
|
366
|
-
sourceRepository: manifestGate.source.repository, sourceSha: manifestGate.source.sha,
|
|
367
|
+
gateRoot: manifestGate.gateRoot,
|
|
367
368
|
},
|
|
368
369
|
upstream: {
|
|
369
370
|
package: manifestGate.standardPackage.name,
|
|
@@ -373,7 +374,7 @@ export function createKfdLegacySupportMatrixProjection({ manifest, manifestGate
|
|
|
373
374
|
verifierSetRoot: manifestGate.standardPackage.verifierSetRoot,
|
|
374
375
|
standardsSha256: standardsFileDigest(),
|
|
375
376
|
},
|
|
376
|
-
rows: manifest.decisions.map((row) => legacyRow(row, gates
|
|
377
|
+
rows: manifest.decisions.map((row) => legacyRow(row, gates)),
|
|
377
378
|
};
|
|
378
379
|
}
|
|
379
380
|
|
|
@@ -944,49 +944,26 @@ export function normalizeKfd1ContractWorldWitness(witness, { metadata = resolveK
|
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
function
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
const current = stack.pop();
|
|
953
|
-
for (const entry of fs.readdirSync(current, { withFileTypes: true })) {
|
|
954
|
-
const candidate = path.join(current, entry.name);
|
|
955
|
-
if (entry.isDirectory()) { stack.push(candidate); continue; }
|
|
956
|
-
if (!entry.isFile()) continue;
|
|
957
|
-
const normalized = candidate.replace(/\\/g, "/");
|
|
958
|
-
for (const artifactPath of wanted) {
|
|
959
|
-
if (normalized === artifactPath || normalized.endsWith(`/${artifactPath}`)) {
|
|
960
|
-
const candidates = indexed.get(artifactPath) || [];
|
|
961
|
-
candidates.push(candidate);
|
|
962
|
-
indexed.set(artifactPath, candidates);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
return indexed;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
function resolveArtifactFile({ cwd, artifactRoot, artifactIndex = new Map(), artifacts = [], artifactPath, expectedSha256 = "" }) {
|
|
971
|
-
const candidates = artifactIndex.size > 0
|
|
972
|
-
? [...(artifactIndex.get(artifactPath) || []), artifactRoot ? path.resolve(artifactRoot, artifactPath) : "", path.resolve(cwd, artifactPath)]
|
|
973
|
-
: [path.resolve(cwd, artifactPath), artifactRoot ? path.resolve(artifactRoot, artifactPath) : ""];
|
|
947
|
+
function resolveArtifactFile({ cwd, artifactRoot, artifacts = [], artifactPath }) {
|
|
948
|
+
const candidates = [
|
|
949
|
+
path.resolve(cwd, artifactPath),
|
|
950
|
+
artifactRoot ? path.resolve(artifactRoot, artifactPath) : "",
|
|
951
|
+
].filter(Boolean);
|
|
974
952
|
for (const artifact of artifacts) {
|
|
975
953
|
const sourcePath = artifact.sourcePath || artifact.path || "";
|
|
976
|
-
if (!sourcePath)
|
|
954
|
+
if (!sourcePath) {
|
|
955
|
+
continue;
|
|
956
|
+
}
|
|
977
957
|
const normalizedSource = sourcePath.replace(/\\/g, "/");
|
|
978
|
-
if (normalizedSource === artifactPath || normalizedSource.endsWith(`/${artifactPath}`))
|
|
958
|
+
if (normalizedSource === artifactPath || normalizedSource.endsWith(`/${artifactPath}`)) {
|
|
959
|
+
candidates.push(path.resolve(sourcePath));
|
|
960
|
+
}
|
|
979
961
|
const name = artifact.name || artifact.filename || "";
|
|
980
|
-
if (name && name === artifactPath)
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
(candidate) => candidate && fs.existsSync(candidate) && fs.statSync(candidate).isFile(),
|
|
984
|
-
);
|
|
985
|
-
if (expectedSha256) {
|
|
986
|
-
const exact = existing.find((candidate) => sha256File(candidate) === expectedSha256);
|
|
987
|
-
if (exact) return exact;
|
|
962
|
+
if (name && name === artifactPath) {
|
|
963
|
+
candidates.push(path.resolve(sourcePath));
|
|
964
|
+
}
|
|
988
965
|
}
|
|
989
|
-
return
|
|
966
|
+
return candidates.find((candidate) => candidate && fs.existsSync(candidate) && fs.statSync(candidate).isFile()) || "";
|
|
990
967
|
}
|
|
991
968
|
|
|
992
969
|
function resolveSourceFile({ cwd, sourcePath }) {
|
|
@@ -1000,7 +977,6 @@ function resolveSourceFile({ cwd, sourcePath }) {
|
|
|
1000
977
|
export function createKfd1ReleaseGateEvidence({
|
|
1001
978
|
cwd = process.cwd(),
|
|
1002
979
|
artifactRoot = "",
|
|
1003
|
-
artifactSearchRoots = [],
|
|
1004
980
|
artifacts = [],
|
|
1005
981
|
witnesses = [],
|
|
1006
982
|
verifiedAt = new Date().toISOString(),
|
|
@@ -1010,10 +986,6 @@ export function createKfd1ReleaseGateEvidence({
|
|
|
1010
986
|
if (normalizedWitnesses.length === 0) {
|
|
1011
987
|
return undefined;
|
|
1012
988
|
}
|
|
1013
|
-
const artifactIndex = indexArtifactSearchRoots({
|
|
1014
|
-
roots: artifactSearchRoots,
|
|
1015
|
-
artifactPaths: normalizedWitnesses.flatMap((witness) => witness.surfaces.map((surface) => surface.artifactPath)),
|
|
1016
|
-
});
|
|
1017
989
|
const worlds = normalizedWitnesses.map((witness) => {
|
|
1018
990
|
const preBuildWitnessSha256 = sha256Json(witness);
|
|
1019
991
|
const sourceResults = witness.surfaces.map((surface) => {
|
|
@@ -1053,10 +1025,8 @@ export function createKfd1ReleaseGateEvidence({
|
|
|
1053
1025
|
const filePath = resolveArtifactFile({
|
|
1054
1026
|
cwd,
|
|
1055
1027
|
artifactRoot,
|
|
1056
|
-
artifactIndex,
|
|
1057
1028
|
artifacts,
|
|
1058
1029
|
artifactPath: surface.artifactPath,
|
|
1059
|
-
expectedSha256: surface.expectedSha256,
|
|
1060
1030
|
});
|
|
1061
1031
|
if (!filePath) {
|
|
1062
1032
|
return {
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
stableJson,
|
|
13
13
|
workCheck,
|
|
14
14
|
} from "./paper-repository.js";
|
|
15
|
-
import { mergePublicationRehearsalAgentInstructions } from "./publication-rehearsal-projection.js";
|
|
16
|
-
import { mergeNextDevelopmentAgentInstructions } from "./next-development-projection.js";
|
|
17
15
|
|
|
18
16
|
export const PAPER_AGENT_ENTRY_CONTRACT = "kungfu-buildchain-paper-agent-entry";
|
|
19
17
|
export const PAPER_AGENT_ENTRY_SCHEMA_VERSION = 1;
|
|
@@ -99,9 +97,9 @@ export function createPaperAgentEntry({
|
|
|
99
97
|
}) {
|
|
100
98
|
const version = String(buildchainVersion || "").trim();
|
|
101
99
|
const sourceSha = String(buildchainSha || "").trim();
|
|
102
|
-
if (
|
|
100
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version)) {
|
|
103
101
|
throw new Error(
|
|
104
|
-
"paper agent entry requires an exact Buildchain
|
|
102
|
+
"paper agent entry requires an exact Buildchain semantic version",
|
|
105
103
|
);
|
|
106
104
|
}
|
|
107
105
|
if (!GIT_SHA_PATTERN.test(sourceSha)) {
|
|
@@ -169,13 +167,9 @@ export function paperAgentEntryFiles({
|
|
|
169
167
|
[PAPER_PATHS.agentEntry, jsonText(entry)],
|
|
170
168
|
[
|
|
171
169
|
PAPER_PATHS.agentInstructions,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
developmentRef: resolvedDevelopmentRef,
|
|
176
|
-
}),
|
|
177
|
-
),
|
|
178
|
-
),
|
|
170
|
+
mergePaperAgentEntryInstructions(currentAgents, {
|
|
171
|
+
developmentRef: resolvedDevelopmentRef,
|
|
172
|
+
}),
|
|
179
173
|
],
|
|
180
174
|
]);
|
|
181
175
|
}
|
|
@@ -211,11 +205,8 @@ function ciContext({ env, developmentRef }) {
|
|
|
211
205
|
sourceBranch.startsWith(versionStatePrefix) &&
|
|
212
206
|
/^[0-9a-f]{12}$/i.test(sourceBranch.slice(versionStatePrefix.length));
|
|
213
207
|
const branchOk = pullRequest
|
|
214
|
-
? (PAPER_WORK_BRANCH_PATTERN.test(sourceBranch) &&
|
|
215
|
-
|
|
216
|
-
(channelIndex > 0 &&
|
|
217
|
-
sourceBranch === channelBranches[channelIndex - 1]) ||
|
|
218
|
-
generatedVersionState
|
|
208
|
+
? (PAPER_WORK_BRANCH_PATTERN.test(sourceBranch) && targetBranch === developmentRef) ||
|
|
209
|
+
(channelIndex > 0 && sourceBranch === channelBranches[channelIndex - 1]) || generatedVersionState
|
|
219
210
|
: channelBranches.includes(refName);
|
|
220
211
|
return {
|
|
221
212
|
mode: "ci",
|
|
@@ -106,8 +106,8 @@ function paperFleetEntry({
|
|
|
106
106
|
),
|
|
107
107
|
workCheck(
|
|
108
108
|
"package.buildchain-v3",
|
|
109
|
-
dependency === buildchainVersion &&
|
|
110
|
-
"package.json pins the exact Buildchain
|
|
109
|
+
dependency === buildchainVersion && /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(dependency),
|
|
110
|
+
"package.json pins the exact Buildchain semantic runtime.",
|
|
111
111
|
"buildchain paper migrate --write --json",
|
|
112
112
|
),
|
|
113
113
|
workCheck(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
1
|
import crypto from "node:crypto";
|
|
3
2
|
import fs from "node:fs";
|
|
4
3
|
import path from "node:path";
|
|
5
4
|
import { loadBuildchainConfig } from "./buildchain-config.js";
|
|
5
|
+
import { spawnSyncCommand } from "./spawn-command.js";
|
|
6
6
|
|
|
7
7
|
export const PAPER_PATHS = Object.freeze({
|
|
8
8
|
config: ".buildchain/buildchain.toml",
|
|
@@ -13,7 +13,6 @@ export const PAPER_PATHS = Object.freeze({
|
|
|
13
13
|
buildWorkflow: ".github/workflows/build.yml",
|
|
14
14
|
verifyWorkflow: ".github/workflows/verify.yml",
|
|
15
15
|
releaseWorkflow: ".github/workflows/paper-release.yml",
|
|
16
|
-
rehearsalWorkflow: ".github/workflows/publication-rehearsal.yml",
|
|
17
16
|
pnpmWorkspace: "pnpm-workspace.yaml",
|
|
18
17
|
reproducibilityReceipt:
|
|
19
18
|
".buildchain/publication/reproducibility-receipt.json",
|
|
@@ -78,7 +77,7 @@ export function commandResult(
|
|
|
78
77
|
args,
|
|
79
78
|
{ cwd, env = process.env, timeout = 15000 } = {},
|
|
80
79
|
) {
|
|
81
|
-
const result =
|
|
80
|
+
const result = spawnSyncCommand(command, args, {
|
|
82
81
|
cwd,
|
|
83
82
|
env,
|
|
84
83
|
encoding: "utf8",
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PUBLICATION_REHEARSAL_CAPSULE_CONTRACT,
|
|
3
|
-
PUBLICATION_REHEARSAL_COMMAND,
|
|
4
|
-
RELEASE_LOCAL_CONSTRUCTIBILITY_ADR,
|
|
5
|
-
RELEASE_LOCAL_CONSTRUCTIBILITY_INVARIANT,
|
|
6
|
-
} from "./publication-rehearsal-runtime.js";
|
|
7
|
-
|
|
8
1
|
function jsonText(value) {
|
|
9
2
|
return `${JSON.stringify(value, null, 2)}\n`;
|
|
10
3
|
}
|
|
@@ -54,14 +47,13 @@ export function paperPackageScripts(current = {}) {
|
|
|
54
47
|
"paper:work:start": "buildchain paper work start",
|
|
55
48
|
"paper:work:submit": "buildchain paper work submit",
|
|
56
49
|
"paper:status": "buildchain paper status --json",
|
|
57
|
-
"publication:rehearse": PUBLICATION_REHEARSAL_COMMAND,
|
|
58
50
|
};
|
|
59
51
|
}
|
|
60
52
|
|
|
61
53
|
export function managedPaperPackageJson(current, buildchainVersion) {
|
|
62
|
-
if (
|
|
54
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(buildchainVersion)) {
|
|
63
55
|
throw new Error(
|
|
64
|
-
"paper repositories require an exact Buildchain
|
|
56
|
+
"paper repositories require an exact Buildchain semantic version",
|
|
65
57
|
);
|
|
66
58
|
}
|
|
67
59
|
const packageManager = current.packageManager || "pnpm@11.7.0";
|
|
@@ -114,7 +106,6 @@ pnpm paper:preflight
|
|
|
114
106
|
pnpm paper:agent:verify
|
|
115
107
|
pnpm paper:work:start -- <topic>
|
|
116
108
|
pnpm paper:work:submit
|
|
117
|
-
pnpm publication:rehearse
|
|
118
109
|
make pdf
|
|
119
110
|
\`\`\`
|
|
120
111
|
|
|
@@ -123,11 +114,6 @@ artifact generation, sealed publication, npm Trusted Publishing, and recovery;
|
|
|
123
114
|
this repository owns the paper source and review history.
|
|
124
115
|
|
|
125
116
|
See [docs/MAP.md](docs/MAP.md) for the repository map.
|
|
126
|
-
|
|
127
|
-
Publication qualification follows the Buildchain
|
|
128
|
-
\`${RELEASE_LOCAL_CONSTRUCTIBILITY_ADR}\` invariant:
|
|
129
|
-
${RELEASE_LOCAL_CONSTRUCTIBILITY_INVARIANT} The capsule contract is
|
|
130
|
-
\`${PUBLICATION_REHEARSAL_CAPSULE_CONTRACT}\`.
|
|
131
117
|
`;
|
|
132
118
|
}
|
|
133
119
|
|
|
@@ -143,17 +129,10 @@ export function scaffoldMap() {
|
|
|
143
129
|
- \`.github/workflows/build.yml\`: thin read-only build and reproducibility caller.
|
|
144
130
|
- \`.github/workflows/verify.yml\`: thin required check that enforces the Paper entry and acceptance policy.
|
|
145
131
|
- \`.github/workflows/paper-release.yml\`: thin protected sealed-release caller.
|
|
146
|
-
- \`.github/workflows/publication-rehearsal.yml\`: thin hosted adapter over the same local capsule runtime.
|
|
147
132
|
|
|
148
133
|
The repository does not own npm transaction logic, publication authority,
|
|
149
134
|
release-state recovery, or site deployment mechanics. Those remain Buildchain,
|
|
150
135
|
npm/GitHub, and downstream site responsibilities respectively.
|
|
151
|
-
|
|
152
|
-
The exact local pre-publication command is:
|
|
153
|
-
|
|
154
|
-
\`\`\`sh
|
|
155
|
-
${PUBLICATION_REHEARSAL_COMMAND}
|
|
156
|
-
\`\`\`
|
|
157
136
|
`;
|
|
158
137
|
}
|
|
159
138
|
|