From 3f415cb145f022418a3ec373f9dbdd3953a0cedd Mon Sep 17 00:00:00 2001 From: Mateo Wang <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:33:01 +0000 Subject: [PATCH] docs: clarify unit test clock rule (#47604) --- tests/unit/AGENTS.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/AGENTS.md b/tests/unit/AGENTS.md index 80a3a87f959..9ce6c58cff7 100644 --- a/tests/unit/AGENTS.md +++ b/tests/unit/AGENTS.md @@ -1,6 +1,9 @@ # tests/unit -In-process. No network, clock or subprocess +In-process. No network or subprocess + +Unit tests must not depend on the current time or execution speed. Use fixed timestamps for fixtures +and controlled clocks for time-dependent behavior. Incidental clock reads inside production code are allowed ## What good looks like