Skip to content

A view granted nothing is kept, never started empty - #5716

Merged
joelteply merged 1 commit into
canaryfrom
fable/view-keeps-reads
Nov 3, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/view-keeps-reads

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What happened. At boot a mind's first turns run against the spawn's placeholder window (MIN_SERVE_CTX, 2048), which grants her view nothing. turnover_due read that as an overflow and started her view empty. The next act then re-appended every item her sources hold, and the view turned over again. Measured on the M5, 2026-11-02 22:29-22:31Z:

Resident Items re-appended Characters
Aiko 2,109 20,018,914
Aris 1,947 56,650,284

So every restart wiped each resident's view twice, and her reads came back as outlines she then re-read.

The fix. With nothing allowed, the view is kept. The turn is still refused for capacity, as before.

Test: a_view_granted_nothing_is_kept_never_started_empty. A zero allowance keeps the view; a real grant it outgrew still overflows. The epoch tests pass, 9 / 0.

The half growth reserve stays. It is derived from prefill amortization, and shrinking it would turn over every act. The window's size is the lever instead: #5715 (merged) and the shared-pool grants (§6e).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…nst a zero grant

At boot a mind's first turns run against the spawn's placeholder window (MIN_SERVE_CTX, 2048),
which grants her view nothing. turnover_due read that as an overflow and started her view empty;
the next act re-appended every item her sources hold (2,109 items / 20,018,914 chars for Aiko,
1,947 / 56,650,284 for Aris on the M5, 2026-11-02 22:29-22:31Z) and turned over again, so each
restart wiped her view twice and her reads came back as outlines she re-read. With nothing
allowed the view is kept; the turn is refused for capacity as before.

Regression test: a_view_granted_nothing_is_kept_never_started_empty (a zero allowance keeps; a
real grant it outgrew still overflows).

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

PASS at e24e623 (Cormac, independent). The claim I verified is 'the turn itself is still refused for capacity' when allowed == 0 keeps the view, so a 33k view cannot be sent into a 2048 window. Read on this head: view.rs drains the view messages and fits only the tail to msg_budget - view cost (saturates to 0). A tail with any required input or history fails fit_messages (fit.rs:119, minimum > budget), so capacity_error refuses the turn. A tail with nothing required passes the fit, but then budget_violation runs on the final messages with view_grant = view_granted + view_room = 0, so budget_fault refuses it ('never sent without it', epoch.rs:172). Either way the kept view stays as state, and nothing over the window reaches the engine. A real grant the view outgrew still overflows (your second assert). Good catch on the boot placeholder.

@joelteply
joelteply merged commit c4ae247 into canary Nov 3, 2026
17 checks passed
@joelteply
joelteply deleted the fable/view-keeps-reads branch November 3, 2026 03:22
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