Write tests
Read root TESTING.md before writing or reviewing tests. For tests under
lib/*, also read the nearest module AGENTS.md and every testing guide it
references.
Treat those files as the source of truth for behavioral value, test style, fakes and mocks, timing, numerical tolerances, markers, and commands.