Stop acceptance withdraws host-held sends and records its Stop in one rollback
boundary; reopen marks only while a card waits; a quit cut is written only for a
presented interrupted turn whose cut is absent.
Replace projection-backed status, work, observer and input facts with named current-row queries while preserving the existing policy and result shapes. Page eligible headers before payloads, preserve independent sending and entered phase order, and retain raw versus visible boundaries.
Cover imported ownership and aliases, scoped cuts, retained end and handover evidence, stopped-history coverage, and complete input populations across keyset pages with real SQLite regressions.
The record store now opens from the same worker database that loads its
records, commits transactions and lone receipts as named store effects,
and adopts a draft only after the acknowledged commit. Failed closes stay
owned until they succeed. Command receipts and workspace attention become
async worker reads; clear lineage derives from held conversations.
Queue list/get/revision/cleared-through/next-input-card/pauses/user-stop/reopen-mark
now run named SQL on current cards, head pause facts, persisted edit holds and the
finite recovery index, sharing the writer's bounded selector instead of a reducer shell.
Context clear, rewind and epoch replacement now run as named writer
transactions over the current chat rows. Removal deletes the current item
and keeps a higher tombstone, removed-turn membership and every independent
original (attempts, receipts, aliases, queue rows) in the same transaction,
refreshing Stop notes, queue failure holds, turn scope and the failure
boundary. Epoch replacement starts a new context in the same physical epoch.
Production still uses the existing journal path.
Replace the facade-backed item reads with readJournalDomainItems(db, target, operation),
which runs synchronously on the caller's reader snapshot against journal_items, aliases,
tombstones, name memberships and current submission attempts. Each read seeks a typed
scalar index and decodes only the rows it returns; the continuation export pages items
and sends in bounded keyset chunks.
journal-domain-item-read-columns.ts supplies the item-read columns, their indexes and the
pure per-revision extractor for frozen 001 and the single item/import upsert. Lifecycle
reads and the point-read dispatch are wired separately during the runtime flip.
Backward, tail and hydrate pages now take each header's sent size and current
submission size from the bounded header query, admit whole sequence groups by
those sizes, and only then load the admitted bodies and submissions. An
oversized lone group becomes placeholders without decoding its bodies. Forward
pages pick the longest event prefix whose touched rows fit by the same sizes
before the existing replay builder reads current rows. The roster finds each
unnamed subagent's earliest visible naming row through one indexed lookup per
id instead of scanning every naming row.
The sent-size column and the subagent-name relation are a new migration body
for the central migration list; item writers call the bounds write after each
upsert.