diff --git a/.bitcode/v43-deposit-option-admission.json b/.bitcode/v43-deposit-option-admission.json index 1a318a92..242a62fb 100644 --- a/.bitcode/v43-deposit-option-admission.json +++ b/.bitcode/v43-deposit-option-admission.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-deposit-option-admission-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-deposit-option-admission:b8125eb826b8cd71515a45ac", + "artifactRoot": "v43-deposit-option-admission:dc159635fe6113a9374062bc", "passed": true, "objectIds": [ "DepositAssetPackOptionAdmissionReport", @@ -111,16 +111,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "optionModel": "packages/pipelines/asset-pack/src/deposit-asset-pack-options.ts:df560ea2544282645f57a6b5", "policyModel": "packages/pipelines/asset-pack/src/deposit-asset-pack-option-policy.ts:12816b23b2d8e304ab4a1638", "admissionModel": "packages/pipelines/asset-pack/src/deposit-asset-pack-option-admission.ts:4d2b0c5e6e10c2b14a75a8c8", @@ -136,8 +136,8 @@ "uapiJestConfig": "uapi/jest.config.cjs:352ee765a17823c7a486fe92", "packageIndex": "packages/pipelines/asset-pack/src/index.ts:24854bd26b47ce7700e02380", "packageManifest": "packages/pipelines/asset-pack/package.json:f998601555d9f21de1393f74", - "protocolIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "protocolTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "protocolIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "protocolTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "protocolTest": "packages/protocol/test/v43-deposit-option-admission.test.js:53ae55cfef55536ebc552b65", "generator": "scripts/generate-v43-deposit-option-admission.mjs:b7101699843c09250a84d41f", "checker": "scripts/check-v43-gate7-deposit-option-admission.mjs:6a857acf8b23f5fdb15fb02d" diff --git a/.bitcode/v43-deposit-policy-compensation.json b/.bitcode/v43-deposit-policy-compensation.json index 07303181..0c4b14ca 100644 --- a/.bitcode/v43-deposit-policy-compensation.json +++ b/.bitcode/v43-deposit-policy-compensation.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-deposit-policy-compensation-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-deposit-policy-compensation:e166ddeef8fb2da03f67a5e1", + "artifactRoot": "v43-deposit-policy-compensation:42f3894f9012b254a7df1c3d", "passed": true, "objectIds": [ "DepositAssetPackOptionPolicy", @@ -100,16 +100,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "optionModel": "packages/pipelines/asset-pack/src/deposit-asset-pack-options.ts:df560ea2544282645f57a6b5", "policyModel": "packages/pipelines/asset-pack/src/deposit-asset-pack-option-policy.ts:12816b23b2d8e304ab4a1638", "optionModelTest": "packages/pipelines/asset-pack/src/__tests__/deposit-asset-pack-options.test.ts:66cfc8c728f134087476a3a3", @@ -120,8 +120,8 @@ "pageTest": "uapi/tests/depositPageClient.test.tsx:b1acbca83d8f3244147217dc", "packageIndex": "packages/pipelines/asset-pack/src/index.ts:24854bd26b47ce7700e02380", "packageManifest": "packages/pipelines/asset-pack/package.json:f998601555d9f21de1393f74", - "protocolIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "protocolTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "protocolIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "protocolTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "protocolTest": "packages/protocol/test/v43-deposit-policy-compensation.test.js:f84b0c016065b10f796eb775", "generator": "scripts/generate-v43-deposit-policy-compensation.mjs:0117b1222d0f4a4640324b47", "checker": "scripts/check-v43-gate6-deposit-policy-compensation.mjs:03412b725c36f24991a6325e" diff --git a/.bitcode/v43-deposit-route-options.json b/.bitcode/v43-deposit-route-options.json index 13b8c7de..12917a1e 100644 --- a/.bitcode/v43-deposit-route-options.json +++ b/.bitcode/v43-deposit-route-options.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-deposit-route-option-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-deposit-route-options:bf06258706ea07556f491beb", + "artifactRoot": "v43-deposit-route-options:32477ecdd4d83555d6cdf49c", "passed": true, "stepIds": [ "connect-source", @@ -111,16 +111,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "terminalRoutes": "uapi/app/terminal/terminal-routes.ts:80f478da2673f1a64ada9bfb", "routeModel": "uapi/app/deposit/deposit-route-model.ts:7354c10d543af2cb65ba0ade", "page": "uapi/app/deposit/page.tsx:6bab6a9debab3f4350d0ddca", @@ -136,8 +136,8 @@ "footer": "uapi/components/base/bitcode/layout/footer.tsx:44749b98e5f63e7ac8f9f574", "routeModelTest": "uapi/tests/depositRouteModel.test.ts:0fb7d8d4d58d7e231ada4510", "pageTest": "uapi/tests/depositPageClient.test.tsx:b1acbca83d8f3244147217dc", - "protocolIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "protocolTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "protocolIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "protocolTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "protocolTest": "packages/protocol/test/v43-deposit-route-options.test.js:6576a3d4947b9bc23f7a786d", "generator": "scripts/generate-v43-deposit-route-options.mjs:2d92d5e9c25e2e66712953f9", "checker": "scripts/check-v43-gate5-deposit-route-options.mjs:10c6ad1594ea8bd06f97d7d5" diff --git a/.bitcode/v43-packs-activity-master-detail.json b/.bitcode/v43-packs-activity-master-detail.json index a00c28b7..eb2a96c4 100644 --- a/.bitcode/v43-packs-activity-master-detail.json +++ b/.bitcode/v43-packs-activity-master-detail.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-packs-activity-master-detail-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-packs-activity-master-detail:4f1cbd384191e1e9ef8ad696", + "artifactRoot": "v43-packs-activity-master-detail:329a62c3be0722dbc4950174", "passed": true, "typeIds": [ "deposit-option", @@ -138,16 +138,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "model": "uapi/components/base/bitcode/activity/pack-activity-model.ts:d848bb7a06bc8f4c46c2fc8a", "route": "uapi/app/api/packs/activity/route.ts:8a524f1dd16889733ce418a7", "page": "uapi/app/packs/page.tsx:1b3d7a1cc00500a13042e8dd", @@ -157,8 +157,8 @@ "workspaceSurface": "uapi/components/base/bitcode/layout/workspace-surface.ts:12418d5db9c3ddad6d10c841", "publicCopy": "uapi/components/base/bitcode/layout/bitcode-public-copy.ts:3a45184ba8d2a4e71858c597", "publicExplainers": "uapi/components/base/bitcode/layout/bitcode-public-explainers.ts:282d915eac3c9f22ba8c07f1", - "packageIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "packageTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "packageIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "packageTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "packageTest": "packages/protocol/test/v43-packs-activity-master-detail.test.js:baf3e44b2fbe4e62590c1824", "uapiTest": "uapi/tests/packActivityModel.test.ts:7854762895ce63b0de8b6940", "generator": "scripts/generate-v43-packs-activity-master-detail.mjs:f342bc9b3ebb8de4e7aa2882", diff --git a/.bitcode/v43-promotion-readiness-report.json b/.bitcode/v43-promotion-readiness-report.json new file mode 100644 index 00000000..386b9c98 --- /dev/null +++ b/.bitcode/v43-promotion-readiness-report.json @@ -0,0 +1,553 @@ +{ + "artifactId": "v43-promotion-readiness-report", + "schemaId": "bitcode.v43.promotionReadinessReport.v1", + "version": "V43", + "currentTarget": "V42", + "generatedAt": "2026-05-29T00:00:00.000Z", + "sourceSafetyVerdict": "source-safe-v43-product-routes-agentic-depositing-promotion-metadata", + "prePromotionPosture": "V42 active / V43 draft", + "postPromotionPosture": "V43 active / V44 draft", + "branchProtection": { + "directMainPushAdmitted": false, + "promotionPrRequired": true, + "versionBranch": "version/v43", + "versionPromotionPullRequestTitlePrefix": "V43 Canonical Promotion" + }, + "generatedArtifactPolicy": { + "provenAppendixPath": "BITCODE_SPEC_V43_PROVEN.md", + "provenAppendixRequiredBeforePromotion": false, + "generatedArtifactPrefix": ".bitcode/v43-", + "promotionOverwritesPreviewArtifacts": true, + "secretValuesSerialized": false, + "protectedSourceSerialized": false, + "rawProtectedPromptSerialized": false, + "rawProviderResponseSerialized": false, + "unpaidAssetPackSourceSerialized": false + }, + "validationCommands": [ + "pnpm run check:v43-gate1", + "pnpm run check:v43-gate2", + "pnpm run check:v43-gate3", + "pnpm run check:v43-gate4", + "pnpm run check:v43-gate5", + "pnpm run check:v43-gate6", + "pnpm run check:v43-gate7", + "pnpm run check:v43-gate8", + "pnpm run check:v43-gate9", + "pnpm run check:v43-gate10", + "node scripts/promote-bitcode-canon.mjs --version V43 --commit HEAD --dry-run" + ], + "gateArtifactEvidence": [ + { + "relativePath": ".bitcode/v43-route-vocabulary-inventory.json", + "present": true, + "parseable": true, + "digest": "sha256:3a253ce1809e55ec1fea1802b188fb487ae8723089ebb60337adbbbc82f73d4c", + "byteLength": 454761, + "sourceSafe": true, + "artifactId": "v43-route-vocabulary-inventory", + "version": "V43", + "sourceSafetyVerdict": "source-safe-route-vocabulary-inventory-metadata" + }, + { + "relativePath": ".bitcode/v43-packs-activity-master-detail.json", + "present": true, + "parseable": true, + "digest": "sha256:1a859ed81e6ec0d72e17bdd358e899859164ce3fe962ba70b8bda9f64aaa0654", + "byteLength": 11717, + "sourceSafe": true, + "artifactId": "v43-packs-activity-master-detail", + "version": "V43", + "sourceSafetyVerdict": "source-safe-packs-activity-master-detail-metadata" + }, + { + "relativePath": ".bitcode/v43-read-route-five-step-ux.json", + "present": true, + "parseable": true, + "digest": "sha256:09fe173129baf4301902238006c7eb958b55df6465d76caf20f42d84a83cceea", + "byteLength": 12152, + "sourceSafe": true, + "artifactId": "v43-read-route-five-step-ux", + "version": "V43", + "sourceSafetyVerdict": "source-safe-read-route-five-step-metadata" + }, + { + "relativePath": ".bitcode/v43-deposit-route-options.json", + "present": true, + "parseable": true, + "digest": "sha256:917f8ed93590bb81d1c37330f6e446f05a23fdbccc04511b14483989903ce193", + "byteLength": 13187, + "sourceSafe": true, + "artifactId": "v43-deposit-route-options", + "version": "V43", + "sourceSafetyVerdict": "source-safe-deposit-route-option-metadata" + }, + { + "relativePath": ".bitcode/v43-deposit-policy-compensation.json", + "present": true, + "parseable": true, + "digest": "sha256:dfb72f95d5d80d826d321d74c727be3248464eaaf53e4d7afaf3a56cc7d4c825", + "byteLength": 11319, + "sourceSafe": true, + "artifactId": "v43-deposit-policy-compensation", + "version": "V43", + "sourceSafetyVerdict": "source-safe-deposit-policy-compensation-metadata" + }, + { + "relativePath": ".bitcode/v43-deposit-option-admission.json", + "present": true, + "parseable": true, + "digest": "sha256:5d194a60137c9b0ca5d9a8bce24ad9deea8ff73e0e62c87919ec1a1eae768d50", + "byteLength": 13657, + "sourceSafe": true, + "artifactId": "v43-deposit-option-admission", + "version": "V43", + "sourceSafetyVerdict": "source-safe-deposit-option-admission-metadata" + }, + { + "relativePath": ".bitcode/v43-route-ux-product-excellence.json", + "present": true, + "parseable": true, + "digest": "sha256:a02d47132b3d521bdd5a25ce2871628584613164a9798ecc41bf67dfd25aac8f", + "byteLength": 11291, + "sourceSafe": true, + "artifactId": "v43-route-ux-product-excellence", + "version": "V43", + "sourceSafetyVerdict": "source-safe-product-route-ux-metadata" + }, + { + "relativePath": ".bitcode/v43-cross-route-rehearsal-telemetry-repair.json", + "present": true, + "parseable": true, + "digest": "sha256:1445faccadb981abd5caf41c841cbfd2be926217004e5f54ca0c8c2ec5dafeff", + "byteLength": 30225, + "sourceSafe": true, + "artifactId": "v43-cross-route-rehearsal-telemetry-repair", + "version": "V43", + "sourceSafetyVerdict": "source-safe-cross-route-rehearsal-telemetry-repair-metadata" + } + ], + "sourceEvidence": [ + { + "relativePath": "scripts/check-v43-gate10-promotion-readiness.mjs", + "present": true, + "digest": "sha256:512ab4ae762c2bddaf39e25e2d3487f9e51c99f4121523d13277cbacd8682a1f", + "requiredTokens": [ + { + "token": "V43 Gate 10 promotion readiness", + "present": true + }, + { + "token": "--promotion-mode", + "present": true + }, + { + "token": "promotedPointer", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + } + ] + }, + { + "relativePath": "scripts/generate-v43-promotion-readiness-report.mjs", + "present": true, + "digest": "sha256:60ba94139699fd89d4cb064608a8be4d099962cab54694f8151034063f4b7e40", + "requiredTokens": [ + { + "token": "buildV43PromotionReadinessReport", + "present": true + }, + { + "token": "source-safe-v43-product-routes-agentic-depositing-promotion-metadata", + "present": true + }, + { + "token": "v43-promotion-readiness-report", + "present": true + } + ] + }, + { + "relativePath": "scripts/promote-bitcode-canon.mjs", + "present": true, + "digest": "sha256:c249f126efde9b8d3ab5633f49be0f189dc6ad76a235035504bbead1282d2f16", + "requiredTokens": [ + { + "token": "if (version === 'V43')", + "present": true + }, + { + "token": "const v43Gate10Command", + "present": true + }, + { + "token": "buildDerivedV43CommitMessageBody", + "present": true + }, + { + "token": "scripts/check-v43-gate10-promotion-readiness.mjs", + "present": true + } + ] + }, + { + "relativePath": "scripts/prepare-bitcode-spec-family-promotion.mjs", + "present": true, + "digest": "sha256:1568e8251d60b4e7bf408d02afb1fb6b257eef3288465c5e6c474c41dffb59c5", + "requiredTokens": [ + { + "token": "if (version === 'V43')", + "present": true + }, + { + "token": "V43 canonical system specification for product routes and agentic depositing", + "present": true + }, + { + "token": "BITCODE_SPEC_V43_PROVEN.md", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + } + ] + }, + { + "relativePath": "scripts/prepare-bitcode-runtime-canon-promotion.mjs", + "present": true, + "digest": "sha256:77b598b0257d7dc2aef367531126f0d8ef1238d1264a78c1e876c624909b4511", + "requiredTokens": [ + { + "token": "--next-draft", + "present": true + }, + { + "token": "rewritePackageReadme", + "present": true + }, + { + "token": "rewriteRuntimeDataState", + "present": true + } + ] + }, + { + "relativePath": ".github/workflows/v43-canon-promotion.yml", + "present": true, + "digest": "sha256:cf287959d6520d3d60b706a9c2d85a0076286fbb83d66542680267e4b8d94ca8", + "requiredTokens": [ + { + "token": "head.ref == 'version/v43'", + "present": true + }, + { + "token": "node scripts/prepare-bitcode-spec-family-promotion.mjs --version V43", + "present": true + }, + { + "token": "node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V43 --next-draft V44", + "present": true + }, + { + "token": "node scripts/generate-bitcode-proven.mjs --version V43", + "present": true + }, + { + "token": "node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43", + "present": true + }, + { + "token": "BITCODE_SPEC_V43_PROVEN.md", + "present": true + }, + { + "token": "Promote V43 canon files", + "present": true + } + ] + }, + { + "relativePath": ".github/workflows/bitcode-gate-quality.yml", + "present": true, + "digest": "sha256:a13e5ee752c88a9da7afa4a69ae7cfe2ec466016d3bbfb22fd913892381b0db6", + "requiredTokens": [ + { + "token": "check-v43-gate10-promotion-readiness.mjs", + "present": true + }, + { + "token": "elif [ \"$POINTER\" = \"V43\" ]", + "present": true + }, + { + "token": "--active-canon V43 --draft-target V44", + "present": true + } + ] + }, + { + "relativePath": ".github/workflows/bitcode-canon-quality.yml", + "present": true, + "digest": "sha256:88bbe4ac9d23a6107216d9cc6347c3fc744a9a11f8f32667bd856ab3fa3c7054", + "requiredTokens": [ + { + "token": "check-v43-gate10-promotion-readiness.mjs", + "present": true + }, + { + "token": "elif [ \"$POINTER\" = \"V43\" ]", + "present": true + }, + { + "token": "--active-canon V43 --draft-target V44", + "present": true + } + ] + }, + { + "relativePath": "packages/protocol/src/canonical/proven-generator.js", + "present": true, + "digest": "sha256:3140ef2da603927ea9879ff7d7414597b16bfff1bf5b0a238e3d2ff1b44a9585", + "requiredTokens": [ + { + "token": "buildV43ProvenPackage", + "present": true + }, + { + "token": "buildV43PromotionReadinessReport", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + } + ] + }, + { + "relativePath": "packages/protocol/test/v43-promotion-readiness.test.js", + "present": true, + "digest": "sha256:aaab14786a1b4d28c104b778ee1806dbb7fb9e86d445a73ce81b86112e8cc300", + "requiredTokens": [ + { + "token": "builds source-safe V43 PromotionReadinessReport", + "present": true + }, + { + "token": "v43-promotion-readiness-report", + "present": true + }, + { + "token": "V43 Promotion Readiness", + "present": true + } + ] + }, + { + "relativePath": "packages/protocol/src/canonical/v21-specifying.js", + "present": true, + "digest": "sha256:6c4c47b12cd095ab89f2578aa896d8932fc7451e23904d580c9f695240a103a0", + "requiredTokens": [ + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + } + ] + }, + { + "relativePath": "package.json", + "present": true, + "digest": "sha256:a02cfbf6b200910870068e4c4c61ff0cd2be63909174243a5b66a2d4ff22013b", + "requiredTokens": [ + { + "token": "generate:v43-promotion-readiness", + "present": true + }, + { + "token": "check:v43-promotion-readiness", + "present": true + }, + { + "token": "check:v43-gate10", + "present": true + } + ] + } + ], + "documentationEvidence": [ + { + "relativePath": "BITCODE_SPEC_V43.md", + "present": true, + "digest": "sha256:276f928dbae1236a7bc367d36048f4d503a6845866cc63a648601988aba3684f", + "requiredTokens": [ + { + "token": "V43 promotion readiness canon", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + }, + { + "token": "V43 active / draft V44", + "present": true + } + ] + }, + { + "relativePath": "BITCODE_SPEC_V43_DELTA.md", + "present": true, + "digest": "sha256:6ca7e12f61eb8c0ddac563227a5918db8ce893b10aa6fe778894829676aae36b", + "requiredTokens": [ + { + "token": "Gate 10: V43 Promotion Readiness", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + }, + { + "token": "promotion scripts support V43", + "present": true + } + ] + }, + { + "relativePath": "BITCODE_SPEC_V43_NOTES.md", + "present": true, + "digest": "sha256:a88be069723574df6b41d973dcd1032df26be2bc3b39000a2469ecbe135aecc7", + "requiredTokens": [ + { + "token": "Gate 10: V43 Promotion Readiness", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + }, + { + "token": "active V43 / draft V44", + "present": true + } + ] + }, + { + "relativePath": "BITCODE_SPEC_V43_PARITY_MATRIX.md", + "present": true, + "digest": "sha256:a5a5bf2fdee2d02f6221d00f6d5b7faa7127aa19a271e8501908ac64228cbdff", + "requiredTokens": [ + { + "token": "## Gate 10 Promotion readiness parity", + "present": true + }, + { + "token": ".bitcode/v43-promotion-readiness-report.json", + "present": true + }, + { + "token": "closed", + "present": true + } + ] + }, + { + "relativePath": "SPECIFICATIONS_ROADMAP.md", + "present": true, + "digest": "sha256:33994a7cf33bb6e3138b932ac582c4de6e2ec8dda24bdf4a7aa6b130bbfda2e4", + "requiredTokens": [ + { + "token": "V43 Gate 10 closure anchor", + "present": true + }, + { + "token": "BITCODE_SPEC_V43_PROVEN.md", + "present": true + } + ] + }, + { + "relativePath": "README.md", + "present": true, + "digest": "sha256:e492ee74bfb581f11a6871481ed0067ecec0b9d29b47f53aa77b53ee96b44fa9", + "requiredTokens": [ + { + "token": "check:v43-gate10", + "present": true + }, + { + "token": "v43-canon-promotion.yml", + "present": true + } + ] + }, + { + "relativePath": "packages/protocol/README.md", + "present": true, + "digest": "sha256:85b0c2ee2ac15860466612c730bf58b17de16399bdb7ec3b3ab3a0fe77fde190", + "requiredTokens": [ + { + "token": "V43 Gate 10", + "present": true + }, + { + "token": "V43` active, `V44` draft", + "present": true + } + ] + } + ], + "coverage": { + "requiredGateArtifactPaths": [ + ".bitcode/v43-route-vocabulary-inventory.json", + ".bitcode/v43-packs-activity-master-detail.json", + ".bitcode/v43-read-route-five-step-ux.json", + ".bitcode/v43-deposit-route-options.json", + ".bitcode/v43-deposit-policy-compensation.json", + ".bitcode/v43-deposit-option-admission.json", + ".bitcode/v43-route-ux-product-excellence.json", + ".bitcode/v43-cross-route-rehearsal-telemetry-repair.json" + ], + "generatedProofOutputs": [ + "BITCODE_SPEC_V43_PROVEN.md", + ".bitcode/v43-spec-family-report.json", + ".bitcode/v43-canonical-input-report.json", + ".bitcode/v43-canon-posture-drift-report.json", + ".bitcode/v43-promotion-readiness-report.json" + ], + "gateArtifactCount": 8, + "missingGateArtifacts": [], + "unparseableGateArtifacts": [], + "sourceUnsafeGateArtifacts": [], + "sourceEvidenceComplete": true, + "documentationEvidenceComplete": true, + "allGateArtifactsCovered": true, + "allGateArtifactsParseable": true, + "allGateArtifactsSourceSafe": true, + "generatedProofOutputsCovered": true, + "promotionWorkflowCovered": true, + "gateQualityWorkflowCovered": true, + "canonQualityWorkflowCovered": true, + "promotionScriptCovered": true, + "specFamilyPromotionScriptCovered": true, + "runtimePromotionScriptCovered": true, + "provenGeneratorCovered": true, + "prePromotionPosture": "V42 active / V43 draft", + "postPromotionPosture": "V43 active / V44 draft", + "valueBearingMainnetAdmission": false, + "credentialsSerialized": false, + "protectedSourceVisible": false, + "rawProtectedPromptVisible": false, + "rawProviderResponseVisible": false, + "unpaidAssetPackSourceVisible": false, + "walletPrivateMaterialVisible": false + }, + "failClosedResult": "promotion remains blocked when any V43 route vocabulary inventory, Packs activity master-detail proof, Read five-step UX proof, Deposit option synthesis proof, deposit policy/compensation proof, deposit option admission proof, route UX product proof, cross-route rehearsal, workflow, promotion script, generated proof support, source-safety check, or value-bearing mainnet block is missing", + "artifactRoot": "v43-product-route-promotion-readiness-report:3bef1fbfb307d4663b1c6c6f", + "passed": true, + "failures": [], + "validationCommand": "pnpm run check:v43-gate10" +} diff --git a/.bitcode/v43-read-route-five-step-ux.json b/.bitcode/v43-read-route-five-step-ux.json index cd06176b..2d14ecd8 100644 --- a/.bitcode/v43-read-route-five-step-ux.json +++ b/.bitcode/v43-read-route-five-step-ux.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-read-route-five-step-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-read-route-five-step-ux:3a6643acd3261fe377037440", + "artifactRoot": "v43-read-route-five-step-ux:14e3d7a5e414b21968709fad", "passed": true, "stepIds": [ "request-read", @@ -117,16 +117,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "routeModel": "uapi/app/read/read-route-model.ts:a9324b0d92cd6c5176fa7940", "page": "uapi/app/read/page.tsx:37a723ed87feac05c0504249", "client": "uapi/app/read/ReadPageClient.tsx:8e75873706918b22d7ddf8ed", @@ -138,8 +138,8 @@ "publicCopy": "uapi/components/base/bitcode/layout/bitcode-public-copy.ts:3a45184ba8d2a4e71858c597", "publicExplainers": "uapi/components/base/bitcode/layout/bitcode-public-explainers.ts:282d915eac3c9f22ba8c07f1", "footer": "uapi/components/base/bitcode/layout/footer.tsx:44749b98e5f63e7ac8f9f574", - "packageIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "packageTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "packageIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "packageTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "packageTest": "packages/protocol/test/v43-read-route-five-step-ux.test.js:fedf825a49244098367f6388", "routeModelTest": "uapi/tests/readRouteModel.test.ts:47d613cef4ab6dce86846c8f", "pageTest": "uapi/tests/readPageClient.test.tsx:39abee8e499c491b5a33cbf1", diff --git a/.bitcode/v43-route-ux-product-excellence.json b/.bitcode/v43-route-ux-product-excellence.json index 9db816ad..5957b791 100644 --- a/.bitcode/v43-route-ux-product-excellence.json +++ b/.bitcode/v43-route-ux-product-excellence.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-product-route-ux-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-route-ux-product-excellence:9eeaee23e694084a35667a45", + "artifactRoot": "v43-route-ux-product-excellence:5d556c48b42e96c722ba5951", "passed": true, "objectIds": [ "ProductRouteShell", @@ -113,16 +113,16 @@ ], "sourceRoots": { "activePointer": "BITCODE_SPEC.txt:75f3f6d81f999da998f40cb6", - "spec": "BITCODE_SPEC_V43.md:8849f8de531262913b80010a", - "delta": "BITCODE_SPEC_V43_DELTA.md:fa1a741e1fd4ca1e461837d1", - "notes": "BITCODE_SPEC_V43_NOTES.md:1cbe1cb10f4a9046baa820f9", - "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:5220d903413048552015ed1f", - "roadmap": "SPECIFICATIONS_ROADMAP.md:ba8bdd93e51231d3a76c2236", - "readme": "README.md:c1e5ffc9b1109074e9a07e19", - "protocolReadme": "packages/protocol/README.md:a85e969589284b3bb243c72c", - "packageJson": "package.json:1b5263d8142677b3220cc910", - "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:98807176f615c51cc183fc39", - "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:94db4321625479863e160d71", + "spec": "BITCODE_SPEC_V43.md:276f928dbae1236a7bc367d3", + "delta": "BITCODE_SPEC_V43_DELTA.md:6ca7e12f61eb8c0ddac56322", + "notes": "BITCODE_SPEC_V43_NOTES.md:a88be069723574df6b41d973", + "parity": "BITCODE_SPEC_V43_PARITY_MATRIX.md:a5a5bf2fdee2d02f6221d00f", + "roadmap": "SPECIFICATIONS_ROADMAP.md:33994a7cf33bb6e3138b932a", + "readme": "README.md:e492ee74bfb581f11a687148", + "protocolReadme": "packages/protocol/README.md:85b0c2ee2ac15860466612c7", + "packageJson": "package.json:a02cfbf6b200910870068e4c", + "gateWorkflow": ".github/workflows/bitcode-gate-quality.yml:a13e5ee752c88a9da7afa4a6", + "canonWorkflow": ".github/workflows/bitcode-canon-quality.yml:88bbe4ac9d23a6107216d9cc", "productRouteShell": "uapi/components/base/bitcode/routes/product-route-shell.tsx:1db5b3d0e67eb84327568b90", "packsClient": "uapi/app/packs/PacksPageClient.tsx:9a225a3462967b4b8c2adc00", "readClient": "uapi/app/read/ReadPageClient.tsx:8e75873706918b22d7ddf8ed", @@ -130,8 +130,8 @@ "packsTest": "uapi/tests/packsPageClient.test.tsx:3d190debc869e3d2ec7c0b45", "readTest": "uapi/tests/readPageClient.test.tsx:39abee8e499c491b5a33cbf1", "depositTest": "uapi/tests/depositPageClient.test.tsx:b1acbca83d8f3244147217dc", - "protocolIndex": "packages/protocol/src/index.js:5e4e37ba6672cf8834589ae1", - "protocolTypes": "packages/protocol/src/index.d.ts:c2cfdb9ad212bb8d969d54be", + "protocolIndex": "packages/protocol/src/index.js:647a8c9de68e311caf5b7d8f", + "protocolTypes": "packages/protocol/src/index.d.ts:50025035a9239ee2fad2ac2c", "protocolTest": "packages/protocol/test/v43-route-ux-product-excellence.test.js:90da888669ac62dabb2fab0d", "generator": "scripts/generate-v43-route-ux-product-excellence.mjs:cfa27fac384b22a62c12aa54", "checker": "scripts/check-v43-gate8-route-ux-product-excellence.mjs:0216d34433f7bd393cf8a99b" diff --git a/.bitcode/v43-route-vocabulary-inventory.json b/.bitcode/v43-route-vocabulary-inventory.json index c3d29a91..94d38947 100644 --- a/.bitcode/v43-route-vocabulary-inventory.json +++ b/.bitcode/v43-route-vocabulary-inventory.json @@ -5,7 +5,7 @@ "currentTarget": "V42", "sourceSafetyVerdict": "source-safe-route-vocabulary-inventory-metadata", "generatedAt": "deterministic", - "artifactRoot": "v43-route-vocabulary-inventory:796ab10542610196758f5080", + "artifactRoot": "v43-route-vocabulary-inventory:dc2284aedb0486adb5dd171e", "passed": true, "tokenIds": [ "route:/exchange", @@ -2081,7 +2081,7 @@ }, { "path": "BITCODE_SPEC_V43.md", - "pathRoot": "v43-route-vocabulary-file:10e32295f5cee473fd948184", + "pathRoot": "v43-route-vocabulary-file:f9489450daa7a81f17a4c59d", "categories": [ "doc", "spec", @@ -2096,15 +2096,15 @@ "symbol:Exchange": 4, "symbol:Terminal": 2, "symbol:Packs": 5, - "symbol:Reading": 20, - "symbol:Depositing": 7, + "symbol:Reading": 21, + "symbol:Depositing": 8, "symbol:PackActivity": 8, "symbol:DepositAssetPackOption": 4, "word:exchange": 6, "word:terminal": 5, "word:self-referential": 4 }, - "totalMatches": 135, + "totalMatches": 137, "sourceSafeMetadataOnly": true, "rawSourceTextSerialized": false, "sourceSnippetSerialized": false @@ -7259,6 +7259,21 @@ "rawSourceTextSerialized": false, "sourceSnippetSerialized": false }, + { + "path": "packages/protocol/src/canonical/v43-promotion-readiness-report.js", + "pathRoot": "v43-route-vocabulary-file:105f32b8b771896cc3a1a140", + "categories": [ + "package", + "telemetry" + ], + "tokenCounts": { + "symbol:Packs": 1 + }, + "totalMatches": 1, + "sourceSafeMetadataOnly": true, + "rawSourceTextSerialized": false, + "sourceSnippetSerialized": false + }, { "path": "packages/protocol/src/canonical/v43-read-route-five-step-ux.js", "pathRoot": "v43-route-vocabulary-file:3ccff3998243a1b97320bb01", @@ -10595,28 +10610,32 @@ }, { "path": "scripts/prepare-bitcode-spec-family-promotion.mjs", - "pathRoot": "v43-route-vocabulary-file:670ed0d24221e4688c6eaa1a", + "pathRoot": "v43-route-vocabulary-file:c0b948392af39c517d7016ef", "categories": [ "script", "telemetry" ], "tokenCounts": { - "route:/read": 2, + "route:/packs": 1, + "route:/read": 3, + "route:/deposit": 1, "symbol:Exchange": 12, "symbol:Terminal": 24, - "symbol:Reading": 36, - "symbol:Depositing": 3, + "symbol:Packs": 1, + "symbol:Reading": 37, + "symbol:Depositing": 4, + "symbol:PackActivity": 2, "word:exchange": 7, "word:terminal": 2 }, - "totalMatches": 86, + "totalMatches": 94, "sourceSafeMetadataOnly": true, "rawSourceTextSerialized": false, "sourceSnippetSerialized": false }, { "path": "scripts/promote-bitcode-canon.mjs", - "pathRoot": "v43-route-vocabulary-file:a51180eb91907243f41d43c5", + "pathRoot": "v43-route-vocabulary-file:e969a2b88ac6b4ead37871ba", "categories": [ "script", "telemetry" @@ -10625,12 +10644,13 @@ "route:/read": 1, "symbol:Exchange": 6, "symbol:Terminal": 8, + "symbol:Packs": 1, "symbol:Reading": 12, "symbol:Depositing": 1, "word:exchange": 9, "word:terminal": 13 }, - "totalMatches": 50, + "totalMatches": 51, "sourceSafeMetadataOnly": true, "rawSourceTextSerialized": false, "sourceSnippetSerialized": false @@ -15789,19 +15809,19 @@ } ], "coverage": { - "sourceFileCount": 928, + "sourceFileCount": 929, "tokenTotals": { "route:/exchange": 147, "route:/terminal": 1475, - "route:/packs": 219, - "route:/read": 327, - "route:/deposit": 198, + "route:/packs": 220, + "route:/read": 328, + "route:/deposit": 199, "symbol:Exchange": 1964, "symbol:Terminal": 3091, - "symbol:Packs": 53, - "symbol:Reading": 1343, - "symbol:Depositing": 249, - "symbol:PackActivity": 32, + "symbol:Packs": 56, + "symbol:Reading": 1345, + "symbol:Depositing": 251, + "symbol:PackActivity": 34, "symbol:DepositAssetPackOption": 33, "word:exchange": 1708, "word:terminal": 3735, @@ -15813,10 +15833,10 @@ "test": 224, "doc": 169, "api": 43, - "telemetry": 667, + "telemetry": 668, "workflow": 12, "script": 124, - "package": 323, + "package": 324, "spec": 76 }, "routeVocabularyInventoryComplete": true, diff --git a/.github/workflows/bitcode-canon-quality.yml b/.github/workflows/bitcode-canon-quality.yml index 92c52586..60348a6e 100644 --- a/.github/workflows/bitcode-canon-quality.yml +++ b/.github/workflows/bitcode-canon-quality.yml @@ -352,6 +352,17 @@ jobs: if [ -f scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs ]; then node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests fi + if [ -f scripts/check-v43-gate10-promotion-readiness.mjs ]; then + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + fi + fi + elif [ "$POINTER" = "V43" ]; then + node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43 + node scripts/check-bitcode-canonical-inputs.mjs --current-target V43 + node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44 + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + if [ -f BITCODE_SPEC_V44.md ]; then + node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43 fi else echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 @@ -500,7 +511,15 @@ jobs: node scripts/check-bitcode-spec-family.mjs --version V42 --mode draft --current-target V41 fi ;; + spec:\ V43*|spec:\ v43*) + POINTER="$(cat BITCODE_SPEC.txt)" + if [ "$POINTER" = "V43" ]; then + node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43 + else + node scripts/check-bitcode-spec-family.mjs --version V43 --mode draft --current-target V42 + fi + ;; *) - echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38/V39/V40/V41/V42 spec change." + echo "Skipping strict spec-title conformance; title is not a V29/V30/V31/V32/V33/V34/V35/V36/V37/V38/V39/V40/V41/V42/V43 spec change." ;; esac diff --git a/.github/workflows/bitcode-gate-quality.yml b/.github/workflows/bitcode-gate-quality.yml index d1c1f7f6..0cf87076 100644 --- a/.github/workflows/bitcode-gate-quality.yml +++ b/.github/workflows/bitcode-gate-quality.yml @@ -481,6 +481,17 @@ jobs: if [ -f scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs ]; then node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests fi + if [ -f scripts/check-v43-gate10-promotion-readiness.mjs ]; then + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + fi + fi + elif [ "$POINTER" = "V43" ]; then + node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43 + node scripts/check-bitcode-canonical-inputs.mjs --current-target V43 + node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44 + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + if [ -f BITCODE_SPEC_V44.md ]; then + node scripts/check-bitcode-spec-family.mjs --version V44 --mode draft --current-target V43 fi else echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 @@ -505,38 +516,45 @@ jobs: - name: Test gate packages run: | POINTER="$(cat BITCODE_SPEC.txt)" - if [ "$POINTER" = "V41" ] || [ "$POINTER" = "V42" ]; then + if [ "$POINTER" = "V41" ] || [ "$POINTER" = "V42" ] || [ "$POINTER" = "V43" ]; then if [ "$POINTER" = "V41" ]; then node scripts/check-v42-gate9-promotion-readiness.mjs --skip-branch-check - else + elif [ "$POINTER" = "V42" ]; then node scripts/check-v42-gate9-promotion-readiness.mjs --promotion-mode --skip-branch-check + else + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check fi - if [ -f scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs ]; then - node scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs --skip-branch-check - fi - if [ -f scripts/check-v43-gate2-route-vocabulary-inventory.mjs ]; then - node scripts/check-v43-gate2-route-vocabulary-inventory.mjs --skip-branch-check - fi - if [ -f scripts/check-v43-gate3-packs-activity-master-detail.mjs ]; then - node scripts/check-v43-gate3-packs-activity-master-detail.mjs --skip-branch-check --skip-uapi-tests - fi - if [ -f scripts/check-v43-gate4-read-route-five-step-ux.mjs ]; then - node scripts/check-v43-gate4-read-route-five-step-ux.mjs --skip-branch-check --skip-uapi-tests - fi - if [ -f scripts/check-v43-gate5-deposit-route-options.mjs ]; then - node scripts/check-v43-gate5-deposit-route-options.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests - fi - if [ -f scripts/check-v43-gate6-deposit-policy-compensation.mjs ]; then - node scripts/check-v43-gate6-deposit-policy-compensation.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests - fi - if [ -f scripts/check-v43-gate7-deposit-option-admission.mjs ]; then - node scripts/check-v43-gate7-deposit-option-admission.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests - fi - if [ -f scripts/check-v43-gate8-route-ux-product-excellence.mjs ]; then - node scripts/check-v43-gate8-route-ux-product-excellence.mjs --skip-branch-check --skip-uapi-tests - fi - if [ -f scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs ]; then - node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + if [ "$POINTER" != "V43" ]; then + if [ -f scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs ]; then + node scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs --skip-branch-check + fi + if [ -f scripts/check-v43-gate2-route-vocabulary-inventory.mjs ]; then + node scripts/check-v43-gate2-route-vocabulary-inventory.mjs --skip-branch-check + fi + if [ -f scripts/check-v43-gate3-packs-activity-master-detail.mjs ]; then + node scripts/check-v43-gate3-packs-activity-master-detail.mjs --skip-branch-check --skip-uapi-tests + fi + if [ -f scripts/check-v43-gate4-read-route-five-step-ux.mjs ]; then + node scripts/check-v43-gate4-read-route-five-step-ux.mjs --skip-branch-check --skip-uapi-tests + fi + if [ -f scripts/check-v43-gate5-deposit-route-options.mjs ]; then + node scripts/check-v43-gate5-deposit-route-options.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + fi + if [ -f scripts/check-v43-gate6-deposit-policy-compensation.mjs ]; then + node scripts/check-v43-gate6-deposit-policy-compensation.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + fi + if [ -f scripts/check-v43-gate7-deposit-option-admission.mjs ]; then + node scripts/check-v43-gate7-deposit-option-admission.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + fi + if [ -f scripts/check-v43-gate8-route-ux-product-excellence.mjs ]; then + node scripts/check-v43-gate8-route-ux-product-excellence.mjs --skip-branch-check --skip-uapi-tests + fi + if [ -f scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs ]; then + node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + fi + if [ -f scripts/check-v43-gate10-promotion-readiness.mjs ]; then + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + fi fi pnpm --filter @bitcode/protocol test pnpm --filter @bitcode/btd exec jest --config jest.config.cjs --runInBand --forceExit diff --git a/.github/workflows/v43-canon-promotion.yml b/.github/workflows/v43-canon-promotion.yml new file mode 100644 index 00000000..6693d93c --- /dev/null +++ b/.github/workflows/v43-canon-promotion.yml @@ -0,0 +1,135 @@ +name: V43 Canon Promotion + +on: + pull_request: + branches: + - main + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: read + +jobs: + promote-v43: + name: V43 Promotion Validation + if: >- + ${{ + github.event_name == 'workflow_dispatch' || + ( + github.event.pull_request.base.ref == 'main' && + github.event.pull_request.head.ref == 'version/v43' && + github.event.pull_request.head.repo.full_name == github.repository + ) + }} + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout version branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} + token: ${{ github.token }} + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "24" + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Validate V43 promotion readiness + run: | + POINTER="$(cat BITCODE_SPEC.txt)" + if [ "$POINTER" = "V42" ]; then + node scripts/check-bitcode-spec-family.mjs --version V43 --mode draft --current-target V42 + node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V42 --draft-target V43 + node scripts/check-bitcode-canonical-inputs.mjs --current-target V42 + node scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs --skip-branch-check + node scripts/check-v43-gate2-route-vocabulary-inventory.mjs --skip-branch-check + node scripts/check-v43-gate3-packs-activity-master-detail.mjs --skip-branch-check --skip-uapi-tests + node scripts/check-v43-gate4-read-route-five-step-ux.mjs --skip-branch-check --skip-uapi-tests + node scripts/check-v43-gate5-deposit-route-options.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + node scripts/check-v43-gate6-deposit-policy-compensation.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + node scripts/check-v43-gate7-deposit-option-admission.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + node scripts/check-v43-gate8-route-ux-product-excellence.mjs --skip-branch-check --skip-uapi-tests + node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs --skip-branch-check --skip-uapi-tests --skip-package-tests + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + node scripts/promote-bitcode-canon.mjs --version V43 --commit HEAD --dry-run + elif [ "$POINTER" = "V43" ]; then + node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43 + node scripts/check-bitcode-canonical-inputs.mjs --current-target V43 + node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44 + node scripts/check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests + else + echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 + exit 1 + fi + pnpm --filter @bitcode/protocol typecheck + pnpm --filter @bitcode/protocol test + pnpm --filter @bitcode/btd typecheck + pnpm --filter @bitcode/btd test + npm --prefix protocol-demonstration test + npm --prefix protocol-demonstration run test:v28-mvp-qa + pnpm --filter @bitcode/pipeline-asset-pack typecheck + pnpm --filter @bitcode/pipeline-hosts typecheck + pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit + pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit + git diff --check + + - name: Promote V43 canon files + if: >- + ${{ + github.event_name == 'pull_request' && + github.event.pull_request.head.ref == 'version/v43' + }} + env: + HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} + run: | + if [ "$(cat BITCODE_SPEC.txt)" = "V43" ]; then + echo "BITCODE_SPEC.txt already points to V43." + exit 0 + fi + PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)" + node scripts/prepare-bitcode-spec-family-promotion.mjs --version V43 --commit "$PROOF_SOURCE_COMMIT" + node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V43 --next-draft V44 + printf "V43\n" > BITCODE_SPEC.txt + node scripts/generate-bitcode-proven.mjs --version V43 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V43_PROVEN.md --allow-dirty + node scripts/generate-bitcode-proven.mjs --version V43 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V43_PROVEN.md --check --allow-dirty + node scripts/check-bitcode-canonical-inputs.mjs --current-target V43 + node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43 + node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V43 --draft-target V44 + git diff --check + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add \ + BITCODE_SPEC.txt \ + BITCODE_SPEC_V43.md \ + BITCODE_SPEC_V43_DELTA.md \ + BITCODE_SPEC_V43_NOTES.md \ + BITCODE_SPEC_V43_PARITY_MATRIX.md \ + BITCODE_SPEC_V43_PROVEN.md \ + protocol-demonstration/src/canon-posture.js \ + protocol-demonstration/README.md \ + packages/protocol/src/canon-posture.js \ + packages/protocol/data/state.json \ + packages/protocol/README.md \ + .bitcode + git commit -m "Promote Bitcode canon to V43" + git push origin "HEAD:$HEAD_BRANCH" diff --git a/BITCODE_SPEC_V43.md b/BITCODE_SPEC_V43.md index 57fb113b..fff1dfeb 100644 --- a/BITCODE_SPEC_V43.md +++ b/BITCODE_SPEC_V43.md @@ -7,8 +7,8 @@ - Current canonical/latest target: `V42` - Prior canonical anchor: `BITCODE_SPEC_V42.md` - Prior generated proof appendix: `BITCODE_SPEC_V42_PROVEN.md` -- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, V43 gate artifacts as they are introduced, V43 gate-quality workflow evidence, and later `BITCODE_SPEC_V43_PROVEN.md` at promotion -- Source parity state: V43 currently opens route vocabulary, pack-activity, agentic deposit, Reading separation, UX, and proof posture; implementation parity is gate-scoped and not yet promoted +- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, `.bitcode/v43-canon-posture-drift-report.json`, V43 gate artifacts through `.bitcode/v43-promotion-readiness-report.json`, V43 gate-quality and promotion workflow evidence, and later `BITCODE_SPEC_V43_PROVEN.md` at promotion +- Source parity state: V43 Gates 1 through 10 now have generated proof-backed implementation parity for route vocabulary, pack activity, Reading, Depositing, policy/compensation, option admission, shared route UX, cross-route rehearsal, and promotion readiness - Notes companion: `BITCODE_SPEC_V43_NOTES.md` - Delta companion: `BITCODE_SPEC_V43_DELTA.md` - Parity companion: `BITCODE_SPEC_V43_PARITY_MATRIX.md` @@ -253,6 +253,21 @@ source. Value-bearing mainnet remains blocked. Gate 10 must bind every V43 artifact, workflow, generated proof, docs update, route migration, source-safety proof, test suite, and active V43 / draft V44 runtime posture before canonical promotion. +Gate 10 closes with `V43PromotionReadinessReport`, the deterministic +`.bitcode/v43-promotion-readiness-report.json` artifact, `check:v43-gate10`, +`generate:v43-promotion-readiness`, `v43-canon-promotion.yml`, V43 promotion +support in `promote-bitcode-canon.mjs`, V43 hand-authored spec-family promotion +rewriting, V43 generated PROVEN support, and post-promotion workflow posture for +V43 active / draft V44. The artifact covers every V43 gate artifact from route +vocabulary through cross-route rehearsal, the promotion workflow, gate/canon +quality workflows, package exports/tests, documentation evidence, and generated +proof outputs. Promotion remains blocked if any required artifact is missing, +unparseable, source-unsafe, stale, missing workflow coverage, missing promotion +script coverage, or admits value-bearing mainnet before a later canon. Gate 10 +does not promote `BITCODE_SPEC.txt` itself; it makes the `version/v43` to `main` +promotion pull request mechanically ready to produce `BITCODE_SPEC_V43_PROVEN.md` +and advance runtime posture to V43 active / draft V44. + ## V43 canonical subsystem surfaces ### Depositing and asset supply @@ -528,6 +543,13 @@ Gate 1 validates with `pnpm run check:v43-gate1`, `node scripts/check-bitcode-sp ## V43 promotion canon +V43 promotion readiness canon is represented by +`.bitcode/v43-promotion-readiness-report.json`. It binds Gate 1 through Gate 10 +artifact coverage, source-safety coverage, workflow coverage, promotion-script +coverage, generated proof support, documentation evidence, and post-promotion +runtime posture. Its accepted post-promotion posture is V43 active / draft V44, +and its report is source-safe metadata only. + V43 promotion must occur only after every gate is implemented, specified, tested, documented, source-safe, rehearsed, and green through maintained workflows. Promotion must create `BITCODE_SPEC_V43_PROVEN.md` and advance `BITCODE_SPEC.txt` to `V43`. ## V43 appendices and canonical supporting material @@ -572,6 +594,16 @@ Inherited. | --- | --- | --- | | `.bitcode/v43-spec-family-report.json` | aggregate proof verdict | draft-required | | `.bitcode/v43-canonical-input-report.json` | generated artifact inventories | draft-required | +| `.bitcode/v43-canon-posture-drift-report.json` | active/draft posture | draft-required | +| `.bitcode/v43-route-vocabulary-inventory.json` | route vocabulary inventory | closed | +| `.bitcode/v43-packs-activity-master-detail.json` | pack activity master-detail | closed | +| `.bitcode/v43-read-route-five-step-ux.json` | Reading route UX | closed | +| `.bitcode/v43-deposit-route-options.json` | deposit option synthesis route | closed | +| `.bitcode/v43-deposit-policy-compensation.json` | deposit policy and compensation | closed | +| `.bitcode/v43-deposit-option-admission.json` | deposit option admission | closed | +| `.bitcode/v43-route-ux-product-excellence.json` | shared product route UX | closed | +| `.bitcode/v43-cross-route-rehearsal-telemetry-repair.json` | cross-route rehearsal and repair | closed | +| `.bitcode/v43-promotion-readiness-report.json` | promotion readiness | closed | ### V43 specifying generated artifacts diff --git a/BITCODE_SPEC_V43_DELTA.md b/BITCODE_SPEC_V43_DELTA.md index d74a73f9..520de50c 100644 --- a/BITCODE_SPEC_V43_DELTA.md +++ b/BITCODE_SPEC_V43_DELTA.md @@ -7,8 +7,8 @@ - Current canonical/latest target: `V42` - Prior canonical anchor: `BITCODE_SPEC_V42.md` - Prior generated proof appendix: `BITCODE_SPEC_V42_PROVEN.md` -- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, and V43 gate artifacts as introduced -- Source parity state: Gate 1 opens V43 specification and validation posture; Gate 2 adds source-safe route vocabulary inventory and migration-matrix proof; Gates 3 through 9 now close Packs, Read, Deposit, deposit policy/admission, shared route UX proof, and cross-route rehearsal proof +- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, `.bitcode/v43-canon-posture-drift-report.json`, and V43 gate artifacts through `.bitcode/v43-promotion-readiness-report.json` +- Source parity state: Gate 1 opens V43 specification and validation posture; Gate 2 adds source-safe route vocabulary inventory and migration-matrix proof; Gates 3 through 10 now close Packs, Read, Deposit, deposit policy/admission, shared route UX proof, cross-route rehearsal proof, and promotion readiness ## Why V43 exists @@ -29,6 +29,10 @@ V42 proved the reliable MVP path, but the product route vocabulary is still tran `/read`, and `/packs` with source-safe rehearsal receipts, telemetry readback, ledger/database/storage synchronization checks, repair posture, and no value-bearing mainnet admission. +11. Gate 10 binds V43 promotion readiness through + `.bitcode/v43-promotion-readiness-report.json`, `v43-canon-promotion.yml`, + V43 PROVEN generation support, promotion scripts support V43, and the + V43 active / draft V44 post-promotion posture. ## Explicitly deferred @@ -157,6 +161,25 @@ metadata only and bind staging-testnet to Supabase project prompts, provider responses, unpaid AssetPack source, wallet private material, private settlement payloads, or live rehearsal logs. +## Gate 10: V43 Promotion Readiness + +Gate 10 adds `V43PromotionReadinessReport`, the generated +`.bitcode/v43-promotion-readiness-report.json` artifact, package exports, +protocol tests, `generate:v43-promotion-readiness`, +`check:v43-promotion-readiness`, `check:v43-gate10`, V43 support in +`promote-bitcode-canon.mjs`, V43 support in +`prepare-bitcode-spec-family-promotion.mjs`, V43 support in generated PROVEN +packages, V43 Gate 10 gate/canon workflow posture, and +`.github/workflows/v43-canon-promotion.yml`. + +The closure acceptance is source-safe metadata only: every V43 gate artifact +must be present, parseable, source-safe, deterministic under check mode, and +bound to active V42 / draft V43 before promotion. The promotion workflow must +produce V43 active / draft V44 posture, create `BITCODE_SPEC_V43_PROVEN.md`, +and refuse promotion when any artifact, workflow, promotion script, generated +proof output, documentation evidence, source-safety boundary, or value-bearing +mainnet block is missing. + ## Commit-Body Direction V43 gate commits should state the route/product surface changed, the protocol objects preserved, the proof/test commands run, and the source-safety boundaries maintained. Gate PR titles must begin with `V43 Gate N:`. diff --git a/BITCODE_SPEC_V43_NOTES.md b/BITCODE_SPEC_V43_NOTES.md index bd7f7afc..1eebf836 100644 --- a/BITCODE_SPEC_V43_NOTES.md +++ b/BITCODE_SPEC_V43_NOTES.md @@ -7,8 +7,8 @@ - Current canonical/latest target: `V42` - Prior canonical anchor: `BITCODE_SPEC_V42.md` - Prior generated proof appendix: `BITCODE_SPEC_V42_PROVEN.md` -- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, and V43 gate artifacts as introduced -- Source parity state: notes define operating memory for V43 gates; Gates 2 through 9 now have generated proof-backed implementation parity +- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, `.bitcode/v43-canon-posture-drift-report.json`, and V43 gate artifacts through `.bitcode/v43-promotion-readiness-report.json` +- Source parity state: notes define operating memory for V43 gates; Gates 2 through 10 now have generated proof-backed implementation parity ## Notes companion rule @@ -96,6 +96,22 @@ raw prompts, interpolated prompts, raw provider responses, wallet private material, private settlement payloads, or live rehearsal logs may enter the generated artifact or operator receipts. +## Gate 10: V43 Promotion Readiness + +Gate 10 closes the V43 draft branch as promotion-ready without itself advancing +`BITCODE_SPEC.txt`. `V43PromotionReadinessReport` binds every V43 artifact, +workflow, documentation update, package export, package test, promotion script, +generated PROVEN hook, and source-safety boundary needed for the eventual +`version/v43` to `main` promotion pull request. + +The expected post-promotion runtime posture is active V43 / draft V44. The +promotion workflow must generate `BITCODE_SPEC_V43_PROVEN.md`, prepare the +runtime canon files, advance `BITCODE_SPEC.txt` to `V43`, and then verify the +posture drift and canonical inputs. The readiness report remains source-safe +metadata only; if a secret, protected source body, raw prompt/provider payload, +unpaid AssetPack source, wallet private material, or value-bearing mainnet +admission appears in the proof, promotion remains blocked. + ## V43 copy boundary Outside public docs, avoid self-referential copy such as text explaining that a component is powerful or that Bitcode is doing a thing. Use clear route names, labels, status rows, measurement summaries, empty states, and expandable proof metadata. Public docs may explain the protocol; product UI should operate it. diff --git a/BITCODE_SPEC_V43_PARITY_MATRIX.md b/BITCODE_SPEC_V43_PARITY_MATRIX.md index 8e8a3f28..c47c9393 100644 --- a/BITCODE_SPEC_V43_PARITY_MATRIX.md +++ b/BITCODE_SPEC_V43_PARITY_MATRIX.md @@ -7,8 +7,8 @@ - Current canonical/latest target: `V42` - Prior canonical anchor: `BITCODE_SPEC_V42.md` - Prior generated proof appendix: `BITCODE_SPEC_V42_PROVEN.md` -- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, and V43 gate artifacts as introduced -- Source parity state: V43 Gate 1 parity is documentation/workflow posture; V43 Gate 2 parity is source-safe inventory and migration planning; V43 Gate 3 parity is PackActivity source-safe master-detail implementation; V43 Gate 4 parity is `/read`; V43 Gate 5 parity is `/deposit` and source-safe DepositAssetPackOption synthesis; V43 Gate 6 parity is source-safe deposit policy and compensation scoring; V43 Gate 7 parity is source-safe deposit option review, admission, indexing, storage projection, telemetry, and `/packs` synchronization; V43 Gate 8 parity is shared product route UX, concise copy, progressive disclosure, and loading/empty/error route states; V43 Gate 9 parity is cross-route rehearsal, telemetry/database readback, ledger/database/storage synchronization, and repair posture +- Generated structured artifact inventory: `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, `.bitcode/v43-canon-posture-drift-report.json`, and V43 gate artifacts through `.bitcode/v43-promotion-readiness-report.json` +- Source parity state: V43 Gate 1 parity is documentation/workflow posture; V43 Gate 2 parity is source-safe inventory and migration planning; V43 Gate 3 parity is PackActivity source-safe master-detail implementation; V43 Gate 4 parity is `/read`; V43 Gate 5 parity is `/deposit` and source-safe DepositAssetPackOption synthesis; V43 Gate 6 parity is source-safe deposit policy and compensation scoring; V43 Gate 7 parity is source-safe deposit option review, admission, indexing, storage projection, telemetry, and `/packs` synchronization; V43 Gate 8 parity is shared product route UX, concise copy, progressive disclosure, and loading/empty/error route states; V43 Gate 9 parity is cross-route rehearsal, telemetry/database readback, ledger/database/storage synchronization, and repair posture; V43 Gate 10 parity is promotion readiness and active V43 / draft V44 posture ## Purpose @@ -22,7 +22,7 @@ Audit V43 against `BITCODE_SPEC_V43.md`, V42 active canon, route source, package | Area | Required V43 result | Source evidence | Judgment | | --- | --- | --- | --- | -| Gate 1 roadmap | Active V42 / draft V43 posture, route vocabulary, gate plan, docs, checker, workflows | `BITCODE_SPEC_V43.md`, `scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs` | drafted | +| Gate 1 roadmap | Active V42 / draft V43 posture, route vocabulary, gate plan, docs, checker, workflows | `BITCODE_SPEC_V43.md`, `scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs` | implemented | | Route vocabulary | `/exchange` to `/packs` and `/terminal` to `/read`/`/deposit` are inventoried with route vocabulary inventory, migration matrix, retained debug cockpit boundary, redirect compatibility, self-referential copy audit, and source-safe file/token counts | `packages/protocol/src/canonical/v43-route-vocabulary-inventory.js`, `.bitcode/v43-route-vocabulary-inventory.json`, `scripts/check-v43-gate2-route-vocabulary-inventory.mjs` | implemented | | Packs master-detail | Searchable, sortable, filterable pack activity table, source-safe detail route, proof-root display, settlement/compensation/delivery/repair readback, and `/exchange` compatibility redirect | `packages/protocol/src/canonical/v43-packs-activity-master-detail.js`, `.bitcode/v43-packs-activity-master-detail.json`, `uapi/app/packs`, `uapi/app/api/packs/activity/route.ts`, `uapi/components/base/bitcode/activity/pack-activity-model.ts` | implemented | | Read route | `ReadRouteSession` and five-step Reading UX own Read Request, synthesized Need review, accepted-Need-gated Finding Fits, source-safe AssetPack preview, BTC settlement, and delivery posture | `packages/protocol/src/canonical/v43-read-route-five-step-ux.js`, `.bitcode/v43-read-route-five-step-ux.json`, `uapi/app/read`, `uapi/app/read/read-route-model.ts` | implemented | @@ -31,16 +31,16 @@ Audit V43 against `BITCODE_SPEC_V43.md`, V42 active canon, route source, package | Deposit option admission | Approved, policy-eligible deposit options enter source-safe Depository projections and `/packs` activity while rejected, resynthesis, pending, and policy-blocked options stay out | `packages/protocol/src/canonical/v43-deposit-option-admission.js`, `.bitcode/v43-deposit-option-admission.json`, `packages/pipelines/asset-pack/src/deposit-asset-pack-option-admission.ts`, `/deposit` admission readback, `/packs` activity model | implemented | | UX/UI product excellence | Self-explanatory, polished, progressive-detail UI without self-referential product copy | `packages/protocol/src/canonical/v43-route-ux-product-excellence.js`, `.bitcode/v43-route-ux-product-excellence.json`, `uapi/components/base/bitcode/routes/product-route-shell.tsx`, `/packs`, `/read`, `/deposit` route clients | implemented | | Cross-route rehearsal | Local/staging-testnet cross-route path verifies `/deposit`, `/read`, `/packs`, deposit admission, Reading Need review, Finding Fits, source-safe preview, settlement, compensation, delivery, telemetry/database readback, ledger/database/storage synchronization, and repair posture | `packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js`, `.bitcode/v43-cross-route-rehearsal-telemetry-repair.json`, `scripts/rehearse-v43-cross-route-product-flow.mjs` | implemented | -| Promotion readiness | V43 generated proof and active V43 / draft V44 posture ready | future Gate 10 artifact | draft-required | +| Promotion readiness | V43 generated proof and active V43 / draft V44 posture ready | `packages/protocol/src/canonical/v43-promotion-readiness-report.js`, `.bitcode/v43-promotion-readiness-report.json`, `.github/workflows/v43-canon-promotion.yml`, `scripts/check-v43-gate10-promotion-readiness.mjs` | closed | ## V43 implementation checklist | Area | Closure requirement | Current judgment | | --- | --- | --- | -| Specification family | V43 SPEC, DELTA, NOTES, PARITY files exist and pass spec-family check | drafted | -| Package script | `check:v43-gate1` exists | drafted | -| Workflows | Gate/canon quality know active V42 / draft V43 | drafted | -| Documentation | README and roadmap name V43 route/product scope | drafted | +| Specification family | V43 SPEC, DELTA, NOTES, PARITY files exist and pass spec-family check | closed | +| Package script | `check:v43-gate1` through `check:v43-gate10` exist | closed | +| Workflows | Gate/canon quality know active V42 / draft V43 and promoted V43 / draft V44 | closed | +| Documentation | README and roadmap name V43 route/product scope and promotion readiness | closed | | Gate 2 package proof | `V43RouteVocabularyInventory` exports, generated artifact, package test, workflow checks, and `check:v43-gate2` exist | implemented | | Gate 3 PackActivity proof | `V43PacksActivityMasterDetail` exports, generated artifact, source-safe model/API/UI tests, workflow checks, and `check:v43-gate3` exist | implemented | | Gate 4 Read route proof | `V43ReadRouteFiveStepUx` exports, generated artifact, source-safe route model/UI tests, workflow checks, and `check:v43-gate4` exist | implemented | @@ -49,8 +49,17 @@ Audit V43 against `BITCODE_SPEC_V43.md`, V42 active canon, route source, package | Gate 7 Deposit option admission proof | `DepositAssetPackOptionAdmissionReport`, generated artifact, source-safe route model/UI tests, asset-pack admission tests, PackActivity sync tests, workflow checks, and `check:v43-gate7` exist | implemented | | Gate 8 route UX proof | `ProductRouteShell`, `ProductRouteStepGrid`, `ProductRouteStatePanel`, `ProductRouteDisclosure`, generated artifact, source-safe route shell tests, workflow checks, and `check:v43-gate8` exist | implemented | | Gate 9 rehearsal proof | `V43CrossRouteRehearsalTelemetryRepair`, generated artifact, source-safe operator script, focused checks, workflow checks, and `check:v43-gate9` exist | implemented | +| Gate 10 promotion proof | `V43PromotionReadinessReport`, generated artifact, source-safe promotion workflow, promotion scripts, generated PROVEN support, workflow checks, and `check:v43-gate10` exist | closed | | Implementation | Route and pipeline source changes are not part of Gates 1 or 2; Gate 3 implements only `/packs` and PackActivity; Gate 4 implements `/read`; Gate 5 implements `/deposit` option synthesis; Gate 6 implements policy scoring; Gate 7 implements depositor decisions, admission receipts, index/storage projections, telemetry, and `/packs` synchronization; Gate 8 implements shared route UX only; Gate 9 implements source-safe cross-route proof/rehearsal only | accepted boundary | +## Gate 10 Promotion readiness parity + +V43 Gate 10 is closed when `.bitcode/v43-promotion-readiness-report.json` +covers every V43 gate artifact, generated proof output, workflow, promotion +script, package export, protocol test, documentation evidence, source-safety +boundary, and active V43 / draft V44 post-promotion posture. The readiness +artifact is source-safe metadata only and keeps value-bearing mainnet blocked. + ## V43 accepted boundaries Gate 1 is allowed to specify and wire validation posture only. Gate 2 is allowed diff --git a/README.md b/README.md index f386a7b6..12d5ed0a 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,14 @@ database readback, ledger/database/storage synchronization, and repair posture. The staging lane is bound to Supabase project `tkpyosihuouusyaxtbau`; receipts and generated artifacts remain source-safe metadata only. +V43 Gate 10 adds `V43PromotionReadinessReport`, +`.bitcode/v43-promotion-readiness-report.json`, +`generate:v43-promotion-readiness`, `check:v43-promotion-readiness`, +`check:v43-gate10`, and `v43-canon-promotion.yml`. It binds every V43 gate +artifact, promotion script, generated PROVEN hook, workflow, source-safety +boundary, documentation update, and post-promotion V43 active / draft V44 +runtime posture before the version branch can promote canon. + Exchange is inherited V36 canon: market-wide activity master-detail, buy/sell/ bid/ask/cancel/accept/settle/history flows, AssetPack range trading, rights-transfer review, pricing/liquidity/wrapper analysis, settlement diff --git a/SPECIFICATIONS_ROADMAP.md b/SPECIFICATIONS_ROADMAP.md index 7a53427f..b727500c 100644 --- a/SPECIFICATIONS_ROADMAP.md +++ b/SPECIFICATIONS_ROADMAP.md @@ -5,8 +5,8 @@ - Current active canonical pointer: `BITCODE_SPEC.txt` -> `V42` - Current active canon: `BITCODE_SPEC_V42.md` - Current draft target: `BITCODE_SPEC_V43.md`. -- Current working gate: V43 Gate 9 Cross-Route Rehearsal, Telemetry, And Repair. -- Next queued work after V43 Gate 9: V43 promotion readiness, generated proof appendix, promotion workflow posture, and active V43 / draft V44 preparation. +- Current working gate: V43 Gate 10 Promotion Readiness. +- Next queued work after V43 Gate 10: V43 canonical promotion PR into `main`, generated `BITCODE_SPEC_V43_PROVEN.md`, and active V43 / draft V44 preparation. - Latest closed version: V42 Reliable MVP Experience, which promoted shortest-path Depositing, five-step Reading, ReadNeed review/resynthesis, ReadFitsFinding source-safe preview and quote, settlement rights transfer, repository delivery, AI-reading demonstration, local/staging MVP rehearsal, and V42 promotion readiness. - Recent V42 canonical promotion anchor: V42 canonical promotion updated `BITCODE_SPEC.txt` to `V42`, generated `BITCODE_SPEC_V42_PROVEN.md`, preserved active V42 / draft V43 runtime posture, and closed reliable MVP experience canon. - Recent V42 opening anchor: reliable MVP experience opens over promoted V41 with V42 SPEC, DELTA, NOTES, and PARITY files, `check:v42-gate1`, active V41 / draft V42 posture, and a nine-gate plan for shortest-path Depositing, five-step Reading, ReadNeed product closure, ReadFitsFinding preview and quote closure, settlement and repository delivery, AI-reading demonstration, local/staging rehearsal, and promotion readiness. @@ -26,6 +26,7 @@ - V43 Gate 7 closure anchor: route-product cleanup now owns package-backed `DepositAssetPackOptionAdmissionReport`, deterministic `.bitcode/v43-deposit-option-admission.json`, approve/reject/resynthesis review decisions, source-safe admission receipts, approved-policy-eligible Depository admission, semantic/lexical/metadata index projection, object-storage metadata and external source pointer projection, BTC source-to-shares compensation preview continuity, execution-stream telemetry, `/packs` `depository-assetpack` synchronization, focused route/package/activity/protocol tests, workflow wiring, and `check:v43-gate7`. - V43 Gate 8 closure anchor: route-product cleanup now owns shared `ProductRouteShell`, `ProductRouteStepGrid`, `ProductRouteStatePanel`, and `ProductRouteDisclosure` components, deterministic `.bitcode/v43-route-ux-product-excellence.json`, concise `/packs`, `/read`, and `/deposit` product route copy, keyboard current-step semantics, route loading/empty/error states, progressive source-safety disclosure, focused route/protocol tests, workflow wiring, and `check:v43-gate8`. - V43 Gate 9 closure anchor: route-product cleanup now owns package-backed `V43CrossRouteRehearsalTelemetryRepair`, deterministic `.bitcode/v43-cross-route-rehearsal-telemetry-repair.json`, source-safe local/staging-testnet operator receipts, staging-testnet Supabase project `tkpyosihuouusyaxtbau`, `/deposit` option synthesis/admission, `/read` Need review and Finding Fits, source-safe AssetPack preview, BTC/BTD settlement rights transfer, repository delivery, source-to-shares compensation readback, `/packs` activity/repair inspection, telemetry/database readback, ledger/database/storage synchronization, workflow wiring, and `check:v43-gate9`. +- V43 Gate 10 closure anchor: route-product cleanup now owns package-backed `V43PromotionReadinessReport`, deterministic `.bitcode/v43-promotion-readiness-report.json`, `BITCODE_SPEC_V43_PROVEN.md` generation support, `v43-canon-promotion.yml`, promotion command dry-run support, spec-family promotion support, gate/canon workflow posture, active V43 / draft V44 runtime preparation, all V43 product route artifacts covered, source-safe, parseable, and workflow-bound, and value-bearing mainnet admission blocked through `check:v43-gate10`. - Recent V41 closure anchor: V41 canonical promotion updated `BITCODE_SPEC.txt` to `V41`, generated `BITCODE_SPEC_V41_PROVEN.md`, preserved active V41 / draft V42 runtime posture, and closed prompt-program excellence canon. - Recent V40 closure anchor: V40 canonical promotion updated `BITCODE_SPEC.txt` to `V40`, generated `BITCODE_SPEC_V40_PROVEN.md`, preserved active V40 / draft V41 runtime posture, and closed exhaustive commercial application testing canon. - Recent V39 closure anchor: V39 canonical promotion updated `BITCODE_SPEC.txt` to `V39`, generated `BITCODE_SPEC_V39_PROVEN.md`, preserved active V39 / draft V40 runtime posture, and closed commercial Reading readiness canon. diff --git a/package.json b/package.json index 102b3989..f778baa0 100644 --- a/package.json +++ b/package.json @@ -355,6 +355,9 @@ "generate:v43-cross-route-rehearsal": "node scripts/generate-v43-cross-route-rehearsal-telemetry-repair.mjs", "check:v43-cross-route-rehearsal": "node scripts/generate-v43-cross-route-rehearsal-telemetry-repair.mjs --check", "check:v43-gate9": "node scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs", + "generate:v43-promotion-readiness": "node scripts/generate-v43-promotion-readiness-report.mjs", + "check:v43-promotion-readiness": "node scripts/generate-v43-promotion-readiness-report.mjs --check", + "check:v43-gate10": "node scripts/check-v43-gate10-promotion-readiness.mjs", "generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs", "check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check", "check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs", diff --git a/packages/protocol/README.md b/packages/protocol/README.md index 022502af..9b431143 100644 --- a/packages/protocol/README.md +++ b/packages/protocol/README.md @@ -167,6 +167,16 @@ ledger/database/storage synchronization, repair posture, settlement delivery, and compensation readback while keeping receipts source-safe and value-bearing mainnet execution blocked. +V43 Gate 10 adds `V43PromotionReadinessReport` through +`packages/protocol/src/canonical/v43-promotion-readiness-report.js`, +`packages/protocol/test/v43-promotion-readiness.test.js`, +`.bitcode/v43-promotion-readiness-report.json`, +`generate:v43-promotion-readiness`, `check:v43-promotion-readiness`, +`check:v43-gate10`, and `v43-canon-promotion.yml`. It binds all V43 product +route artifacts, workflows, generated PROVEN support, promotion scripts, +source-safety checks, documentation evidence, and the `V43` active, `V44` draft +posture needed before canonical promotion. + Historical V39 promotion moved this package through the `V39` active, `V40` draft posture. V40 promotion has since advanced the current package posture to `V40` active, `V41` draft. diff --git a/packages/protocol/src/canonical/proven-generator.js b/packages/protocol/src/canonical/proven-generator.js index 3fab1d93..a1720056 100644 --- a/packages/protocol/src/canonical/proven-generator.js +++ b/packages/protocol/src/canonical/proven-generator.js @@ -46,6 +46,7 @@ import { buildV39CommercialReadingPromotionReadinessReport } from './v39-commerc import { buildV40PromotionReadinessReport as buildV40PromotionReadinessReportArtifact } from './v40-promotion-readiness-report.js'; import { buildV41PromotionReadinessReport as buildV41PromotionReadinessReportArtifact } from './v41-promotion-readiness-report.js'; import { buildV42PromotionReadinessReport as buildV42PromotionReadinessReportArtifact } from './v42-promotion-readiness-report.js'; +import { buildV43PromotionReadinessReport as buildV43PromotionReadinessReportArtifact } from './v43-promotion-readiness-report.js'; export const DEFAULT_PROVEN_BRANCH_MODES = ['patch', 'context']; export const DEFAULT_V23_PROVEN_PAYMENT_MODES = [...BITCOIN_PAYMENT_MODES]; @@ -68,6 +69,7 @@ const V39_PROMOTION_READINESS_ARTIFACT_PATH = '.bitcode/v39-promotion-readiness- const V40_PROMOTION_READINESS_ARTIFACT_PATH = '.bitcode/v40-promotion-readiness-report.json'; const V41_PROMOTION_READINESS_ARTIFACT_PATH = '.bitcode/v41-promotion-readiness-report.json'; const V42_PROMOTION_READINESS_ARTIFACT_PATH = '.bitcode/v42-promotion-readiness-report.json'; +const V43_PROMOTION_READINESS_ARTIFACT_PATH = '.bitcode/v43-promotion-readiness-report.json'; /** * @param {string} version @@ -6257,6 +6259,27 @@ export function renderCanonicalProvenMarkdown(data) { )); lines.push(''); } + if (data.v43) { + const { v43 } = data; + lines.push('## V43 Promotion Readiness'); + lines.push(''); + lines.push(`- reportId: ${markdownCode(v43.promotionReadinessReport.reportId || v43.promotionReadinessReport.artifactId)}`); + lines.push(`- sourceSafe: ${markdownCode(String(v43.promotionReadinessReport.sourceSafe === true))}`); + lines.push(`- passed: ${markdownCode(String(v43.promotionReadinessReport.passed === true))}`); + lines.push(`- failureCount: ${markdownCode(String(v43.promotionReadinessReport.failures.length))}`); + lines.push(`- prePromotionPosture: ${markdownCode(v43.promotionReadinessReport.prePromotionPosture)}`); + lines.push(`- postPromotionPosture: ${markdownCode(v43.promotionReadinessReport.postPromotionPosture)}`); + lines.push(''); + lines.push(renderMarkdownTable( + ['artifactPath', 'digest', 'byteLength'], + (v43.artifactSummaries || []).map((/** @type {any} */ artifact) => [ + markdownCode(artifact.artifactPath), + markdownCode(artifact.digest), + artifact.byteLength + ]) + )); + lines.push(''); + } if (v20) { lines.push('## V20 Operator Quality Reports'); lines.push(''); @@ -10857,6 +10880,135 @@ function buildV42ProvenPackage(baseData, { }; } +/** + * @param {{ + * generatedAt: string, + * baseData: ReturnType + * }} input + */ +function buildV43PromotionReadinessReport({ generatedAt, baseData }) { + const report = buildV43PromotionReadinessReportArtifact({ + generatedAt, + repoRoot: REPO_ROOT + }); + return { + reportId: report.artifactId, + ...report, + proofSourceCommit: baseData.canonicalCommit, + generatorId: baseData.generatorId, + worktreeState: baseData.worktreeState, + sourceSafe: report.sourceSafetyVerdict === 'source-safe-v43-product-routes-agentic-depositing-promotion-metadata' + }; +} + +/** + * @param {any} baseData + * @param {{ + * generatedAt: string, + * inheritedV19: any, + * inheritedV20: any + * }} input + */ +function buildV43ProvenPackage(baseData, { + generatedAt, + inheritedV19, + inheritedV20 +}) { + const draftPreview = ACTIVE_CANON_VERSION !== 'V43'; + const specFamilyReport = buildV21SpecFamilyReport({ + version: 'V43', + mode: draftPreview ? 'draft' : 'promoted', + ...(draftPreview ? { currentTarget: ACTIVE_CANON_VERSION } : { currentTarget: 'V43' }) + }); + const assumedArtifactPaths = [ + 'BITCODE_SPEC_V43_PROVEN.md', + '.bitcode/v43-spec-family-report.json', + '.bitcode/v43-canonical-input-report.json', + '.bitcode/v43-canon-posture-drift-report.json', + '.bitcode/v43-route-vocabulary-inventory.json', + '.bitcode/v43-packs-activity-master-detail.json', + '.bitcode/v43-read-route-five-step-ux.json', + '.bitcode/v43-deposit-route-options.json', + '.bitcode/v43-deposit-policy-compensation.json', + '.bitcode/v43-deposit-option-admission.json', + '.bitcode/v43-route-ux-product-excellence.json', + '.bitcode/v43-cross-route-rehearsal-telemetry-repair.json', + V43_PROMOTION_READINESS_ARTIFACT_PATH + ]; + const canonicalInputReport = buildV21CanonicalInputReport({ + currentTarget: 'V43', + reportVersion: 'V43', + ...(draftPreview + ? { + skipPointerCheck: true, + assumeExistingRelativePaths: assumedArtifactPaths + } + : { assumeExistingRelativePaths: assumedArtifactPaths }) + }); + const canonPostureDriftReport = buildCanonPostureDriftReport({ + version: 'V43', + activeCanonVersion: draftPreview ? ACTIVE_CANON_VERSION : 'V43', + draftTargetVersion: draftPreview ? 'V43' : 'V44', + proofSourceCommit: baseData.canonicalCommit, + generatedAt, + generatorId: baseData.generatorId, + worktreeState: baseData.worktreeState + }); + const promotionReadinessReport = buildV43PromotionReadinessReport({ + generatedAt, + baseData + }); + const artifacts = { + ...buildCanonPostureGeneratedArtifactContents({ + version: 'V43', + proofSourceCommit: baseData.canonicalCommit, + generatedAt, + generatorId: baseData.generatorId, + worktreeState: baseData.worktreeState, + specFamilyReport, + canonicalInputReport, + canonPostureDriftReport + }), + [V43_PROMOTION_READINESS_ARTIFACT_PATH]: `${JSON.stringify(promotionReadinessReport, null, 2)}\n` + }; + const artifactSummaries = summarizeArtifactContents(artifacts); + const promotionReady = specFamilyReport.passed === true + && canonicalInputReport.passed === true + && canonPostureDriftReport.passed === true + && promotionReadinessReport.passed === true; + const data = { + ...baseData, + v19: inheritedV19, + v20: inheritedV20, + v43: { + specFamilyReport, + canonicalInputReport, + canonPostureDriftReport, + promotionReadinessReport, + artifactSummaries, + draftPreview, + promotionReady, + activeCanonicalTarget: ACTIVE_CANON_VERSION, + nextDraftTarget: 'V44' + }, + aggregate: { + ...baseData.aggregate, + fullyProven: baseData.aggregate.fullyProven + && inheritedV19?.deterministicReplayReport?.passed === true + && inheritedV19?.volatilityInventory?.passed === true + && inheritedV19?.contractChangeLedger?.passed === true + && inheritedV20?.qualitySummary?.passed === true + && promotionReady + && specFamilyReport.mode === 'promoted' + } + }; + return { + data, + markdown: renderCanonicalProvenMarkdown(data), + artifacts + }; +} + /** * @param {{ * version: string, @@ -11949,6 +12101,58 @@ export function generateCanonicalProvenMarkdown({ finishGenerateProfile(); return v42Package; } + if (version === 'V43') { + const inheritedV19BaseData = buildBaseCanonicalProvenData({ + version: 'V19', + canonicalCommit, + canonicalCommitRecordedAt, + generatedAt, + worktreeState, + generatorId, + branchModes, + buildInitialStateFn, + runMakeBitcodeBranchFn, + ...(scenarioIds ? { scenarioIds } : {}) + }); + const inheritedV19Package = buildV19DeterministicProvenPackage(inheritedV19BaseData, { + version: 'V19', + canonicalCommit, + canonicalCommitRecordedAt, + generatedAt, + worktreeState, + generatorId, + branchModes, + buildInitialStateFn, + runMakeBitcodeBranchFn, + renderMarkdown: false, + ...(scenarioIds ? { scenarioIds } : {}) + }); + const inheritedV20BaseData = buildBaseCanonicalProvenData({ + version: 'V20', + canonicalCommit, + canonicalCommitRecordedAt, + generatedAt, + worktreeState, + generatorId, + branchModes, + buildInitialStateFn, + runMakeBitcodeBranchFn, + ...(scenarioIds ? { scenarioIds } : {}) + }); + const inheritedV20Package = buildV20ProvenPackage(inheritedV20BaseData, { + version: 'V20', + generatedAt, + inheritedV19: inheritedV19Package.data.v19, + renderMarkdown: false + }); + const v43Package = buildV43ProvenPackage(baseData, { + generatedAt, + inheritedV19: inheritedV19Package.data.v19, + inheritedV20: inheritedV20Package.data.v20 + }); + finishGenerateProfile(); + return v43Package; + } const v18Matrices = version === 'V18' ? buildV18Matrices(baseData, { version, diff --git a/packages/protocol/src/canonical/v21-specifying.js b/packages/protocol/src/canonical/v21-specifying.js index 2d843635..de47871c 100644 --- a/packages/protocol/src/canonical/v21-specifying.js +++ b/packages/protocol/src/canonical/v21-specifying.js @@ -491,6 +491,19 @@ function buildV21LikeProfile(version) { '.bitcode/v42-promotion-readiness-report.json' ] : []), + ...(version === 'V43' + ? [ + '.bitcode/v43-route-vocabulary-inventory.json', + '.bitcode/v43-packs-activity-master-detail.json', + '.bitcode/v43-read-route-five-step-ux.json', + '.bitcode/v43-deposit-route-options.json', + '.bitcode/v43-deposit-policy-compensation.json', + '.bitcode/v43-deposit-option-admission.json', + '.bitcode/v43-route-ux-product-excellence.json', + '.bitcode/v43-cross-route-rehearsal-telemetry-repair.json', + '.bitcode/v43-promotion-readiness-report.json' + ] + : []), ...(version === 'V26' ? [ '.bitcode/terminal-composition-proof.json', diff --git a/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js b/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js index df7f1dac..646d1525 100644 --- a/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js +++ b/packages/protocol/src/canonical/v43-cross-route-rehearsal-telemetry-repair.js @@ -295,7 +295,7 @@ function buildPredicateResults(repoRoot) { predicateResult('v43-delta-expanded', SOURCE_ROOTS.delta, includesText(sources.delta, 'Gate 9') && includesText(sources.delta, 'cross-route rehearsal')), predicateResult('v43-notes-expanded', SOURCE_ROOTS.notes, sources.notes.includes('Gate 9') && sources.notes.includes('telemetry/database/ledger/storage')), predicateResult('v43-parity-implemented', SOURCE_ROOTS.parity, sources.parity.includes('Cross-route rehearsal') && sources.parity.includes('implemented')), - predicateResult('roadmap-advanced-to-gate9', SOURCE_ROOTS.roadmap, sources.roadmap.includes('Current working gate: V43 Gate 9') && sources.roadmap.includes('V43 Gate 9 closure anchor')), + predicateResult('roadmap-advanced-to-gate9', SOURCE_ROOTS.roadmap, (sources.roadmap.includes('Current working gate: V43 Gate 9') || sources.roadmap.includes('Current working gate: V43 Gate 10')) && sources.roadmap.includes('V43 Gate 9 closure anchor')), predicateResult('readmes-document-gate9', SOURCE_ROOTS.readme, sources.readme.includes('V43 Gate 9') && sources.protocolReadme.includes('V43CrossRouteRehearsalTelemetryRepair')), ]; } diff --git a/packages/protocol/src/canonical/v43-promotion-readiness-report.js b/packages/protocol/src/canonical/v43-promotion-readiness-report.js new file mode 100644 index 00000000..54d6d22e --- /dev/null +++ b/packages/protocol/src/canonical/v43-promotion-readiness-report.js @@ -0,0 +1,430 @@ +// @ts-check + +import crypto from 'node:crypto'; +import { existsSync, readFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export const V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH = + '.bitcode/v43-promotion-readiness-report.json'; +export const V43_PROMOTION_READINESS_REPORT_SCHEMA_ID = + 'bitcode.v43.promotionReadinessReport.v1'; +export const V43_PROMOTION_READINESS_REPORT_VERSION = 'V43'; +export const V43_PROMOTION_READINESS_REPORT_CURRENT_TARGET = 'V42'; +export const V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT = + 'source-safe-v43-product-routes-agentic-depositing-promotion-metadata'; + +export const V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS = Object.freeze([ + '.bitcode/v43-route-vocabulary-inventory.json', + '.bitcode/v43-packs-activity-master-detail.json', + '.bitcode/v43-read-route-five-step-ux.json', + '.bitcode/v43-deposit-route-options.json', + '.bitcode/v43-deposit-policy-compensation.json', + '.bitcode/v43-deposit-option-admission.json', + '.bitcode/v43-route-ux-product-excellence.json', + '.bitcode/v43-cross-route-rehearsal-telemetry-repair.json', +]); + +export const V43_PROMOTION_READINESS_GENERATED_OUTPUTS = Object.freeze([ + 'BITCODE_SPEC_V43_PROVEN.md', + '.bitcode/v43-spec-family-report.json', + '.bitcode/v43-canonical-input-report.json', + '.bitcode/v43-canon-posture-drift-report.json', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, +]); + +const JWT_HEADER_PREFIX = String.fromCharCode( + 101, + 121, + 74, + 104, + 98, + 71, + 99, + 105, + 79, + 105, + 74, + 73, + 85, + 122, + 73, + 49, + 78, + 105, + 73, + 115, + 73, + 110, + 82, + 53, + 99, + 67, + 73, + 54, + 73, + 107, + 112, + 88, + 86, + 67, + 74, + 57, +); + +const SECRET_MARKERS = Object.freeze([ + `${['sk', 'proj'].join('-')}-`, + `${['sb', 'secret'].join('_')}__`, + ['service', 'role'].join('_'), + JWT_HEADER_PREFIX, + ['SUPABASE', 'SERVICE', 'ROLE'].join('_'), + ['OPENAI', 'API', 'KEY'].join('_'), + ['VERCEL', 'TOKEN'].join('_'), + ['VERCEL', 'OIDC', 'TOKEN'].join('_'), + ['PRIVATE', 'KEY'].join('_'), +]); + +const REQUIRED_SOURCE_EVIDENCE = Object.freeze([ + source('scripts/check-v43-gate10-promotion-readiness.mjs', [ + 'V43 Gate 10 promotion readiness', + '--promotion-mode', + 'promotedPointer', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + ]), + source('scripts/generate-v43-promotion-readiness-report.mjs', [ + 'buildV43PromotionReadinessReport', + V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT, + 'v43-promotion-readiness-report', + ]), + source('scripts/promote-bitcode-canon.mjs', [ + "if (version === 'V43')", + 'const v43Gate10Command', + 'buildDerivedV43CommitMessageBody', + 'scripts/check-v43-gate10-promotion-readiness.mjs', + ]), + source('scripts/prepare-bitcode-spec-family-promotion.mjs', [ + "if (version === 'V43')", + 'V43 canonical system specification for product routes and agentic depositing', + 'BITCODE_SPEC_V43_PROVEN.md', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + ]), + source('scripts/prepare-bitcode-runtime-canon-promotion.mjs', [ + '--next-draft', + 'rewritePackageReadme', + 'rewriteRuntimeDataState', + ]), + source('.github/workflows/v43-canon-promotion.yml', [ + "head.ref == 'version/v43'", + 'node scripts/prepare-bitcode-spec-family-promotion.mjs --version V43', + 'node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V43 --next-draft V44', + 'node scripts/generate-bitcode-proven.mjs --version V43', + 'node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43', + 'BITCODE_SPEC_V43_PROVEN.md', + 'Promote V43 canon files', + ]), + source('.github/workflows/bitcode-gate-quality.yml', [ + 'check-v43-gate10-promotion-readiness.mjs', + 'elif [ "$POINTER" = "V43" ]', + '--active-canon V43 --draft-target V44', + ]), + source('.github/workflows/bitcode-canon-quality.yml', [ + 'check-v43-gate10-promotion-readiness.mjs', + 'elif [ "$POINTER" = "V43" ]', + '--active-canon V43 --draft-target V44', + ]), + source('packages/protocol/src/canonical/proven-generator.js', [ + 'buildV43ProvenPackage', + 'buildV43PromotionReadinessReport', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + ]), + source('packages/protocol/test/v43-promotion-readiness.test.js', [ + 'builds source-safe V43 PromotionReadinessReport', + 'v43-promotion-readiness-report', + 'V43 Promotion Readiness', + ]), + source('packages/protocol/src/canonical/v21-specifying.js', [ + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + ]), + source('package.json', [ + 'generate:v43-promotion-readiness', + 'check:v43-promotion-readiness', + 'check:v43-gate10', + ]), +]); + +const REQUIRED_DOCUMENTATION_EVIDENCE = Object.freeze([ + source('BITCODE_SPEC_V43.md', [ + 'V43 promotion readiness canon', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + 'V43 active / draft V44', + ]), + source('BITCODE_SPEC_V43_DELTA.md', [ + 'Gate 10: V43 Promotion Readiness', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + 'promotion scripts support V43', + ]), + source('BITCODE_SPEC_V43_NOTES.md', [ + 'Gate 10: V43 Promotion Readiness', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + 'active V43 / draft V44', + ]), + source('BITCODE_SPEC_V43_PARITY_MATRIX.md', [ + '## Gate 10 Promotion readiness parity', + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + 'closed', + ]), + source('SPECIFICATIONS_ROADMAP.md', [ + 'V43 Gate 10 closure anchor', + 'BITCODE_SPEC_V43_PROVEN.md', + ]), + source('README.md', [ + 'check:v43-gate10', + 'v43-canon-promotion.yml', + ]), + source('packages/protocol/README.md', [ + 'V43 Gate 10', + 'V43` active, `V44` draft', + ]), +]); + +/** + * @param {string} relativePath + * @param {readonly string[]} tokens + */ +function source(relativePath, tokens) { + return { relativePath, tokens }; +} + +/** + * @param {string} repoRoot + * @param {{ relativePath: string, tokens: readonly string[] }} item + */ +function scanTokens(repoRoot, item) { + const absolutePath = path.join(repoRoot, item.relativePath); + const present = existsSync(absolutePath); + const content = present ? readFileSync(absolutePath, 'utf8') : ''; + return { + relativePath: item.relativePath, + present, + digest: present ? sha256(content) : null, + requiredTokens: item.tokens.map((token) => ({ + token, + present: content.includes(token), + })), + }; +} + +/** + * @param {string} repoRoot + * @param {string} relativePath + */ +function scanArtifact(repoRoot, relativePath) { + const absolutePath = path.join(repoRoot, relativePath); + const present = existsSync(absolutePath); + const content = present ? readFileSync(absolutePath, 'utf8') : ''; + let parsed = null; + let parseable = false; + if (present) { + try { + parsed = JSON.parse(content); + parseable = true; + } catch { + parseable = false; + } + } + return { + relativePath, + present, + parseable, + digest: present ? sha256(content) : null, + byteLength: present ? Buffer.byteLength(content, 'utf8') : 0, + sourceSafe: present ? !includesSecretMarker(content) && !content.includes('protectedSourceBody') : false, + artifactId: parsed?.artifactId || parsed?.reportId || null, + version: parsed?.version || null, + sourceSafetyVerdict: parsed?.sourceSafetyVerdict || null, + }; +} + +/** + * @param {unknown} value + * @returns {string} + */ +function canonicalJson(value) { + if (value === null || typeof value !== 'object') return JSON.stringify(value); + if (Array.isArray(value)) return `[${value.map(canonicalJson).join(',')}]`; + const record = /** @type {Record} */ (value); + return `{${Object.keys(record) + .sort() + .map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key])}`) + .join(',')}}`; +} + +/** + * @param {unknown} value + * @returns {string} + */ +function sha256(value) { + return `sha256:${crypto.createHash('sha256').update(String(value)).digest('hex')}`; +} + +/** + * @param {string} value + * @returns {boolean} + */ +function includesSecretMarker(value) { + return SECRET_MARKERS.some((marker) => value.includes(marker)); +} + +/** + * @param {ReturnType} entry + */ +function allTokensPresent(entry) { + return entry.present && entry.requiredTokens.every((token) => token.present); +} + +/** + * @param {{ + * version?: string, + * currentTarget?: string, + * generatedAt?: string, + * repoRoot?: string, + * }} [input] + */ +export function buildV43PromotionReadinessReport(input = {}) { + const version = input.version || V43_PROMOTION_READINESS_REPORT_VERSION; + const currentTarget = input.currentTarget || V43_PROMOTION_READINESS_REPORT_CURRENT_TARGET; + const generatedAt = input.generatedAt || '2026-05-29T00:00:00.000Z'; + const repoRoot = input.repoRoot || path.resolve(__dirname, '../../../..'); + const sourceEvidence = REQUIRED_SOURCE_EVIDENCE.map((item) => scanTokens(repoRoot, item)); + const documentationEvidence = REQUIRED_DOCUMENTATION_EVIDENCE.map((item) => scanTokens(repoRoot, item)); + const gateArtifactEvidence = V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS.map((artifactPath) => + scanArtifact(repoRoot, artifactPath), + ); + const missingGateArtifacts = gateArtifactEvidence.filter((artifact) => !artifact.present).map((artifact) => artifact.relativePath); + const unparseableGateArtifacts = gateArtifactEvidence + .filter((artifact) => artifact.present && !artifact.parseable) + .map((artifact) => artifact.relativePath); + const sourceUnsafeGateArtifacts = gateArtifactEvidence + .filter((artifact) => artifact.present && artifact.sourceSafe !== true) + .map((artifact) => artifact.relativePath); + const sourceEvidenceFailures = sourceEvidence.flatMap((entry) => { + if (!entry.present) return [`missing promotion source ${entry.relativePath}`]; + return entry.requiredTokens + .filter((token) => !token.present) + .map((token) => `${entry.relativePath} missing token ${token.token}`); + }); + const documentationEvidenceFailures = documentationEvidence.flatMap((entry) => { + if (!entry.present) return [`missing promotion documentation ${entry.relativePath}`]; + return entry.requiredTokens + .filter((token) => !token.present) + .map((token) => `${entry.relativePath} missing token ${token.token}`); + }); + const serializedEvidence = canonicalJson({ sourceEvidence, documentationEvidence, gateArtifactEvidence }); + const forbiddenMarkerDetected = includesSecretMarker(serializedEvidence); + const failures = [ + ...sourceEvidenceFailures, + ...documentationEvidenceFailures, + ...missingGateArtifacts.map((artifactPath) => `missing gate artifact ${artifactPath}`), + ...unparseableGateArtifacts.map((artifactPath) => `unparseable gate artifact ${artifactPath}`), + ...sourceUnsafeGateArtifacts.map((artifactPath) => `source-unsafe gate artifact ${artifactPath}`), + ...(forbiddenMarkerDetected ? ['promotion readiness evidence contains a secret-shaped marker'] : []), + ]; + const validationCommands = [ + 'pnpm run check:v43-gate1', + 'pnpm run check:v43-gate2', + 'pnpm run check:v43-gate3', + 'pnpm run check:v43-gate4', + 'pnpm run check:v43-gate5', + 'pnpm run check:v43-gate6', + 'pnpm run check:v43-gate7', + 'pnpm run check:v43-gate8', + 'pnpm run check:v43-gate9', + 'pnpm run check:v43-gate10', + 'node scripts/promote-bitcode-canon.mjs --version V43 --commit HEAD --dry-run', + ]; + const coverage = { + requiredGateArtifactPaths: [...V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS], + generatedProofOutputs: [...V43_PROMOTION_READINESS_GENERATED_OUTPUTS], + gateArtifactCount: gateArtifactEvidence.length, + missingGateArtifacts, + unparseableGateArtifacts, + sourceUnsafeGateArtifacts, + sourceEvidenceComplete: sourceEvidence.every(allTokensPresent), + documentationEvidenceComplete: documentationEvidence.every(allTokensPresent), + allGateArtifactsCovered: missingGateArtifacts.length === 0, + allGateArtifactsParseable: unparseableGateArtifacts.length === 0, + allGateArtifactsSourceSafe: sourceUnsafeGateArtifacts.length === 0, + generatedProofOutputsCovered: V43_PROMOTION_READINESS_GENERATED_OUTPUTS.includes('BITCODE_SPEC_V43_PROVEN.md'), + promotionWorkflowCovered: sourceEvidence.some((entry) => entry.relativePath === '.github/workflows/v43-canon-promotion.yml' && allTokensPresent(entry)), + gateQualityWorkflowCovered: sourceEvidence.some((entry) => entry.relativePath === '.github/workflows/bitcode-gate-quality.yml' && allTokensPresent(entry)), + canonQualityWorkflowCovered: sourceEvidence.some((entry) => entry.relativePath === '.github/workflows/bitcode-canon-quality.yml' && allTokensPresent(entry)), + promotionScriptCovered: sourceEvidence.some((entry) => entry.relativePath === 'scripts/promote-bitcode-canon.mjs' && allTokensPresent(entry)), + specFamilyPromotionScriptCovered: sourceEvidence.some((entry) => entry.relativePath === 'scripts/prepare-bitcode-spec-family-promotion.mjs' && allTokensPresent(entry)), + runtimePromotionScriptCovered: sourceEvidence.some((entry) => entry.relativePath === 'scripts/prepare-bitcode-runtime-canon-promotion.mjs' && allTokensPresent(entry)), + provenGeneratorCovered: sourceEvidence.some((entry) => entry.relativePath === 'packages/protocol/src/canonical/proven-generator.js' && allTokensPresent(entry)), + prePromotionPosture: 'V42 active / V43 draft', + postPromotionPosture: 'V43 active / V44 draft', + valueBearingMainnetAdmission: false, + credentialsSerialized: forbiddenMarkerDetected, + protectedSourceVisible: false, + rawProtectedPromptVisible: false, + rawProviderResponseVisible: false, + unpaidAssetPackSourceVisible: false, + walletPrivateMaterialVisible: false, + }; + const artifactSeed = { + version, + currentTarget, + validationCommands, + coverage, + sourceSafetyVerdict: V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT, + }; + + return { + artifactId: 'v43-promotion-readiness-report', + schemaId: V43_PROMOTION_READINESS_REPORT_SCHEMA_ID, + version, + currentTarget, + generatedAt, + sourceSafetyVerdict: V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT, + prePromotionPosture: 'V42 active / V43 draft', + postPromotionPosture: 'V43 active / V44 draft', + branchProtection: { + directMainPushAdmitted: false, + promotionPrRequired: true, + versionBranch: 'version/v43', + versionPromotionPullRequestTitlePrefix: 'V43 Canonical Promotion', + }, + generatedArtifactPolicy: { + provenAppendixPath: 'BITCODE_SPEC_V43_PROVEN.md', + provenAppendixRequiredBeforePromotion: false, + generatedArtifactPrefix: '.bitcode/v43-', + promotionOverwritesPreviewArtifacts: true, + secretValuesSerialized: false, + protectedSourceSerialized: false, + rawProtectedPromptSerialized: false, + rawProviderResponseSerialized: false, + unpaidAssetPackSourceSerialized: false, + }, + validationCommands, + gateArtifactEvidence, + sourceEvidence, + documentationEvidence, + coverage, + failClosedResult: + 'promotion remains blocked when any V43 route vocabulary inventory, Packs activity master-detail proof, Read five-step UX proof, Deposit option synthesis proof, deposit policy/compensation proof, deposit option admission proof, route UX product proof, cross-route rehearsal, workflow, promotion script, generated proof support, source-safety check, or value-bearing mainnet block is missing', + artifactRoot: `v43-product-route-promotion-readiness-report:${sha256(canonicalJson(artifactSeed)).slice(7, 31)}`, + passed: failures.length === 0, + failures, + validationCommand: 'pnpm run check:v43-gate10', + }; +} + +export function listMissingV43PromotionReadinessSources(repoRoot = path.resolve(__dirname, '../../../..')) { + return [...REQUIRED_SOURCE_EVIDENCE, ...REQUIRED_DOCUMENTATION_EVIDENCE] + .filter((item) => !existsSync(path.join(repoRoot, item.relativePath))) + .map((item) => item.relativePath); +} diff --git a/packages/protocol/src/index.d.ts b/packages/protocol/src/index.d.ts index 15e9141c..05accb7f 100644 --- a/packages/protocol/src/index.d.ts +++ b/packages/protocol/src/index.d.ts @@ -673,6 +673,15 @@ export const V43_CROSS_ROUTE_REHEARSAL_ROUTE_IDS: readonly string[]; export const V43_CROSS_ROUTE_REHEARSAL_STAGE_IDS: readonly string[]; export const V43_CROSS_ROUTE_REHEARSAL_ROW_IDS: readonly string[]; export function buildV43CrossRouteRehearsalTelemetryRepair(input?: Record): BitcodeProtocolReport; +export const V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH: string; +export const V43_PROMOTION_READINESS_REPORT_CURRENT_TARGET: string; +export const V43_PROMOTION_READINESS_REPORT_SCHEMA_ID: string; +export const V43_PROMOTION_READINESS_REPORT_VERSION: string; +export const V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT: string; +export const V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS: readonly string[]; +export const V43_PROMOTION_READINESS_GENERATED_OUTPUTS: readonly string[]; +export function buildV43PromotionReadinessReport(input?: Record): BitcodeProtocolReport; +export function listMissingV43PromotionReadinessSources(repoRoot?: string): string[]; export const EXCHANGE_INTENT_ORDER_CONTRACTS_ARTIFACT_PATH: string; export const EXCHANGE_INTENT_ORDER_CONTRACTS_CURRENT_TARGET: string; export const EXCHANGE_INTENT_ORDER_CONTRACTS_SCHEMA_ID: string; diff --git a/packages/protocol/src/index.js b/packages/protocol/src/index.js index 74b90b74..e6929c71 100644 --- a/packages/protocol/src/index.js +++ b/packages/protocol/src/index.js @@ -763,6 +763,17 @@ export { V43_CROSS_ROUTE_REHEARSAL_VERSION, buildV43CrossRouteRehearsalTelemetryRepair } from './canonical/v43-cross-route-rehearsal-telemetry-repair.js'; +export { + V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS, + V43_PROMOTION_READINESS_GENERATED_OUTPUTS, + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + V43_PROMOTION_READINESS_REPORT_CURRENT_TARGET, + V43_PROMOTION_READINESS_REPORT_SCHEMA_ID, + V43_PROMOTION_READINESS_REPORT_VERSION, + V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT, + buildV43PromotionReadinessReport, + listMissingV43PromotionReadinessSources +} from './canonical/v43-promotion-readiness-report.js'; export { EXCHANGE_INTENT_ACTION_KINDS, EXCHANGE_INTENT_ORDER_CONTRACTS_ARTIFACT_PATH, diff --git a/packages/protocol/test/v43-promotion-readiness.test.js b/packages/protocol/test/v43-promotion-readiness.test.js new file mode 100644 index 00000000..9fba3dd8 --- /dev/null +++ b/packages/protocol/test/v43-promotion-readiness.test.js @@ -0,0 +1,81 @@ +import assert from 'node:assert/strict'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { test } from 'node:test'; + +import { + V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS, + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + buildV43PromotionReadinessReport, + generateCanonicalProvenMarkdown, +} from '../src/index.js'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const repoRoot = path.resolve(__dirname, '..', '..', '..'); + +test('builds source-safe V43 PromotionReadinessReport', () => { + const report = buildV43PromotionReadinessReport({ + generatedAt: '2026-05-29T00:00:00.000Z', + repoRoot, + }); + + assert.equal(report.artifactId, 'v43-promotion-readiness-report'); + assert.equal(report.schemaId, 'bitcode.v43.promotionReadinessReport.v1'); + assert.equal(report.version, 'V43'); + assert.equal(report.currentTarget, 'V42'); + assert.equal(report.passed, true); + assert.equal(report.sourceSafetyVerdict, 'source-safe-v43-product-routes-agentic-depositing-promotion-metadata'); + assert.equal(report.prePromotionPosture, 'V42 active / V43 draft'); + assert.equal(report.postPromotionPosture, 'V43 active / V44 draft'); + assert.equal(report.coverage.allGateArtifactsCovered, true); + assert.equal(report.coverage.allGateArtifactsParseable, true); + assert.equal(report.coverage.allGateArtifactsSourceSafe, true); + assert.equal(report.coverage.sourceEvidenceComplete, true); + assert.equal(report.coverage.documentationEvidenceComplete, true); + assert.equal(report.coverage.generatedProofOutputsCovered, true); + assert.equal(report.coverage.promotionWorkflowCovered, true); + assert.equal(report.coverage.gateQualityWorkflowCovered, true); + assert.equal(report.coverage.canonQualityWorkflowCovered, true); + assert.equal(report.coverage.promotionScriptCovered, true); + assert.equal(report.coverage.specFamilyPromotionScriptCovered, true); + assert.equal(report.coverage.runtimePromotionScriptCovered, true); + assert.equal(report.coverage.provenGeneratorCovered, true); + assert.equal(report.coverage.valueBearingMainnetAdmission, false); + assert.equal(report.coverage.credentialsSerialized, false); + assert.equal(report.coverage.protectedSourceVisible, false); + assert.equal(report.coverage.rawProtectedPromptVisible, false); + assert.equal(report.coverage.rawProviderResponseVisible, false); + assert.equal(report.coverage.unpaidAssetPackSourceVisible, false); + assert.equal(report.coverage.walletPrivateMaterialVisible, false); + assert.deepEqual(report.coverage.missingGateArtifacts, []); + assert.deepEqual(report.coverage.unparseableGateArtifacts, []); + assert.deepEqual(report.coverage.sourceUnsafeGateArtifacts, []); + assert.match(report.artifactRoot, /^v43-product-route-promotion-readiness-report:[a-f0-9]{24}$/u); + assert.equal( + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + '.bitcode/v43-promotion-readiness-report.json', + ); + + for (const artifactPath of V43_PROMOTION_READINESS_GATE_ARTIFACT_PATHS) { + assert.equal(report.gateArtifactEvidence.some((artifact) => artifact.relativePath === artifactPath), true, `missing ${artifactPath}`); + } +}); + +test('supports V43 promotion readiness with source-safe product routes and agentic depositing artifacts', () => { + const result = generateCanonicalProvenMarkdown({ + version: 'V43', + canonicalCommit: '0'.repeat(40), + canonicalCommitRecordedAt: '2026-05-29T00:00:00.000Z', + generatedAt: '2026-05-29T00:00:00.000Z', + worktreeState: 'clean', + }); + + assert.equal(result.data.version, 'V43'); + assert.equal(result.data.v43.promotionReadinessReport.artifactId, 'v43-promotion-readiness-report'); + assert.equal(result.data.v43.promotionReadinessReport.prePromotionPosture, 'V42 active / V43 draft'); + assert.equal(result.data.v43.promotionReadinessReport.postPromotionPosture, 'V43 active / V44 draft'); + assert.equal(result.data.v43.promotionReadinessReport.passed, true); + assert.match(result.markdown, /V43 Promotion Readiness/); + assert.ok(result.artifacts['.bitcode/v43-promotion-readiness-report.json']); + assert.ok(result.artifacts['.bitcode/v43-canon-posture-drift-report.json']); +}); diff --git a/scripts/check-v43-gate10-promotion-readiness.mjs b/scripts/check-v43-gate10-promotion-readiness.mjs new file mode 100644 index 00000000..6b8ada5a --- /dev/null +++ b/scripts/check-v43-gate10-promotion-readiness.mjs @@ -0,0 +1,360 @@ +#!/usr/bin/env node + +import { execFileSync } from 'node:child_process'; +import { existsSync, readFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const defaultRepoRoot = path.resolve(__dirname, '..'); +const ARTIFACT_PATH = '.bitcode/v43-promotion-readiness-report.json'; + +const V43_GATE_ARTIFACTS = [ + '.bitcode/v43-route-vocabulary-inventory.json', + '.bitcode/v43-packs-activity-master-detail.json', + '.bitcode/v43-read-route-five-step-ux.json', + '.bitcode/v43-deposit-route-options.json', + '.bitcode/v43-deposit-policy-compensation.json', + '.bitcode/v43-deposit-option-admission.json', + '.bitcode/v43-route-ux-product-excellence.json', + '.bitcode/v43-cross-route-rehearsal-telemetry-repair.json', +]; + +const JWT_HEADER_PREFIX = String.fromCharCode( + 101, + 121, + 74, + 104, + 98, + 71, + 99, + 105, + 79, + 105, + 74, + 73, + 85, + 122, + 73, + 49, + 78, + 105, + 73, + 115, + 73, + 110, + 82, + 53, + 99, + 67, + 73, + 54, + 73, + 107, + 112, + 88, + 86, + 67, + 74, + 57, +); + +const SECRET_MARKERS = [ + `${['sk', 'proj'].join('-')}-`, + `${['sb', 'secret'].join('_')}__`, + ['service', 'role'].join('_'), + JWT_HEADER_PREFIX, + ['SUPABASE', 'SERVICE', 'ROLE'].join('_'), + ['OPENAI', 'API', 'KEY'].join('_'), + ['VERCEL', 'TOKEN'].join('_'), + ['VERCEL', 'OIDC', 'TOKEN'].join('_'), + ['PRIVATE', 'KEY'].join('_'), +]; + +function read(root, relativePath) { + return readFileSync(path.join(root, relativePath), 'utf8'); +} + +function fileExists(root, relativePath) { + return existsSync(path.join(root, relativePath)); +} + +function git(root, args) { + return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim(); +} + +function run(root, command, args) { + return execFileSync(command, args, { + cwd: root, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'pipe'], + }).trim(); +} + +function assertCheck(failures, condition, message) { + if (!condition) failures.push(message); +} + +function parseArgs(argv) { + const args = { + promotionMode: false, + skipBranchCheck: false, + skipPackageTests: false, + repoRoot: defaultRepoRoot, + }; + + for (let index = 0; index < argv.length; index += 1) { + const arg = argv[index]; + if (arg === '--') continue; + else if (arg === '--promotion-mode') args.promotionMode = true; + else if (arg === '--skip-branch-check') args.skipBranchCheck = true; + else if (arg === '--skip-package-tests') args.skipPackageTests = true; + else if (arg === '--repo-root') args.repoRoot = path.resolve(argv[++index]); + else if (arg === '--help' || arg === '-h') args.help = true; + else throw new Error(`Unknown argument ${arg}`); + } + + return args; +} + +function printHelp() { + process.stdout.write( + [ + 'Usage: node scripts/check-v43-gate10-promotion-readiness.mjs [--promotion-mode] [--skip-branch-check] [--skip-package-tests] [--repo-root ]', + '', + 'Checks V43 Gate 10 promotion readiness, product route and agentic depositing artifacts, V43 promotion workflow support, source-safety, generated proof support, and V44 draft posture preparation.', + 'Use --skip-package-tests only in lightweight workflow posture jobs that do not need promotion dry-run coverage.', + ].join('\n'), + ); + process.stdout.write('\n'); +} + +function main() { + const args = parseArgs(process.argv.slice(2)); + if (args.help) { + printHelp(); + return; + } + + const root = args.repoRoot; + const failures = []; + const pointer = read(root, 'BITCODE_SPEC.txt').trim(); + const promotedPointer = args.promotionMode && pointer === 'V43'; + + assertCheck( + failures, + args.promotionMode ? ['V42', 'V43'].includes(pointer) : pointer === 'V42', + args.promotionMode + ? `BITCODE_SPEC.txt must be V42 before V43 promotion or V43 after promotion. Observed ${pointer || 'empty'}.` + : `BITCODE_SPEC.txt must remain V42 during V43 Gate 10 work. Observed ${pointer || 'empty'}.`, + ); + + if (!args.skipBranchCheck) { + const branch = git(root, ['branch', '--show-current']); + assertCheck( + failures, + branch === 'version/v43' || /^v43\/gate-10-[a-z0-9][a-z0-9-]*$/u.test(branch), + `V43 Gate 10 work must occur on version/v43 or v43/gate-10-* branches. Observed ${branch || 'detached HEAD'}.`, + ); + } + + const requiredFiles = [ + 'BITCODE_SPEC_V43.md', + 'BITCODE_SPEC_V43_DELTA.md', + 'BITCODE_SPEC_V43_NOTES.md', + 'BITCODE_SPEC_V43_PARITY_MATRIX.md', + ARTIFACT_PATH, + 'scripts/generate-v43-promotion-readiness-report.mjs', + 'scripts/check-v43-gate10-promotion-readiness.mjs', + 'scripts/promote-bitcode-canon.mjs', + 'scripts/prepare-bitcode-spec-family-promotion.mjs', + 'scripts/prepare-bitcode-runtime-canon-promotion.mjs', + 'scripts/generate-bitcode-proven.mjs', + '.github/workflows/bitcode-gate-quality.yml', + '.github/workflows/bitcode-canon-quality.yml', + '.github/workflows/v43-canon-promotion.yml', + 'packages/protocol/src/canon-posture.js', + 'packages/protocol/data/state.json', + 'packages/protocol/README.md', + 'packages/protocol/src/canonical/proven-generator.js', + 'packages/protocol/src/canonical/v43-promotion-readiness-report.js', + 'packages/protocol/test/v43-promotion-readiness.test.js', + 'packages/protocol/src/canonical/v21-specifying.js', + 'package.json', + 'README.md', + 'SPECIFICATIONS_ROADMAP.md', + ...V43_GATE_ARTIFACTS, + ]; + + for (const relativePath of requiredFiles) { + assertCheck(failures, fileExists(root, relativePath), `Missing V43 Gate 10 file: ${relativePath}`); + } + + if (failures.length === 0 && !promotedPointer) { + try { + run(root, 'node', ['scripts/generate-v43-route-vocabulary-inventory.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-packs-activity-master-detail.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-read-route-five-step-ux.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-deposit-route-options.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-deposit-policy-compensation.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-deposit-option-admission.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-route-ux-product-excellence.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-cross-route-rehearsal-telemetry-repair.mjs', '--check']); + run(root, 'node', ['scripts/generate-v43-promotion-readiness-report.mjs', '--check']); + } catch (error) { + failures.push(`V43 Gate 10 artifact freshness check failed: ${error.stderr || error.message}`); + } + } + + const artifactText = fileExists(root, ARTIFACT_PATH) ? read(root, ARTIFACT_PATH) : ''; + for (const marker of SECRET_MARKERS) { + assertCheck(failures, !artifactText.includes(marker), `${ARTIFACT_PATH} must not contain secret-shaped value ${marker}.`); + } + assertCheck(failures, !artifactText.includes('protectedSourceBody'), `${ARTIFACT_PATH} must not serialize protected source bodies.`); + + const artifact = artifactText ? JSON.parse(artifactText) : null; + if (artifact) { + assertCheck(failures, artifact.artifactId === 'v43-promotion-readiness-report', 'Promotion readiness artifactId must match.'); + assertCheck(failures, artifact.schemaId === 'bitcode.v43.promotionReadinessReport.v1', 'Promotion readiness schemaId must match.'); + assertCheck(failures, artifact.version === 'V43' && artifact.currentTarget === 'V42', 'Promotion readiness must bind V43 over active V42.'); + assertCheck(failures, artifact.passed === true, 'Promotion readiness report must pass.'); + assertCheck( + failures, + artifact.sourceSafetyVerdict === 'source-safe-v43-product-routes-agentic-depositing-promotion-metadata', + 'Promotion readiness report must be source-safe product route and agentic depositing promotion metadata.', + ); + assertCheck(failures, artifact.prePromotionPosture === 'V42 active / V43 draft', 'Promotion readiness pre-promotion posture must match.'); + assertCheck(failures, artifact.postPromotionPosture === 'V43 active / V44 draft', 'Promotion readiness post-promotion posture must match.'); + assertCheck(failures, artifact.coverage.allGateArtifactsCovered === true, 'Promotion readiness must cover all gate artifacts.'); + assertCheck(failures, artifact.coverage.allGateArtifactsParseable === true, 'Promotion readiness artifacts must be parseable.'); + assertCheck(failures, artifact.coverage.allGateArtifactsSourceSafe === true, 'Promotion readiness artifacts must be source-safe.'); + assertCheck(failures, artifact.coverage.sourceEvidenceComplete === true, 'Promotion readiness source evidence must be complete.'); + assertCheck(failures, artifact.coverage.documentationEvidenceComplete === true, 'Promotion readiness documentation evidence must be complete.'); + assertCheck(failures, artifact.coverage.generatedProofOutputsCovered === true, 'Promotion readiness must cover generated proof outputs.'); + assertCheck(failures, artifact.coverage.promotionWorkflowCovered === true, 'Promotion readiness must cover promotion workflow.'); + assertCheck(failures, artifact.coverage.gateQualityWorkflowCovered === true, 'Promotion readiness must cover gate-quality workflow.'); + assertCheck(failures, artifact.coverage.canonQualityWorkflowCovered === true, 'Promotion readiness must cover canon-quality workflow.'); + assertCheck(failures, artifact.coverage.promotionScriptCovered === true, 'Promotion readiness must cover promotion script.'); + assertCheck(failures, artifact.coverage.specFamilyPromotionScriptCovered === true, 'Promotion readiness must cover spec-family promotion script.'); + assertCheck(failures, artifact.coverage.runtimePromotionScriptCovered === true, 'Promotion readiness must cover runtime promotion script.'); + assertCheck(failures, artifact.coverage.provenGeneratorCovered === true, 'Promotion readiness must cover proven generator.'); + assertCheck(failures, artifact.coverage.valueBearingMainnetAdmission === false, 'Promotion readiness must not admit value-bearing mainnet.'); + assertCheck(failures, artifact.coverage.credentialsSerialized === false, 'Promotion readiness must not serialize credentials.'); + assertCheck(failures, artifact.coverage.protectedSourceVisible === false, 'Promotion readiness must not expose protected source.'); + assertCheck(failures, artifact.coverage.rawProtectedPromptVisible === false, 'Promotion readiness must not expose raw protected prompts.'); + assertCheck(failures, artifact.coverage.rawProviderResponseVisible === false, 'Promotion readiness must not expose raw provider responses.'); + assertCheck(failures, artifact.coverage.unpaidAssetPackSourceVisible === false, 'Promotion readiness must not expose unpaid AssetPack source.'); + assertCheck(failures, artifact.coverage.walletPrivateMaterialVisible === false, 'Promotion readiness must not expose wallet private material.'); + assertCheck(failures, artifact.validationCommands.includes('pnpm run check:v43-gate10'), 'Promotion readiness must list check:v43-gate10.'); + assertCheck( + failures, + artifact.validationCommands.includes('node scripts/promote-bitcode-canon.mjs --version V43 --commit HEAD --dry-run'), + 'Promotion readiness must list V43 promotion dry-run.', + ); + } + + const spec = read(root, 'BITCODE_SPEC_V43.md'); + const delta = read(root, 'BITCODE_SPEC_V43_DELTA.md'); + const notes = read(root, 'BITCODE_SPEC_V43_NOTES.md'); + const parity = read(root, 'BITCODE_SPEC_V43_PARITY_MATRIX.md'); + const packageJson = read(root, 'package.json'); + const gateWorkflow = read(root, '.github/workflows/bitcode-gate-quality.yml'); + const canonWorkflow = read(root, '.github/workflows/bitcode-canon-quality.yml'); + const promotionWorkflow = read(root, '.github/workflows/v43-canon-promotion.yml'); + const promoteScript = read(root, 'scripts/promote-bitcode-canon.mjs'); + const prepareSpecScript = read(root, 'scripts/prepare-bitcode-spec-family-promotion.mjs'); + const prepareRuntimeScript = read(root, 'scripts/prepare-bitcode-runtime-canon-promotion.mjs'); + const provenGenerator = read(root, 'packages/protocol/src/canonical/proven-generator.js'); + const protocolReadme = read(root, 'packages/protocol/README.md'); + const rootReadme = read(root, 'README.md'); + const roadmap = read(root, 'SPECIFICATIONS_ROADMAP.md'); + + assertCheck(failures, spec.includes('V43 promotion readiness canon'), 'V43 SPEC must define promotion readiness canon.'); + assertCheck(failures, spec.includes(ARTIFACT_PATH) && spec.includes('V43 active / draft V44'), 'V43 SPEC must include Gate 10 artifact and post-promotion posture.'); + assertCheck(failures, delta.includes('Gate 10: V43 Promotion Readiness') && delta.includes(ARTIFACT_PATH), 'V43 DELTA must define Gate 10 closure acceptance and artifact.'); + assertCheck(failures, delta.includes('promotion scripts support V43'), 'V43 DELTA must state V43 promotion script support.'); + assertCheck(failures, notes.includes('Gate 10: V43 Promotion Readiness') && notes.includes('active V43 / draft V44'), 'V43 NOTES must carry Gate 10 post-promotion posture notes.'); + assertCheck(failures, parity.includes('## Gate 10 Promotion readiness parity') && parity.includes(ARTIFACT_PATH) && parity.includes('closed'), 'V43 PARITY must close Gate 10 artifact parity.'); + assertCheck(failures, roadmap.includes('V43 Gate 10 closure anchor'), 'Roadmap must include V43 Gate 10 closure anchor.'); + assertCheck( + failures, + packageJson.includes('"generate:v43-promotion-readiness"') && + packageJson.includes('"check:v43-promotion-readiness"') && + packageJson.includes('"check:v43-gate10"'), + 'package.json must expose V43 Gate 10 generator/check scripts.', + ); + assertCheck( + failures, + gateWorkflow.includes('check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check') && + gateWorkflow.includes('elif [ "$POINTER" = "V43" ]') && + gateWorkflow.includes('--active-canon V43 --draft-target V44'), + 'Gate-quality workflow must tolerate both V42-draft and V43-promoted states.', + ); + assertCheck( + failures, + canonWorkflow.includes('check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check') && + canonWorkflow.includes('elif [ "$POINTER" = "V43" ]') && + canonWorkflow.includes('--active-canon V43 --draft-target V44'), + 'Canon-quality workflow must validate V43 promoted posture.', + ); + assertCheck( + failures, + promotionWorkflow.includes("head.ref == 'version/v43'") && + promotionWorkflow.includes('node scripts/prepare-bitcode-spec-family-promotion.mjs --version V43') && + promotionWorkflow.includes('node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V43 --next-draft V44') && + promotionWorkflow.includes('node scripts/generate-bitcode-proven.mjs --version V43') && + promotionWorkflow.includes('node scripts/check-bitcode-spec-family.mjs --version V43 --mode promoted --current-target V43') && + promotionWorkflow.includes('check-v43-gate10-promotion-readiness.mjs --promotion-mode --skip-branch-check'), + 'V43 promotion workflow must validate Gate 10 and promote V43.', + ); + assertCheck( + failures, + promoteScript.includes("if (version === 'V43')") && + promoteScript.includes('const v43Gate10Command') && + promoteScript.includes('buildDerivedV43CommitMessageBody') && + promoteScript.includes("version === 'V43'"), + 'Promotion script must support V43.', + ); + assertCheck( + failures, + prepareSpecScript.includes("if (version === 'V43')") && + prepareSpecScript.includes('V43 canonical system specification for product routes and agentic depositing') && + prepareSpecScript.includes(ARTIFACT_PATH), + 'Spec-family promotion preparation must support V43.', + ); + assertCheck( + failures, + prepareRuntimeScript.includes('--next-draft') && + prepareRuntimeScript.includes('rewritePackageReadme') && + prepareRuntimeScript.includes('rewriteRuntimeDataState'), + 'Runtime promotion preparation must preserve next-draft posture support.', + ); + assertCheck( + failures, + provenGenerator.includes('buildV43ProvenPackage') && + provenGenerator.includes('buildV43PromotionReadinessReport') && + provenGenerator.includes(ARTIFACT_PATH), + 'Proven generator must include V43 promotion package support.', + ); + assertCheck(failures, protocolReadme.includes('V43 Gate 10') && protocolReadme.includes('V43` active, `V44` draft'), 'Protocol README must document V43 Gate 10.'); + assertCheck(failures, rootReadme.includes('check:v43-gate10') && rootReadme.includes('v43-canon-promotion.yml'), 'Root README must document V43 Gate 10 scripts/workflow.'); + + if (failures.length === 0 && !args.skipPackageTests) { + try { + run(root, 'pnpm', ['--filter', '@bitcode/protocol', 'exec', 'node', '--test', '--test-force-exit', 'test/v43-promotion-readiness.test.js']); + run(root, 'node', ['scripts/promote-bitcode-canon.mjs', '--version', 'V43', '--commit', 'HEAD', '--dry-run']); + } catch (error) { + failures.push(`V43 Gate 10 package promotion tests failed: ${error.stderr || error.message}`); + } + } + + if (failures.length > 0) { + process.stderr.write(`V43 Gate 10 promotion readiness failed:\n${failures.map((failure) => `- ${failure}`).join('\n')}\n`); + process.exit(1); + } + + process.stdout.write(`V43 Gate 10 promotion readiness ok artifacts=${V43_GATE_ARTIFACTS.length} root=${artifact?.artifactRoot || 'pending'}\n`); +} + +main(); diff --git a/scripts/generate-v43-promotion-readiness-report.mjs b/scripts/generate-v43-promotion-readiness-report.mjs new file mode 100644 index 00000000..45c4712c --- /dev/null +++ b/scripts/generate-v43-promotion-readiness-report.mjs @@ -0,0 +1,69 @@ +#!/usr/bin/env node + +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { + V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH, + V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT, + buildV43PromotionReadinessReport, +} from '../packages/protocol/src/index.js'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const repoRoot = path.resolve(__dirname, '..'); +const GENERATED_AT = '2026-05-29T00:00:00.000Z'; +const EXPECTED_ARTIFACT_ID = 'v43-promotion-readiness-report'; +const EXPECTED_SOURCE_SAFETY_VERDICT = 'source-safe-v43-product-routes-agentic-depositing-promotion-metadata'; + +function parseArgs(argv) { + return { + check: argv.includes('--check'), + }; +} + +function main() { + const args = parseArgs(process.argv.slice(2)); + const artifact = buildV43PromotionReadinessReport({ + generatedAt: GENERATED_AT, + repoRoot, + }); + if ( + artifact.artifactId !== EXPECTED_ARTIFACT_ID || + artifact.sourceSafetyVerdict !== V43_PROMOTION_READINESS_SOURCE_SAFETY_VERDICT || + artifact.sourceSafetyVerdict !== EXPECTED_SOURCE_SAFETY_VERDICT + ) { + throw new Error('Unexpected V43 promotion readiness artifact identity.'); + } + const outputPath = path.join(repoRoot, V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH); + const serialized = `${JSON.stringify(artifact, null, 2)}\n`; + + if (args.check) { + const current = readFileSync(outputPath, 'utf8'); + if (current !== serialized) { + process.stderr.write( + `${V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH} is stale. Run pnpm run generate:v43-promotion-readiness.\n`, + ); + process.exitCode = 1; + return; + } + if (!artifact.passed) { + process.stderr.write(`V43 promotion readiness artifact failed:\n${artifact.failures.map((failure) => `- ${failure}`).join('\n')}\n`); + process.exitCode = 1; + return; + } + process.stdout.write( + `V43 promotion readiness artifact ok artifacts=${artifact.coverage.gateArtifactCount} root=${artifact.artifactRoot}\n`, + ); + return; + } + + mkdirSync(path.dirname(outputPath), { recursive: true }); + writeFileSync(outputPath, serialized); + process.stdout.write( + `Wrote ${V43_PROMOTION_READINESS_REPORT_ARTIFACT_PATH} artifacts=${artifact.coverage.gateArtifactCount} root=${artifact.artifactRoot}\n`, + ); +} + +main(); diff --git a/scripts/prepare-bitcode-spec-family-promotion.mjs b/scripts/prepare-bitcode-spec-family-promotion.mjs index 3f091cd5..6b24bb41 100644 --- a/scripts/prepare-bitcode-spec-family-promotion.mjs +++ b/scripts/prepare-bitcode-spec-family-promotion.mjs @@ -31,7 +31,7 @@ function printHelp() { 'Usage: node scripts/prepare-bitcode-spec-family-promotion.mjs --version V31 --commit [--repo-root ]', '', 'Rewrites the hand-authored spec family status truth for canonical promotion.', - 'Currently implemented for V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, and V42.' + 'Currently implemented for V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, and V43.' ].join('\n') ); } @@ -586,8 +586,37 @@ function rewritePromotionStatus(version, commit, content, kind) { return kind === 'parity' ? rewritePromotedParityJudgments(rewritten, version) : rewritten; } + if (version === 'V43') { + const sharedInventory = 'active canonical `.bitcode/v43-spec-family-report.json`, `.bitcode/v43-canonical-input-report.json`, `.bitcode/v43-canon-posture-drift-report.json`, `.bitcode/v43-route-vocabulary-inventory.json`, `.bitcode/v43-packs-activity-master-detail.json`, `.bitcode/v43-read-route-five-step-ux.json`, `.bitcode/v43-deposit-route-options.json`, `.bitcode/v43-deposit-policy-compensation.json`, `.bitcode/v43-deposit-option-admission.json`, `.bitcode/v43-route-ux-product-excellence.json`, `.bitcode/v43-cross-route-rehearsal-telemetry-repair.json`, `.bitcode/v43-promotion-readiness-report.json`, V43 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V43_PROVEN.md` as the generated proof appendix for V43 promotion'; + const scopeByKind = { + spec: 'V43 canonical system specification for product routes and agentic depositing across `/packs`, `/read`, `/deposit`, PackActivity search/detail, Read five-step UX, deposit AssetPack option synthesis, deposit policy/compensation, option admission, route UX product excellence, cross-route rehearsal, and promotion readiness surfaces', + delta: 'V43 canonical delta for product routes and agentic depositing over promoted V42 reliable MVP canon', + notes: 'V43 canonical notes for product routes and agentic depositing over promoted V42 reliable MVP canon', + parity: 'V43 canonical parity ledger for product routes and agentic depositing over promoted V42 reliable MVP canon' + }; + const stateByKind = { + spec: 'canonical promotion complete; V43 is the active product-route and agentic-depositing canon and the V43 hand-authored plus generated canon are aligned', + delta: 'canonical promotion complete; this delta records the promoted V42-to-V43 product-route and agentic-depositing closure set', + notes: 'canonical promotion complete; V43 notes record accepted route vocabulary, PackActivity, Reading, Depositing, policy, admission, UX, rehearsal, and promotion-readiness evidence', + parity: 'canonical promotion complete; V43 parity truth, generated product-route artifacts, gate closure, and promotion automation are aligned' + }; + const rewritten = rewriteStatusValues(content, { + Scope: scopeByKind[kind], + ...(kind !== 'delta' + ? { 'Last fully realized canonical target preserved in source': '`V43`' } + : {}), + 'Current canonical/latest target': '`V43`', + 'Canonical proof-source commit': `\`${commit}\``, + 'Generated structured artifact inventory': sharedInventory, + 'Source parity state': + 'V43 source-side route vocabulary, Packs master-detail, Read five-step UX, deposit option synthesis, deposit policy/compensation, deposit option admission, route UX, cross-route rehearsal, workflow, and promotion surfaces are canonicalized in the promoted V43 file family', + 'V43 state': stateByKind[kind] + }); + return kind === 'parity' ? rewritePromotedParityJudgments(rewritten, version) : rewritten; + } + if (!['V21', 'V22', 'V23', 'V24', 'V25'].includes(version)) { - throw new Error(`Promotion hand-authored family rewriting is currently implemented for V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, and V42. Received ${version}.`); + throw new Error(`Promotion hand-authored family rewriting is currently implemented for V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, and V43. Received ${version}.`); } const sharedInventory = version === 'V21' ? 'active canonical `.bitcode/v19-*` reproducible reports, `.bitcode/v20-*` operator-quality reports, `.bitcode/v21-spec-family-report.json`, and `.bitcode/v21-canonical-input-report.json`; `ENGI_SPEC_V21_PROVEN.md` is the active generated proof appendix for V21' diff --git a/scripts/promote-bitcode-canon.mjs b/scripts/promote-bitcode-canon.mjs index 91aa260b..0038c429 100644 --- a/scripts/promote-bitcode-canon.mjs +++ b/scripts/promote-bitcode-canon.mjs @@ -47,7 +47,7 @@ function printHelp() { 'Usage: npm run promote:canon -- --version V20 --commit [--dry-run]', '', 'Options:', - ' --version Canonical version to promote. Accepted targets: V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42.', + ' --version Canonical version to promote. Accepted targets: V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43.', ' --commit Proof-source commit to render into the generated appendix.', ' --dry-run Print the promotion plan without executing commands or writing files.', ' --allow-dirty-start Permit a dirty worktree before promotion. Not for canonical use.', @@ -576,6 +576,24 @@ function buildCommandPlan(version, commit) { const v42PromotedCanonicalInputCheckCommand = ['node', ['scripts/check-bitcode-canonical-inputs.mjs', '--current-target', 'V42']]; const v42PromotedSpecCheckCommand = ['node', ['scripts/check-bitcode-spec-family.mjs', '--version', 'V42', '--mode', 'promoted', '--current-target', 'V42']]; const v42PromotedCanonPostureDriftCommand = ['node', ['scripts/check-bitcode-canon-posture-drift.mjs', '--active-canon', 'V42', '--draft-target', 'V43']]; + const v43DraftSpecCheckCommand = ['node', ['scripts/check-bitcode-spec-family.mjs', '--version', 'V43', '--mode', 'draft', '--current-target', 'V42']]; + const v43CanonicalInputCheckCommand = ['node', ['scripts/check-bitcode-canonical-inputs.mjs', '--current-target', 'V42']]; + const v43DraftCanonPostureDriftCommand = ['node', ['scripts/check-bitcode-canon-posture-drift.mjs', '--active-canon', 'V42', '--draft-target', 'V43']]; + const v43Gate1Command = ['node', ['scripts/check-v43-gate1-packs-read-deposit-roadmap.mjs', '--skip-branch-check']]; + const v43Gate2Command = ['node', ['scripts/check-v43-gate2-route-vocabulary-inventory.mjs', '--skip-branch-check']]; + const v43Gate3Command = ['node', ['scripts/check-v43-gate3-packs-activity-master-detail.mjs', '--skip-branch-check', '--skip-uapi-tests']]; + const v43Gate4Command = ['node', ['scripts/check-v43-gate4-read-route-five-step-ux.mjs', '--skip-branch-check', '--skip-uapi-tests']]; + const v43Gate5Command = ['node', ['scripts/check-v43-gate5-deposit-route-options.mjs', '--skip-branch-check', '--skip-uapi-tests', '--skip-package-tests']]; + const v43Gate6Command = ['node', ['scripts/check-v43-gate6-deposit-policy-compensation.mjs', '--skip-branch-check', '--skip-uapi-tests', '--skip-package-tests']]; + const v43Gate7Command = ['node', ['scripts/check-v43-gate7-deposit-option-admission.mjs', '--skip-branch-check', '--skip-uapi-tests', '--skip-package-tests']]; + const v43Gate8Command = ['node', ['scripts/check-v43-gate8-route-ux-product-excellence.mjs', '--skip-branch-check', '--skip-uapi-tests']]; + const v43Gate9Command = ['node', ['scripts/check-v43-gate9-cross-route-rehearsal-telemetry-repair.mjs', '--skip-branch-check', '--skip-uapi-tests', '--skip-package-tests']]; + const v43Gate10Command = ['node', ['scripts/check-v43-gate10-promotion-readiness.mjs', '--promotion-mode', '--skip-branch-check', '--skip-package-tests']]; + const v43PreparePromotionSpecFamilyCommand = ['node', ['scripts/prepare-bitcode-spec-family-promotion.mjs', '--version', 'V43', '--commit', commit]]; + const v43PrepareRuntimePromotionCommand = ['node', ['scripts/prepare-bitcode-runtime-canon-promotion.mjs', '--version', 'V43', '--next-draft', 'V44']]; + const v43PromotedCanonicalInputCheckCommand = ['node', ['scripts/check-bitcode-canonical-inputs.mjs', '--current-target', 'V43']]; + const v43PromotedSpecCheckCommand = ['node', ['scripts/check-bitcode-spec-family.mjs', '--version', 'V43', '--mode', 'promoted', '--current-target', 'V43']]; + const v43PromotedCanonPostureDriftCommand = ['node', ['scripts/check-bitcode-canon-posture-drift.mjs', '--active-canon', 'V43', '--draft-target', 'V44']]; const inheritedProofCommands = [ ['npm', ['--prefix', 'protocol-demonstration', 'run', 'typecheck']], ['npm', ['--prefix', 'protocol-demonstration', 'run', 'test:unit']], @@ -1270,7 +1288,42 @@ function buildCommandPlan(version, commit) { ['git', ['diff', '--check']] ]; } - throw new Error(`Unsupported promotion target ${version}. Expected V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, or V42.`); + if (version === 'V43') { + return [ + v43DraftSpecCheckCommand, + v43CanonicalInputCheckCommand, + v43DraftCanonPostureDriftCommand, + v43Gate1Command, + v43Gate2Command, + v43Gate3Command, + v43Gate4Command, + v43Gate5Command, + v43Gate6Command, + v43Gate7Command, + v43Gate8Command, + v43Gate9Command, + v43Gate10Command, + ['pnpm', ['--filter', '@bitcode/protocol', 'typecheck']], + ['pnpm', ['--filter', '@bitcode/protocol', 'test']], + ['pnpm', ['--filter', '@bitcode/btd', 'typecheck']], + ['pnpm', ['--filter', '@bitcode/btd', 'test']], + ['npm', ['--prefix', 'protocol-demonstration', 'test']], + ['npm', ['--prefix', 'protocol-demonstration', 'run', 'test:v28-mvp-qa']], + ['pnpm', ['--filter', '@bitcode/pipeline-asset-pack', 'typecheck']], + ['pnpm', ['--filter', '@bitcode/pipeline-hosts', 'typecheck']], + ['pnpm', ['--filter', '@bitcode/pipeline-asset-pack', 'exec', 'jest', '--config', 'jest.config.cjs', '--passWithNoTests', '--forceExit']], + ['pnpm', ['--filter', '@bitcode/pipeline-hosts', 'exec', 'jest', '--config', 'jest.config.cjs', '--passWithNoTests', '--forceExit']], + v43PreparePromotionSpecFamilyCommand, + v43PrepareRuntimePromotionCommand, + ['node', ['scripts/generate-bitcode-proven.mjs', '--version', version, '--commit', commit, '--worktree-state', 'clean', '--output', archivedProvenOutput(version), '--allow-dirty']], + ['node', ['scripts/generate-bitcode-proven.mjs', '--version', version, '--commit', commit, '--worktree-state', 'clean', '--output', archivedProvenOutput(version), '--check', '--allow-dirty']], + v43PromotedCanonicalInputCheckCommand, + v43PromotedSpecCheckCommand, + v43PromotedCanonPostureDriftCommand, + ['git', ['diff', '--check']] + ]; + } + throw new Error(`Unsupported promotion target ${version}. Expected V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, or V43.`); } /** @@ -2364,6 +2417,58 @@ async function buildDerivedV42CommitMessageBody(commit) { ].join('\n'); } +/** + * @param {string} commit + * @returns {Promise} + */ +async function buildDerivedV43CommitMessageBody(commit) { + const { spec, delta, parity } = await readSpecFamily('V43'); + const scope = extractStatusValue(spec, 'Scope') || 'V43 canonical system specification for product routes and agentic depositing'; + const focus = deriveScopeFocus(scope) || 'product routes and agentic depositing over promoted V42 reliable MVP canon'; + const decisionSection = extractSection(delta, 'Accepted V43 decisions'); + const acceptedDecisions = extractOrderedItems(decisionSection).map(stripMarkdown); + const parityRows = [ + ...parseMarkdownTable(extractSection(parity, 'V43 implementation matrix')), + ...parseMarkdownTable(extractSection(parity, 'V43 implementation checklist')) + ]; + + /** @type {string[]} */ + const bullets = []; + for (const decision of acceptedDecisions.slice(0, 4)) { + bullets.push(trimTrailingPeriod(decision)); + } + + const prioritizedAreas = [ + 'Route vocabulary', + 'Packs master-detail', + 'Read route', + 'Deposit route', + 'Criticality/ROI policy', + 'Deposit option admission', + 'UX/UI product excellence', + 'Cross-route rehearsal', + 'Promotion readiness' + ]; + for (const area of prioritizedAreas) { + const row = findParityRow(parityRows, area); + if (!row) continue; + const closureSignal = trimTrailingPeriod( + stripMarkdown(row['Required V43 result'] || row['Closure requirement'] || row['Source evidence'] || '') + ); + if (!closureSignal) continue; + bullets.push(`${stripMarkdown(area)}: ${closureSignal}`); + } + + return [ + `Promotes V43 as ${focus} for Bitcode.`, + '', + `Proof-source commit: ${commit}`, + '', + 'The promotion carries:', + ...bullets.slice(0, 14).map((bullet) => `- ${bullet}`) + ].join('\n'); +} + /** * @param {string} version * @param {string} commit @@ -2463,7 +2568,10 @@ async function buildCommitMessageBody(version, commit) { if (version === 'V42') { return buildDerivedV42CommitMessageBody(commit); } - throw new Error(`Unsupported promotion target ${version}. Expected V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, or V42.`); + if (version === 'V43') { + return buildDerivedV43CommitMessageBody(commit); + } + throw new Error(`Unsupported promotion target ${version}. Expected V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, or V43.`); } async function main() { @@ -2474,8 +2582,8 @@ async function main() { } const version = args.version || ''; - if (!['V19', 'V20', 'V21', 'V22', 'V23', 'V24', 'V25', 'V28', 'V29', 'V30', 'V31', 'V32', 'V33', 'V34', 'V35', 'V36', 'V37', 'V38', 'V39', 'V40', 'V41', 'V42'].includes(version)) { - throw new Error(`Canonical promotion accepts --version V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, or V42. Received ${version || 'none'}.`); + if (!['V19', 'V20', 'V21', 'V22', 'V23', 'V24', 'V25', 'V28', 'V29', 'V30', 'V31', 'V32', 'V33', 'V34', 'V35', 'V36', 'V37', 'V38', 'V39', 'V40', 'V41', 'V42', 'V43'].includes(version)) { + throw new Error(`Canonical promotion accepts --version V19, V20, V21, V22, V23, V24, V25, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, or V43. Received ${version || 'none'}.`); } const commit = args.commit || ''; if (!commit) {