Skip to content

fix(cognition): an act whose own generation is advancing is not stalled — the act bound extends by checkpoint on its pinned slot, up to 3x (card 6f3218ed) - #4455

Merged
joelteply merged 2 commits into
canaryfrom
fix/act-bound-busy-is-not-dead
Sep 27, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/act-bound-busy-is-not-dead

Conversation

@joelteply

@joelteply joelteply commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

The other half of 6f3218ed after #4453. The act bound (TICK_DEADLINE, 25 min, raised only
by a MEASURED turn) is pure elapsed time. IntelMac, 2026-09-27: five of seven cancellations
in one hour were "request future dropped before a terminal response" at 24.6 to 25.0 min.
They were generations alive and queued or prefilling, reaped because the measured turn that
would raise the bound is exactly what this tier rarely completes.

A per-request signal, per Fable on the design: an engine-wide fingerprint would let a
request lost inside a busy engine ride other slots' progress forever. Turn traffic already
pins id_slot to the admission lease's slot (openai_adapter, inference.slot_pin.decision).
The adapter now registers that (root, slot) for the persona while the generation runs
(llama_server::InFlightSlotGuard, cleared on drop). At the act deadline, settle reads that
slot:

  • first checkpoint: processing extends by one bound;
  • later checkpoints: the SAME task with its work moved extends again;
  • a new task on the slot, an idle or silent slot, or no pinned slot ends the act exactly
    as before;
  • at most two extensions (3x the bound), so even a moving act can't hold the lane past it.

Probe: settle.tick.extended (slot, extensions, bound_s).

Tests: slot_advanced / slot_work_of rules (llama_server), and settle's no-pinned-slot
act ends at its bound as the plain timeout did.

Not compiled on the IntelMac: its deploy build holds the machine. CI is the compile.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…ed — the act bound extends by checkpoint on its pinned slot, up to 3x (card 6f3218ed)

The other half of 6f3218ed after #4453. The act bound (TICK_DEADLINE, 25 min, raised only
by a MEASURED turn) is pure elapsed time. IntelMac, 2026-09-27: five of seven cancellations
in one hour were "request future dropped before a terminal response" at 24.6 to 25.0 min.
They were generations alive and queued or prefilling, reaped because the measured turn that
would raise the bound is exactly what this tier rarely completes.

A per-request signal, per Fable on the design: an engine-wide fingerprint would let a
request lost inside a busy engine ride other slots' progress forever. Turn traffic already
pins `id_slot` to the admission lease's slot (openai_adapter, inference.slot_pin.decision).
The adapter now registers that (root, slot) for the persona while the generation runs
(`llama_server::InFlightSlotGuard`, cleared on drop). At the act deadline, settle reads that
slot:
- first checkpoint: processing extends by one bound;
- later checkpoints: the SAME task with its work moved extends again;
- a new task on the slot, an idle or silent slot, or no pinned slot ends the act exactly
  as before;
- at most two extensions (3x the bound), so even a moving act can't hold the lane past it.

Probe: settle.tick.extended (slot, extensions, bound_s).

Tests: `slot_advanced` / `slot_work_of` rules (llama_server), and settle's no-pinned-slot
act ends at its bound as the plain timeout did.

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

Copy link
Copy Markdown
Contributor Author

Fable: APPROVED at b28e338, pending green (the word is on airc). Read in full.

  • The registry is recorded where the adapter already pins id_slot from the admission lease, so no new placement decision is made. It is cleared by a guard when the generation ends.
  • slot_advanced is the per-request rule: processing at the first checkpoint, then the SAME task with its work moved. An idle slot, a silent engine, or a new task on the slot ends the act. Keeping to one slot's counters rather than the engine-wide fingerprint is what lets a lost request end.
  • The ceiling is 1 + 2 bounds, and anything unknown ends the act as before.

Not blocking. At the first checkpoint there is no task id yet. If our request is pinned to a slot that is still serving someone else's task (queued behind it), that task's progress extends ours once. From the second checkpoint on it extends only while that same task moves, so a request queued behind a long neighbour can ride it for up to the two extensions. The ceiling bounds it. Recording the slot's id_task at the moment our generation starts streaming, when the first byte arrives, would close it.

@joelteply
joelteply merged commit 1bdd35f into canary Sep 27, 2026
8 checks passed
@joelteply
joelteply deleted the fix/act-bound-busy-is-not-dead branch September 27, 2026 10:32
joelteply added a commit that referenced this pull request Sep 27, 2026
… so a relaunch's drain cannot keep the node dark (card 7c5f0a08) (#4468)

When the serving daemon condemns a lane it flips its snapshot not-ready, and the
relaunch's transition_if takes a write on the endpoint gate: it waits for every
admitted turn to drop its guard, with new admissions barred behind it. The
busy-is-not-dead waits (#4453's header wait, #4455's act extension) kept
renewing on the condemned engine because it was still prefilling, so the drain
ran as long as the turns did. On the IntelMac on 2026-09-27 that was 15:44-16:09Z,
16:33-17:19Z and again from 17:47Z: no lane and 0 acts in each window.

engine_probe now answers EngineProbe::Condemned while the snapshot is not-ready
(false before the daemon installs its state), and wait_while_engine_progresses
ends there at the checkpoint (probe inference.wait.engine_condemned). The act
deadline never extends on a condemned engine. Busy is still not dead on a live
engine; a dying one is simply not worth waiting on, since its relaunch cuts the
work anyway. The drain is now bounded by one checkpoint (<= 300 s header wait).


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 <[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