Skip to content

quest(m1): finish the test cost audit - #6174

Merged
kixelated merged 11 commits into
mainfrom
quest/m1/audit-test-cost
Oct 22, 2026
Merged

kixelated merged 11 commits into
mainfrom
quest/m1/audit-test-cost

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Finishes the m1 run of the recurring test cost audit (quest/m1/audit-test-cost.md) and plans the m2 run behind the release cut. It removes about 50 test-seconds from a full queue selection and stops benchmark-only edits from running their dependents' suites.

Changes (one commit each)

  • moq-auth: the stalled re-check close runs on the paused clock. It waited out the re-check's 10 s bound on the wall clock against wiremock. It now uses the in-process Script the other lease tests use. The refusal and invalid-grant re-check tests nudge a re-check instead of waiting out the 1 s cadence, which revalidate_runs_on_cadence_and_applies_the_reply still covers.
  • moq-mux: delete a_source_past_the_limit_fails_once_half_the_delay_is_gone. It simulated 900 s of media in a debug build to see a 400 ppm source fail once it used half the delay. jitter::tests::a_source_past_the_drift_limit_fails already times that failure at ±40 and ±400 ppm, and a_source_far_off_real_time_fails_within_seconds covers the export surfacing the same error.
  • moq-tokio: the close-code tests dial 127.0.0.1. The server binds IPv4 only. The NixOS queue runner lists ::1 first for localhost, so each of the ten QUIC dials per test first waited out the 250 ms Happy Eyeballs stagger on a dead ::1. I reproduced this locally by bind-mounting such an /etc/hosts in a user namespace. A whole-suite run under it showed only these three tests regressing.
  • moq-tokio: the blocked-handshake test pair gets a 10 ms initial RTT. A connection closed before its handshake drains for three PTOs, which is 3 s at the default 333 ms initial RTT. The handshake_timeout test already uses 10 ms.
  • CI: a benchmark-only edit selects only its own crate or JS workspace. Nothing else can depend on a crate's benches/ or a workspace's bench/, and the gate's test build never compiles Rust benches (test_unexecuted_bench_is_not_compiled). Before this change, a moq-stats bench edit ran the moq-relay and moq-cli suites, about 40% of the workspace's test time, plus the play build. A js/net bench edit checked and tested 22 workspaces and built the WASM. Now each selects only its owner, whose lint or typecheck still covers the file. This answers the quest's "still to measure" item.
  • Quests. Deletes the m1 run, adds quest/m2/audit-test-cost.md at the end of m2's Required (it requires the release cut), and points the two links at it.

Measured

Test Before After
moq-auth a_close_is_reported_while_a_recheck_is_stalled 11.1 s (CI and local) 0.03 s
moq-auth a_refusal_on_recheck_revokes / an_invalid_grant_on_recheck_revokes 3.1 s / 1.1 s 0.08 s / 0.04 s
moq-mux TS past-limit failure 16.6 s CI, 6.6 to 11.1 s local deleted
moq-tokio close_code::* (×3), ::1-first hosts 3.05 s each 0.55 s each
moq-tokio split_accept_* (×4) 3.0 to 3.2 s each 0.12 to 0.30 s each

Local times are from 3 to 5 repeats on a 24-core host at load average 20 to 30.

The baseline is queue run 39546261474, a full selection on the 8-core runner VM. nextest ran 9,312 tests in 127 s, and their summed time was 995 s, so the run is limited by slot time. This PR cuts about 50 test-seconds from that sum, about 6 s of wall time at 8 threads.

Public API and wire

None. These are test-only and CI selection changes.

Checks

  • just check: the select.sh change selects the whole workspace. Lint, JS, gh and every other module pass. The Rust tests pass except export::redundant_importers_switch_through_bufferbloat_on_lite_07, the known load flake that moq-dev/moq#6113 fixes. The rerun with --no-fail-fast gave 9,316 of 9,317 passing. The capture and play test builds did not run after that failure. This PR touches nothing they build.
  • python3 sh/rs/select.test.py passes with a new case. python3 sh/js/workspace.test.py passes except test_dispatcher_passes_only_js_impact_paths, which also fails on main: it chmods the just stub before writing it. moq-dev/moq#6145 fixes that.
  • quest check passes.
  • The moq-tokio driver tests ran 5 times and the moq-auth and moq-mux timing tests 3 times; all passed.

Suggested follow-ups

  • Oversubscribe the queue's nextest (maintainer decision; recommended). Whole-suite runs pinned to 8 CPUs took 105 to 113 s at 8 threads (about 185% CPU), 60 s at 16, 47 s at 24, and 41 s at 32. The suite needs only about 200 CPU-seconds; most slots wait on sockets, subprocesses, and timeouts. My recommendation: set NEXTEST_TEST_THREADS=24 for the queue job only, after a few loaded just check --all runs at that setting. The risk is more load on timing-sensitive tests, where a flake ejects a queue entry. Only the known redundant-importer flake failed, once, at 16 threads.
  • moq-quic: skip draining for a connection that never heard from its peer (recommended quest). About ten moq-gst tests per run each pay 3 s at random. stop closes a client whose dial to the unreachable test relay never got an answer, and the close waits three PTOs. A user stopping a pipeline whose relay is down waits the same.
  • The configured idle timeout also bounds the handshake (maintainer decision, public API). Three moq-uring endpoint tests wait out moq-quic's fixed 10 s handshake idle timeout (30 s together). Neither --quic-idle-timeout nor moq-uring's Transport sets it.

moq-dev/moq#6113 already cuts the three slowest tests, the redundant-importer exports at 40, 29 and 18 s, by shortening the killed importer's idle timeout. It edits the quest file this PR deletes, so whichever lands second resolves that by dropping the edit.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 8 commits October 20, 2026 23:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test waited out the stalled re-check's 10 s bound on the wall clock
against a wiremock server. The in-process Script already drives the
lease on Tokio's paused clock, so the same case now takes milliseconds.
The refusal and invalid-grant re-check tests nudge a re-check instead of
waiting out the one-second cadence, which the cadence test still covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It simulated 900 s of media to see the export fail once a 400 ppm
source used half the delay. The jitter buffer's own test times that
failure at 40 and 400 ppm, and the far-off source case covers the
export surfacing the same error within seconds of media.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server binds IPv4 only. On a host whose /etc/hosts lists ::1 first
for localhost, as the NixOS queue runner does, each of the ten QUIC dials
first waited out the 250 ms Happy Eyeballs stagger on a dead ::1, so the
three tests took 3 s each instead of 0.5 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A connection closed before its handshake drains for three PTOs, and the
default 333 ms initial RTT made that three seconds in each split-accept
test that waits for the endpoints to go idle. A 10 ms initial RTT, as the
handshake timeout test already uses, keeps the same states and takes
about 0.2 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Rust crate's benches/ and a JS workspace's bench/ are no dependency of
anything else, and the gate's test build never compiles Rust benches. Yet
selection walked their owners' dependents: a moq-stats bench edit ran
the moq-relay and moq-cli suites, about 40% of the workspace's test time,
plus the play build, and a js/net bench edit checked and tested 22
workspaces and built the WASM. Each now selects only its owner, whose
lint and typecheck still cover the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deletes the m1 run and adds its successor at the end of m2's Required,
behind the release cut, with this run's baselines and leads.

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

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 21 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: ee701614-c0de-4e98-8d7a-efd226485bd3
📥 Commits

Reviewing files that changed from the base of the PR and between 56601eb and b62e09f.

📒 Files selected for processing: 12
  • quest/m1/README.md
  • quest/m1/audit-ci.md
  • quest/m1/audit-test-cost.md
  • quest/m2/README.md
  • quest/m2/audit-test-cost.md
  • rs/moq-mux/src/container/ts/export_timing_test.rs
  • rs/moq-tokio/src/quic/driver/tests.rs
  • rs/moq-tokio/tests/integration/close_code.rs
  • sh/js/workspace.py
  • sh/js/workspace.test.py
  • sh/rs/select.sh
  • sh/rs/select.test.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c08ac1f5-a2ba-4b7e-a248-ce3b59745ff7
📥 Commits

Reviewing files that changed from the base of the PR and between 3f45b2f and 56601eb.

📒 Files selected for processing: 14
  • quest/m0/ci/audit.md
  • quest/m1/README.md
  • quest/m1/audit-ci.md
  • quest/m1/audit-test-cost.md
  • quest/m2/README.md
  • quest/m2/audit-test-cost.md
  • rs/moq-auth/src/client.rs
  • rs/moq-mux/src/container/ts/export_timing_test.rs
  • rs/moq-tokio/src/quic/driver/tests.rs
  • rs/moq-tokio/tests/integration/close_code.rs
  • sh/js/workspace.py
  • sh/js/workspace.test.py
  • sh/rs/select.sh
  • sh/rs/select.test.py
💤 Files with no reviewable changes: 2
  • quest/m1/audit-test-cost.md
  • quest/m1/README.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

The m1 test-cost audit requirement and document were removed, and the audit links now point to the m2 audit plan. The m2 roadmap and audit document define recurring measurements, record test timing data, and list investigations. Test changes update revalidation, export timing, and QUIC test setup. JavaScript and Rust package selection now handles benchmark paths separately from dependency expansion.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 56601

No actionable production or workflow risk is established, so this change is mergeable with normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 8 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies completion of the m1 test cost audit, which is the primary change in the pull request.
Description check Passed The description directly explains the audit work, test and CI changes, measurements, validation results, and m2 follow-up planning.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 8 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • 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 21, 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-22T04:21:45.434134Z b62e09f 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

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 4e8a0c2179

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Outcome: Codex found nothing on 4e8a0c2. Queued with the head pinned. This PR leaves no open decisions. Three follow-ups need the maintainer and are listed in the description and in quest/m2/audit-test-cost.md:

  • Oversubscribe the queue's nextest threads (recommended: 24 on the 8-core VM, after loaded just check --all runs). Pinned to 8 CPUs, the suite went from 105-113 s to 47 s.
  • moq-quic skips draining for a connection that never heard from its peer, which causes the random 3 s moq-gst stops.
  • The configured idle timeout also bounds the handshake (public API), which causes the 30 s of moq-uring endpoint tests.

(Written by Claude Opus 5.5)

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
# Conflicts:
#	quest/m1/README.md
#	quest/m2/README.md
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main (e248c5b) to clear the conflict that dropped this from the queue. Mechanical resolution in the quest READMEs only: m1 drops both the test cost and test coverage audit entries (main finished the coverage audit in moq-dev/moq#6175), and m2 keeps main's new entries plus this PR's test cost audit. quest check and just check pass. The reviewed head 4e8a0c2 is otherwise unchanged, so re-queued with the head pinned.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main again (56601eb) after the merge queue dropped this. The queue's Check failed on auth_lifetime::the_drain_waits_for_a_closed_session_to_report_its_end in rs/moq-relay (run), a relay test this PR does not touch, and main moved with moq-dev/moq#6180.

The only conflict was quest/m1/README.md: this PR drops the test cost audit entry and #6180 drops the interop report entry, so both lines go. quest check passes. The change since Codex's clean review of 4e8a0c2 is merge-only, so re-queued with the head pinned.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 21, 2026 23:09
@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 22, 2026
# Conflicts:
#	quest/m0/ci/audit.md
#	quest/m1/README.md
#	quest/m1/audit-test-cost.md
#	quest/m2/README.md
#	rs/moq-auth/src/client.rs
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main (b62e09f) to clear the conflict that dropped this from the queue, then re-queued with the head pinned.

quest check passes. just check passes js, rs, quest, and drill; only check flake fails, on a local user-namespace limit. No new review needed: the last Codex review covered 4e8a0c2, and this merge adds no new code.

(Written by Claude Opus 5.5)

Merged via the queue into main with commit a62f077 Oct 22, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m1/audit-test-cost branch October 22, 2026 04:31
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