Repository navigation
test(moq-c): raw track reads hold no wall-clock budget - #8995
Conversation
Quest-Claim: 18291d748e0f3bb4
…e ends the read The options test's 25 ms max_us aged group one out whenever the suite took longer than that between publishing and subscribing, and the far open range (a time anchor, containing the newest group) then handed out two first. The time anchor test had the same dependence on a 1 s budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the full diff of the 2 changed files.
- Unlimited budgets in
raw_track_subscription_options_and_updateandraw_track_time_anchor: both tests now usemax_age_unlimitedanddelay.max_unlimited, so no wall-clock budget can age outone. - Corrected expectations: the options test now expects
onethentwo, because the open range starts at the newest group held. - Observable update: the update replaces both ranges with one bounded range ending at 60000. The test then publishes
threeandfourand checks that the read deliversthreeand ends on its own (terminal 0, cancel refused). - Quest file removed:
c-raw-track-options.mdis deleted as the quest is finished.
I read the diff but didn't run the tests. The author reports 20/20 failures at base and 0/20 after the fix, and the reasoning in the diff holds up.
claude-sonnet-5-5 | 𝕏
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head b098785927e0c7d73102dd3938a979e3d4bbad8e.
Go. Unlimited budgets remove the scheduling assumption without changing what the time anchors mean. The revised fixture proves the update actually replaces the open range: without the update it can receive four, rather than ending cleanly after three. The terminal-before-cancel assertion is race-safe by inspection: the raw reader removes its handle before it invokes the terminal callback. Other fixtures retain successful cancellation coverage. Static review; the 20-run result is from the PR's validation, not an independent rerun.
|
No actionable comments were generated in the recent review. WalkthroughThe raw-track subscription test now uses unlimited track age and subscription delay. It reads groups one and two, updates the ranges, and verifies that it receives three but not four before the read ends. The time-anchor test also uses unlimited track age and delay. The pull request removes the document describing an intermittent Merge Risk:
|

Finishes quest/m0/test-flakes-3/c-raw-track-options.md and deletes it.
Problem
raw_track_subscription_options_and_updatereceivedtwowhere it expectedoneunder load. I traced it with the reader instrumented: the ordered reader reported20000..20001as anOldgap, then handed out group 40000. The library behaved as designed, and the test's premise was wrong in two ways:max_us: 25_000budget runs on the wall clock: a group is stale once its successor arrived a full budget ago (TrackState::superseded). Any suite stall over 25 ms between publishing and subscribing agesoneout.MOQ_ANCHOR_ABSOLUTE100,000,000, which maps toAnchor::Time, meaning the group containing that time: the newest held,two. Sotwowas always in range. That's why the reader moved on to it instead of waiting, and why the old update ("widen to 40001, then readtwo") never showed the update doing anything.raw_track_time_anchorhad the same wall-clock dependence on a 1 s budget.Approach
max_age_unlimitedanddelay.max_unlimited, so no budget runs on the wall clock and the read waits for each group.onethentwo(the open range really starts attwo). Its update replaces both ranges with one bounded range ending at 60000. It then publishesthreeandfourand checks that the read deliversthreeand then ends on its own (terminal 0, cancel refused). That makes the update's effect observable.Impact
Validation
test::) in one process 20 times failed this test 20/20 on this host (the quest saw 6/20).thread::sleepbefore subscribing makes both original tests fail every time (twoinstead ofone). The rewritten tests pass with the same sleep.route_broadcast_survives_id_reuse, which documents that it needs nextest's process-per-test, so it is an artifact of the loop and not a flake.just checkpasses.Alternatives
Caused by
two. From then on, a wall-clock drop ofonehanded outtwo(found by check). The 25 ms budget itself came from moq-dev/moq#7697.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, medium effort
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.Head: b098785
Base: origin/main at 0051c3d
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:
01a1e90e-e16e-7170-9d9b-1abde4b21ef0, round 1Score: 9/10,
Source inspection found no actionable regressions in the test changes, with remaining uncertainty limited to execution validation because tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none