Repository navigation
fix(benchmarks): preserve interrupted trace replay evidence - #191
Merged
Merged
Conversation
Signed-off-by: psv666 <2693925048@qq.com>
psv666
marked this pull request as ready for review
October 27, 2026 03:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Trace replay lost completed responses when interrupted during a later request, and reusing
--outsilently overwrote prior evidence. This follow-up fixes the confirmed persistence and artifact-hygiene findings from the review of #185; #174, #179, and #184 remain in place.Every planned request is accounted for as completed, incomplete, or unattempted. HTTP/transport failures remain visible, and unfinished requests do not enter latency statistics. Existing output directories, including empty ones and directories owned by another running replay, are rejected before sending requests. Response rows are written in completion order;
sent_sretains send order.Remove the dated one-off experiment report from the current source tree and link its unchanged original revision. Both maintained replay samples remain byte-identical. This preserves the existing published evidence; it does not claim to recover any unpublished raw measurements.
Evidence
Base:
32346fcb2b88a10ffa7c8d456ae74d0543972d03. Fix:72f9d8b398aa0cb00a8fcf03e34bd7e0ad08610c.config.json, losing the completed response. Replaying a different trace into the same directory replaced the prior config, responses, and summary. The new process tests reproduce both failures on the base implementation.Personally run with Python 3.12.13 and the pinned
httpx==0.28.1, in a separate environment:python benchmarks/bench.py validate benchmarks/smoke.jsonl python -m unittest discover -s tests/benchmarks -p 'test_*.py' -v mkdocs build --strictResults: 4-request smoke manifest valid; 133 benchmark tests passed, including 7 new persistence tests; strict documentation build passed.
git diff --checkpassed. Sample file bytes and SHA-256 values were compared against the base. Changes comprise 396 authored source/test lines and 490 total changed lines across 4 files.No Rust or inference code changes. No GPU/model execution was performed for this fix, and no inference performance or numerical-parity claim is made. Historical hardware evidence for #174/#179/#184 remains subject to its documented source, model and device limits; this PR does not extend that qualification to the integrated head.
Merge Danger
Door: two-way.
Blast Radius: benchmarks.
Callers must supply a new
--outdirectory. Completed runs retain their existing counts and successful-response latency definitions; interrupted runs now include explicit unfinished rows and counts. Ctrl-C and replay exceptions finalize partial evidence and exit unsuccessfully. Forced termination or machine failure cannot run finalization; flushed files are partial evidence and are not guaranteed durable against power loss.Draft for maintainer review; no merge requested by this submission.