Answer stability round 1: 0 🔴, 2 🟡 (1 misread); the hook-limit comment was fixed in the prose round, and a test now runs the own rank_todo.py past its time limit; the 🔀 went to the security pass, which ruled it below its bar

This commit was merged in pull request #444.
This commit is contained in:
2026-11-09 01:21:31 +01:00
parent 54b239d7f3
commit 275e384172
+6
View File
@@ -8,6 +8,7 @@ import subprocess
import sys
import tempfile
import unittest
import unittest.mock
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
@@ -890,6 +891,11 @@ class TodoRankCheck(unittest.TestCase):
checkout = self.changed_plan(f"{self.folder}/clone", "import sys\nsys.exit(3)\n")
self.assertEqual(self.details(checkout), [f"{checkout}/bin/rank_todo.py --check failed with exit 3 and printed nothing"])
def test_its_own_rank_todo_running_past_the_limit_is_named(self):
checkout = self.changed_plan(f"{self.folder}/clone", "import signal\nsignal.pause()\n")
with unittest.mock.patch("rule_hook.todo_check.OWN_CHECK_SECONDS", 0.2):
self.assertEqual(self.details(checkout), [f"{checkout}/bin/rank_todo.py --check did not finish in 0.2 seconds"])
def test_another_repos_rank_todo_never_runs(self):
reasons = self.details(self.changed_plan(self.other, self.STUB))
self.assertTrue(reasons)