Skip to content

Her view keeps one copy of a room's blocks; a start gives a read she has since repeated or changed its outline - #5518

Closed
joelteply wants to merge 1 commit into
canaryfrom
fable/view-bloat
Closed

joelteply wants to merge 1 commit into
canaryfrom
fable/view-bloat

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

This serves the residents' speed (plan path step 1, "Fast"; order-of-work line 2, a mind's context as an epoch).

What changed

(b) One copy of each room's blocks. Grounding blocks (wall, roster, board, recall) are now keyed by the room they describe, and the header names the room ([room-wall] (room <id>)). The room comes from a new Contribution::room field: RagSourceFaculty sets it to the room it delivered for, and recall sets it too, since recall's sticky cache is already per room.

Before, blocks were keyed by faculty alone. Every switch between two rooms superseded one room's block with the other's, so each return re-appended an unchanged block. The captures show it directly: Aiko on the M5, 2026-10-26 23:07-00:25Z, sent 20-26k chars of byte-identical copies per request (an 18,755-char wall, its roster and recall). Benchy sent about 8.4k. The restarts were not the cause. They moved her into the other room, and the room switch did the re-adding. A restart's handoff is new text each time, a real new version, not a copy.

(a) A start gives superseded reads their outline. Source::superseded names items that a newer item made redundant. At a start, such an item gets at most its summary, and older items keep their own level.

The action log now records each act's typed file touches at the receipt seam. A read counts as superseded when, in the same workspace, a later act changed that file or read the same lines again. Partial re-reads, unknown ranges and batches with other output never count. The whole read stays one expand away by its handle.

The code/read result parsing now lives in one reader, open_views::file_read, shared by her open views and the action log.

Replay. New flags:

  • --engine <tok/s> prices each request at the share of its carried prefix that its own receipt says the engine kept.
  • --since <ms> limits the replay to requests captured from then on.

A captured block now offers only its newest version, and recall is one block, as the core renders them. Before this fix the replay offered every captured version of a block and alternated between them on every act.

Measured

Replay --engine 250 --since 1793052000000 (2026-10-26 22:00Z on, the M5 captures). Engine-priced prefill and seconds per request at 250 tok/s:

resident as sent (receipts) core rule today + room keys + room keys + superseded
Aiko 75ece751 730,591 tok, 183 s/req (16 with receipts) 1,060,579 tok, 177 s 1,060,579 tok, 177 s 1,056,116 tok, 176 s
Atlas e5f4141d 105,789 tok, 212 s (2) 188,373 tok, 188 s 190,060 tok, 190 s 177,166 tok, 177 s
Benchy 2f50b223 403,753 tok, 404 s (4) 760,981 tok, 338 s 762,800 tok, 339 s 702,385 tok, 312 s
Aris 8044b75b no receipts after 22:00Z not priced not priced not priced

Turnovers per run (today / room keys / superseded): Aiko 1/1/1, Atlas 0/0/0, Benchy 1/1/0. Re-reads held: Aiko 5 of 5 had 4 held, in every column.

  • Superseded reads: prefill falls 8% for Benchy and 6% for Atlas. For Aiko it is 0.4% in this window, which had only one start.
  • Room keys: the replay shows no change here. It starts at 22:00Z, inside the epoch, so every room's block is a first visit. The returns that re-added copies (the 20-26k chars per request above) are measured from the captures themselves; for Aiko they all fell inside one epoch.
  • Coverage: no item leaves the view without a level. A superseded read keeps its outline or its pointer, which is its expand handle.

Dropped from this PR

A third rule, starting a new epoch whenever that is cheaper than carrying the view at the engine's measured keep, was built and then dropped. Its replay was worse for Aiko: 1.58M tok and 264 s/request against 1.06M and 177 s. The engine's keep is bimodal (cold acts follow other minds' prefill), and the rule used the mean.

cachedTokens itself is reliable: 58 of 58 replies joined to the engine's resume lines agree within 3 tokens. The rule is #5517, which needs a cold predictor per act.

Follow-up

#5516 (owner: the airc-source owner): an already-read room backlog enters her view as one grouped item per room. Benchy's 275 turns, about 33k tokens, at 22:55Z.

Tests

  • continuum-context: 25 lib tests plus 11 example tests pass, including:
    • a_superseded_item_takes_its_summary_and_leaves_the_older_ones_whole
    • the replay's engine tests
  • continuum-cognition --lib --features continuum-engine/metal: 1192 passed, 2 ignored, 0 failed. New tests:
    • a_room_block_is_one_item_per_room
    • a_read_is_superseded_only_by_a_newer_read_of_the_same_lines_or_a_change
  • source-hygiene ratchets: every count unchanged against canary e1b9716.
  • Built in a serving-down build window. Live 15-minute read after deploy: owner Fable, on the next deploy.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…she has since repeated or changed its outline

Serves the residents' speed (plan path step 1, order-of-work line 2: a mind's context as an epoch).

(b) A grounding block (wall, roster, board, recall) is now keyed by the room it describes
(`Contribution::room`, set by `RagSourceFaculty` for the room it delivered for and by recall,
whose sticky cache is per room), and its header names the room. Keyed by faculty alone, each
switch between two rooms superseded one room's block with the other's, so every return
re-appended an unchanged block: Aiko on the M5, 2026-10-26 23:07-00:25Z, carried 20-26k chars of
identical copies per request (an 18,755-char wall, its roster and recall); Benchy ~8.4k.

(a) `Source::superseded`: a start gives an item a newer one made redundant at most its summary,
without lowering the older items. The action log records each act's typed file touches at the
receipt seam (one `open_views::file_read` reader now shared by her open views and her log); a
read is superseded when a later act in the same workspace changed the file or read the same
lines again. Its whole stays one expand away by its handle.

Replay: `--engine <tok/s>` prices each request at the share of its carried prefix its own
receipt says the engine kept, `--since` bounds the window; blocks in a capture offer only their
newest version and recall is one block, as the core renders them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Closing (Fable, WIP triage 2026-10-31). Its own Measured table is the reason: room-keyed blocks changed nothing (Aiko 1,060,579 -> 1,060,579 tok), and superseded reads saved 0.4-8% of engine-priced prefill. It conflicts in 18 files of a context layer since rebuilt (render receipt #5639, levels, tasks source). The surviving idea, a read she has since repeated getting less than Full, is Cormac's invariant 4 (Level::Repeat). The replay flags (--engine, --since) can return in a replay-only PR if needed. Branch kept.

@joelteply joelteply closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant