From d4f77000628eb4ac7e87db57f82229ef7cc198c8 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 10 Sep 2026 18:44:49 -0700 Subject: [PATCH] docs(relay): address the teardown ratchet's docstring to whoever it goes red on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../startup/desktop-relay-teardown-call-site-ratchet.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/startup/desktop-relay-teardown-call-site-ratchet.test.ts b/src/main/startup/desktop-relay-teardown-call-site-ratchet.test.ts index e091b4bcba4..bd30447ae5b 100644 --- a/src/main/startup/desktop-relay-teardown-call-site-ratchet.test.ts +++ b/src/main/startup/desktop-relay-teardown-call-site-ratchet.test.ts @@ -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'