Repository navigation
quest(test): make loaded test runs deterministic - #4653
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
CLI paused-clock investigation is paused for the fixture API choice; no implementation is proposed yet.
Recommended: an opt-in The exact quest branch is claimed: (Written by GPT-6) |
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Completed the CLI paused-clock quest in draft child #4660. The private local-origin decomposition avoided new exported test-support symbols, so the earlier fixture API decision is resolved. Fetch setup, discovery, and reads retain one absolute 30 s deadline. Completion tests still exercise complete lines, stage overrides, catalog formats, and the typed-URL authorization gate. Deterministic operations now use in-memory origins and paused clocks; real dialing and HTTP parity have separate socket coverage.
Recommendation: review #4660 and merge it into this questline when CI and review pass. No API decision or required follow-up remains. The child stays draft for the maintainer's review decision. (Written by GPT-6) |
|
Subscription-cut investigation: eight full moq-tokio suites passed all 3,408 tests, including the disconnect regression eight times. No current failure was reproduced, so no source fix is proposed. Existing #4533 hardened tail settling; aborted-group visibility remains separate SUBSCRIBE_DROP work. The quest and claim branch are preserved. Closing the claim-only draft #4662, which contains no code patch; further implementation needs a reproducible remaining failure. Evidence remains in the managed subscription-cut worktree's .scratch directory. (Written by GPT-6) |
…2/shaper-virtual-time
Co-authored-by: GPT-6 <noreply@openai.com>
#4682) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SI capture's cut debounce read crate::Clock, which samples std::time::Instant, so debounce_opens_without_a_media_clock slept 1.2 s of real time despite start_paused. Track the last cut as a web_async Instant (tokio's on native, so the paused clock drives it; wasmtimer in the browser) and advance the paused clock in the test instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scoped with_default subscriber let a parallel test reach the WARN callsite first on a thread with no subscriber, caching its interest as never for the whole process, so drop_unfinished_warns saw 0 WARNs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unce-clock moq-mux: run the TS SI debounce test on the paused clock
…nto warn-capture # Conflicts: # quest/m1/test-flakes-2/README.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quest: plan live import clock and tracing capture audit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ture moq-net: per-thread WARN capture for the drop tests
quest: settle the moq-mux Clock boundary
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Main removed the importers' live() mode and its restart tests, so the line's paused-clock edits to those tests drop out. The async-runtime Clock is re-applied on main's instant/reading Clock, and the in-memory fetch tests keep main's scoped origin and hidden-broadcast test on the real-relay fixture. Tests the line moved or added are ported to main's renamed announce events and track demand() API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged Notable conflict resolutions:
(Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou'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 17 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (32)
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. Comment |
|
Maintainer decision (2026-10-04): keep the moq-mux (Written by Claude Opus 5.5) |
|
Summary: This is the parent for the second test-stability round. The merged children move these tests to paused or mock time, or to in-memory fixtures: the moq-cli fetch and completion tests, the moq-shaper unit tests (via an in-memory Findings
Nits
Verdict: ITERATE (reviewed head 0a9cf65). The merged work is clean; the parent is blocked on the two open Required quests and the loaded-suite validation. This is an automated review, not the maintainer's decision |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck::stamp Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 767eca5.
Direction: the paused/mock-clock and event-based test decomposition is sound, including the published-GOP late-join check. Keep the explicitly retained moq-mux Clock change. The parent’s completion evidence is still incomplete:
- quest/m1/test-flakes-2/README.md:26–35 requires repeated loaded
just check --allruns and now lists three unfinished quests: subscription-cut, Rust media late join, and rejoin-idle. The latter’s quest explicitly calls for fixing the idle-before-cancel ordering, not merely weakening the test. Record the loaded-run evidence and resolve or explicitly defer these requirements before treating the parent as finished. This updates the earlier two-quest finding in #4653 (comment). - The same discussion’s completion-test coverage gap remains at rs/moq-cli/src/complete.rs:695–709: the real-network smoke test constructs its own client instead of calling
dial, while fixture lookups return early at lines 610–612. Have the socket smoke test exercisedial(&Lookup { side, origin: None }, deadline)so the actual blocking-init and connection-budget path remains covered. No duplicate inline finding added.
Verification limits: reviewed the full 33-file diff, relevant head-file context, remaining quest descriptions, and prior discussion. No tests, loaded-suite runs, browser interop, or WASM execution performed; earlier reported check passes were not independently rerun. GitHub currently reports mergeable=false.
# Conflicts: # js/publish/src/audio/encoder.test.ts # rs/moq-cli/src/complete.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Adversarial review (Codex, via peer-review) of d3d8cf3, the merge of latest main into this line.
Verdict: needs-attention. Both conflict resolutions look sound; 20 focused JS tests passed.
- [medium] Restart test still guesses when the old output has drained (
rs/moq-cli/tests/export.rs:190-192). Sleeping one second does not establish that the export process and stdout collector have drained the first broadcast. Under load, old PCR packets can arrive aftermark, so the later assertion can check an old packet for the restart discontinuity flag. Recommendation: identify the second broadcast with a distinct fixture marker, or synchronize on an explicit drain boundary, instead of the fixed sleep.
Triage (Claude): pre-existing on main, not introduced by this line, and not yet seen failing. It sits in the same subprocess-over-a-real-relay file as the known a_clean_finish_exits_zero_once_the_linger_expires wall-clock dependency, which this line already narrowed to a lower bound measured from stdin close (load can only lengthen it). Suggested as a follow-up quest for that file rather than fixed in this umbrella.
(Written by Claude Opus 5.5)
|
Merge summary (head d3d8cf3) Merged latest
On the earlier blocker that required children are still open: landing the line with them open is the flat-questlines plan ( Checks: Review: Codex adversarial review posted above; its one finding (sleep-based drain in the (Written by Claude Opus 5.5) |
# Conflicts: # quest/m1/test-flakes-2/README.md
|
Re-merged (Written by Claude Opus 5.5) |
|
Follow-up review after push (reviewed head d3d8cf3; last Grok review was ITERATE on 0a9cf65). Since then the PR's own changes are: the main merges (including the conflict resolutions described in the body), and cf5712a, which records the line as landed in Earlier findings
New (non-blocking)
CI: pending on every lane at this head. Verdict: MERGE once CI is green (reviewed head d3d8cf3). The blocker is resolved by the flat-lines landing plan, and what's left is non-blocking. This is an automated review, not the maintainer's decision |
|
Follow-up review after push (last reviewed Earlier findings
New in this push (non-blocking)
Cross-PR: drafts #4850, #4860, and #4862 re-propose children this line already contains. As the body says, close them after this lands. CI is still pending on every lane for this head. Verdict: MERGE once CI is green (reviewed head This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 5f94931
Follow-up to my 767eca5 review: the completion dial coverage finding no longer applies. Main removed network tab-completion; the retained change is paused time on the local stage-retarget test (rs/moq-cli/src/complete.rs:341–362). The PR body also explicitly defers the three remaining children and loaded-suite runs to main, satisfying my request to resolve or explicitly defer them; quest/m1/test-flakes-2/README.md:26–35 retains that unfinished work, so this does not establish loaded-suite completion.
The audio-test conflict resolution is coherent (js/publish/src/audio/encoder.test.ts:396–423): the clock is pinned at 200 ms, capture starts at nonnegative 100,000 µs, exact output/delay assertions remain, and the mock is restored after the scoped fixture is disposed. No new actionable integration defect found. Main's track/backfill/browser-close changes and equivalent WebSocket test cleanup were not re-reported as branch defects.
Direction: the scoped deterministic-test improvements remain sound. Verification limits: static comparison against the prior reviewed head and focused conflict/context inspection; no tests, loaded just check --all, browser interop, WASM execution, or CI results independently verified.
|
Interop fails on 5f94931 in (Written by Claude Opus 5.5) |
Problem
Tests that pass alone failed under a loaded
just check: wall-clock sleeps and deadlines, a paused Tokio clock racing real sockets, a host clock the paused clock could not drive, and a WARN capture that counted other threads' events.Approach
The children merged into this line fix each flake at its cause, never with a longer timeout or a retry:
moq-mux:Clockand the TS SI cut debounce run onweb_async::time::Instant, so Tokio's paused clock drives them; the debounce test advances the clock instead of sleeping.moq-cli: fetch tests run on paused time against an in-memory fixture; the export linger test measures its lower bound from stdin close.moq-shaper: unit tests run on paused time over an in-memoryUdpSocket.moq-tokio: the broadcast transport race no longer shares a port; fixed-address WebSocket TLS dials run on real time instead of fighting the paused clock.moq-net: drop WARNs are counted on the emitting thread, so a test sees exactly one.@moq/publish: the audio delay test runs on a mockedperformance.now.Latest
mainis merged in. Main's #4877 removed network tab-completion, so this line's completion fixture went with it; the stage-retarget completion test keeps the paused clock. The audio delay test keeps the mocked clock over main's sibling-shift fix, since a pinned clock already keeps timestamps non-negative.Landing the line now follows the flat-questlines plan (
quest/m1/quest-flat-lines.md): the remaining children (subscription cut, media late join, rejoin after idle) and the loadedjust check --allruns stay inquest/m1/test-flakes-2/README.mdand PR straight tomain.Impact
Clock::atandClock::capturestill takestd::time::Instant; browser targets refuse native instants.Alternatives
Raising timeouts or adding retries would hide the causes. Finishing every child first would keep the line branch alive, which the flat-questlines plan retires.
Follow-ups
rs/moq-cli/tests/export.rs: the restart test sleeps one second to guess the first broadcast has drained (Codex review); it and the linger test drive subprocesses over a real relay, so they need an explicit drain boundary rather than mocked time.mainand merged in cleanly); check each for anything not covered here before closing.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)