Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ Assume a better approach exists until you have tried to find one:
An approach finding names the alternative and why it holds up better long-term.
"Rework or abandon this PR" is a valid finding when the case is strong.

# Tests

Unit tests mock time instead of depending on the real clock: a test that sleeps to let work settle, waits out a timeout to prove nothing happened, or asserts that an operation finished within a real-time budget passes on a quiet machine and flakes under load.
Flag one in any language, even when the timer goes through `kio::clock` or `@moq/clock`, whose timers still wait in real time until the test installs a paused, simulated, or `Manual` clock.
The fix is a mocked clock or an awaited event, never a shorter or longer real wait or a looser budget, and the same fix lands in every language's sibling test.
The exception is a test that drives real sockets, devices, or processes, which may wait on the real clock and opts out with `host_time()` or `hostTime()`; that opt-out belongs nowhere else.
The runtime guards fail Rust and bun tests only when a timer fires on the host clock, so they miss Go and Python tests, elapsed-time assertions, and any wait that bypasses those clocks; and Rust's `host_time()` lasts for the whole process, so it hides other tests' waits outside nextest's one-test-per-process runs.

# Not findings

Each of these has been raised and refuted repeatedly here; the rules in `AGENTS.md` already decide them:
Expand Down
1 change: 0 additions & 1 deletion quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ edge, which embeds moq-relay; it moved there on 2026-09-28.
- [Bun-spawning test recipes install the JS workspace](/quest/m0/recipe-js-install.md) - `bare-fin`, `max-age`, `stream-limits`, `relay-fill`, and `receive-credit` pass in a fresh checkout
- [CI cost and latency](/quest/m0/ci/README.md) - cloud CI runs only in GitHub's merge queue, one tested entry at a time, expensive checks run nightly and gate `release`, caches move to R2, and runners are chosen last
- [More tests under load](/quest/m0/test-flakes-2/README.md) - load-only and queue failures, one quest per flake, fixed at the cause, since each one drops a queued PR
- [Tests can't wait on the real clock](/quest/m0/clock-guard/README.md) - a test whose real-clock timer fires fails every run, in JS and, if the spike holds, Rust
- [Agent build output can't fill the desktop's disk](/quest/m0/agent-disk-budget.md) - finished agent checkouts reclaim their mbx targets automatically, so parallel agent builds stop filling the root disk
40 changes: 0 additions & 40 deletions quest/m0/clock-guard/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions quest/m1/mock-clock-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ test's clock):
assertions.** Not chosen: only the first two; also the ~530 tests that
only wait for progress under a timeout, which flake little and would cost
a much larger migration.
- ✅ m1, while the [guards](/quest/m0/clock-guard/README.md) that stop new
ones are m0.
- ✅ m1, while the guards that stop new ones (the runtime guards and the
`REVIEW.md` rule) landed in m0.

Rules every child keeps:

Expand Down
Loading