Archived
dashboard: statsdump exits cleanly when its handle is dead; sparkline comment told a third wrong story
Judge ringer 4 on the final tree (3 slices, Tasmania, independent questions). Slice A PASS-WITH-CAVEATS, slice B PASS-WITH-CAVEATS, slice C FAIL. Both findings were real and both are fixed here. statsdump (slice B, R1 + R2): the rotation fix deferred the death instead of removing it. If the best-effort reopen inside rotate() itself fails, out stays CLOSED, the re-raised OSError is swallowed by the cap check's handler, and the next poll's write raises ValueError -- which no handler in the file catches (they all catch OSError). Slice B found the unpatched twin in the write-failure handler: close succeeds, reopen fails (EMFILE/ENOENT/EACCES/EIO -- not ENOSPC, which append-open survives), and the cap check's out.tell() dies on the closed handle two statements later. Both paths now raise a dedicated RecorderDead, caught at the loop: the recorder exits loudly with its exit summary, because a handle that cannot be reopened means recording cannot continue. Deferring a traceback by one iteration was the wrong ambition; exiting with the count is the honest terminal state. Canaries reproduce both geometries (reopen fails after rotation shift fails; reopen fails after write fails): pre-fix dies 'ValueError: I/O operation on closed file' with no summary in both; post-fix exits rc=0/rc=1 with the summary printed in both. dashboard.cpp (slice C, FAIL): my previous commit replaced one wrong sparkline comment with another. The truth, verified against the call sites: setMetric samples EVERY poll for every tile (idle polls push 0), so the accept sparkline spans the same 60 s as the others; the only difference is the dash case -- no draft head, no value, a gap that stretches the line over more wall-clock. The original comment claimed 10 s drafting windows; my rewrite claimed drafting-only sampling, conflating the sparkline (setMetric/hist) with the triple's recent window (noteSample, win=false). Two lies in one comment block, both caught by review rather than by me. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
This commit is contained in:
1 parent
b2e0ef7911
commit
459529638e
2 files changed
+21
-8
No files matched your search
@@ -2041,9 +2041,11 @@ function update(s, dt) {
|
||||
* reads as a live measurement of a lane that drafted nothing. The lifetime ratio stays on
|
||||
* /stats and /metrics; what the tile answers is "what is it accepting now", and now, idle,
|
||||
* it is accepting nothing.
|
||||
* THE SPARKLINE'S SCALE DIFFERS from the other tiles: it samples only polls that DRAFTED (the
|
||||
* others sample every poll), so its 120 samples span 60 s of continuous drafting at the 500 ms
|
||||
* poll -- and more wall-clock than that when drafting is intermittent. */
|
||||
* THE SPARKLINE'S SCALE IS THE SAME as the other tiles -- 120 samples at the 500 ms poll, 60 s
|
||||
* -- because setMetric samples every poll, idle polls included (0 is a value; see above). The
|
||||
* one difference is the dash case: with no draft head there is no value to push, so those polls
|
||||
* leave a gap and the line stretches over more wall-clock than 60 s. (Judge slice 4C: this
|
||||
* comment claimed a 10 s window, then a drafting-only window; neither sampling scheme exists.) */
|
||||
if (!(s.draft_positions && s.draft_positions.length)) setMetric("accept", null, DASH);
|
||||
else if (awR != null) setMetric("accept", 100 * awR, pctn(awR, 0));
|
||||
else setMetric("accept", 0, pctn(0, 0)); /* drafted nothing this poll -> 0, the idle figure */
|
||||
|
||||
Reference in new issue
Block a user