The decoy suite is a gate of the full run (R-1116); no code change
gates / gates (push) Successful in 46s
gates / gates (push) Successful in 46s
controller/scripts/test_gate_decoys.py is now controller_gates.py's `gate-decoys` row: blocking, full run only (~22 s, 53 cases, and it edits real files in the tree for a moment, so never the hook). Declared in its own COVERS; test_controller_gates.py pins it. Red-proved: debug-routes/comment flipped to expect accept -> CONVICTED: gate-decoys; restored, green. gates.md's "--fast is all of them" corrected. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -60,6 +60,20 @@ class ControllerGatesTest(unittest.TestCase):
|
||||
self.assertFalse(os.path.exists(os.path.join(SCRIPTS, "reuse_refs_check.py")),
|
||||
"reuse_refs_check.py must NOT be copied into this repo")
|
||||
|
||||
def test_decoy_suite_is_a_blocking_full_run_gate(self):
|
||||
"""R-1116: the decoy suite is a gate of the FULL run (blocking), and --fast names it as skipped.
|
||||
Not --fast: ~22 s, and it edits real files in this tree for a moment (a hook would race other sessions)."""
|
||||
sys.path.insert(0, SCRIPTS)
|
||||
import controller_gates as mod
|
||||
rows = [g for g in mod.GATES if g[0] == "gate-decoys"]
|
||||
self.assertEqual(len(rows), 1, "gate-decoys is not registered exactly once")
|
||||
_label, path, _args, fast, blocking = rows[0]
|
||||
self.assertEqual(os.path.basename(path), "test_gate_decoys.py")
|
||||
self.assertFalse(fast, "gate-decoys must not be --fast")
|
||||
self.assertTrue(blocking, "a decoy that stops convicting must fail the run")
|
||||
self.assertEqual([g[0] for g in mod.GATES if not g[3]], ["gate-decoys"])
|
||||
self.assertIn("--fast SKIPPED (deliberate periodic runs, never in a hook): gate-decoys", self.out)
|
||||
|
||||
def test_unknown_argument_is_rejected(self):
|
||||
p = subprocess.run([sys.executable, ENTRY, "--nope"], cwd=CTRL,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
Reference in New Issue
Block a user