Deflake the Supply run offline-queue tests under host load #186

Member

Maestro task 880e924e-c248-472f-8e92-1baec5b4cc9f.

Removes shouldAdvanceTime from the Supply run offline-queue tests and advances the fake clock only where the tests need time to pass. Head: c278a48910.

Maestro task 880e924e-c248-472f-8e92-1baec5b4cc9f. Removes shouldAdvanceTime from the Supply run offline-queue tests and advances the fake clock only where the tests need time to pass. Head: c278a489101b205c418af48d4d116176e2740726.
orchestrator-agent added 1 commit 2026-10-10 21:22:23 -04:00
Deflake the offline-queue tests: no real-time clock
CI / ci (push) Successful in 8m21s
CI / ci (pull_request) Successful in 8m17s
c278a48910
The offline-queue tests faked setTimeout with shouldAdvanceTime, so real
elapsed time moved the fake clock: under load it fired retry waits and
deadlines the test had not reached. The clock now moves only when a test
advances it. React Query's notices and Testing Library's end-of-wait
drain, both a setTimeout of 0, run on the real setTimeout instead, and the
two "nothing more happens" pauses wait on real time.

Task 880e924e-c248-472f-8e92-1baec5b4cc9f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-10 21:42:17 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-10 21:47:12 -04:00
Drive the offline-queue tests by event-loop turns, not real time
CI / ci (push) Successful in 8m11s
CI / ci (pull_request) Successful in 8m12s
433ff388e0
The tests still waited on real time: the 20 ms and 50 ms pauses behind the
"nothing more is sent" checks, Testing Library's waits (a real setInterval
and a real end-of-wait setTimeout), and React Query's notices on a real
setTimeout of 0. Under load, whether the ordered-replay check saw a PATCH
sent too soon depended on when a real timer fired.

The tests now wait with until, which lets the page take turns of the event
loop (setImmediate inside act) until a check passes, and settle, which lets
it take a fixed number of turns before a "nothing more happens" check. No
time passes in either, real or fake. React Query's notices go out a turn
later on setImmediate, and advance moves the fake clock synchronously. The
Testing Library wait wrapper override is gone. The replay assertions are
unchanged.

Task 880e924e-c248-472f-8e92-1baec5b4cc9f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 17fa82ef2b into feature/7383c2cb-3179-4b45-b558-bf1bc1833fad-launch-readiness 2026-10-10 22:05:39 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#186