Skip to content

fix(inference): the remote lane says how each request ended — remote_lane.answered / remote_lane.failed - #3820

Merged
joelteply merged 1 commit into
canaryfrom
fix/the-remote-lane-says-how-each-request-ended
Sep 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/the-remote-lane-says-how-each-request-ended

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The instrument the last read was missing

First read on the M5 after #3818 (600 s deadline) landed: remote_lane.cold ×3 and refused_cold ×65 inside 200 s. Three trips = nine Timeout results — impossible as nine ten-minute waits — and nothing in any probe said what those requests returned or how long they took. The adapter's only rows were the breaker's; the deliberation layer swallows the adapter's error string.

Change

AircRemoteInferenceAdapter::generate_text ends every request in exactly one row:

  • remote_lane.answered {peer, served_by, elapsed_ms, out_tokens, finish}
  • remote_lane.failed {peer, elapsed_ms, error}

So a deadline miss (elapsed_ms ≈ the deadline), a fast failure (stream ended, peer refused, no model), and a delivered answer are three different rows with the same join keys the breaker uses.

No behaviour change. Existing adapter tests cover the paths; the two unwrap_or sites are probe labels and carry same-line justifications.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…lane.answered / remote_lane.failed

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.

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.

One row per request, on the side that was blind

#3813 gave the RESPONDER an accept/complete pair. This gives the SENDER the same symmetry, and the gap it closes is real: until now the only remote-lane rows were the breaker's, so from the caller's side a turn that answered, a turn that errored and a turn that timed out were the same silence. Your own line says it best — 9 misses in 200 s could not be told from 3 ten-minute waits.

It also completes the estimator's input, which matters more than the debugging

Pairing this with #3816, both ends of a cross-grid turn now emit size and duration keyed by correlation:

responder params_bytes / result_bytes + elapsed_ms (#3816)
caller out_tokens + elapsed_ms + served_by (this)

That is (size, peer, seat) -> duration measured independently at both ends, which is exactly what #3819's learned lease would train on, and it exists as a side effect of debugging rather than as a project. served_by in particular is the seat covariate BigMama needed — the seat question stopped being answerable by grouping precisely because nobody had that field on the caller's rows.

finish is the detail I would have missed

finish = ?r.text_response.finish_reason makes the act-length argument READABLE rather than inferred. A turn that ends Length was cut by a cap; one that ends Stop chose to stop. That distinguishes "the model wrote 4,000 tokens because it wanted to" from "because nothing stopped it", which is the whole of card 61b6e54d, and no amount of elapsed_ms could have separated them.

Not a repeat of my #3816 note

I flagged there that params_bytes/result_bytes serialize unconditionally outside probe! on the busiest inbound seam. That concern does NOT apply here: these fields are a counter, a Duration, an enum and a peer string, with the only allocation on the error path. Cheap by construction. Saying so explicitly so nobody carries the earlier objection across.

Minor

peer falls back to "-" when no peer is pinned, justified inline as a label. Fine — though if a request can reach this path with no pinned peer, served_by on the Ok arm will tell you who actually took it, and the two together would let you spot an unpinned request that still got answered. Probably not a real case; worth knowing it is legible if it happens.

@joelteply
joelteply merged commit 2b323dc into canary Sep 7, 2026
5 checks passed
@joelteply
joelteply deleted the fix/the-remote-lane-says-how-each-request-ended branch September 7, 2026 02:20
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