docs(relay): address the teardown ratchet's docstring to whoever it goes red on

The reader who decides this test's fate is not the reviewer — it is someone
hitting a red ratchet during an unrelated refactor, weighing whether to relax
the pattern. Say the trade to them directly: a ratchet that fails loudly on a
benign change beats one that passes silently on a harmful one, and the literal
match is deliberate because a refactor that obscures which teardown runs at
quit is exactly what should get a second look.
This commit is contained in:
Neil
2026-09-10 18:44:49 -07:00
parent 762e1faa80
commit d4f7700062
@@ -14,6 +14,10 @@ import { describe, expect, it } from 'vitest'
* This test is the compile error that swap cannot produce. Both directions matter: quit must not
* regain the re-armable fence, and sign-out/relaunch must not lose it — collapsing them either way
* destroys the distinction the defect came from.
*
* If you are here because this went red on a refactor that looks harmless, that is the intended
* trade: a ratchet that fails loudly on a benign change beats one that passes silently on a
* harmful one. Re-read which teardown your call site now runs before relaxing the pattern.
*/
const STARTUP_DIR = __dirname
const QUIT_MODULE = 'main-process-quit.ts'