Skip to content

Commit c0ee7ae

Browse files
V40 Gate 8: Ledger Storage Wallet Delivery Sync
Close the V40 synchronization gate with package-backed ledger/storage proof, UAPI no-custody delivery contract, deterministic artifact generation, focused protocol and interface tests, workflow wiring, and spec/roadmap documentation. Also keep the Gate 7 browser proof predicate green as V40 advances past Gate 7.
1 parent 2f18ef7 commit c0ee7ae

21 files changed

Lines changed: 1710 additions & 4 deletions

.bitcode/v40-ledger-storage-sync.json

Lines changed: 647 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ jobs:
241241
if [ -f scripts/check-v40-gate7-browser-e2e-visual-proof.mjs ]; then
242242
node scripts/check-v40-gate7-browser-e2e-visual-proof.mjs --skip-branch-check --skip-browser-tests
243243
fi
244+
if [ -f scripts/check-v40-gate8-ledger-storage-sync.mjs ]; then
245+
node scripts/check-v40-gate8-ledger-storage-sync.mjs --skip-branch-check --skip-integration-tests
246+
fi
244247
fi
245248
else
246249
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ jobs:
370370
if [ -f scripts/check-v40-gate7-browser-e2e-visual-proof.mjs ]; then
371371
node scripts/check-v40-gate7-browser-e2e-visual-proof.mjs --skip-branch-check --skip-browser-tests
372372
fi
373+
if [ -f scripts/check-v40-gate8-ledger-storage-sync.mjs ]; then
374+
node scripts/check-v40-gate8-ledger-storage-sync.mjs --skip-branch-check --skip-integration-tests
375+
fi
373376
fi
374377
else
375378
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
@@ -496,6 +499,9 @@ jobs:
496499
if [ -f packages/protocol/test/v40-conversation-terminal-integration.test.js ]; then
497500
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-conversation-terminal-integration.test.js
498501
fi
502+
if [ -f packages/protocol/test/v40-ledger-storage-sync.test.js ]; then
503+
pnpm --dir packages/protocol exec node --test --test-force-exit test/v40-ledger-storage-sync.test.js
504+
fi
499505
pnpm --filter @bitcode/protocol test
500506
501507
- name: Test staged Reading route and Terminal harness contracts
@@ -539,6 +545,7 @@ jobs:
539545
tests/terminalInterfaceIntegrationRegression.test.ts \
540546
tests/terminalWalletBtcOperation.test.ts \
541547
tests/terminalJournalReconciliation.test.ts \
548+
tests/bitcodeLedgerStorageSync.test.ts \
542549
tests/terminalOrganizationAuthority.test.ts \
543550
tests/protocolCommercialBoundary.test.ts \
544551
tests/terminalTransactionDetailCards.test.tsx \

BITCODE_SPEC_V40.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ The app-owned `BITCODE_BROWSER_PROOF_CONTRACT` covers Terminal, Conversations, A
144144
The focused browser spec exercises five-stage Reading, selected activity detail, Conversation source-safe handoff, Exchange rights review, Docs navigation, Auxillaries live regions, reduced motion, and horizontal-overflow limits under local mock data.
145145
Gate 7 permits no missing, blocked, or exempt critical browser proof row; proof rows may include route ids, viewport ids, screenshot/trace posture, command ids, fixture roots, and source-safe coverage flags, but must not include secrets, protected source, raw protected prompts, raw provider/model responses, wallet private material, or unpaid AssetPack source.
146146

147+
## V40 Gate 8 Ledger, Database, Storage, Wallet, And Delivery Synchronization
148+
149+
Gate 8 closes synchronization coverage for the economic and delivery state that follows a worthy AssetPack preview.
150+
The package-owned `V40LedgerStorageSync` emits `.bitcode/v40-ledger-storage-sync.json` with ten source-safe rows: BTC fee finality and wallet authority, BTD read-right transfer projection, source-to-shares compensation conservation, ledger/database/object-storage reconciliation, artifact locks and source-safe storage projection, post-settlement pull-request delivery unlock, finality/drift/delivery repair posture, no-custody wallet boundary, Terminal route/interface readback, and proof-system wiring.
151+
The app-owned `BITCODE_LEDGER_STORAGE_SYNC_CONTRACT` covers settlement source-to-shares, no-custody wallet authority, and post-settlement pull-request delivery across BTC fee, BTD rights, ledger, database, object storage, wallet, VCS delivery, and Terminal readback systems.
152+
The focused proof test suite exercises the existing `AssetPackSettlementRightsDeliveryBoundary`, BTD wallet and reconciliation primitives, Terminal wallet/journal/detail readbacks, and the app contract without serializing protected source, unpaid AssetPack source, wallet private material, raw prompts, provider responses, or private settlement payloads.
153+
Gate 8 permits no missing, blocked, or lane-skipped critical synchronization row; source-bearing pull-request delivery remains withheld until payment observation, confirmed finality, source-to-shares conservation, BTD rights transfer, and ledger/database/object-storage reconciliation all agree.
154+
147155
## V40 canonical subsystem surfaces
148156

149157
### Depositing and asset supply

BITCODE_SPEC_V40_DELTA.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Gate 7 closes with package-backed `V40BrowserE2eVisualProof`, deterministic `.bi
6363
### Gate 8: Ledger, Database, Storage, Wallet, And Delivery Synchronization
6464

6565
Close synchronization and reconciliation tests for settlement, rights transfer, delivery, repair, and storage projections.
66+
Gate 8 closes with package-backed `V40LedgerStorageSync`, deterministic `.bitcode/v40-ledger-storage-sync.json`, protocol exports, app-owned current synchronization contract, source-safe rows for BTC fee finality, BTD rights, source-to-shares compensation, ledger/database/object-storage reconciliation, storage locks, post-settlement pull-request delivery, repair posture, no-custody wallet authority, Terminal readback, workflow wiring, and `check:v40-gate8`.
6667

6768
### Gate 9: Local And Staging-Testnet Rehearsal Automation
6869

BITCODE_SPEC_V40_NOTES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,11 @@ Its generated `.bitcode/v40-browser-e2e-visual-proof.json` artifact binds browse
106106
The app-owned `BITCODE_BROWSER_PROOF_CONTRACT` summarizes five product surfaces, thirteen route states, eighteen interaction states, four canonical viewports, eight accessibility assertions, and five visual proof strategies.
107107
The focused browser spec covers five-stage Reading, selected activity detail, Conversation source-safe handoff, Exchange rights review, Docs navigation, Auxillaries live regions, reduced motion, and horizontal overflow limits under local mock data.
108108
No missing, blocked, or exempt critical browser proof row is allowed in the Gate 7 artifact, and screenshot-only approval is explicitly rejected.
109+
110+
## Gate 8 implementation notes
111+
112+
Gate 8 is closed by `V40LedgerStorageSync`.
113+
Its generated `.bitcode/v40-ledger-storage-sync.json` artifact binds ledger, database, object-storage, wallet, settlement, BTD rights, source-to-shares compensation, repair, and delivery synchronization to ten source-safe rows.
114+
The app-owned `BITCODE_LEDGER_STORAGE_SYNC_CONTRACT` summarizes settlement source-to-shares, no-custody wallet authority, and post-settlement pull-request delivery surfaces with explicit delivery visibility boundaries.
115+
The focused tests prove the existing AssetPack settlement delivery boundary, BTD BTC fee/wallet/reconciliation/source-to-shares primitives, Terminal wallet/journal/detail readbacks, and source-safe UAPI contract.
116+
No missing, blocked, or lane-skipped critical synchronization row is allowed in the Gate 8 artifact; source-bearing delivery stays locked until payment, finality, compensation, BTD rights, and projection reconciliation agree.

BITCODE_SPEC_V40_PARITY_MATRIX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This matrix records the V40 testing surfaces that must become promotion-grade be
4949
| Gate 5 | Reading pipeline integration artifact | implemented |
5050
| Gate 6 | Conversation/Terminal integration artifact | implemented |
5151
| Gate 7 | Browser/visual/accessibility/responsive artifact | implemented |
52-
| Gate 8 | Ledger/database/storage/wallet/delivery sync artifact | not yet implemented |
52+
| Gate 8 | Ledger/database/storage/wallet/delivery sync artifact | implemented |
5353
| Gate 9 | Local/staging rehearsal artifact | not yet implemented |
5454
| Gate 10 | Prompt benchmark smoke and V41 readiness artifact | not yet implemented |
5555
| Gate 11 | Promotion readiness artifact and workflow | not yet implemented |

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,14 @@ Exchange, Docs, responsive viewport overflow, screenshot/trace baselines, and
560560
keyboard/landmark/status accessibility. The current app browser proof contract
561561
binds five product surfaces, thirteen route states, eighteen interaction
562562
states, four canonical viewports, and no screenshot-only approval.
563+
V40 Gate 8 adds the package-backed `V40LedgerStorageSync`, generated
564+
`.bitcode/v40-ledger-storage-sync.json`, and `check:v40-gate8` to close
565+
source-safe synchronization proof for BTC fee finality, BTD read-right
566+
projection, source-to-shares compensation, ledger/database/object-storage
567+
reconciliation, storage locks, no-custody wallet authority, Terminal readback,
568+
repair posture, and post-settlement pull-request delivery. The current app
569+
ledger/storage sync contract keeps source-bearing AssetPack delivery invisible
570+
until settlement, BTD rights, compensation, and projection readbacks agree.
563571
V38 Gates 1 through 11 are wired through `pnpm run check:v38-gate1`,
564572
`pnpm run check:v38-gate2`, `pnpm run check:v38-gate3`,
565573
`pnpm run check:v38-gate4`, `pnpm run check:v38-gate5`,

SPECIFICATIONS_ROADMAP.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
- Current active canonical pointer: `BITCODE_SPEC.txt` -> `V39`
66
- Current active canon: `BITCODE_SPEC_V39.md`
77
- Current draft target: `BITCODE_SPEC_V40.md`.
8-
- Current working gate: V40 Gate 7 Browser E2E, Accessibility, Responsive, And Visual Proof.
9-
- Next queued gate after V40 Gate 7 closure: V40 Gate 8 Ledger, Database, Storage, Wallet, And Delivery Synchronization.
8+
- Current working gate: V40 Gate 8 Ledger, Database, Storage, Wallet, And Delivery Synchronization.
9+
- Next queued gate after V40 Gate 8 closure: V40 Gate 9 Local And Staging-Testnet Rehearsal Automation.
1010
- Latest closed version: V39 Commercial Reading Readiness, which promoted Depository supply indexing, enterprise five-step Reading UX, ReadNeed review/resynthesis, ReadFitsFinding many-candidate runtime, source-safe AssetPack preview and deterministic BTC quote, settlement rights delivery, operational telemetry/repair readback, interface parity, local/staging rehearsal, and V39 promotion readiness.
1111
- 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.
1212
- V39 Gate 9 closure anchor: commercial Reading readiness now owns package-backed `ReadingInterfaceProductParity`, deterministic `.bitcode/v39-interface-conversation-product-parity.json`, Terminal/Conversation/API/MCP/ChatGPT/package-consumer no-bypass rows, source-safe contract readback, BTD interface root composition, focused package/interface tests, and workflow wiring through `check:v39-gate9`.
@@ -19,6 +19,7 @@
1919
- V40 Gate 5 closure anchor: exhaustive testing now owns package-backed `V40ReadingPipelineIntegrationCoverage` source, deterministic `.bitcode/v40-reading-pipeline-integration-coverage.json`, nine source-safe Reading integration surfaces for pipeline topology, ReadNeed runtime, ReadFitsFinding search runtime, PTRR agent integration, preview/settlement/delivery boundaries, telemetry/repair readback, Terminal API harness integration, primitive/host integration, and local/staging rehearsal linkage, protocol exports, package tests, workflow wiring, and `check:v40-gate5`.
2020
- V40 Gate 6 closure anchor: exhaustive testing now owns package-backed `V40ConversationTerminalIntegration` source, deterministic `.bitcode/v40-conversation-terminal-integration.json`, eight source-safe Conversation/Terminal integration surfaces for Terminal handoff route contracts, Conversation stream-to-rich-log projection, route/API persistence and branch contracts, writing/source selector handoff, Terminal Reading state readback, Terminal harness log streaming, transaction-cockpit authority boundaries, and rehearsal/docs/interface parity, protocol exports, focused UAPI integration test, package tests, workflow wiring, and `check:v40-gate6`.
2121
- V40 Gate 7 closure anchor: exhaustive testing now owns package-backed `V40BrowserE2eVisualProof` source, deterministic `.bitcode/v40-browser-e2e-visual-proof.json`, eight source-safe browser proof surfaces for Terminal, Conversations, Auxillaries, Exchange, Docs, responsive viewport overflow, screenshot/trace baselines, and keyboard/landmark/status accessibility, app-owned current browser proof contract, focused Jest and Playwright proof tests, workflow wiring, optional browser lane, and `check:v40-gate7`.
22+
- V40 Gate 8 closure anchor: exhaustive testing now owns package-backed `V40LedgerStorageSync` source, deterministic `.bitcode/v40-ledger-storage-sync.json`, ten source-safe synchronization surfaces for BTC fee finality, BTD rights projection, source-to-shares compensation, ledger/database/object-storage reconciliation, storage locks, post-settlement pull-request delivery, repair posture, no-custody wallet authority, Terminal route/interface readback, and proof/workflow wiring, app-owned current synchronization contract, focused protocol/package/UAPI tests, workflow wiring, and `check:v40-gate8`.
2223
- Forward planning note: V41 should focus singularly on Prompt and PromptPart implementation quality: prompts as programs. V38's inference correctness hardening and V40's testing/benchmark depth should empower V41 to examine every raw PromptPart, every composed Prompt, every benchmark, every meaningfully benchmarkable semantic part, title, template, interpolation contract, registry binding, inference callsite, and downstream parsed return type; then repartition, retitle, rewrite, catalogue, and validate them across Reading pipelines and conversational interactions. V41 should primarily harden `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis` prompt surfaces while also covering conversational and other inference prompts with the same catalogue-and-benchmark discipline.
2324
- V34 Gate 2 closure anchor: deployment-depth now owns package-backed `DeploymentHostCapabilityCatalog` and `EnvironmentLaneContract` source, deterministic `.bitcode/v34-deployment-host-capability-catalog.json` and `.bitcode/v34-environment-lane-contracts.json`, and visible `value-bearing-mainnet` blocking through `blocked_future_canon_required`.
2425
- V34 Gate 3 closure anchor: deployment-depth now owns package-backed `DistributedExecutionRuntimeReceipt` source, deterministic `.bitcode/v34-distributed-execution-runtime-receipts.json`, `request_response_not_required` long-running work posture, and source-safe roots for pipeline, PTRR agent, ThricifiedGeneration, tool, ledger, wallet, proof, object-storage, and repair work.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@
264264
"generate:v40-browser-e2e-visual-proof": "node scripts/generate-v40-browser-e2e-visual-proof.mjs",
265265
"check:v40-browser-e2e-visual-proof": "node scripts/generate-v40-browser-e2e-visual-proof.mjs --check",
266266
"check:v40-gate7": "node scripts/check-v40-gate7-browser-e2e-visual-proof.mjs",
267+
"generate:v40-ledger-storage-sync": "node scripts/generate-v40-ledger-storage-sync.mjs",
268+
"check:v40-ledger-storage-sync": "node scripts/generate-v40-ledger-storage-sync.mjs --check",
269+
"check:v40-gate8": "node scripts/check-v40-gate8-ledger-storage-sync.mjs",
267270
"generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs",
268271
"check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check",
269272
"check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs",

0 commit comments

Comments
 (0)