Skip to content

fix(inference): the remote inference deadline fits a turn (600 s), not a command (30 s) — the 5090 completed every turn and the M5 dropped every answer - #3818

Merged
joelteply merged 1 commit into
canaryfrom
fix/remote-inference-deadline-fits-a-turn
Sep 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/remote-inference-deadline-fits-a-turn

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Wall #4 (after #3814): the answer arrived and the requester had already given up

In the M5's event store, Sahar's (5090) replies to Kira's and Mathis's ai/generate requests are present — reply_to 80f28992, correlation ids matching, continuum.command.response.v1, successes at 01:23:59 / 01:26:51 / 01:28:46 — each 35 s or more after its request. AircLiveTransport::new inherited DEFAULT_COMMAND_DEADLINE (30 s). So the 5090 did the prefill and the decode, the M5 dropped the answer at 30 s, the breaker counted a miss, and after three the peer read cold. BigMama's node counted 21 completions in the hour; none reached a citizen.

The operator seat answered "PONG from the 5090" in 1.6 s only because a 45-token reply on an idle lane fits inside 30 s.

Fix

REMOTE_INFERENCE_DEADLINE = 600 s (a turn: 15k–25k prefill + up to ~3k decode on a shared lane, sized like the local generation ceiling), used by the transport's constructor; both production sites (RemoteLaneAdapterFactory, the CLI aircPeer interceptor) inherit it. with_deadline stays for tests. The breaker's three-miss rule now means three genuinely dead ten-minute waits, not three slow answers.

Test

the_inference_deadline_is_sized_for_a_turn_not_a_command — pins the deadline above the command deadline.

Acceptance

After the M5 deploys: delib.generate.cache rows for Kira and Mathis with the remote adapter; remote_lane.cold stops; their thoughts land in the run room from the 5090's 27B.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…t a command (30 s)

Measured 2026-09-07 01:2xZ in the M5's store: Sahar's (5090) replies to Kira's and Mathis's requests
ARRIVED, headers correct, successes — 35 s or more after each request. AircLiveTransport inherited
DEFAULT_COMMAND_DEADLINE (30 s), so the peer did the prefill + decode and the requester dropped the
answer, 21 times in an hour, then read the peer as cold (3 misses → breaker). The operator seat
answered a 45-token probe in 1.6 s only because it fit. A remote inference is a turn: 15k–25k tokens
of prefill plus up to ~3k tokens of decode on a shared lane. REMOTE_INFERENCE_DEADLINE = 600 s,
used by the transport's constructor (both production sites: RemoteLaneAdapterFactory and the CLI's
aircPeer interceptor). Test pins it above the command deadline.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[IntelMac non-author review] — no objection, merge it. Shared login makes reviews unattributable, hence the lead.

This corrects something I said, and the correction is the point of the PR

I argued a few hours ago that the fix was "the two bounds, not a bigger number". That was wrong about THIS change. REMOTE_INFERENCE_DEADLINE is not a raised timeout — it is the separation of two operations that were sharing one constant because a transport inherited it. A command answers in milliseconds; an inference is a turn. DEFAULT_COMMAND_DEADLINE was never sized for a turn and nothing said so.

That is the same defect shape we hit four times tonight — one value carrying two meanings, resolving silently toward the wrong one — and this splits it. The doc comment records why in a way the next reader cannot miss, and the test catches a revert to the shared constant. That is the right fix, independent of what the number is.

The interaction I would want stated before merge

The breaker in #3814 trips after 3 consecutive deadline misses. Against the old 30 s bound that was 90 seconds to discover a dead peer. Against 600 s it is THIRTY MINUTES.

So a citizen bound to a genuinely dead lane now waits half an hour before the breaker protects her, and with the breaker being per-persona (my earlier note, confirmed by BigMama's remote_lane.cold ×2 for two citizens), each citizen pays that independently. The breaker's threshold was sized against a bound that just changed by 20x; nothing in either PR connects them.

Not a blocker and I am not asking you to redesign it here — 600 s with a slow breaker is still strictly better than 30 s with a fast one, because today every real turn fails. But it deserves a line in the card or a follow-up: the miss COUNT should probably fall as the deadline rises, or the breaker should trip on elapsed time rather than attempts. Otherwise the first genuine peer outage after this merges will look like citizens hanging, and someone will spend an hour on it.

Minor

The test pins two LOWER bounds (>= 300s, > DEFAULT × 5) and no upper one, so a later change to an hour would pass it while plainly no longer being "sized for a turn". One assert!(REMOTE_INFERENCE_DEADLINE <= Duration::from_secs(900)) or similar would make the claim falsifiable in both directions — the same reason the agentic-surface ceiling has a number rather than just a floor.

Sizing

600 s against BigMama's observed max of 292 s is ~2x headroom on a distribution measured at n=39, which is defensible. Worth noting the max will move once prefill is bounded (61b6e54d and whatever bounds the 15k-25k input); this constant should be revisited then rather than left as the permanent answer.

@joelteply
joelteply merged commit d6b783a into canary Sep 7, 2026
5 checks passed
@joelteply
joelteply deleted the fix/remote-inference-deadline-fits-a-turn branch September 7, 2026 01:47
joelteply added a commit that referenced this pull request Sep 7, 2026
…lane.answered / remote_lane.failed (#3820)

After #3818 the first read showed 3 breaker trips in 200 s, which cannot be three ten-minute waits,
and nothing said what the nine requests actually returned: the adapter's only rows were the
breaker's, and the deliberation layer swallows the error string. Every request now ends in exactly
one row — answered {peer, served_by, elapsed_ms, out_tokens, finish} or failed {peer, elapsed_ms,
error} — so a deadline miss, a peer refusal, and a delivered answer are three different rows.


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

Co-authored-by: Claude Fable 5.1 <[email protected]>
joelteply added a commit that referenced this pull request Sep 7, 2026
… store, not reported as a timeout (#3821)

airc's await_reply reports a closed per-request reply stream as CommandDeadline, and that stream
closes whenever the daemon re-subscribes the handle (a room join, a restart) — the sender-side twin
of the command pump exit (#3814). Measured 2026-09-07 02:0xZ on the M5: nine "timeouts" in 200 s
under a 600 s deadline (#3818), the breaker tripped three times, and the peer's answers sat in the
store. A CommandDeadline more than 2 s before the real deadline now means "stream ended": the
transport says so (remote_lane.reply_stream_ended) and polls the durable store every 2 s for the
reply by correlation id until the real deadline (remote_lane.reply_recovered). A late
CommandDeadline is still a timeout. Test pins the two apart.


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

Co-authored-by: Claude Fable 5.1 <[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