From a2061b07d38bf038dec0d63312399394cf39a8af Mon Sep 17 00:00:00 2001 From: Jozef Koval Date: Sun, 1 Nov 2026 17:29:00 +0100 Subject: [PATCH] Log the clearing value first in the best-value gate test The test logged 50, then 500. The last value was also the best one, so a gate that kept the last value instead of the best passed all eight tests. With 500 first and 50 last, that gate stays below the floor and fails this test. --- scripts/tests/test_check_perf_floors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/tests/test_check_perf_floors.py b/scripts/tests/test_check_perf_floors.py index 7fd2db71..00f06e8c 100644 --- a/scripts/tests/test_check_perf_floors.py +++ b/scripts/tests/test_check_perf_floors.py @@ -89,9 +89,10 @@ class CheckPerfFloorsTests(unittest.TestCase): def test_best_value_across_appended_attempts_is_what_counts(self) -> None: # Re-measurements append to the same log, so one line clearing the - # floor is enough even when an earlier attempt sat under it. + # floor is enough. The clearing line comes first: a gate that kept the + # last value instead of the best would fail here. result = self.run_gate( - self.log("PERF[a.one]: 50 ops/sec", "PERF[a.one]: 500 ops/sec"), + self.log("PERF[a.one]: 500 ops/sec", "PERF[a.one]: 50 ops/sec"), self.floors(**{"a.one": 100}), )