Repository navigation
test(libmoq): session close flake was fixed by #9038; drop the comments it outdated - #9078
Conversation
Quest-Claim: 08774965aafe6b7a
… fixed the close flake The client's close returned SESSION_NOT_FOUND when the server closed the accepted session first: before #9038 a session closed within 1s of uptime ended the reconnect loop, racing the test's close. #9038 establishes a session once its SETUP is answered, so the client now redials. Drop the comments that still describe the old rule, and the finished quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — #9038 already fixed the library, so this only removes the stale workaround comments and states the rule the assertion depends on.
Reviewed changes: the full diff (comments in rs/libmoq tests plus a deleted quest file).
- Stale comments removed: the three "close the client first" notes in
announce_route_crosses_a_relay_session,a_minted_instance_pins_request_and_followandparity::session_tokens_and_grants. The close order is unchanged. - Assertion documented:
server_accepts_a_sessionnow says whymoq_session_close(client) == 0holds. - Comment reworded:
server_rejects_a_sessionno longer claims the client "sees it connect first". - Quest file deleted: the finished quest.
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe change deletes an investigation note about intermittent session test failures. It revises or removes comments about session-close ordering, client state after server closure, and rejected session requests. No executable test logic or session-close assertions changed. Merge Risk:
|

Closes the quest quest/m0/test-flakes-3/c-server-accepts-session.md.
Problem
libmoq test::server_accepts_a_sessionsometimes failed withmoq_session_close(client)returning-21(MOQ_ERROR_SESSION_NOT_FOUND) instead of 0, mostly under a loadedjust check(most recently on the heads of moq-dev/moq#9059 and moq-dev/moq#9061).Cause: the reconnect policy treated a session closed before 1 s of uptime as a refusal and ended the whole loop. The test closes the accepted session within milliseconds, so the dialed client's loop ended and released its handle. The result depended on timing: the test failed only when the client saw the close before the test reached
moq_session_close(client).moq-dev/moq#9038 already fixed the library: a session is now established once the peer answers its credential (lite-06's SETUP reply), so after the server closes, the client backs off and redials as documented. Both failing heads above predate #9038. Its deterministic regression test is
an_accepted_session_establishes_the_policyinrs/moq-net/src/reconnect/tests.rs, which runs on a paused clock. #9038 also removed a 1 s sleep thata_credential_rides_every_reconnectneeded for the same reason.Approach
No library change is needed. This PR:
moq_session_close(client) == 0assertion inserver_accepts_a_sessionso the rule it depends on is stated.announce_route_crosses_a_relay_session,a_minted_instance_pins_request_and_follow, andparity::session_tokens_and_grants). feat(net)!: a reconnecting client is connected once the peer accepts its credential #9038 made them false, and they were the earlier workaround for this same flake. The close order stays as it is.server_rejects_a_session's comment, which still said the refused client "sees it connect first". Since feat(net)!: a reconnecting client is connected once the peer accepts its credential #9038 a refused session never reports CONNECTED.Validation
Ran the test binary directly, 8 copies at a time across all 32 CPUs on a host already loaded by other agents (load about 35):
16880c8371(main just before #9038)left: -21, right: 0attest.rs:8761Earlier on this branch:
cargo nextest --stress-count 400 --test-threads 64over both tests passed 400/400, and 24 copies pinned to one core passed 240/240.just checkpasses.Impact
None. Test comments and quest file only. Public API: none. Wire: none.
Alternatives
moq_session_close(client) == 0asserts that.Caused by
Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, high effort
(Written by Claude Opus 5.5 with high)
Review
Rewritten by
quest reviewafter each round.Head: 1c0c161
Base: origin/main at 4e73451
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1eebb-ebb4-7d10-b222-19d0b0249f89, round 1Score: 10/10,
The scoped diff only updates test comments and removes a resolved quest record, changing no executable behavior and leaving no actionable defects.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none