Skip to content

Commit 3609040

Browse files
docs(plans): reader-seat rebuild — build the seat beside the deciders under __TEST__, differential, then swap
Co-authored-by: Cursor <[email protected]>
1 parent 9bd9c34 commit 3609040

2 files changed

Lines changed: 326 additions & 25 deletions

File tree

‎documentation/plans/reader-seat-brief.md‎

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -85,31 +85,40 @@ Each pin cites the rule by id in a comment and the scenario where one exists
8585

8686
Baseline must be zero on E4/E5/E9 after §2 lands.
8787

88-
## 4. The carve, with four changes to the design
89-
90-
The model (§2 of the design) and the table (§2.5) stand. These change:
91-
92-
1. **Step 1 runs against the generator before step 2.** The shadow seat under
93-
`__TEST__` computes the table's predicted slot beside every decider and
94-
asserts agreement — on the suite _and_ on 50k generator cases per seed.
95-
Every mismatch is a table error or a bug on `next`. The table is correct
96-
before any behaviour moves. The two invariants — a leaf never raises its
97-
world; posture is never inherited — are pinned as `INV-*` here, not at
98-
step 9.
99-
2. **Step 4 is stated honestly.** `t._verdict` (today `newLane(t)`) stays as
100-
the record; `_ahead` is a rename and the design says so. What goes is
101-
seating verdict passes through `passLane` and the `_parent._verdict === l`
102-
arms (`core.ts:361`, `lanes.ts:645`, `:672`, `:934`, `verdict.ts:442`,
103-
`route`). Verdicts need no node set: `latest()` is read-level (D-27), so
104-
the posture is the whole mechanism. The isPending-page byte figure is
105-
re-derived from what actually becomes unreachable in `lanes.ts`, or
106-
dropped. R7 is the semantic reason verdict work must not use the lane
107-
read path: that path's visibility rule is the optimistic one.
108-
3. **Bytes are a tracked budget, not a per-step gate.** Steps 2–4 may be
109-
transiently positive. The hard check is after P0 and at step 9: the floor
110-
and compiled hello world do not grow. CodSpeed on every step as before.
111-
4. **Serial merges, isolated worktrees.** One PR lands at a time; each
112-
rebases; no two agents share a git store (the #4366/#4373 incident).
88+
## 4. The carve: rebuild beside, then swap
89+
90+
The model and the table stand; the plan is no longer the nine-step fold.
91+
The design is `reader-seat-rebuild.md`: the seat and the slot table are
92+
built _beside_ the existing deciders as `core/seat.ts` (+ the display-ahead
93+
rows in `verdict.ts` and a `lanes.ts` core/layer split), reachable only
94+
under `__TEST__`, and asserted against every decider on every read and
95+
every pass; then one PR makes the seat live and deletes the deciders. Three
96+
to five PRs (`reader-seat-rebuild.md` §5):
97+
98+
- **S0** — shadow under `__TEST__`, `INV-seat` pinned (a leaf never raises
99+
its world; posture is never inherited; the shadow agrees), differential
100+
on the suites, the oracle and 50k generator cases per seed (3289, 91501,
101+
7; owned and unowned; every pair). Every mismatch is a table error (fix
102+
the row, say so) or a bug on `next` (file it with rule id and row; do not
103+
fix in S0). Dist byte-identical.
104+
- **S1** — the seat is live; `frameRead`, `bornInto`, `joinPass`,
105+
`readerSeesCommitted`, `stagedScreen`, `stagedRead`, `route`,
106+
`verdictValue`'s arms, `laneRead`'s arms and the duplicated hold arms of
107+
`read`/`serve` go. `t._verdict` (today `newLane(t)`) stays as the record;
108+
verdict passes are seated by posture, not `passLane`; verdicts have no
109+
node set (`latest()` is read-level, D-27). R7 is the semantic reason
110+
verdict work must not use the lane read path.
111+
- **S2** — `lanes.ts` split into a sub-hold core and the optimistic layer;
112+
the isPending-only byte saving is **measured** (`scripts/size`), not
113+
estimated.
114+
- **S3** — bits and hooks freed (`JOINED`, `STAGED_READ`, `LANE_READ`,
115+
`PROBED`; `FRAME_READ`+`SCREEN_READ` → one STALE bit).
116+
- **S4** (deferred) — store shims replaced with the store twins (§6).
117+
118+
Gates: S0 differential zero; S1 and S3 floor scenario and compiled hello
119+
world not above `next` post-P0; CodSpeed on every PR. Serial merges,
120+
isolated worktrees — one PR lands at a time, each rebases, no two agents
121+
share a git store (the #4366/#4373 incident).
113122

114123
The byte case is not the justification. The justification is the drift in
115124
§1 and the bug concentration the audit measured. Say that in the PR bodies.

0 commit comments

Comments
 (0)