Repository navigation
Prefer complete runs for BEST and WORST results - #794
Conversation
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. Thanks, this went through cleanly. The ranking change is small and does what it says. Rank complete runs when there are any, and fall back to all runs otherwise. Zero-throughput complete runs stay eligible. BEST/WORST still point at the original One question, about the second commit ("Mark worker-failed runs partial before ranking results"). The PR description only covers ranking, but Nitpicking: The core fix looks solid. I'd mainly want the (would file this as a comment, not a formal block) |
|
The final description now explicitly calls out the metadata change for single-run I considered keeping ranking validity separate. The 1.3-second drop is after the one-second deadline but before the current ten-second drain grace. The test requires exit 1, exactly three completed replies, and |
Problem
A partial run can displace completed runs in BEST/WORST after a
--run-countseries is interrupted. A run with a failed worker also reportsInterrupted: falsedespite the existing invalid-results diagnostic and failure exit code, allowing it to compete as a complete result.Root cause
The ranking loop considers all runs without checking their interruption flag. Separately, joined worker failures set only the process failure status; their invalidity is not retained in the returned run statistics.
Fix
Mark a run interrupted when the existing post-join worker-failure count is nonzero. Prefer non-interrupted runs for both BEST and WORST whenever any exist; if all runs are partial, rank the available results as before. The README explains this policy.
Worker failure detection and exit codes are unchanged, including failures already classified after a timed deadline. Ordinary command errors and legitimate zero-throughput timed completion remain eligible. No completion inference uses elapsed duration, operation count, or error count.
Selection retains the original run object and its timestamps, counters, and histograms. Per-run output, numbered HDR files, aggregate population, and JSON keys remain unchanged. Failed-worker runs now correctly carry
Interrupted: truein single-runALL STATSas well as per-run/selected output and propagate it to the aggregate; this is the intended metadata correction.Tests
Paired bounded private-loopback fixtures against base
4bade818c3642e1771a34e2faddb3fcc9b96c956, initial head8bc426afee0e72a8cd35de819391084a86228236, and this change:-ERRcontrol: all twenty responses complete; both old and fixed versions exit 0, keep the run uninterrupted, and allow it to rank. These deliberately different scripted response delays discriminate selection, not performance.Interrupted: true.Affected versions
Both defects affect unreleased master:
5a304b01b70262c19930849be0783166e4d3f711. Releases 2.3.0–2.5.2 had the separate run-1 selection defect (--run-count: BEST and WORST RUN RESULTS always show the same run #565).7a6394e7c92db071a10eff6661d9a97ba6e56128(Stop silently re-running worker threads after connection errors #546) introduced the current failure finalization/classification.No release tag contains either introducing commit. Historical attribution is from source inspection; paired runtime claims are limited to the exact SHAs above.
Fixes #711.
Fixes #796.
🤖 Generated with Claude Code