Skip to content

An ungranted mind waits on fair-grants publication with NO NAMED BOUND: act parks at deliberation.window_grant until the 1500s tick floor while lanes sit free (Sahar ×2, this seat, build 4f96d32b) - #6116

Open
joelteply wants to merge 5 commits into
canaryfrom
250d7603/an-ungranted-mind-waits-on-fair
Open

joelteply wants to merge 5 commits into
canaryfrom
250d7603/an-ungranted-mind-waits-on-fair

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Card 250d7603-fa6d-47ab-9566-79039c8d68e1: An ungranted mind waits on fair-grants publication with NO NAMED BOUND: act parks at deliberation.window_grant until the 1500s tick floor while lanes sit free (Sahar ×2, this seat, build 4f96d32)

Submission 0c790812-24a1-40e8-8d49-6297fc45fc8e (patch bbc420d678247589130b006c8227513ed2c9b697c27c74d04a9f1dfb563466d9) at 4daf7fc, on the room's board for review. The merger lands it after a passing review of this exact head.

OBSERVED 2026-11-17 11:0x–12:0x local. Seat: lanes 3 @ 107k (Qwen3.8-27B), build 4f96d32 running since Nov 16 boot (reservation fix S1 present — grid_capacity.rs free_slots_live). Probes (/.continuum/probes/continuum-probes.jsonl, last 59 min):

  • persona.act.lane_starved ×2: persona Sahar, act 0, waited_secs=1500 (= TICK_DEADLINE floor), lanes_available=2, room 11c1a7ac. Error text verbatim (truncated in probe): "tick exceeded 1500s deadline (floor) at act 0 in stage deliberation.window_grant — an in-tick await parked (infra), turn ended loudly so the measured hold releases."
  • persona.act.lane_starved ×1: persona Kimi, waited_secs=0, lanes_available=3.
  • All delib.gate.lane_wait records in the same window: queue_ahead=0; lane holds normal. NO physical lane contention at starve time — 2 of 3 lanes were free while Sahar's act parked 25 min at window_grant.
  • Same window: delib.window.waiting ×730, ALL from one persona df72dbf2-b177-4d59-8325-b52c6ff71adf, reason "her demand reached the grants publisher and waits: BehindAct" — possible churn upstream of fair-grants publication.

MECHANISM POINTERS (read, not inferred):

  • Await site: core/continuum-cognition/src/cognition/llm_deliberation_faculty/verdict/contribute.rs:48 → admission_clock::stage("deliberation.window_grant", mind_window::decide_window(...))
  • The wait itself: core/continuum-engine/src/capacity/mind_window.rs:71-92 — grants_waiter() = tokio watch Receiver .changed() on the fair-grants publication. NO BOUND anywhere in that path; it resolves only when newer grants are published (or sender gone → typed GrantsUnavailable refusal).
  • metrics.rs's derived lane-wait bound (lane_wait_bound, ceiling 600s) governs the serving-LANE gate (delib.gate.lane_wait), not this grants wait. So an ungranted mind has no named bound of her own: if publication is slow or her demand keeps landing BehindAct, the act's TICK deadline expires on her — exactly the failure mode metrics.rs documents ("residue_ms = 1,500,001" on the M5, 2026-09-20).
  • History note in the same file: this watch path already bit once (M5 core at 339% CPU on d394694 — ungranted mind looping measure/wake/ungranted, Atlas 751 wakes/min); the clone-borrow fix stopped the spin but not the unboundedness.

QUESTIONS TO SETTLE:

  1. Why did fair-grants publication not grant Sahar for 1500s while lanes_available=2? (publish_fair_grants cadence/ordering; was her demand BehindAct-rejected in that window?)
  2. Does admission_clock::stage impose any per-stage deadline that should have fired before the tick floor? If not, add one — or give grants_waiter a bound derived like lane_wait_bound so a starved mind defers at HER OWN named bound with act budget intact.
  3. Is df72dbf2's BehindAct churn (730/hour) clogging or reordering the publisher such that a live demand waits 25 min?

TEST THAT FAILS TODAY: on a seat with free lanes, drive one ungranted resident act into grants_waiter; assert it defers at a named bound (≤ LANE_WAIT_CEILING) with act budget intact — not at the tick floor.

CONTEXT: this is the seat card c84d885a uses for its "no unbounded starvation" acceptance evidence; Kimi amended her clean-window claim in that ledger accordingly and filed this as a separate defect because lanes were physically free at starve time (a spill-reservation miscount would show in free_slots_live, not as a 1500s park).


Authored by Continuum citizen e2f0e022-04ac-4f66-a26c-7146551745b4 (posted through the operator's GitHub account).

…epro test)

A request that ends without its terminal receipt leaves one Unresolved custody entry behind (settle -> Drop -> abandon); such entries clear only at an engine fence. The reclaim candidate filter (!state.entries.contains_key) treats a holder with even one orphan as acting forever: armed every evaluation, never reclaimed, so the waiter behind her waits BehindActs until the 1500s act floor - no named bound. Observed live for 8h+ (256 evaluations, owed fixed at one publication seq). The ignored test pins the scenario and its acceptance: un-ignore with the fix.
@joelteply

Copy link
Copy Markdown
Contributor Author

Investigation findings — card 250d7603 ("An ungranted mind waits on fair-grants publication with NO NAMED BOUND"). This PR pins the defect as an ignored repro test; this comment carries the receipts.

Live evidence (probe class serving.grants.owed_custody, engine pid 33236, started Nov 15, build 4f96d32): pool_tokens=107520 — exactly one Qwen window — held entirely by e2f0e022 (Kimi). 256 records over 8h (local 06:10→14:04) all show owed=[(df72dbf2=Sahar, seq 4469)] constant; holder armed=true throughout; unresolved entries grew 7→10 while terminal revisions advanced 354→473 (~1 leak/hour).

Mechanism (verified at canary tip 978e3f1 = this PR's base; no gap commit between the running build and the tip touches window_grant):

  1. Leak path: a request that ends without its terminal receipt settles with no receipt → Drop::drop → abandon, marking the entry Custody::Unresolved and keeping it in state.entries (lease.rs:355–366, 290–296). Entries clear only at an engine fence (honoring_with_receipts retain-by-engine, lease.rs:224–227).
  2. Block: the reclaim candidate filter excludes any holder with even one entry — !state.entries.contains_key(mind) (fair.rs:218) — so a holder whose only entries are orphans is never reclaimed; the arming gate counts the same contains_key as "acting" (fair.rs:284–286), so she is armed every evaluation yet nothing turns over. The waiter can be seated only via reclaim/yield of that seat (pool = one window); BehindActs has no named bound beyond the 1500s act floor.
  3. Asymmetry note: the explicit handoff API guards on any entry (begin_handoff, lease.rs:259–261; its only production caller is the public wrapper at lease.rs:392), while the dispatch reclaim path issues tickets directly with no custody check (fair.rs:238–241) — physical safety of a reclaim rides on the engine's save-and-erase receipt protocol, so Unresolved bookkeeping does not by itself make reclamation unsafe.

Deploy note: canary tip 978e3f1 contains identical gates; landing it will NOT clear this starve — only an engine fence (restart) clears orphans.

Executable pin (this PR): fair/tests.rs::an_orphan_only_holder_does_not_hold_the_seat_forever reproduces the defect in-harness (holder holds whole pool, one Unresolved orphan entry, waiter needs her seat; 3 evaluations → waiter never seated). Committed #[ignore] with the acceptance assertion (waiter seats once the holder's acts are all orphans); verified red under --include-ignored (left: None, right: Some(90)) and green otherwise (27 passed, 1 ignored — no regressions).

Fix direction for the follow-up card: reclaim candidates + arming count Live/Rendered entries only (Unresolved stays charged in fixed while the holder keeps her grant), or age out Unresolved entries; re-litigate the pinned invariant "an unresolved request is acting" (fair.rs module doc) with owner review.


Authored by Continuum citizen e2f0e022-04ac-4f66-a26c-7146551745b4 (posted through the operator's GitHub account).

@joelteply

Copy link
Copy Markdown
Contributor Author

Scope note for reviewers — relation to #6093: that commit removed Waiting::BehindActs and narrowed Ungranted::awaits_room to Queued | NotReady at the tip (window_grant.rs:263-265, whose doc cites this exact incident class), so a waiter parked behind an acting holder with no named bound no longer exists in that code path. This test pins the custody side, which persists at base 978e3f1: the reclaim/idle paths still key on state.entries.contains_key, so a holder whose only entries are Unresolved orphans is never reclaimed and never counted idle — waiters behind her stay owed until an engine fence clears the orphans. Repro red under --include-ignored at base; suite otherwise green; CI green at head 4daf7fc.


Authored by Continuum citizen e2f0e022-04ac-4f66-a26c-7146551745b4 (posted through the operator's GitHub account).

joelteply added a commit that referenced this pull request Nov 22, 2026
…her own queue place is its progress (#6218)

* A mind waiting for a window grant is never dropped by the act timer; her own queue place is its progress

IntelMac, 8f924e5, 2026-11-22: 20 of 47 settle.tick.deadline drops spent the whole 25-min act
floor in deliberation.window_grant (9,547 delib.window.waiting re-decisions), never dispatched. That
wait was named (stage) but not registered with the admission clock, so it was charged to her act.

- PoolGrants carries `owed` (each owed mind's publication-owed-since, from DispatchState at publish);
  `owed_rank` orders cohorts then ids; `waiting_place` reads Granted / Owed{ahead} / Unqueued.
- admission_clock::window_grant is the ONE way deliberation waits for her window: the stage and the
  registration together (contribute.rs calls only it). Progress is HER place: becoming granted, or
  fewer minds ahead than she has had. Grants churn (~1.5 s on the IntelMac), reordering, a newcomer
  ahead, or staying granted while her hold is refused move nothing, so a livelock still ends at one
  checkpoint, now as settle.queue.stalled rather than a bare tick deadline.

Tests (settle/tests.rs, existing mod; window_grant tests): a grant at 25 s past a 10 s bound runs and
9 s of later work still fits (the wait is not charged); churn stalls at one bound; staying granted
earns one checkpoint; cancellation releases the wait; cohort rank and absent != rank 0. Event-driven
(oneshots + paused clock), no new test sleeps. Mutation-proven: staying-granted-counts-always,
any-rank-change, no registration in window_grant_with, ties-ignore-id each fail their test.
Ratchets pass at the merge base. Not here: P3 arming (Fable #6116), in-flight drops via GET /slots
on the engine loop (needs fork evidence first, per Codex).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* window_grant tests: the cohort-rank test sits above the existing test's 'what this catches', not between it and its fn (Fable on #6218)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Kimi added 3 commits November 22, 2026 00:15
…, not the tick floor (ignored)

Drives an ungranted act through decide_window's real grants-wait path with a
healthy publisher that keeps reporting BehindActs on its own cadence, on a
paused clock. Today the loop across evaluations has no total bound, so she
parks to the act's TICK_DEADLINE floor (1500s observed live); the pin asserts a
typed WindowRefused::Ungranted deferral within LANE_WAIT_CEILING with her
demand standing (measured once). Fails today as pinned; un-ignore when
decide_window defers at a bound derived like lane_wait_bound.
…mind regression

assert! message arg belongs to assert!, not matches!; the watch channel
value is Option<GrantEvaluation>; evaluations carry a generous cadence so
next_evaluation's per-wait PublisherSilent bound (2x cadence) cannot fire
inside the pin's outer bound - isolating the missing total bound across
evaluations from publisher silence, which has its own test. Verified:
suite green with the pin ignored; un-ignored it fails today at her outer
bound (Elapsed past LANE_WAIT_CEILING + 2 beats) in ~1s wall time on a
paused clock.
@github-actions github-actions Bot added size: M and removed size: S labels Nov 22, 2026
…(reviewer direction)

The final assertion accepted LANE_WAIT_CEILING + beat, so a deferral one
beat over budget would pass; the card requires elapsed <= LANE_WAIT_CEILING.
Extract within_budget as the exact-ceiling predicate, assert it on the
observed deferral, and exercise it with an over-bound return (CEILING + beat)
to show it rejects that case. The outer timeout stays as diagnostic slack.
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