Repository navigation
test(mcp): match HTTP trace rows by request identity - #1335
Merged
yyjeqhc merged 1 commit intoOct 28, 2026
Merged
Conversation
Trace persistence is asynchronous, so the last persisted row is not a stable identifier for the tools/list request. Match it by action identity, require exactly one match, keep the previous invariants, and cover an interleaved later request.
yyjeqhc
approved these changes
Oct 28, 2026
yyjeqhc
left a comment
Owner
There was a problem hiding this comment.
Reviewed the scoped implementation and regression coverage against its source baseline; CI and diff checks pass. No blocking issue identified.
This was referenced Oct 28, 2026
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.
Problem
stateless_full_trace_correlates_only_hashed_openai_windowlocated thetools/listActionAudit row withdurable_rows.last(). Trace persistence is asynchronous, so row order is not a stable identifier for that request: any later row for the same Window makes the assertion fail for reasons unrelated to the behavior under test, and the failure message points at the wrong contract.Change
Test-only. The test now:
tools/callin the same Window aftertools/list, so thetools/listrow is no longer expected to be last;action_name == "toolsList") and requires exactly one match, reporting the whole row set on failure;mcp_tools_list,window_meaningful == 0, no recorder gap);tools/calltrace ids, so a row cannot satisfy the assertion by belonging to another request.Production logging order and all identity/privacy assertions are unchanged.
Validation
This demonstrates the old assumption fails as soon as another request persists after
tools/list; the filtered assertion is independent of persistence order. Not run here: Windows/macOS lanes (no environment available).