Explore report · NVIDIA/hyperflare-inference #611

Raw Markdown for agents: https://autobot.eidonix.com/p/b57c8692-a9e2-445b-b281-56eba7d5bcdc.md

Case file: PR #611 — fix(selene): fix pool client event-loop starvation, fencing, backpressure, and overflow bugs

Author yatesdr (COLLABORATOR, Discord "D-Rock"), branch fix/selene-pool-client-reliability → main, head aac8f4f, 12 files, +260/−43. Opened 2026-11-29 17:08, merged 17:32 (24 minutes later) as commit 8d05b9b6. 0 comments, 0 reviews, 0 reactions; CI listed as pending on the head commit. Link: https://github.com/NVIDIA/hyperflare-inference/pull/611

Key findings

  1. No review and no automated case file, merged with CI pending. #611's discussion is empty (pr_comments: "No comments"; read_item 611: "Discussion (0)"). Its three same-day siblings #607, #609 and #612 each carry a flare-autobot "case file opened / Ready To Merge" comment; #611 is the only one of the quartet with neither human nor bot review. It was merged 24 minutes after opening while the orientation packet still records CI as "pending" on the head commit.
  2. The description does not match the diff in several places. (a) "hold partial-open TP >= 3 export pins until opened peers report Done" — the code contains no TP count or >= 3 test; the branch fires whenever self.ranks.is_some() and open_export_peers failed after some peers opened (selene/src/pool/engine/source.rs:322-349). (b) "verify max_window_bytes on reconnect in net_staging" — the comparison is against net_shape().1 = max(max_window_bytes, page_record_bytes, row_record_bytes) (engine/netio.rs:41-48, 63-71), wider than the stated field. (c) It lists two new tests; three exist — staging_slots_saturates_instead_of_overflowing (selene/src/shared/limits.rs:129-140) is unlisted. (d) "Engine::pump_flow did not drain collect_outbound_fills()" — pump_flow is introduced by this PR; the pre-existing method is pump (engine/mod.rs:586-603).
  3. Undeclared behaviour changes. A new session-termination condition: if drain_out keeps returning Full for more than CLOSE_TIMEOUT (30 s, selene/src/copier.rs:18 (not opened)) the loop breaks (pool/conn.rs:848-853) — a deliberate give-up not mentioned in the backpressure bullet. Announcer::spilled now also pushes Notice::Evicted { key, tier: from, heir: None } when from was removed but to could not be added at capacity (pool/announce.rs:139-158) — the description mentions only the reordering. Leftover pending_out is re-emitted through engine.emit on session exit (conn.rs:919-925), the unstated second half of the fence-preservation fix.
  4. Evidence is pooled, not per-PR. The "Combined 4-PR validation & SM120/SM121 hardware qualification" paragraph (cn5 SM120 pool retirement/restore; cn6–cn9 GB10 cross-host TCP, 300–400 stream windows, "0 disconnects, 0 leaked pins, 0 quarantined bytes, bit-exact pos0 parity") is byte-identical in #609 and #611, and the description itself says hardware ran against the combined stack before rebasing onto #496/#497/#607. CPU tests were re-run after rebasing to 5df8edd3c (claimed 542/542 with --features codec; RUSTFLAGS="-D warnings" cargo check --all-targets --features codec,rdma clean for selene and selene-manager).
  5. Test coverage is thin relative to the fix count. Of nine fix clusters, only the put/fence state machine and session_lost preservation have new tests (engine/tests.rs:1592-1648). No tests for the run_session rewrite / drain_out / tx.reserve() backpressure / next_tick, IPv6 trim, Staging::planned_bytes/new overflow, the net_staging reconnect check, wind_down timeout, quarantine clearing, spilled ordering, pool_peer empty-rendezvous guard, refused_on_open, or the CopyChecksum classification.
  6. No linked issue or reproduction. #611 refers only to pull requests (#496, #497, #607) as rebase bases. The defects are asserted reachable ("could stall, drop required fence acknowledgments, livelock…"), not observed. The nearest precedent for a tracked pool-client degradation is #335 ("Prefix-cache pool and scheduler fixes from a production degradation (DeepSeek V4.1 TP4)", closed 2026-11-19), which spawned #344/#345/#365 — #611 attaches to nothing of the kind.

The change (what it does, in plain terms)

Nine independent micro-fixes inside the pool client, no wire/protocol change (selene.proto (not opened) untouched, no Cargo or docs change):

  1. Session loop rewrite (pool/conn.rs:836-949, replaces the old flush() + fresh sleep(tick) per select iteration): a persistent next_tick deadline, a pending_out VecDeque, drain_out() returning Drained/Full/Closed, and a tx.reserve() select arm guarded by need_permit = !pending_out.is_empty() || tx.capacity() <= 64 (conn.rs:882, 897-905). flow_index is paused while can_flow = pending_out.is_empty() && tx.capacity() > 64 (conn.rs:871-873).
  2. Engine pump split (engine/mod.rs:586-603): pump(now) delegates to pump_flow(now, true); pump_flow calls collect_net, collect_ranks, collect_outbound_fills(), poll_jobs, submit_pending, then optionally flow_index. With flow_index == false it returns more = false but still drains fills and jobs.
  3. Session recovery (engine/mod.rs:340-349): session_lost no longer clears out blindly; it re-queues only FenceAck/ExportEnd/WindowReleased into self.owed, matching the pre-existing emit rule (mod.rs:243-260) replayed by session_opened (mod.rs:309-311). Verified in code at PR head.
  4. Put accept state machine (engine/writer.rs:315-347): Phase::Accepted set immediately after the Begun check (line 334); unknown put_id emits Out::PutCancel + FenceAck(Drained) (lines 317-327); accept.packed && put.packed_offer.is_none() fails the put (lines ~372-377). Note the unknown-id branch cannot distinguish a cancelled/timed-out put from a completed one — completed puts are removed from writer.puts in drive_put (writer.rs:709), so a duplicate accept for a committed put also produces PutCancel + FenceAck(Drained).
  5. Partial-open export pins (engine/source.rs:322-349): on open_export_peers error with already-opened peers, keep the run Phase::Pinned, set cancelled/refused_on_open (source.rs:54-56, 148), so drive_export suppresses the second ExportEnd (source.rs:783-799).
  6. Packed checksum classification (engine/requester.rs:883-895): a failed restore whose error carried() a crate::shared::packed::Checksum is reported as wire::CopyOutcome::CopyChecksum instead of CopyErrorOutcome (the other CopyChecksum site, window verification, is pre-existing at line 598).
  7. Overflow-safe sizing: Staging::planned_bytes uses checked_next_multiple_of + checked_mul, returning u64::MAX on overflow (pool/net.rs:73-78); Staging::new returns errors instead of wrapping (net.rs:88-94); limits::staging_slots uses saturating add/mul (shared/limits.rs:121-127). This matters because limits::validate only rejects zero limits, never upper bounds (limits.rs:98-119).
  8. Reconnect window check (engine/netio.rs:40-50): an existing staging region with slot_bytes() < required_bytes is an error ("the manager's window size (…) exceeds registered staging (…)"). Verified. It compares slot bytes only — let (_, required_bytes) discards the slot count — so a manager that increases window_credits/max_open_puts across a reconnect is not caught; and same-host shared-memory attachments bypass net_staging entirely (conn.rs:629-635, Attachment::Shm arm). Failure is soft: attach prints "warning: cannot use the pool's data channel (…); restores and puts are off" (conn.rs:620-626), leaving the instance on local tiers.
  9. Lifecycle/address fixes: dial trims [/] from the host so IPv6 literals parse (conn.rs:574-578); RankAgent::wind_down wraps the Goodbye send in a 2 s tokio::time::timeout (agent.rs:486-501); quarantine clears self.jobs/self.pending (agent.rs:1711-1717, still mem::forgets regions afterwards); Announcer::spilled removes from before upsert(to) (announce.rs:139-158); pool_peer guards an empty rendezvous list (peers.rs:196-199).

The why

Recent activity

selene/src/pool in the last six months is almost entirely yatesdr (36 of 43 commits in selene/src; Luke Alonso 5, Martin Vit 2). Merge order on 2026-11-29: 5df8edd3 (#607) → e2522eb0 (#609) → a56333a0 (#610) → 8d05b9b6 (#611), within ~35 minutes. Earlier: 2026-11-25 #524/#504 (the packed paths hardened here); 2026-11-18 the #335 cluster, including #365 (register memory off the I/O thread) which introduced the registration window feeding Staging::planned_bytes; 2026-11-02 #140/#142 (multi-host TP prefix pools, opt-in RoCE); 2026-10-28 #92 created the pool client. #611 builds on this work and reverses none of it — the session_lost change makes that function consistent with the existing emit fence-class rule rather than inventing a new one.

People

Community

Zero visible interest: 0 comments, 0 reviews, 0 inline comments, 0 reactions; no autobot case file (contrast #607 with two bot comments, #609/#612 with case files). Merged 24 minutes after opening, before CI reported.

Project fit

Claims and evidence

Claim Backing Gap
cargo check --all-targets --features codec,rdma (selene + selene-manager) clean under -D warnings author statement not independently reproduced here; CI pending at merge
cargo test --release --features codec --lib → 542/542 author statement counts the whole lib suite, not per-fix coverage
Event-loop no longer starves fills/ticks code change verified (conn.rs:836-949, mod.rs:592-603) no test exercises it
Fence acks never dropped across session loss / late accepts code verified (mod.rs:340-349, writer.rs:317-334) + 2 tests (tests.rs:1592-1648) —
Backpressure instead of disconnect code verified (conn.rs:882, 897-905) no test; new 30 s give-up unmentioned
Overflow-safe staging limits code verified (net.rs:73-94, limits.rs:121-140) + 1 test test unlisted in description
"0 disconnects, 0 leaked pins, 0 quarantined bytes, bit-exact pos0 parity" on SM120/GB10 author statement, pooled across 4 PRs description itself disclaims per-PR attribution; pre-rebase stack

Reach

Process

Draft/ready state: not marked draft; merged. CI: pending on head aac8f4f at the time it merged. Review: none. Autobot case file: none (the only such PR of the four). Age: opened and merged the same day, 2026-11-29, 24 minutes apart.

Open questions / not found