From 8f50874afba18d993da22872d75473670d280df8 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 6 Nov 2026 22:41:53 +0000 Subject: [PATCH] test(watch): pin the thresholds in the invalid-state block hook test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_the_block_hook_reads_a_state_that_is_no_object_as_none measured the real disk under $TMPDIR against the default limits, so it failed with exit 2 whenever the host had less than 40 GB free or a falling trend. It now sets every threshold to 0 like its neighbours and proves only that a state file that is no object reads as none. 🎯 Fix: 95 % 💥 Break: 1 % 💸 Cost: – ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 94 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 --- tests/test_watch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_watch.py b/tests/test_watch.py index fb4e00c..fcb7880 100644 --- a/tests/test_watch.py +++ b/tests/test_watch.py @@ -459,6 +459,8 @@ class TestWatchCommands(unittest.TestCase): self.assertNotIn("", shown) def test_the_block_hook_reads_a_state_that_is_no_object_as_none(self): + self.cfg["thresholds_gb"] = {"warn": 0, "stop": 0, "critical": 0} + self._write_config() self.root.mkdir() (self.root / "watch.json").write_text("[]", encoding="utf-8") (self.root / "radio-silence.json").write_text("[]", encoding="utf-8")