Amendments to the case file for PR #549 — new event: head 5ed7af86 → 9cca87ac ("Keep page gauges out of the copy-out retry key")
Scope: this file contains only what changes in the 2026-11-26 report (scratchpad note #16). Everything not listed here stands unchanged. Consolidated list: scratchpad note #23; detail in notes #17–#21.
Key findings (what is new)
- The one blocker from the automated review is genuinely fixed — the new gauges no longer leak into the host copy-out retry key (
helios/src/server/runtime.rs:2441-2453), and the fix is sound, not just expedient: every state change the key no longer sees moves no cache resource (note #20). - The fix has no claimed coverage. Its only source change is in
server::runtime, which the PR's own test filter (--lib -- cache:: scheduler:: server::metrics) does not select; no test was added,server/runtime/phase_tests.rsis untouched, and the quoted 508-test run predates the fix (note #19). - The PR description is now stale about its own diff. "What changed" still lists only
cache.rs,scheduler.rs,metrics.rs,docs/api.md;runtime.rs(+8/−1) is undocumented, and "No allocation, eviction, or scheduling decision changes" is still asserted without recording that the gauges had briefly perturbed deferred host copy-outs. - The "subtract" item was answered by adding code, not removing it. A new
pin_prefix/unpin_prefix(id, request: bool)pair plus arequest_pinboolean covers only three of five request-pin sites; the ~90 removable lines are untouched (note #17). - Two new prose inaccuracies were introduced in
docs/api.mdwhile fixing the old ones: test-only internals presented as runtime behaviour, and "publishes both on every scheduler pass" (it is progress-gated). - Engagement changed: the bot arrived, humans have not. A flare-autobot case file (2026-11-26 21:35) and Autobot Review 2026-11-26 22:38, "Changes Requested" now exist, plus the author's re-review request at 04:56 (note #21). No human review or comment.
- Series context: WynnD now has four open drafts in two days (#548, #549, #552, #553) plus issue #551; siblings #553's auto-review was halted on charter/value grounds (note #18).
1. Replace in the header / scale section
- Head:
5ed7af86→9cca87ac"Keep page gauges out of the copy-out retry key" (Wynn Drahorad, 2026-11-26), on top of5ed7af86. Basemain. Still a draft. - Size: 8 files, +246/−16 (was 7 files, +218/−10). Verified per file:
docs/api.md+16,cache.rs+60/−1,cache/lifecycle_tests.rs+3,cache/tests.rs(not opened) +24,scheduler.rs+51/−14,scheduler/tests.rs+66,server/metrics.rs+18,server/runtime.rs+8/−1 (new in this commit). - Updated-at: 2026-11-27 04:56 (author's comment).
2. Strike — closed by this event
- "Gauges leaked into the copy-out retry key" (checkpoint 2 of the old evidence list): fixed.
CopyoutResourcesnow storesSchedulerStats { request_pages: 0, reserved_pages: 0, ..self.scheduler.stats() }(helios/src/server/runtime.rs:2441-2453). Key is byte-equivalent to pre-PR semantics. Soundness verified (note #20): the key still carriesfree_pages,cached_pages,active_requests,retiring_slots,free_slots,snapshot_*, the u64 counters,completed,exports,next; the movements removed from the key (acommitmoving pages fromrequest.reserved_pagesintoprivate_pages,scheduler.rs:2433-2438, 2442; a ticket waiter'spin_requeston a restore,scheduler.rs:1889) move no cache resource.SchedulerStats' derivedPartialEqis used only here (runtime.rs:1053-1059construction,2455comparison). - Three prose items — done:
- "gauges read from scheduler state on each scrape" removed; replaced with worker-publishes wording (
docs/api.md:302-303). - Ratio paragraph rewritten (
docs/api.md:303-312): reserved outside the numerator,request + reservednamed as the comparable figure, request-pinned tail pages noted as counted in both gauges, retirement-draining and in-flight-restore pages excluded. - Minor nit "Dividing either gauge…" still present (
docs/api.md:309-310) — dividing the reserved gauge alone is meaningless (see §5).
- "gauges read from scheduler state on each scrape" removed; replaced with worker-publishes wording (
cache.rs:548-550doc comment — done. Now "Pins a checkpoint on behalf of an active request. Request pins also count the tail pages of the pinned checkpoints, each page once; a request's own private pages are counted by the scheduler, which holds them." (cache.rs:548-550).- "retire can fail after
request.take()" — done.record_publication(prefix)+cache.unpin_request(prefix)now run atscheduler.rs:3149-3156, beforeself.slots[..].request.take()at:3157.retireis re-enterable (cancel / finish / fail_ticket / release_after_shutdown), andrecord_publicationdedups viaoffered_publications, so a retry cannot double-offer (note #19). - "No engagement at all" / "no automated intake comment, unlike its siblings" (old Community section, notes #13 and #16) — stale. See §6.
3. Stands, with new detail
- Ledger gap unchanged. The PR's own live scrape still shows
flare_request_kv_pages399/402 againstflare_total_kv_pages21504 with free 15582/15400 and cached 2037/2043 — leaving ~3,885 pages (21504 − 15582 − 2037) unattributed, an order of magnitude more than the new gauge reports. The PR description's inequality (request + reserved < total − free − cached) is satisfied trivially because it is dominated by snapshot-backing pages. The bot reaches the same point independently ("Cite the in-repo drift assertion … instead ofrequest + reserved < total − free − cached, which is dominated by snapshot-backing pages"). - #537's cheaper option still neither taken nor explained. The pinned/idle split of
flare_cached_kv_pagesusing existingpins/direct_pinsremains unimplemented and undiscussed; the ready-made ratio gauge likewise. - Field↔Prometheus table still not extended.
docs/api.md:332-362has rows forcached_pages/free_pages/total_pages/page_tokensbut no row forflare_request_kv_pagesorflare_reserved_kv_pages, while the prose block above it now describes them. (Line range moved from :325-355 to :332-362 with the +16 prose insertion; the table itself is unchanged.) - Compaction claim still a
debug_assertonly (cache.rs:627), compiled out of release builds. pin_request/unpin_requeststill walkchain()twice per call (cache.rs:551-563,565-580), on admission, ticket-waiter, boundary-publication and retirement paths.- Subtract/Simplify item answered by adding code (new): instead of carrying the pin kind once in the
pinnedbinding as the review asked, the commit addspin_prefix(id, request: bool)/unpin_prefix(scheduler.rs:2025-2040) andlet request_pin = inbound.is_none()(scheduler.rs:1643), used at only three sites (:1645,:1656,:1678). Directcache.pin_request/unpin_requestremain at:1889,:2977,:2999,:3155→ two idioms for one operation, a boolean-flag parameter, net ~+13 lines.scheduler/tests.rsstill +66 (the duplicate test atscheduler/tests.rs:971-1034vs:1037+),cache/tests.rs(not opened) still +24.
4. New finding — the fix sits outside the claimed test filter
helios/src/server/runtime.rs is the only source file the second commit changes (+8/−1), and the Evidence section still reports cargo test --lib -- cache:: scheduler:: server::metrics, a name filter that does not select server::runtime::*. No test was added; helios/src/server/runtime/phase_tests.rs is untouched; the "508 passed" result predates the fix. So the copy-out-key fix has no claimed coverage at all (note #19). Existing tests that could catch a regression only incidentally: completed_copyout_retries_capacity_waiters_without_a_new_model_fence (phase_tests.rs:5890), local_copyout_defers_without_a_pin_until_pending_admission_headroom_returns (:6357), local_copyout_rechecks_headroom_after_each_queued_pin (:6408) — they assert copyout_headroom_deferrals counts, but only trip if a page-boundary-crossing decode happens between deferred-copy-out retries, which I did not verify. Suggested review ask: one test that decodes across a page boundary while a copy-out is deferred and asserts the deferral count does not move.
5. New prose inaccuracies introduced by this commit
- Test internals leaked into the operator contract —
docs/api.md:311-312: "the test-only assertion inCache::statscompares the maintained request-pinned count with a full scan of every checkpoint on each read". That assertion exists only undercfg(test)(cache.rs:817-837) and is not runtime behaviour; it belongs in the PR as evidence, not indocs/api.md. - "The worker publishes both on every scheduler pass" (
docs/api.md:302-303) is wrong: publishing is gated onprogress(runtime.rs:1148-1149) and also happens once at worker start (:722) and once after shutdown (:745), so it is "each pass that made progress", not every pass, and not only scheduler passes. - Minor —
docs/api.md:309-310"Dividing either gauge byflare_total_kv_pages": only the request gauge (or request+reserved) divides usefully; one-word fix ("Dividing that sum or the request gauge …").
6. Replace the Community / People engagement lines
- PR #549 now has three comments: flare-autobot case file 2026-11-26 21:35 (case
993b6a3c, intakec610511d); flare-autobot Autobot Review 2026-11-26 22:38, "Recommendation: Changes Requested" (98f8d847, value-proposition report98a32ff2); and the author, 2026-11-27 04:56: "@flare-autobot review the pushed changes. The per-request metrics PR is new; the other two carry review fixes." Engagement is bot-only: no human review, no human comment, no maintainer comment on #537. - The bot review is against the old head; the pushed fix has not been re-reviewed (its auto-review is queued 90 min after the push / on the @-mention).
- The bot independently reaches five of this case file's findings: scrape-vs-worker prose, the ratio sentence, the snapshot-backing residual,
retirereleasing the pin beforerequest.take(), thepin_requestdoc comment, the duplicate scheduler test (+~55 removable lines), foldingpin_request/unpin_request(~25 lines), andflare_reserved_kv_pagesas unasked-for (~22–25 conditional lines). It says "Nothing below asks for new code" and asks for ~90 lines to be removed. - The bot does not reach: the ~3,885-page ledger gap in the PR's own scrape as a blocker, that #537's cheaper pinned/idle split was rejected without explanation, that
docs/api.md:332-362still lacks the two metric rows, that the compaction claim is adebug_assert, or that the description and Evidence section are now stale aboutruntime.rs. These remain this case file's distinct findings.
7. Series / project-fit context to add
WynnD now has six items open in under two days, none merged: #548 "Add request latency histograms and process metrics" (draft, +548/−25, closes #536; bot "Changes Requested" 2026-11-26 22:00), #549 (this, draft, +246/−16), #552 "Report request timings on final responses" (draft, +929/−26, closes #551, stacked on #548, states it does not touch #549's code), #553 "Add vLLM-compatible per-request metrics" (+303/−9) — and #553's auto-review was Stopped at 2026-11-27 05:17: "Review Stopped — It is low value or does not align with the project charter" (value-proposition report 0b596174-…) — plus issue #551. Read against the charter's "solve the right problem / smallest footprint" bar, this strengthens the existing fit finding: #553 is the sibling that made the weakest operator case and was stopped on exactly that gate, while #549's answer to the same gate is the independently filed operator issue #537 — which remains its strongest charter argument, and the reason to keep reviewing it on substance rather than value.
Unchanged open questions (still open after this event)
- What accounts for the ~3,885-page residual in the PR's own scrape? Still unreported and unattributed; #351's identity suggests snapshot backing. The rewritten docs prose now admits "snapshot backing pages" are excluded (a partial acknowledgement,
docs/api.md:309-311) but the PR still does not show the numbers closing. - Why was #537's cheaper pinned/idle split rejected? Still unstated, and the new
pin_prefix/unpin_prefixpair makes the chosen design slightly larger rather than smaller. - Is the copy-out fix correct under TP/multi-rank and multi-host Selene? Untested by the author, not exercised by any claimed test, and now the one code path added by the second commit with zero coverage.
- Would maintainers accept the new
unpin_requesterror path?cache.rs:565-568still errors whendirect_request_pins == 0; unreachable in the paths traced, but a new failure mode on retirement — now more visible becauseretiresurfaces the error before emptying the slot. - Will the deferred bot re-review (or a human) confirm the fixed prose? Two of the four old prose findings are queued for re-review, and two new prose inaccuracies were added in the same commit.