Skip to content

test(relay): reserve the unavailable auth endpoint - #5768

Merged
kixelated merged 4 commits into
mainfrom
fix/relay-refusal-fixture
Oct 17, 2026
Merged

kixelated merged 4 commits into
mainfrom
fix/relay-refusal-fixture

Conversation

@kixelated

@kixelated kixelated commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The unavailable-auth fixture dropped its TCP listener before dialing the relay, leaving the auth port available to concurrent tests. If another listener took that port, the fixture could stall or receive an unrelated response. A workspace run hit the session-close assertion's ten-second deadline.

Approach

Retain a listening TCP endpoint for the test and close each accepted connection before answering HTTP. A scoped JoinSet owns the accept task and releases it on teardown. Assert that another listener cannot acquire the address and that an HTTP request fails, then retain the relay refusal-counter checks. Listening avoids the earlier bound-but-not-listening fixture's assumption about the operating system's TCP refusal behavior.

Impact

  • Public API: none; test fixture only.
  • Wire and configuration: none.
  • No dependency, version, or timeout changes.

Validation

  • The original fixture passed alone in 0.160s. Controlled reclamation of its released port reproduced the session-close panic in 10.119s. This demonstrates the mechanism; the original run did not identify the port's claimant.
  • Restoring the original reserve/drop setup with the reservation assertion fails immediately in 0.007s.
  • At 6b67a8194, the listening/closing fixture passes in 0.261s during the scoped suite. The focused run also passes.
  • Full Linux Nix MOQ_STRICT=1 just check passes: 507 scoped relay/CLI tests and 200 CLI playback tests, plus formatting, rustdoc, dependency hygiene, drill sensitivity, flake, and repository checks. No macOS or Windows execution is claimed for this revision.

Alternatives

A scripted HTTP error response would test HTTP status handling. Closing the connection instead keeps this a transport failure while reserving the port, without retries, sleeps, or a longer timeout.

Follow-ups

This remains separate from S3 coverage #5760 and admission deadline changes #5765. The earlier S3 head plus fixture revision a88391d53 passed a full Linux workspace check; #5760 records those exact inputs. Refresh S3 and its checks after this prerequisite lands. No merge is requested by this update.

(written by GPT-6)

kixelated and others added 2 commits October 16, 2026 14:36
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated
kixelated marked this pull request as ready for review October 16, 2026 21:43
@coderabbitai

coderabbitai Bot commented Oct 16, 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 16 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: 62aad032-4803-4f9d-aa12-2cc0685d5c76
📥 Commits

Reviewing files that changed from the base of the PR and between 2aa7a95 and 148b522.

📒 Files selected for processing: 1
  • rs/moq-relay/tests/integration/refusals.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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T23:07:32.266449Z 148b522 New commits
ℹ️ 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.

kixelated and others added 2 commits October 16, 2026 15:31
Co-Authored-By: GPT-6 <noreply@openai.com>
…ture

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

  • Merged main into the branch (148b52219). The only overlap was test: link each crate's integration tests into one binary #5689 moving rs/moq-relay/tests/refusals.rs to tests/integration/refusals.rs; rename detection carried the fixture change across with no manual resolution.
  • Local: cargo test -p moq-relay --test integration refusals passes (6 tests, including unavailable_auth_server_is_counted), and Nix just check passes on the merged head.
  • Codex reviewed 148b52219 with no findings.
  • Public API and wire impact: none, test fixture only.
  • Decisions: none outstanding. Draft test(archive): exercise recording proof through S3 HTTP #5760 can refresh on main once this lands.

Enabling auto-merge pinned to 148b5221952b3181e022b47e84be0f1ee8a7cce2.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 16, 2026 23:31
@kixelated
kixelated added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 25d93d8 Oct 17, 2026
8 checks passed
@kixelated
kixelated deleted the fix/relay-refusal-fixture branch October 17, 2026 00:16
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