From e24e623b5aec750b79c6dc4da891ed2b489cdaec Mon Sep 17 00:00:00 2001 From: Joel Teply Date: Mon, 2 Nov 2026 16:48:44 -0600 Subject: [PATCH] A view granted nothing is kept, never started empty: no turnover against 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 Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --- .../llm_deliberation_faculty/prompt/epoch.rs | 8 ++++++++ .../llm_deliberation_faculty/prompt/epoch/tests.rs | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch.rs b/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch.rs index 8e71a8555c..4f3e88cfcb 100644 --- a/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch.rs +++ b/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch.rs @@ -444,6 +444,14 @@ pub(in super::super) fn turnover_due( next_act_tokens: Option, would_restore: impl FnOnce() -> Result, ) -> Result { + // NO GRANT, NO TURNOVER: a turn sized before her served window is known (the spawn's + // placeholder MIN_SERVE_CTX, 2048) allows her view nothing, and turning over against that + // started her view empty; the next act re-appended every item her sources hold (~2,000 + // items, 20-56M chars on the M5, 2026-11-02 22:29-22:31Z) and turned over again. Her held + // view is kept; the turn itself is refused for capacity. + if allowed == 0 { + return Ok(Turnover::Keep); + } if view_tokens > allowed { return Ok(Turnover::Overflow); } diff --git a/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch/tests.rs b/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch/tests.rs index 94c6d8bd04..0b3cc9fee7 100644 --- a/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch/tests.rs +++ b/core/continuum-cognition/src/cognition/llm_deliberation_faculty/prompt/epoch/tests.rs @@ -131,3 +131,14 @@ fn a_fitting_view_restores_only_when_the_next_act_would_turn_it_over() { assert_eq!(turnover_due(33_000, 32_000, Some(5_000), never), Ok(Turnover::Overflow), "over its grant: turn over"); assert_eq!(turnover_due(30_000, 32_000, Some(5_000), || Err("mismatch")), Err("mismatch"), "a broken allocation refuses"); } + +// what this catches: a turn sized before her window is known (granted nothing) turning her view +// over to an empty start, after which the next act re-appends every item her sources hold and +// turns over again (2026-11-02, every M5 resident at boot). With nothing allowed the view is kept. +#[test] +fn a_view_granted_nothing_is_kept_never_started_empty() { + let due = turnover_due::<()>(33_165, 0, Some(10_000), || Ok(true)).expect("pure"); + assert_eq!(due, Turnover::Keep, "no grant is not an overflow"); + let due = turnover_due::<()>(33_165, 29_000, Some(10_000), || Ok(true)).expect("pure"); + assert_eq!(due, Turnover::Overflow, "a real grant it outgrew still turns over"); +}