Skip to content

Commit 8381f43

Browse files
V32 Gate 8: Rehearse testnet and mainnet readiness
Adds package-owned typed readiness rehearsal records for local, staging-testnet, production-mainnet, and offline-disabled lanes. Generates the source-safe Gate 8 artifact, wires the checker, focused BTD test, proof matrix, deterministic replay report, workflow coverage, and V32 spec/roadmap parity updates. Keeps production-mainnet value-bearing settlement explicitly blocked while staging-testnet readiness is classified by secret presence only.
1 parent 06a66dd commit 8381f43

17 files changed

Lines changed: 1186 additions & 22 deletions

.bitcode/v32-deterministic-replay-report.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
{
1212
"artifactPath": ".bitcode/v32-proof-coverage-matrix.json",
1313
"byteEqual": true,
14-
"byteLength": 21695,
15-
"firstDigest": "sha256:61248901dde4774485f5c9e56b2c7a83a44943274058a3408c503bbcb8dd6851",
16-
"secondDigest": "sha256:61248901dde4774485f5c9e56b2c7a83a44943274058a3408c503bbcb8dd6851"
14+
"byteLength": 22024,
15+
"firstDigest": "sha256:ba6a357d344ceb075c9d2bf76f1b28314fac25caab4236f9e22a5a2fcbf2920a",
16+
"secondDigest": "sha256:ba6a357d344ceb075c9d2bf76f1b28314fac25caab4236f9e22a5a2fcbf2920a"
1717
}
1818
],
1919
"artifactId": "v32-deterministic-replay-report",

.bitcode/v32-proof-coverage-matrix.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,19 +262,19 @@
262262
{
263263
"blockers": [],
264264
"coverageStatus": "v32-expansion-required",
265-
"expectedArtifact": ".bitcode/v32-ledger-btd-settlement-failure-state-coverage.json",
265+
"expectedArtifact": ".bitcode/v32-testnet-mainnet-readiness-rehearsal.json",
266266
"failureModes": [
267267
"rls-projection-denial-without-repair",
268268
"schema-type-drift",
269269
"service-secret-leak",
270270
"telemetry-row-missing"
271271
],
272-
"fixture": "packages/orm/src/__tests__/bitcode-execution-storage.test.ts; packages/orm/src/__tests__/execution-events.test.ts; packages/orm/src/__tests__/btd-registry.test.ts; packages/orm/src/__tests__/data-health.contract.test.ts; packages/btd/__tests__/v32-ledger-btd-settlement-failure-states.test.ts",
272+
"fixture": "packages/orm/src/__tests__/bitcode-execution-storage.test.ts; packages/orm/src/__tests__/execution-events.test.ts; packages/orm/src/__tests__/btd-registry.test.ts; packages/orm/src/__tests__/data-health.contract.test.ts; packages/btd/__tests__/v32-ledger-btd-settlement-failure-states.test.ts; packages/btd/__tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts",
273273
"owner": "packages/orm; supabase/migrations; packages/pipeline-hosts",
274274
"plannedGate": "Gate 5 and Gate 8",
275275
"promotedBehavior": "Supabase/PostgreSQL projections for executions, events, pipeline runs, BTD registry, user/account state, and asset-pack evidence.",
276276
"repairPosture": "Gate 5 proves ledger/database drift repair; Gate 8 proves environment-lane readiness without printing credentials.",
277-
"replayCommand": "pnpm -C packages/orm test -- --runTestsByPath src/__tests__/bitcode-execution-storage.test.ts src/__tests__/execution-events.test.ts src/__tests__/btd-registry.test.ts src/__tests__/data-health.contract.test.ts --runInBand && pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-ledger-btd-settlement-failure-states.test.ts && pnpm run check:v32-ledger-btd-settlement-failure-states",
277+
"replayCommand": "pnpm -C packages/orm test -- --runTestsByPath src/__tests__/bitcode-execution-storage.test.ts src/__tests__/execution-events.test.ts src/__tests__/btd-registry.test.ts src/__tests__/data-health.contract.test.ts --runInBand && pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-ledger-btd-settlement-failure-states.test.ts __tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts && pnpm run check:v32-ledger-btd-settlement-failure-states && pnpm run check:v32-testnet-mainnet-readiness-rehearsal",
278278
"requiredContexts": [
279279
"pipeline_runs",
280280
"execution_events",
@@ -287,10 +287,10 @@
287287
},
288288
{
289289
"blockers": [
290-
"V32 needs source-safe object-storage fixture rows that distinguish proof artifacts from protected AssetPack source."
290+
"A future storage-provider depth gate must replace source-safe readiness classification with live provider readback for every protected-source storage adapter."
291291
],
292292
"coverageStatus": "planned-gap",
293-
"expectedArtifact": ".bitcode/v32-ledger-btd-settlement-failure-state-coverage.json",
293+
"expectedArtifact": ".bitcode/v32-testnet-mainnet-readiness-rehearsal.json",
294294
"failureModes": [
295295
"artifact-missing-after-settlement",
296296
"protected-source-upload-visible-before-payment",
@@ -302,7 +302,7 @@
302302
"plannedGate": "Gate 5 and Gate 8",
303303
"promotedBehavior": "Object-storage and artifact delivery posture for source-safe proof artifacts, protected AssetPack source, delivery receipts, and retrieval readback.",
304304
"repairPosture": "Gate 5 binds delivery receipts to paid settlement and encrypted protected-source storage; Gate 8 classifies provider connectivity by environment lane.",
305-
"replayCommand": "pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-harness.test.ts --runInBand && pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-ledger-btd-settlement-failure-states.test.ts && pnpm run check:v32-ledger-btd-settlement-failure-states && npm --prefix protocol-demonstration test -- --test-name-pattern \"storage\"",
305+
"replayCommand": "pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-harness.test.ts --runInBand && pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-ledger-btd-settlement-failure-states.test.ts __tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts && pnpm run check:v32-ledger-btd-settlement-failure-states && pnpm run check:v32-testnet-mainnet-readiness-rehearsal && npm --prefix protocol-demonstration test -- --test-name-pattern \"storage\"",
306306
"requiredContexts": [
307307
"storage publication receipt",
308308
"storage retrieval receipt",
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
{
2+
"artifactId": "v32-testnet-mainnet-readiness-rehearsal",
3+
"closureCommand": "pnpm run check:v32-gate8",
4+
"currentTarget": "V31",
5+
"generatedAt": "2026-05-22T00:00:00.000Z",
6+
"lanes": [
7+
{
8+
"blockers": [],
9+
"laneId": "local",
10+
"ledgerNetwork": "local",
11+
"network": "regtest",
12+
"postures": [
13+
"local-ledger-ready",
14+
"fixture-database-ready",
15+
"source-safe-object-storage-only",
16+
"regtest-btc-only",
17+
"rollback-root-required"
18+
],
19+
"providerConnectivity": [
20+
"local-fixtures:ready",
21+
"sandbox-host:review"
22+
],
23+
"readinessRoot": "sha256:a58fe2e8ba02508d4380de3cd6e15ac1b6820283ebacd6f33a1dd3be5ae92fb3",
24+
"secretHandling": "no-live-secret-required",
25+
"sourceSafetyClass": "source-safe-internal",
26+
"state": "ready",
27+
"valueBearingSettlementAdmitted": false,
28+
"valueBearingSettlementRequested": false
29+
},
30+
{
31+
"blockers": [],
32+
"laneId": "staging-testnet",
33+
"ledgerNetwork": "testnet",
34+
"network": "testnet",
35+
"postures": [
36+
"ledger-readback-ready",
37+
"database-readback-ready",
38+
"encrypted-protected-source-storage",
39+
"testnet-btc-only",
40+
"rollback-root-required"
41+
],
42+
"projectRef": "tkpyosihuouusyaxtbau",
43+
"providerConnectivity": [
44+
"vercel-sandbox:ready",
45+
"supabase-staging-testnet:ready",
46+
"github-delivery:ready",
47+
"model-inference:ready"
48+
],
49+
"readinessRoot": "sha256:b0ddc3908285b32db13bbeefa5ec713a0a680c081f2943b5cb2cc72a83f69177",
50+
"secretHandling": "presence-only-values-never-serialized",
51+
"sourceSafetyClass": "secret-presence-only",
52+
"state": "ready",
53+
"valueBearingSettlementAdmitted": false,
54+
"valueBearingSettlementRequested": false
55+
},
56+
{
57+
"blockers": [
58+
"production-mainnet-value-bearing-not-admitted-in-v32",
59+
"future-explicit-launch-gate-required"
60+
],
61+
"laneId": "production-mainnet",
62+
"ledgerNetwork": "mainnet",
63+
"network": "mainnet",
64+
"postures": [
65+
"ledger-represented-no-value-write",
66+
"database-non-value-readiness-only",
67+
"protected-source-locked",
68+
"mainnet-broadcast-blocked",
69+
"future-launch-gate-required"
70+
],
71+
"projectRef": "rinalyjfecxnmyczrpzo",
72+
"providerConnectivity": [
73+
"supabase-production-mainnet:review",
74+
"bitcoin-mainnet-observer:review",
75+
"github-delivery:blocked"
76+
],
77+
"readinessRoot": "sha256:7e104efa6bebac350d2882f3c8432a5eacb69bfe319e6c45b0085fb3b67862e8",
78+
"secretHandling": "presence-only-values-never-serialized",
79+
"sourceSafetyClass": "secret-presence-only",
80+
"state": "blocked",
81+
"valueBearingSettlementAdmitted": false,
82+
"valueBearingSettlementRequested": true
83+
},
84+
{
85+
"blockers": [
86+
"external-network-disabled"
87+
],
88+
"laneId": "offline-disabled",
89+
"ledgerNetwork": "offline",
90+
"network": "offline",
91+
"postures": [
92+
"no-live-ledger-write",
93+
"no-live-database-readback",
94+
"no-live-object-storage-write",
95+
"no-btc-broadcast",
96+
"fixture-only"
97+
],
98+
"providerConnectivity": [
99+
"external-network:disabled",
100+
"wallet-broadcast:disabled"
101+
],
102+
"readinessRoot": "sha256:18b0ccdf8ba5102b0f5b752665179a2c7bb346c7e54f0deeae451d72a92f3c31",
103+
"secretHandling": "no-live-secret-required",
104+
"sourceSafetyClass": "source-safe-generated-proof",
105+
"state": "disabled",
106+
"valueBearingSettlementAdmitted": false,
107+
"valueBearingSettlementRequested": false
108+
}
109+
],
110+
"passed": true,
111+
"proofCoverage": {
112+
"laneCount": 4,
113+
"localRepresented": true,
114+
"offlineDisabledRepresented": true,
115+
"productionMainnetRepresented": true,
116+
"productionMainnetValueBearingAdmitted": false,
117+
"protectedSourceSerialized": false,
118+
"rawProviderPayloadsSerialized": false,
119+
"secretPresenceClassCount": 7,
120+
"secretValuesSerialized": false,
121+
"stagingTestnetRepresented": true
122+
},
123+
"schemaId": "bitcode.v32.testnetMainnetReadinessRehearsal.v1",
124+
"secretPresenceClasses": [
125+
"sandbox-auth-token",
126+
"model-provider-key",
127+
"supabase-admin-credential",
128+
"database-admin-password",
129+
"vcs-installation-credential",
130+
"wallet-signer-capability",
131+
"production-operator-approval"
132+
],
133+
"sourceEvidence": [
134+
{
135+
"digest": "sha256:5be7cfcc9518ef8cb2e33ba3e178b7e4d07e1ad717e0b902690993ed3a364963",
136+
"relativePath": "packages/btd/src/testnet-mainnet-readiness-rehearsal.ts",
137+
"requiredTokens": [
138+
{
139+
"present": true,
140+
"token": "buildV32TestnetMainnetReadinessRehearsal"
141+
},
142+
{
143+
"present": true,
144+
"token": "production-mainnet-value-bearing-not-admitted-in-v32"
145+
},
146+
{
147+
"present": true,
148+
"token": "secret-presence-only"
149+
},
150+
{
151+
"present": true,
152+
"token": "tkpyosihuouusyaxtbau"
153+
},
154+
{
155+
"present": true,
156+
"token": "rinalyjfecxnmyczrpzo"
157+
}
158+
]
159+
},
160+
{
161+
"digest": "sha256:65f910e8e471fe199939e9c4f0ce6498b6d97f649d9cbd0ca42e38c0ee2588de",
162+
"relativePath": "packages/btd/src/btc-fee-operation.ts",
163+
"requiredTokens": [
164+
{
165+
"present": true,
166+
"token": "production-mainnet"
167+
},
168+
{
169+
"present": true,
170+
"token": "Value-bearing BTC fee settlement on mainnet requires explicit operational approval."
171+
}
172+
]
173+
},
174+
{
175+
"digest": "sha256:0c76a019063830300de0e30ebcb4f5e5b8296ac1cb912685cb3df90c61fbf971",
176+
"relativePath": "packages/btd/src/deployment-lanes.ts",
177+
"requiredTokens": [
178+
{
179+
"present": true,
180+
"token": "mainnet-value-bearing"
181+
},
182+
{
183+
"present": true,
184+
"token": "Value-bearing mainnet V27 lane requires operational approval root."
185+
}
186+
]
187+
},
188+
{
189+
"digest": "sha256:5011937c41fefefd5973b2272bdc1c0f37c707a7dced70cbb3cda1ed27cbb45d",
190+
"relativePath": "packages/btd/README.md",
191+
"requiredTokens": [
192+
{
193+
"present": true,
194+
"token": "testnet/mainnet readiness rehearsal"
195+
},
196+
{
197+
"present": true,
198+
"token": "secret-presence-only"
199+
},
200+
{
201+
"present": true,
202+
"token": "production-mainnet remains blocked"
203+
}
204+
]
205+
}
206+
],
207+
"sourceSafetyVerdict": "source-safe-readiness-metadata-secret-presence-only",
208+
"testEvidence": [
209+
{
210+
"digest": "sha256:eb849a63ffae938c1e84ad26462611202bdef67c5d4a1336e68ba7015f4a71c9",
211+
"relativePath": "packages/btd/__tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts",
212+
"requiredTokens": [
213+
{
214+
"present": true,
215+
"token": "represents every readiness lane with typed source-safe records"
216+
},
217+
{
218+
"present": true,
219+
"token": "classifies secret presence without serializing credential values"
220+
},
221+
{
222+
"present": true,
223+
"token": "keeps production-mainnet value-bearing settlement blocked in V32"
224+
},
225+
{
226+
"present": true,
227+
"token": "keeps disabled/offline rehearsal fixture-only"
228+
}
229+
]
230+
}
231+
],
232+
"version": "V32"
233+
}

.github/workflows/bitcode-gate-quality.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118
node scripts/check-v32-gate5-ledger-btd-settlement-failure-states.mjs --skip-branch-check
119119
node scripts/check-v32-gate6-interface-contract-regression-suites.mjs --skip-branch-check
120120
node scripts/check-v32-gate7-browser-accessibility-responsive-visual-proof.mjs --skip-branch-check
121+
node scripts/check-v32-gate8-testnet-mainnet-readiness-rehearsal.mjs --skip-branch-check
121122
else
122123
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
123124
exit 1
@@ -145,6 +146,7 @@ jobs:
145146
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/btd.test.ts
146147
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-ledger-btd-settlement-failure-states.test.ts
147148
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-interface-contract-regression.test.ts
149+
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts
148150
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand
149151
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/auxillaries-contract.test.ts --runInBand
150152
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/auth.test.ts --runInBand

BITCODE_SPEC_V32.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Canonical proof-source commit: none until V32 promotion
99
- Prior canonical anchor: `BITCODE_SPEC_V31.md`
1010
- Prior generated proof appendix: `BITCODE_SPEC_V31_PROVEN.md`
11-
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, generated Gate 3 `.bitcode/v32-artifact-volatility-inventory.json` and `.bitcode/v32-deterministic-replay-report.json`, generated Gate 4 `.bitcode/v32-reading-pipeline-proof-coverage.json`, generated Gate 5 `.bitcode/v32-ledger-btd-settlement-failure-state-coverage.json`, later V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
11+
- Generated structured artifact inventory: planned draft `.bitcode/v32-spec-family-report.json`, `.bitcode/v32-canonical-input-report.json`, `.bitcode/v32-canon-posture-drift-report.json`, generated Gate 2 `.bitcode/v32-proof-coverage-matrix.json`, generated Gate 3 `.bitcode/v32-artifact-volatility-inventory.json` and `.bitcode/v32-deterministic-replay-report.json`, generated Gate 4 `.bitcode/v32-reading-pipeline-proof-coverage.json`, generated Gate 5 `.bitcode/v32-ledger-btd-settlement-failure-state-coverage.json`, generated Gate 8 `.bitcode/v32-testnet-mainnet-readiness-rehearsal.json`, later V32 proof/test coverage artifacts, V32 gate-quality and promotion workflow evidence, and `BITCODE_SPEC_V32_PROVEN.md` only after promotion
1212
- Source parity state: V32 source-side proof-family replay, deterministic artifact generation, scenario matrices, cross-surface regression coverage, browser/accessibility/visual evidence, testnet/mainnet-readiness rehearsal, and promotion-proof hardening are opened but not yet closed
1313
- State: draft target opened
1414
- Active canonical pointer during draft opening: `BITCODE_SPEC.txt` -> `V31`
@@ -300,8 +300,14 @@ Gate 8 readiness rehearsal precision:
300300

301301
- Local, staging-testnet, production-mainnet, and offline/disabled lanes are typed readiness records.
302302
- Secrets are classified by presence and purpose but are never printed in logs, generated artifacts, or UI metadata.
303+
- Provider connectivity, ledger/database/object-storage posture, BTC network posture, rollback, and repair checks are source-safe.
303304
- Production-mainnet remains blocked unless a future explicit launch gate admits value-bearing settlement.
304305

306+
Gate 8 source closure is `.bitcode/v32-testnet-mainnet-readiness-rehearsal.json`, generated by `pnpm run generate:v32-testnet-mainnet-readiness-rehearsal` and checked by `pnpm run check:v32-testnet-mainnet-readiness-rehearsal` plus `pnpm run check:v32-gate8`.
307+
The package source `packages/btd/src/testnet-mainnet-readiness-rehearsal.ts` owns the typed readiness records for `local`, `staging-testnet`, `production-mainnet`, and `offline-disabled`.
308+
The focused test `packages/btd/__tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts` proves lane shape, secret-presence-only handling, staging-testnet project boundary `tkpyosihuouusyaxtbau`, production-mainnet project boundary `rinalyjfecxnmyczrpzo`, disabled/offline fixture mode, and production-mainnet value-bearing block posture.
309+
The artifact records readiness metadata, roots, source/test digests, provider connectivity classes, ledger/database/object-storage posture, BTC network posture, and rollback/repair checks only; it must never serialize credential values, raw provider payloads, protected source, or production-mainnet value-bearing approval.
310+
305311
Gate 9 promotion proof precision:
306312

307313
- V32 proof generation must support dry-run, check, and promotion modes.

BITCODE_SPEC_V32_DELTA.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ Closure acceptance:
177177
- secret presence, provider connectivity, ledger/database/object-storage posture, BTC network posture, and rollback/repair checks are source-safe;
178178
- production-mainnet remains blocked unless a future explicit launch gate admits it.
179179

180+
Gate 8 source closure is `.bitcode/v32-testnet-mainnet-readiness-rehearsal.json`, generated by `pnpm run generate:v32-testnet-mainnet-readiness-rehearsal` and checked by `pnpm run check:v32-testnet-mainnet-readiness-rehearsal` plus `pnpm run check:v32-gate8`.
181+
The implementation centers on `packages/btd/src/testnet-mainnet-readiness-rehearsal.ts` and `packages/btd/__tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts`.
182+
The record set binds local, staging-testnet, production-mainnet, and offline-disabled lanes; classifies credentials as secret-presence-only; names staging-testnet project `tkpyosihuouusyaxtbau` and production-mainnet project `rinalyjfecxnmyczrpzo`; and keeps production-mainnet value-bearing settlement blocked for V32.
183+
180184
### Gate 9: Promotion Proof Generation Hardening
181185

182186
Gate 9 hardens V32 promotion proof generation and workflow debuggability.

BITCODE_SPEC_V32_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Rehearse environment readiness without admitting value-bearing launch:
118118
- local, staging-testnet, production-mainnet, and disabled/offline lanes;
119119
- secret presence classes, provider connectivity, ledger/database/object-storage posture, BTC network posture, rollback, and repair;
120120
- production-mainnet remains blocked unless a future explicit launch gate admits it.
121+
- generated artifact `.bitcode/v32-testnet-mainnet-readiness-rehearsal.json`;
122+
- generator command `pnpm run generate:v32-testnet-mainnet-readiness-rehearsal`, checker command `pnpm run check:v32-testnet-mainnet-readiness-rehearsal`, and gate closure command `pnpm run check:v32-gate8`;
123+
- focused package test `packages/btd/__tests__/v32-testnet-mainnet-readiness-rehearsal.test.ts` proving typed lanes, secret-presence-only handling, staging-testnet and production-mainnet project boundaries, disabled/offline fixture posture, and production-mainnet value-bearing block posture.
121124

122125
### Gate 9: Promotion Proof Generation Hardening
123126

0 commit comments

Comments
 (0)