#1 [high] Change: #611 is 12 files +260/−43 in selene/src pool client, no protocol change
PR #611 "fix(selene): fix pool client event-loop starvation, fencing, backpressure, and overflow bugs", author yatesdr (COLLABORATOR), branch fix/selene-pool-client-reliability into main, head aac8f4f, merged 2026-11-29 17:32 (opened 17:08 — ~24 min open, 0 reviews, 0 comments). Files (12), +260/−43 (pr_files result): selene/src/pool/agent.rs +8/−5, announce.rs +10/−4, conn.rs +69/−12, engine/mod.rs +18/−2, engine/netio.rs +7, engine/requester.rs +10/−6, engine/source.rs +27/−7, engine/tests.rs +59, engine/writer.rs +19/−1, net.rs +11/−4, peers.rs +4/−1, selene/src/shared/limits.rs +18/−1.
Plain terms (9 independent micro-fixes inside the pool client, no wire/proto change — selene.proto untouched, no Cargo dependency change, no docs change):
- conn.rs
run_sessionwas rewritten from aflush()+ freshsleep(tick)per select iteration into a persistentnext_tickdeadline + apending_outVecDeque drained viatry_send(newdrain_out()returning Drained/Full/Closed) + atx.reserve()select arm as real backpressure; on exit unsent messages are handed back withengine.emit()(conn.rs:836-949 at PR head). - engine/mod.rs:
pump()split intopump(now)=pump_flow(now, true)and newpump_flow(now, flow_index)which now callscollect_outbound_fills()and can skipflow_index()(mod.rs:586-601). session_lostno longerself.out.clear(); it re-queues FenceAck/ExportEnd/WindowReleased intoself.owed(mod.rs:340-349).- writer.rs
on_put_accept: setsput.phase = Phase::Acceptedimmediately after the Begun check (line 334); for an unknown put id emitsOut::PutCancel+FenceAck(Drained)(lines 317-327); rejectsaccept.packed && put.packed_offer.is_none()via fail_put (lines 372-377). - source.rs: partial-open
TP>=3export — onopen_export_peerserror with already-opened peers, keeps the run inPhase::Pinned, markscancelled/refused_on_open, andpin_refusedalready answered;drive_exportthen suppresses the second ExportEnd (refused_on_open field, lines 54-56, 148, 328-349, 783-799). - requester.rs: a failed restore whose error
carried()acrate::shared::packed::Checksumis reported aswire::CopyOutcome::CopyChecksuminstead of CopyErrorOutcome (requester.rs:883-895). - net.rs:
Staging::planned_bytesandStaging::newusechecked_next_multiple_of/checked_mul(planned_bytes returns u64::MAX on overflow); limits.rsstaging_slotssaturating add/mul. - netio.rs
net_staging: on reconnect, if existing stagingslot_bytes() < net_shape(limits).1→ Error "the manager's window size (…) exceeds registered staging (…)" (netio.rs:40-50). - conn.rs
dial:.trim_matches(['[', ']'])on host so IPv6 literals parse (conn.rs:574-578). agent.rswind_down: Goodbye send wrapped intokio::time::timeout(2s)(agent.rs:492-498);quarantineclearsself.jobs/self.pending(agent.rs:1716-1717). announce.rsspilled: removefrombeforeupsert(to), and iftowas not added butfromwas removed, pushNotice::Evicted{heir:None}(announce.rs:137-158). peers.rspool_peer:records.first().ok_or(invalid("empty pool rank rendezvous response"))(peers.rs:196-199).
#2 [high] Claims and evidence: #611 test/check claims and their limits
Claims in #611's description ("Supporting evidence"):
- "Standalone branch rebased onto post-#607 main (5df8edd3c)":
RUSTFLAGS="-D warnings" cargo check --lockedfor selene --all-targets --features codec,rdma and selene-manager --lib --bins → 0 warnings;cargo test --locked --release --manifest-path selene/Cargo.toml --features codec --lib→ 542/542 passed. - "Combined 4-PR validation & SM120/SM121 hardware qualification": live
flare run+selene-managerpool retirement and cold-start pool-only restores on SM120 (cn5: Qwen3.8-Flash-Next TP1/TP2, GLM-5.3-Flash TP2/TP4, DeepSeek-V4.1-Flash-1017 TP4) and cross-host TCP streaming on GB10 (cn6–cn9, 300–400 stream windows across 3-node TP2 / 4-node TP4): 0 disconnects, 0 leaked pins, 0 quarantined bytes, bit-exact pos0 parity. - Says itself: live hardware qualification ran against the combined 4-PR stack before rebasing onto #496/#497/#607, and CPU tests were re-run after rebasing — i.e. no per-PR hardware attribution for #611.
What I could verify in the tree at PR head: exactly 2 new engine tests (late_or_rejected_put_accept_always_emits_fence_ack_drained tests.rs:1592, session_lost_preserves_unsent_fence_messages_for_next_session tests.rs:1632) plus 1 new test in selene/src/shared/limits.rs (staging_slots_saturates_instead_of_overflowing, limits.rs:133-139) that the description does NOT mention (it lists only the two engine tests). So 3 new tests, 2 declared.
No new tests for: conn.rs run_session/drain_out/backpressure/next_tick, IPv6 trim, Staging::planned_bytes/new overflow, net_staging reconnect window check, agent wind_down timeout + quarantine clearing, announce.spilled ordering, pool_peer empty-rendezvous guard, source.rs refused_on_open, requester CopyChecksum classification. Of the 9 fix clusters, only the put-fence state machine and session_lost preserving get tests.
CI on head commit: orientation packet says "pending"; PR was merged 24 minutes after opening with no review and no bot case-file comment (contrast #607, #609, #610, #612 which all carry flare-autobot review comments — #611 and #609's discussions are empty).
#3 [high] Why: #611 cites no issue; the observed-degradation precedent is #335
- #611 links no issue; it "refers to" only #496, #497, #607 (all pull requests, as rebase bases/targets — read_item 611). No bug report, no reproduction, no operator report is cited: the defects are asserted to be reachable ("could stall, drop required fence acknowledgments, livelock on resync, or overflow staging calculations") rather than observed. Contrast #607 (opened 15 min earlier by lukealonso) which enumerates six concrete defects with per-defect evidence.
- The nearest earlier public record of pool-client reliability work is #335 ("Prefix-cache pool and scheduler fixes from a production degradation (DeepSeek V4.1 TP4)", closed 2026-11-19, all fixes merged; pool-client items #344, #345, #365 plus #338/#358 for the pool spill loop). #335 shows the project's habit of tracking pool-client fixes against a real operator degradation; #611 does not attach itself to #335 or any successor issue.
- The event-loop/starvation claim: in the pre-#611 code, engine ticks went through
tick()→source_tick(), which did callcollect_outbound_fills()(source.rs:805, unchanged by this PR), so outbound fills were only serviced after a tick; the tick itself was starved becausetokio::select!rebuiltsleep(tick)on every iteration (pre-PR conn.rs around the oldflush()/sleep(tick)block, replaced at conn.rs:836-949). The two halves of the stated bug therefore interact — a nuance the description states but doesn't spell out. - Naming slip in the description: it says "
Engine::pump_flowdid not draincollect_outbound_fills()", butpump_flowis introduced by this PR (mod.rs:586-601 replaces the oldpump); the pre-existing method waspump.
#4 [high] Related work: stacked on #607, sibling of #609/#610/#612, extends #504/#524/#413
- Stacked on #607. #611's own evidence section says it was rebased onto post-#607 main
5df8edd3c. #607 (lukealonso, merged 17:17, 15 min before #611 at 17:32) touched the same pool-client files: selene/src/pool/agent.rs (+155), selene/src/pool/engine/requester.rs (+15), selene/src/pool/engine/tests.rs (+47), selene/src/pool/net.rs (+4), plus selene/src/memory.rs, composite.rs, shared/index.rs (read_item 607 file list). #607's autobot review explicitly notes "#609, #610, #611, #612 by yatesdr are already rebased onto #607 (overlapping hunks removed, #607 referenced explicitly)". So #611 and #607 overlap in agent.rs, requester.rs, net.rs and tests.rs, and #611's staging/overflow hardening sits on #607's slot-aliasing fix in the same files. - Sibling quartet. #609 (DMA/RDMA/quarantine lifetimes, +225/−71), #610 (local storage tier/input cache/sharding/codec), #611, #612 (selene-manager hardening) are all yatesdr, all opened 2026-11-29 17:08, merged 17:17–17:32, all cross-referencing each other and sharing the same "Combined 4-PR validation & SM120/SM121 hardware qualification" evidence paragraph (identical cn5/cn6–cn9 qualification text in #609 and #611). #609 also rewrites selene/src/pool/conn.rs (+1) and engine/mod.rs (+7) and #612 works the manager side of the same protocol.
- Same-file history that #611 modifies the semantics of: #504 (packed KV compression, author yatesdr) introduced the packed put path that #611's new
accept.packedrejection guards; #524 (mixed-chain retirement, packed errors) introduced the packed-error classification that requester.rs:883-895 extends withCopyChecksum; #413/#415/#429 (yatesdr) shaped the linked-put/min_first_page/accept logic in writer.rs; #142 (window credits) and #92 (created the pool client, conn.rs/engine) are the origin ofstaging_slots/window_creditsbounds now made saturating. - No competing or superseding PRs found. Searches for issues/PRs on pool client starvation, backpressure, FenceAck wedging, IPv6 pool dialing returned nothing but #611 itself (search_items results). Nothing open reverses it; #611 is already on main as commit 8d05b9b6.
- Existing tests #611 must not regress and that passed before: engine/tests.rs had 50+ pool engine tests (e.g.
losing_the_session_mid_copy_drains_before_failing_and_owes_the_fence_to_the_next_sessiontests.rs:1064,a_late_grant_is_never_used_and_its_terminal_is_fenced_at_oncetests.rs:938,put_accept_below_homogeneous_suffix_boundary_cancels_as_permanent_refusaltests.rs:2136 — the last one added by an earlier fix and directly adjacent to the newPhase::Acceptedtransition).
#6 [high] People: yatesdr owns the pool client; not a charter priority contributor; no reviewers
- Author: yatesdr, COLLABORATOR. 79 merged, 9 closed, 4 open PRs/issues in 180 days (orientation packet). Owns the Selene pool client and manager history: created the client in #92 ("Share prefix KV cache between instances and hosts through a selene pool manager"), then #140/#142/#171, #338/#344/#345/#365/#376/#413/#415/#429/#455/#504/#524/#609/#610/#612. Areas touched: helios/src (34), docs (33), selene/src (32), selene-manager/src (25), selene-manager/tests (20).
- Not one of the charter's named priority contributors (
@voipmonitor,@original-el8,@lukealonso— charter "How We Work"/"Respect for the Community"). He is a collaborator with a long merged record, but the charter's "extra weight" clause does not cover him. - The only other regular in selene/src this half-year is Luke Alonso (5 commits), whose #607 is the direct base of this PR; PCCessna/FujitsuPolycom works the disk-offload side (#496/#497) that #611 names as a rebase target.
- Discussant: "Discord: D-Rock" line only. No reviewers, no human comments, no reactions on #611, #609 or #607-from-yatesdr side (#607 has two flare-autobot comments; #611's discussion is empty).
- Same-day pattern: #609, #610, #611, #612 all opened at 17:08 by yatesdr with identical evidence boilerplate — a batch of four PRs from one author merged within 35 minutes, none human-reviewed.
#7 [high] Community: no review at all, merged 24 min after opening with CI pending
- #611's discussion is empty: 0 comments, 0 reviews, 0 inline review comments, 0 reactions (pr_comments "No comments"; read_item 611 "Discussion (0)"). No flare-autobot case file was opened for it, unlike its three siblings #607/#609/#612, which each carry a "A case file has been opened / Autobot Review → Ready To Merge" comment. So #611 is the one PR of the quartet that got no automated review either.
- Merged 24 minutes after opening (opened 17:08, merged 17:32) with no review state recorded ("Reviews: none yet" in the orientation packet). CI on the head commit is still listed as "pending" in the packet — i.e. it was merged before CI reported.
- Interest drawn: none visible. The only external pointer is the shared "Discord: D-Rock" contact line that all four sibling PRs carry (no username for #607).
#9 [high] Change: what the description overstates, understates or omits
Says but doesn't do (or overstates):
- "hold partial-open
TP >= 3export pins until opened peers reportDone" — the code has noTP/>= 3test; the branch fires wheneverself.ranks.is_some()andopen_export_peersfailed after some peers had opened (source.rs:322-349). Wider than described. - "verify
max_window_byteson reconnect innet_staging" — the comparison is againstnet_shape().1=max(max_window_bytes, page_record_bytes, row_record_bytes)(netio.rs:41-48, 63-71), i.e. wider than the stated field. - "
Engine::pump_flowdid not draincollect_outbound_fills()" —pump_flowis created by this PR; the old name ispump(mod.rs:586-588). - "Unit tests … Added
late_…andsession_lost_…" — a third new test exists,staging_slots_saturates_instead_of_overflowing(selene/src/shared/limits.rs:133-139), unlisted.
Does but doesn't say:
- New session-termination condition in conn.rs: if
drain_outkeeps returningFullandnow - stalled_since > CLOSE_TIMEOUT(30 s, selene/src/copier.rs:18) the loopbreaks — a deliberate give-up rather than an unbounded stall. Not mentioned in the description's backpressure bullet. - On session end, leftover
pending_outis pushed back withengine.emit(m)(conn.rs:920-926) sosession_lostcan re-owe it — an unstated second half of the "preserve queued fence-class messages" fix. Announcer::spillednow also emitsNotice::Evicted { key, tier: from, heir: None }whenfromwas removed buttocould not be added at capacity (announce.rs:149-155). The description only mentions the reordering.on_put_accept's new unknown-id branch fires for anyput_idnot inwriter.puts, not only cancelled/timed-out puts: a completed put is removed fromwriter.putsatdrive_putcompletion (writer.rs:709), so a duplicate/latePutAcceptfor an already-committed put also producesPutCancel+FenceAck(Drained). The code cannot distinguish the two cases.net_staging's reconnect check compares slot bytes only, discarding the slot count fromnet_shape(netio.rs:41let (_, required_bytes)), so a manager that increaseswindow_credits/max_open_putsacross a reconnect is not detected; also the check never runs for same-host shared-memory attachments, which bypassnet_staging(attach'sAttachment::Shmarm, conn.rs:629-635).- The failure mode of that new check is soft:
net_stagingerror →net_dialerror →attachprints "warning: cannot use the pool's data channel (…); restores and puts are off" (conn.rs:620-626), so the instance keeps serving with local tiers only. - On the event-loop side,
pump_flow(now, can_flow=false)returnsmore=falseand still runscollect_outbound_fills,poll_jobsandsubmit_pending(mod.rs:592-601) — only resync/notice emission pauses.
#11 [high] File map: per-file citations at #611 head (aac8f4f)
File map of the 12 changed files at #611's head (aac8f4f), with what each fix sits next to (line numbers are PR-head):
- selene/src/pool/conn.rs (+69/−12) —
dialIPv6 trim 574-578; session loop rewrite 836-949 (pending_outVecDeque,stalled_since, persistentnext_tick,DrainOut::{Drained,Full,Closed},need_permittx.reserve()arm, 30 s full-channel give-up, unsent messages handed back viaengine.emiton exit);drain_outreplacesflush. ChannelOUTBOUND = 4096(line 58),BUSY_TICK1 ms /IDLE_TICK20 ms (56-57),CLOSE_TIMEOUT30 s (selene/src/copier.rs:18). Registration plan usesStaging::planned_bytes(756-760);net_stagingcalled at 555; soft-fail message "cannot use the pool's data channel …; restores and puts are off" 620-626;Attachment::Shmarm bypasses net_staging 629-635. - selene/src/pool/engine/mod.rs (+18/−2) —
session_lostre-owes FenceAck/ExportEnd/WindowReleased 340-349;pump→pump_flow586-601; pre-existingemitfence-class rule 243-260;session_openedreplaysowed309-311;tick()525-554 still callssource_tick(which drained fills before this PR too, source.rs:804-805). - selene/src/pool/engine/writer.rs (+19/−1) —
on_put_accept315-347 withPhase::Acceptedat 334, unknown-id PutCancel+FenceAck 317-327, packed-offer rejection 372-377;fail_put267-274;drive_putfence rule 701-708 and removal fromwriter.putsat 709 (so a duplicate PutAccept for a completed put hits the unknown-id branch). - selene/src/pool/engine/source.rs (+27/−7) —
refused_on_openfield 54-56/148; partial-open branch 322-349 (guarded byranks.is_some(), no TP count);drive_exportExportEnd suppression 783-799;source_tick804-805. - selene/src/pool/engine/netio.rs (+7) —
net_stagingreconnect slot-bytes check 40-50 (let (_, required_bytes), slot count discarded);net_shape63-71 (slot_bytes = max(max_window_bytes, page_record_bytes, row_record_bytes); slots vialimits::staging_slots). - selene/src/pool/engine/requester.rs (+10/−6) — packed
crate::shared::packed::Checksum→wire::CopyOutcome::CopyChecksum883-895; other CopyChecksum site 598 (window verification, pre-existing). - selene/src/pool/net.rs (+11/−4) —
Staging::planned_byteschecked math 73-78 (u64::MAX on overflow),Staging::new88-94,slot_bytes()134-136; ALIGN = 4096 (55). - selene/src/shared/limits.rs (+18/−1) —
staging_slotssaturating 121-127; newoverflow_tests::staging_slots_saturates_instead_of_overflowing129-140;validaterejects only zero limits 98-119 (no upper bounds) — the reason the checked math matters. - selene/src/pool/agent.rs (+8/−5) —
wind_down2 s Goodbye timeout 490-500;quarantineclearsjobs/pending1715-1717 (still mem::forget of regions/staging 1732-1740). - selene/src/pool/announce.rs (+10/−4) —
spilledremove-then-upsert 137-158 plus newNotice::Evicted{heir:None}whentocannot be added at capacity 149-155;State::upsertcapacity rule 74-87;State::remove89-91. - selene/src/pool/peers.rs (+4/−1) —
pool_peerempty-rendezvous guard 196-199 (rank>0 path connects at 206-217; rank 0'soffer/listener side at 150-183). - selene/src/pool/engine/tests.rs (+59) —
late_or_rejected_put_accept_always_emits_fence_ack_drained1592-1629,session_lost_preserves_unsent_fence_messages_for_next_session1632-1648; adjacent pre-existing tests that constrain the change:put_accept_below_homogeneous_suffix_boundary_cancels_as_permanent_refusal2136,a_late_grant_is_never_used_and_its_terminal_is_fenced_at_once938,losing_the_session_mid_copy_drains_before_failing_and_owes_the_fence_to_the_next_session1064.
#5 [medium] Recent activity: #611 is the fourth of four same-day pool PRs, following #607 by 15 minutes
Six months of selene/src/pool commits are almost entirely yatesdr (36 of 43 in selene/src in 180 days; Luke Alonso 5, Martin Vit 2 — orientation packet). Directly relevant recent ones:
- 2026-11-29: #607 (lukealonso, 5df8edd3) then #609 e2522eb0 → #610 a56333a0 → #611 aac8f4f8/8d05b9b6, all merged within ~35 minutes.
search_history path=selene/src/poolshows the merge order: 5df8edd3 (#607) → e2522eb0 (#609) → a56333a0 (#610) → aac8f4f8 (#611). - 2026-11-25: #524 (kv-codec mixed-chain, packed errors, MAX_UNITS guard) and #504 (GPU/CPU lossless KV compression) — the packed put/restore paths #611 hardens.
- 2026-11-18: the #335 cluster (pool client + manager fixes from a production degradation), including #365 (attach at startup / register off the I/O thread) which introduced the registration-window/
register_memorycode that #611'splanned_bytesfix feeds (conn.rs:756-760). - 2026-11-02: #142, #140 (multi-host TP prefix pools, opt-in RoCE), #171; 2026-10-28..#92 created the pool client (conn.rs, engine/mod.rs, announce.rs: the only other PRs to touch those files).
- #611 is a self-fix by the area's sole active owner; no maintainer besides lukealonso has touched these files this quarter, and lukealonso's #607 landed 15 min before and does not overlap #611's lines (his changes in agent.rs/requester.rs are in different functions: window_drained/forget_window, withdraw_queued).
- Builds on rather than reverses: #611's
session_lostchange preserves exactly the fence-class set (FenceAck/ExportEnd/WindowReleased) thatEngine::emitalready owes when no session exists (mod.rs:243-260), so it makessession_lostconsistent with the existing rule instead of inventing one.
#8 [medium] Project fit: squarely inside the Selene prefix-cache goal; description meets the 4-part contract; docs untouched
- In scope / aligned. The charter's stated goal "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene" (charter line 24) is exactly the subsystem #611 hardens (selene/src/pool/, the client half of that sharing). No new model branch, no flag, no config knob, no new dependency, no API/protocol change — consistent with "Solve the right problem in the right place … smallest footprint" and "Keep the runtime small and model-agnostic".
- Evidence standard. Charter: "Bring real evidence… Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)". #611's fixes are per-mechanism rather than retry/skip, which fits; but the hardware evidence is pooled across four PRs and the description itself disclaims per-PR attribution, which is weaker than the charter's "bug fixes need to address the root cause" bar only in the sense of attribution, not mechanism.
- PR description contract. Charter: "Expect four parts: why the change is needed, what changed, the claimed result, and the evidence backing it." #611 has all four headings (Why / What changed / Expected benefit and measured result / Supporting evidence) plus an explicit "Material limitations" line — the contract is met formally.
- Non-goals: nothing here strays into rack-scale disaggregation, CPU backends, or orchestration; the work is inside the existing single/cross-host pool. No conflict with a non-goal.
- Documentation. The area's design doc is docs/prefix-cache-offload.md (pool client covered at line 29 and lines 1515-1517; pool protocol/flags at 1168). #611 changes no docs — unlike #607, which updated docs/prefix-cache-offload.md for its
Index::expiredchange. Two behaviour changes that arguably touch documented semantics are undocumented: (a) reconnect now fails the data channel if the manager'smax_window_bytesgrew past the registered staging (netio.rs:40-50) — previously it silently reused smaller staging; (b)Announcer::spilledat an at-capacity index now re-emits anEvictednotice withheir: Noneinstead of nothing (announce.rs:149-155), which changes what the manager is told about a holding that could not be added. Neither is mentioned in the description.
#10 [medium] Reach: operational effects on pool-attached instances, no compatibility or config surface change
- Users/operators. Everything lands in the client half of prefix-cache pooling, i.e. instances started with
--prefix-cache-pool ADDRESStalking toselene-manager(docs/prefix-cache-offload.md:1168, and 1515-1517 for the pool client's place in the stack). Observable changes: far fewer session drops under outbound pressure (previously anytry_sendon a full 4096-slot channel broke the session —OUTBOUND = 4096, conn.rs:58, and the oldflush()returned false on the first full send), no lost fence acknowledgments across reconnects (manager no longer waits on a put/export fence that will never arrive), and no IPv6-literal data-channel address failure (dial, conn.rs:574-578). - Configuration and defaults. No new flags, no changed defaults.
staging_slots/Staging::planned_bytes/Staging::newkeep the same values for all saneLimits(MAX_OPEN_PUTS=4, WINDOW_CREDITS=2, MAX_WINDOW_BYTES=4 MiB, limits.rs:11-20); they only stop wrapping/UB under hostile manager metadata, which the client validates only for zero (limits.rsvalidate, lines 98-119 — no upper bounds are checked). - Compatibility. No wire/protocol change (selene.proto untouched), no Cargo.toml change, no on-disk format change; old and new selene/ selene-manager builds interoperate. Matches the description's claim. Sibling #612 hardens the manager side of the same protocol, so operators get both halves only together.
- Deployment/regressions to watch.
quarantinenow clearsjobs/pending(agent.rs:1716-1717) while stillmem::forgetting the maps' backing regions — behaviour on a quarantine is unchanged for memory safety (that is #609's ground) but the agent stops polling those jobs; a quarantined agent is already terminal (status → Disabled, agent.rs:1741-1743).RankAgent::wind_down's 2 s timeout (agent.rs:492-498) bounds a shutdown that could previously hang forever, at the cost of possibly dropping the Goodbye frame. - Docs. None updated (see project-fit note).