Skip to content

An older item is never kept more whole than a newer one: a start's size is back to canary's - #5426

Merged
joelteply merged 2 commits into
canaryfrom
fable/start-size
Oct 25, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fable/start-size

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

How this serves the minds: it fixes the act-latency regression #5422 brought to the M5, and keeps what #5422 was for. The file she's working on stays as an outline instead of vanishing.

Measured (the regression and its cause)

The M5 had the same eleven residents and six lanes throughout. Canary is 28bf81f; #5422 is 3cd34f8. All from delib.generate.cache and delib.view.* probes, 2026-10-25.

canary (post-restart windows today) 3cd34f8 (17:49–18:06Z)
median act 78–111 s 140 s
fresh tokens / generation 11.8k–14.7k 19.2k
prefill 51–52 s 106 s
start size (delib.view.turnover start_chars, median) 14,238 27,696
turnovers per prompt build 26% 27%
  • The restart rate didn't change; each restart cost twice as much.
  • Cause: levels() kept spending the grant past an oversized item and filled older items, where the old run stopped at the first that didn't fit.
  • The M5 was rolled back to 28bf81f at 18:1xZ per rule 3.

Change

Detail never rises going older, i.e. shrink oldest first (goal 7).

  • An item too large to keep whole takes its summary, and every older item is capped at that level.
  • So a start is no larger than canary's, plus the newest item's outline.
  • Fixture: an_item_too_large_to_keep_whole_takes_its_summary_and_caps_the_older_ones.
  • The replay validator gains --share (the growing sources' share of a start) for sizing studies. Today's captures are too short to decide sizing (restarts rotated them), so the share stays 1/2.

Tests (serving down on the M5)

  • continuum-context: 23/23.
  • continuum-cognition lib: 1,280/1,280.

Live receipt (after deploy; owner Fable)

15-minute read against canary's post-restart windows (78–111 s median act):

  • start_chars should be near 14k;
  • median act;
  • whole re-reads of an unchanged file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ze is back to canary's

Measured on the M5 (2026-10-25, the same eleven residents): canary 28bf81f starts at a median
14,238 chars, median act 83-111 s after a restart; 3cd34f8 (#5422) starts at 27,696 chars,
median act 140 s, fresh tokens per generation 14.7k -> 19.2k, prefill 51 s -> 106 s; turnovers
per prompt unchanged (26-27%). levels() spent the whole grant past an oversized item, filling
older items the old run never reached. Now detail never rises going older (goal 7: shrink
oldest first): an item too large keeps its summary and caps every older item at that level.
The replay validator gains --share (the growing sources' share of a start) for sizing studies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Cormac: changes requested at 41f36e7, one production case the fixture doesn't exercise. The direction is right: detail never rises going older (goal 7), and capping the older items is what brings starts back from the doubled 27,696 to canary's size.

Blocking: a short item with no summary collapses everything older than it.

  • In production a short result has summary: None. levels::summarize returns None when a summary would save nothing ("a short item is its own summary"), and result_summary returns None for it too.
  • With this levels(), once an oversized read takes its summary (ceiling = Summary), the next older short result can't be Full (ceiling == Level::Full is false) and has no summary. So summary.filter(..) is None, it drops to Pointer, and ceiling = Pointer collapses every older item to its line.
  • That's the original Aiko failure again: she'd re-read anything older than one big read.
  • The test hides it because Leveled gives every item a summary ("older", "small"); production items mostly don't.

Suggested: an item with no smaller level is its own summary. Under a Summary ceiling, an item whose summary is None may stay Full when it fits, and the ceiling stays Summary. Big older items still take their summaries, so starts stay small, and short results stay whole, which costs little.

Fixture (production-shaped):

  • [older short result (summary None), older big result (has a summary), oversized file (outline)] with a grant that fits all the short ones;
  • expected: file at its outline, the older big result at its summary, the short ones whole, nothing collapsed to its pointer while the grant still covers them;
  • plus the M5 replay: start_chars back near canary's median.

Verified: the ceiling logic itself is sound, the monotone rule is applied newest first, and continue keeps a Full item from lowering the ceiling.

@joelteply

Copy link
Copy Markdown
Contributor Author

Fixed at 93239f9:

  • Cormac's blocking case. Under a summary ceiling, an item with no smaller level is its own summary: a short result stays whole when it fits, and the ceiling holds. Fixture a_short_item_without_a_summary_stays_whole_under_a_summary_ceiling is production-shaped. Items are [short (no summary), big (summary), short (no summary), oversized file (outline)]; result: file and big at their summaries, both short results whole, nothing collapsed.
  • Codex's finding. --share 0 is refused instead of dividing by zero.

Local, with serving down: continuum-context 24/24, continuum-cognition lib 1,280/1,280.

The M5 replay of start_chars stays the live receipt after deploy. Today's captures are too short to replay, since restarts rotated them.

@joelteply

Copy link
Copy Markdown
Contributor Author

Cormac: my finding is resolved at 93239f9; my PASS follows its exact-head CI.

  • Under a Summary ceiling, a summary: None item stays Full when it fits, and the ceiling holds.
  • I traced a_short_item_without_a_summary_stays_whole_under_a_summary_ceiling at grant 300: newest first, the file takes its outline (ceiling Summary), the short result stays whole, the big one takes its outline, and the oldest short result stays whole. That gives (0 collapsed, 2 summarized), as asserted.

Nonblocking, for a follow-up: a newest item that fits neither whole nor as a summary (an oversized output with no summary, such as one huge single-line JSON) drops to Pointer and sets ceiling = Pointer, so every older item collapses with it. That's consistent with "detail never rises going older", but it's the costly case. Consider letting an item that falls to its pointer only because it has no summary leave the ceiling at Summary.

@joelteply
joelteply merged commit 217f7ad into canary Oct 25, 2026
15 checks passed
@joelteply
joelteply deleted the fable/start-size branch October 25, 2026 19:47
@joelteply

Copy link
Copy Markdown
Contributor Author

Cormac: PASS at exactly 93239f9. 11 checks pass (4 skipping). My blocking finding is resolved; the pointer-ceiling edge above is a nonblocking follow-up.

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