You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Close V29 Gate 3 with BTD-owned BTC fee quote lifecycle, signer-session recovery, blocked-readiness receipts, and operation posture.
Expose operation posture through the BTC fee route and add a source-safe Terminal Wallet/BTC detail section with focused package, route, UI, spec, and gate-quality coverage.
-`TerminalTransactionReadModel`: typed operator projection of a selected `TerminalTransaction`, including route state, active detail section, low-detail summary, section availability, expandable audit posture, and source-safe raw-payload boundary.
162
165
@@ -191,14 +194,37 @@ The Terminal transaction read model must contain:
- route state with canonical hrefs for each section and with the former `runId` carrier removed on write;
193
196
- low-detail default summary, metrics, and posture chips sufficient for ordinary operation without opening raw JSON;
194
-
- section read models for Shippables, identity, closure, proofs, history, journal, activity stream, and console;
197
+
- section read models for Shippables, identity, Wallet/BTC, closure, proofs, history, journal, activity stream, and console;
195
198
- explicit section availability: available, empty, or blocked with an operator-readable reason;
196
199
- expandable detail metadata preserving row counts, metric counts, payload availability, and target DOM section ids;
197
200
- a source-safe disclosure boundary: protected AssetPack source is never displayed before settlement, and raw payloads remain audit detail rather than the default operator contract.
198
201
199
202
The model is deterministic from execution history, detail readback, route query state, and data mode.
200
203
It must tolerate partial live readback by preserving a fallback selected-run projection while naming empty or blocked sections.
201
204
205
+
## V29 Wallet/BTC operation canon
206
+
207
+
Wallet and BTC fee state is an ordinary Terminal transaction surface, not an opaque settlement footnote.
208
+
The canonical wallet/BTC operation model is owned by `packages/btd` and projected by Terminal.
209
+
210
+
The operation model must contain:
211
+
212
+
- quote lifecycle: quoted, accepted, expired, superseded, and failed;
213
+
- deterministic quote root over quote id, purpose, network, sats, measurement root, issue time, and expiration;
214
+
- signer recovery: missing, prepared authorization required, stored authorization requiring live reconnect, expired, revoked, failed, network mismatch, capability missing, server-custody rejected, or live authorized;
215
+
- PSBT handoff: accepted quote prepares a PSBT; the wallet signs; the signed PSBT broadcasts;
- blocked-readiness receipts naming the blocker id, summary, required action, quote id, wallet session id, receipt id, and no-server-custody posture;
218
+
- Terminal read rows and metrics for state, network, sats, confirmations, quote root, wallet session, payer wallet, PSBT handoff, txid, server custody, and next action.
219
+
220
+
No server component may custody the Reader private key.
221
+
Server-side routes may prepare receipts, validate proofs, serialize quote/posture evidence, and persist registry rows only when explicitly requested.
222
+
They must not claim signature, broadcast, finality, settlement unlock, or rights transfer without matching receipt and readback evidence.
223
+
224
+
The Terminal Wallet/BTC section is source-safe before settlement.
225
+
It may reveal quote roots, state labels, txids, and readiness blockers.
226
+
It may not expose protected AssetPack source, wallet secrets, provider tokens, or private signing material.
227
+
202
228
## V29 canonical subsystem surfaces
203
229
204
230
### Depositing and asset supply
@@ -265,10 +291,10 @@ It must tolerate partial live readback by preserving a fallback selected-run pro
- Current algorithms and derivation rules: Share-to-Fee pricing is deterministic from measurement weights and measurement volume; BTC fee payment gates protected-source unlock and read-license/right transfer.
268
-
- Current invariants and fail-closed conditions: settlement conservation drift, missing payment proof, stale fee quote, reorg, replacement, broadcast failure, or custody ambiguity blocks finality.
269
-
- Current proof obligations: quote root, PSBT state, txid or blocked-readiness receipt, ledger anchor, source-to-shares report, and reconciliation result.
270
-
- Current source-bearing implementation basis: `packages/btd` fee/range/journal/reconciliation primitives, UAPI settlement routes, Terminal payment UI, and Supabase projections.
271
-
- Current validating commands and parity basis: BTD tests, settlement route tests, staging ledger/database readback, and V29 gate checks.
294
+
- Current invariants and fail-closed conditions: settlement conservation drift, missing payment proof, stale fee quote, unaccepted quote, missing signer capability, reorg, replacement, broadcast failure, or custody ambiguity blocks finality.
295
+
- Current proof obligations: quote root, signer recovery state, PSBT state, txid or blocked-readiness receipt, ledger anchor, source-to-shares report, and reconciliation result.
296
+
- Current source-bearing implementation basis: `packages/btd` fee/range/journal/reconciliation primitives, UAPI settlement routes, Terminal Wallet/BTC section, and Supabase projections.
297
+
- Current validating commands and parity basis: BTD tests, settlement route tests, Terminal wallet/BTC tests, staging ledger/database readback, and V29 gate checks.
-`packages/btd` defines `BtcFeeQuote`, `WalletSignerSessionRecovery`, `BtcFeeBlockedReadinessReceipt`, and `BtcFeeOperationPosture`.
105
+
- BTC fee quotes have deterministic quote roots, accepted/expired/superseded/failed lifecycle transitions, BTC-only fee asset, and measurement-root pricing posture.
106
+
- Signer recovery distinguishes missing, prepared, stored reconnect, expired, revoked, failed, network mismatch, capability missing, server-custody rejected, and live authorized states.
107
+
- BTC fee operation posture maps accepted quote, PSBT-ready, signed, broadcast, confirmed, replaced, reorged, failed, and blocked states into next actions and settlement booleans.
108
+
- The BTC fee API serializes operation posture and accepts JSON-safe quote carriers without mutating registry rows unless explicitly requested.
109
+
- Terminal adds a Wallet/BTC transaction detail section with source-safe metrics, rows, blockers, quote root, signer session, PSBT handoff, txid, finality, and server-custody posture.
110
+
- Gate-quality CI runs the Gate 3 checker plus BTD operation and Terminal Wallet/BTC tests.
111
+
102
112
### Gate 4: Reading Transaction Recovery And Pipeline Observability
103
113
104
114
Gate 4 owns deep Terminal visibility over `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis`, including execution, phase, PTRR agent, PTRR step, ThricifiedGeneration, prompt, tool, output, and typed parse telemetry.
Copy file name to clipboardExpand all lines: BITCODE_SPEC_V29_NOTES.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ For a simplified reading of V29:
56
56
57
57
3.**Gate 3: Wallet Signer Session And BTC Fee Operations**
58
58
- Deepen signer-session recovery, BTC fee quote, PSBT handoff, broadcast, replacement, reorg, failure, and blocked-readiness states.
59
+
- Acceptance detail: BTC quote lifecycle and signer recovery are package-owned primitives; API responses expose JSON-safe operation posture; Terminal exposes Wallet/BTC as a route-owned transaction detail section with blockers before raw payloads.
59
60
60
61
4.**Gate 4: Reading Transaction Recovery And Pipeline Observability**
61
62
- Make `ReadNeedComprehensionSynthesis` and `ReadFitsFindingSynthesis` execution telemetry fully readable in Terminal at execution, phase, PTRR agent, PTRR step, ThricifiedGeneration, prompt, tool, raw output, and parsed output levels.
@@ -106,6 +107,19 @@ The low-detail default should answer:
106
107
107
108
The detailed view may still carry raw payload accordions for audit, but the ordinary collapsed view must be typed and readable.
108
109
110
+
## Gate 3 working notes
111
+
112
+
Gate 3 makes wallet and BTC fee operation readable and typed before the later settlement-repair gate.
113
+
114
+
Accepted Gate 3 posture:
115
+
116
+
- BTC fee quote lifecycle and quote-root derivation live in `packages/btd`.
117
+
- Signer-session recovery is explicit and never implies server custody.
118
+
- PSBT, signed, broadcast, confirmed, replaced, reorged, failed, and blocked readiness are represented as operation posture, not prose-only route errors.
119
+
- The BTC fee API can serialize the operation posture and normalize JSON-safe quote carriers.
120
+
- Terminal has a Wallet/BTC detail section so fee readiness is visible before raw ledger payload inspection.
121
+
- Gate 3 does not implement settlement reconciliation repair; Gate 6 owns drift repair and ledger/database reconciliation action depth.
122
+
109
123
## Later-version boundaries
110
124
111
125
- V30 remains reserved for Protocol/BTD hardening that is not necessary to close Terminal transaction depth.
Copy file name to clipboardExpand all lines: BITCODE_SPEC_V29_PARITY_MATRIX.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ No `_legacy/` source is active source truth.
50
50
| Draft family and branch posture | Gate 1 |`BITCODE_SPEC_V29.md`, DELTA, NOTES, PARITY, `BITCODE_SPEC.txt`, branch `v29/gate-1-objectives-and-gating`| drafted | V29 family validates in draft mode over active V28 and `check:v29-gate1` passes. |
51
51
| Workflow retargeting | Gate 1 |`.github/workflows/bitcode-gate-quality.yml`, `.github/workflows/bitcode-canon-quality.yml`| drafted | CI checks V28 active / V29 draft posture instead of stale V27/V28 posture. |
52
52
| Terminal transaction read models | Gate 2 |`uapi/app/terminal/terminal-transaction-read-model.ts`, `uapi/app/terminal/terminal-transaction-query.ts`, `TerminalTransactionWorkspace.tsx`, `TerminalTransactionDetailSurface.tsx`, UAPI tests, Gate 2 checker | drafted | Terminal transaction state is URL-addressable, recoverable, typed, low-detail by default, and expandable without raw JSON as the ordinary operator contract. |
53
-
| Wallet signer/BTC operations | Gate 3 |`packages/btd`, wallet API, BTC fee route, Terminal wallet UI | pending| Signer session, PSBT, broadcast/finality/reorg/replacement/failure states are ordinary Terminal states. |
53
+
| Wallet signer/BTC operations | Gate 3 |`packages/btd/src/btc-fee-operation.ts`, BTC fee route, Terminal Wallet/BTC detail section, BTD and UAPI tests, Gate 3 checker | drafted| Signer session, PSBT, broadcast/finality/reorg/replacement/failure states are ordinary Terminal states. |
@@ -115,3 +116,26 @@ Gate 1 is complete when the V29 draft family validates, `check:v29-gate1` passes
115
116
## Gate 2 completion condition
116
117
117
118
Gate 2 is complete when Terminal selected transaction state rewrites recoverable URLs, a typed read model drives detail navigation and low-detail summaries, focused tests pass, `check:v29-gate2` passes, CI invokes the checker, docs name the implemented source surfaces, and the gate branch is committed and pushed for review into `version/v29`.
119
+
120
+
## Gate 3 Parity
121
+
122
+
| Requirement | Source evidence | Current V29 judgment |
| Gate 3 checker is wired to package scripts and CI |`scripts/check-v29-gate3-wallet-signer-btc-operations.mjs`, `package.json`, gate workflow | drafted |
131
+
132
+
## Gate 3 accepted boundaries
133
+
134
+
- Gate 3 does not implement full settlement reconciliation repair; Gate 6 owns drift repair and readback repair actions.
135
+
- Gate 3 does not expose protected AssetPack source before settlement.
136
+
- Gate 3 does not broadcast value-bearing mainnet transactions.
137
+
- Gate 3 does not add versioned API routes or source identifiers.
138
+
139
+
## Gate 3 completion condition
140
+
141
+
Gate 3 is complete when package primitives model BTC quotes, signer recovery, operation posture, and blocked readiness; API responses serialize operation posture; Terminal has a Wallet/BTC route-owned detail section; focused package and UAPI tests pass; `check:v29-gate3` passes; CI invokes the checker and tests; docs name the implemented source surfaces; and the gate branch is committed and pushed for review into `version/v29`.
0 commit comments