Skip to content

test(net): wait out the jittered retry after a reset renewal - #5865

Merged
kixelated merged 1 commit into
mainfrom
claude/fix-reset-renewal-flake-f38e93
Oct 18, 2026
Merged

kixelated merged 1 commit into
mainfrom
claude/fix-reset-renewal-flake-f38e93

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Fixes the flaky ietf::publisher::tests::a_reset_renewal_ends_only_its_request, which knocked #5736 out of the merge queue.

Root cause

The test, not the product code. After the peer resets the renewal's stream, the loop withdraws the request and re-advertises the namespace on its retry, armed at jitter(RETRY_BASE): a random 50 to 100 ms. The test waited for that advertisement with poll_until, which gives up after 100 one-millisecond settles, a millisecond or two of which are spent before the retry is armed. A jitter near the top of its window therefore landed past the budget. Pinning jitter to return delay fails the test every time.

The jitter is intended (it spreads a relay's retries), and the simulated clock stays deterministic apart from that one random draw.

Fix

Assert the reset request was withdrawn, moq_clock::sleep(RETRY_BASE) on the simulated clock, then look for the fresh advertisement. The wait now covers the whole jitter window by construction rather than by poll count.

No other poll_until caller in this module waits on the retry; an_unanswered_renewal_advertises_again already loops for 20 simulated seconds.

Verification

  • Before: 8 failures in 500 runs of the single test on main.
  • After: 0 failures in 2000 runs.
  • With jitter temporarily pinned to its minimum (50 ms) and maximum (100 ms): both pass; the maximum failed deterministically before.
  • just check passes.

API and wire impact

None. Test-only change.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

a_reset_renewal_ends_only_its_request waited for the re-advertisement with
poll_until, which gives up after 100 one-millisecond settles. That
advertisement rides the retry, armed at jitter(RETRY_BASE), 50 to 100 ms
after the reset, and a millisecond or two of the budget is already spent by
then, so a jitter near the top of its window failed the test (about 1 in 50).

Assert the reset request was withdrawn, sleep RETRY_BASE on the simulated
clock, then look for the fresh advertisement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T14:56:53.207715Z f317fc4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d915bfc-07e7-41dd-85c0-35845923bc71
📥 Commits

Reviewing files that changed from the base of the PR and between 291e392 and f317fc4.

📒 Files selected for processing: 1
  • rs/moq-net/src/ietf/publisher.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: test-only fix for the a_reset_renewal_ends_only_its_request flake. The test now asserts the reset request was withdrawn, sleeps RETRY_BASE on the simulated clock to cover the whole retry jitter window, then waits for the fresh advertisement. Codex reviewed this head with no findings, CI is green, no open threads, and no decisions were outstanding. Enabling auto-merge on f317fc4.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 46b33c7 Oct 18, 2026
10 checks passed
@kixelated
kixelated deleted the claude/fix-reset-renewal-flake-f38e93 branch October 18, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant