Repository navigation
A decided credit's settle runs off the region's tick and is never cut by it (card a4e8756d) - #5547
Merged
joelteply merged 3 commits intoOct 28, 2026
Conversation
… by it (card a4e8756d) CreditAcceptanceRegion settled each owed decision inside its tick under half the governor's region bound. On Windows (2026-10-28 01:58Z) a submit slower than that was cancelled after the trigger accepted Kimi's 28087ebb but before her acceptance was recorded, and each pass cut it again until one fit (02:04:59Z). Hardening, not a fix for a permanent failure: the tick now only reads what is owed and starts one settle per decision (at most a page per persona in flight); the settle runs to completion as its own task and a drop guard frees its slot however it ends. Removed: tick_budget, Attempt, the retry_slow cut. REGION_TICK_TIMEOUT is private again. The mind-integration fixture gains a settle slower than a tick budget. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… decision, drained before reuse (Codex on #5547) At 5a2a318 eight settles that hang forever held every slot of hers, and a ninth, healthy decision never started; spawned tasks had no owner. SettleSlots (new, settle_slots.rs) owns them: a page per persona; a settle is aborted only under contention, when another owed decision waits and it has outrun its quantum (the governor's REGION_TICK_TIMEOUT, doubled each time that decision was preempted), and its slot stays held (draining) until its task has ended, one abort at a time. Aborts run outside the lock. Any pass sweeps personas that left; dropping the region aborts the rest (guards hold Weak). A replay under the same submission id is accepted at most once, so an abort writes nothing twice. Tests (settle_slots): eight hung plus a healthy ninth; a slow settle cut only under contention with a doubling quantum; a departed persona and a dropped region abort. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…g; the fixtures observe async settles (Codex on #5547) CI at 1162e72 failed two existing fixtures (refused_submit.rs), and one exposed a real gap: with a single owed decision there is no contention, so a hung settle was never cut and the decision was never retried, which the old per-tick budget did. A settle past its quantum is now cut when its own decision comes round (Admit::Cut), its next quantum doubled, so a hung submit is retried with backoff and a slow one completes after about log2(D / 5 s) cuts; contention still cuts another overdue settle for a waiting decision. The fixtures tick and then observe the outcome (tick_until, bounded), since a settle now runs off the tick. Renamed: Admit::Preempting -> Cut, preempted -> cuts. Test rewritten: an_overdue_settle_is_cut_and_retried_with_a_doubled_quantum. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
deleted the
a4e8756d/a-decided-credit-s-settle-runs-off-the-g
branch
October 28, 2026 04:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How this serves the minds: a persona's reviewed credit reaches her training bucket as soon as its submit completes, with nothing cutting it partway. This advances goal 8 (learning, my lane). It is hardening, not a fix for an observed permanent failure.
Why
CreditAcceptanceRegion(#5531) settled each owed decision inside its tick, under half the governor's region bound (tick_budget).Windows, 2026-10-28 01:58Z:
So the cut was intermittent, not a livelock; I retracted that claim on airc. It still leaves a decided credit unrecorded for as long as its submits stay slow.
Change (
continuum-mind,persona/training_producer/)credit_acceptance_region.rs: the tick reads what is owed (owed_acceptance, a store read) and asks the slots to start each owed decision's settle (retry_decidedunder its original submission id). It never waits on a settle. The cadence isSlowerwhile anything is owed. Removed:tick_budget,Attempt, and theretry_slowcut.settle_slots.rs(new; Codex's review of 5a2a318): one owner for the settles in flight.Admit::Cut), even with nothing waiting. A hung submit is retried with backoff, which the old per-tick budget also did, and 1162e72 didn't. Under contention, another overdue settle of hers is cut for the waiting decision.REGION_TICK_TIMEOUT, doubled each time that decision's settle was cut. A slow submit of duration D completes after about log2(D / 5 s) cuts, where the fixed per-tick cut never let it.draining) until its task has actually ended, one abort at a time, so her settles never exceed the bound. The waiting decision starts on a later pass.Weak, so a hung task can't keep the slots alive. Aborts run outside the lock, because an aborted task's guard takes it.Tests
settle_slots(continuum-mind, 3 passed locally):eight_hung_settles_never_starve_a_ninth_healthy_decision: 8 settles that never end hold her page. The ninth waits within their quantum. Past it, one hung settle is aborted and still counted until its task ends; then the ninth starts and settles, and the preempted one runs again when a slot is free.an_overdue_settle_is_cut_and_retried_with_a_doubled_quantum: a hung settle with nothing waiting is cut once past its quantum. It drains, is retried, and its quantum doubles with each cut. A cut task's late end never frees its successor's slot.a_departed_persona_and_a_dropped_region_abort_their_settles.refused_submit.rs(continuum-core): both fixtures now tick and observe the outcome (tick_until, bounded), because a settle runs off the tick. The hanging-decision fixture also proves the hung settle is cut and retried once past its quantum (CI at 1162e72 caught the missing retry).continuum-core,test_env/mind_integration/training_credit/automatic.rs):HangOnadds aslowdecision that answers only after 3 s, longer than the old tick budget. The healthy decision is slow, the other hangs, and the slow one is still accepted. CI only on this node.cargo check -p continuum-mind --libis clean (macOS x86_64).🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE