# test: ban wall-clock readings in tests · PR \#22562 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/22562)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: tests/no-wall-clock

Target branch: tests/no-frame-waits

Head commit: 595c60457c6bdfc4569d7212072c70f8fe9e4fe9

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/22562)

[Commits](https://git.cafe/pingdotgg/t3code/pull/22562/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/22562/diffs?format=markdown)

## Description

---

## Problem
Tests asserted "finishes within N ms" with `performance.now()`, or built fixtures from `Date.now()`. Elapsed-time assertions pass or fail with runner load; live timestamps make fixtures drift.

## Fix
- New rule `t3code/no-wall-clock-in-tests`: flags `performance.now()`, `process.hrtime`, `Date.now()`, and zero-arg `new Date()` outside `vi.spyOn`/`vi.setSystemTime`/mock arguments.
- 33 sites in 19 files: timing assertions dropped (the behavioral assertion next to them stays), fixtures use fixed epochs, fake-clock seeds are constants. Two suppressions on the env-gated recovery benchmark.

Part of the anti-flake stack (#22563). Context: main was red in ~600 of ~2,900 runs since September; the genuinely flaky tests all waited on real time, scheduler budgets, or renderer frames. These rules make those tests fail lint instead of CI.

Made with Claude Opus 5.5 and Claude Fable 5.1 in Claude Code (T3 Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
