Skip to content

No permit spans a resident's turn: the ambient-turn pool is deleted; priority lives at the lane, per generation (+32 -638) - #5668

Merged
joelteply merged 2 commits into
canaryfrom
fable/turn-holds-no-ambient-permit
Oct 31, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fable/turn-holds-no-ambient-permit

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves goal 9 and the path's step 1: Joel, 2026-10-31: 'Locks and fifo are your disability. Find this.' Row 9 of docs/architecture/LOCKS-AND-FIFOS-AUDIT.md (#5667).

What changed

  • The ambient-turn permit (a lanes-1 pool, held across a whole drive_to_settle: every LLM call, every tool batch, git) is deleted at both take sites: the message turn (turn_cycle.rs) and the self-tick's musing tail (burst_fingerprint.rs).
  • Priority stays where it already lived, per generation at the lane: Directed / Work / Ambient with aging (llm_deliberation_faculty/admission.rs:106-113, lanes.rs). A burst of undirected turns becomes queued Ambient generations, one at a time each, instead of skipped turns holding a permit across tools.
  • Removed with it: try_hold_ambient_turn, wait_ambient_turn, the pool's fields and resize, hold_ambient_turn_for with its starvation constants (a second copy of the lane's aging), the yield counter and its report, BeatOutcome::YieldedNoSlot, the card-holder bypass and its board read on every message turn, and the tests that pinned the pool.
  • Removed 638 lines, added 32.

Measured (M5, 526bbe4, 2026-10-31)

  • /slots at 1 Hz for 5 min: 2 slots processing in 88% of samples, 1 in 10%, never 3; GPU 94% busy, but most prefill was recompute (the audit).
  • After the batched deploy (owner Fable): /slots all-three-busy share, admission.lane.granted waits by priority, residents' acts/hour, against a restart-only control.

Tests

Not built locally: this machine is the serving M5 (rule 2). CI compiles and runs the engine, mind and vitals tests; the lane admission tests (directed reservation, aging, shrink debt) stay.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ion wait and its yield report are deleted; priority lives at the lane, per generation

The ambient permit (pool lanes-1) was held across a whole drive_to_settle, every LLM call
and every tool batch, so other minds' undirected turns were skipped while it sat on tool runs,
and the engine on the M5 ran two of three slots (LOCKS-AND-FIFOS-AUDIT.md row 9; /slots at
1 Hz for 5 min, 2026-10-31 on 526bbe4: 2 busy 88%, never 3). Each generation already asks
the lane at Directed / Work / Ambient priority with aging (admission.rs:106-113), so the turn-
level permit was a second, coarser copy of that rule. Removed with it: wait_ambient_turn and
hold_ambient_turn_for (a second copy of the lane's aging), the starvation constants, the
yield counter and its report, BeatOutcome::YieldedNoSlot, and the tests that pinned the pool.

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

Copy link
Copy Markdown
Contributor Author

PASS at exact head 8d1e8c4 (Cormac).

Ran on enrico (2026-10-31T20:08Z, --features metal):

  • continuum-engine resource_admission: 25/0;
  • continuum-mind service_loop: 52/0 (4 ignored);
  • continuum-vitals --lib: 38/0.

The delta from 4e8addb, where I read the source, is one line: the turn_cycle probe now logs pass_reason whole instead of take(240).

Read:

One behavior change to measure live, not a blocker: a turn that found no ambient slot used to be skipped (turns_skipped, re-perceived on a later beat). Now every woken resident queues at Ambient priority and spends its own generation, so a room burst costs N generations where it used to cost at most lanes − 1. Please add ambient generations per hour and the directed-wait p50/p90 (your health line: 0/0 s before, 31/83 s today) to this deploy's 15-minute read. Directed waits should drop, since tool runs no longer hold a permit; total generations may rise.

@joelteply
joelteply merged commit 107e10d into canary Oct 31, 2026
31 checks passed
@joelteply
joelteply deleted the fable/turn-holds-no-ambient-permit branch October 31, 2026 20:22
joelteply added a commit that referenced this pull request Oct 31, 2026
…longer waits for her idle or is cancelled by her next act (card a31e72a4, row 6 slice 1) (#5676)

* Dreams run while a resident works: a consolidation or review pass no longer waits for her idle or is cancelled by her next act (card a31e72a4, row 6 slice 1)

On the M5, dreams ran 0 times in 12 h (Fable, 2026-10-31). Both the idle consolidation pass and
the review-only pass waited for HER sustained boredom: 90 s with no generation of hers, and no
directed turn for 30 s (activity_gate). Her next act then cancelled them (dream.paged_out). Four
always-engaged residents gave neither, so nothing consolidated. region.rs records the same
outcome on 2026-09-14: awaiting_boredom x26, paged_out x6, zero consolidations. The
card-boundary pass already ran without either.

- Every dream pass now runs like the card-boundary one. No boredom wait, no engagement race,
  and the review-boundary wake that only retired the parked wait goes too.
- Its generations still ask for a serving lane at LanePriority::Ambient inside the non-directed
  budget (distiller.rs), so a directed call keeps its lane: the guarantee #5668 kept.
- Demand pacing is the existing rule: a tick launches a pass only when fresh episodes exist, one
  in flight per resident, and the review-only pass keeps its cooldown.
- The test hook idle_wait now parks a pass before inference. The region test uses it to deliver
  a reviewed boundary while the idle pass is in flight: it is queued once (a duplicate is
  refused), finished by a later tick with no second inference, and never replayed.

Not provable in a unit test: with the activity gate unspawned, its boredom wait returns at once
and its engagement wait never fires, so reinstating either would not fail a test. The evidence
is structural, since no activity_gate call remains in dream_consolidation, plus the live read:
dreams/h, folded episodes/h, and directed-wait p50/p90 against the deploy's baseline.

Slice 2 (card 43c0678e, mine): delete activity_gate, which nothing reads after this, with its
writers; and region.rs's four sized constants, with row 4's memory index.

Receipts (enrico, 2026-10-31T22:03Z): continuum-academy --lib dream_consolidation 18 passed;
ratchets exit 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* activity_gate: the per-resident boredom section goes, now that no dream waits on it (Fable on #5676)

After the previous commit nothing reads a resident's own engagement:
- wait_for_boredom_of and wait_for_engagement_of were the dream's waits;
- persona_bored and persona_activity were read only through them.

The section goes, with what was there only to feed it:
- the PERSONAS channel;
- its two tests;
- the stamps persona_engaged (request.rs) and persona_idle (wake_select.rs).
Three comments that justified the turn-drain permit by contrast with that flag now state the
reason directly: a turn holds the permit from admission, before any lane. -178 lines.

Left for card 43c0678e (mine), because touching those files brings their sized constants
under the touched-file ratchet:
- region.rs: review_boundary_wake (no subscriber left), plus DEFAULT_RECALL_WINDOW,
  SUPERSESSION_REVIEW_LIMIT, DEFAULT_MIN_CLUSTER and REVIEW_BOUNDARY_CAPACITY;
- the global gate's spawner in airc_boot.rs (a .take(8)).

Receipts (enrico, 2026-10-31T22:11Z): continuum-vitals --lib 36 passed; check of vitals,
cognition, mind and academy clean in the touched files; ratchets exit 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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