Repository navigation
Keep AgentX profile captures when AIPerf fails only its metric-coverage gate - #124
Merged
Merged
Conversation
…etric-coverage gate Synchronous trace export stalls the server for long captures, so AIPerf's profiling-phase latency coverage falls below its floor by construction. A profiled replay is diagnostic-only; treat a client exit whose sole invalid reason is insufficient_profile_metric_coverage (uncancelled, no request errors) as a finished replay so the trace flush completes, and report the waived reasons in agentx_metrics.
Ahmedhasssan-aig
requested review from
a team,
haofrank and
sinarafati-amd
as code owners
October 15, 2026 04:05
haofrank
reviewed
Oct 23, 2026
Signal termination (negative return code) or any exit code other than AIPerf's fatal validation exit (1) now fails the profiled replay even if a coverage-only result was already exported. Co-authored-by: Cursor <cursoragent@cursor.com>
haofrank
self-requested a review
October 28, 2026 16: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
SGLang writes a large profiled Chrome trace synchronously, and the server serves no tokens for the 15–18 minutes that export takes. AIPerf measures a fixed profiling window, exits non-zero with
insufficient_profile_metric_coverage, and Magpie treats that client failure as fatal, stopping the server while the trace is still being written.A profiled AgentX replay is diagnostic-only. When the AIPerf result is uncancelled,
error_summaryis empty, and the onlysubmission_invalid_reasonsentry isinsufficient_profile_metric_coverage, Magpie now treats the replay as finished and lets the trace flush complete. The waived reason is recorded onagentx_metrics.client_waived_invalid_reasons. A cancellation, a non-emptyerror_summary, or any other invalid reason still fails the run. The result stays diagnostic and is not publishable benchmark evidence.Validation
pytest tests/unit/modes/test_agentx_profile_integration.py— 30 passedcomplete, and the waived reason is recorded.request_error_rate_exceeded, alone or together with the coverage reason: run fails and no reason is waived.