From 15a0899119c9dd47590f53aadbc50d7d7c399ce3 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 16 Nov 2026 09:37:20 +0100 Subject: [PATCH] Zero gatelock startup grace in tests wait_for_turn sleeps its 1.5 s startup grace for real, so every test that builds a gate paid it. With the grace zeroed in the hermetic gatelock fixture the 1427 tests run in 11 s instead of overrunning the 60 s action cap, so the ci-mirror-pytest gate step can finish. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WzxdWWfb63jncj9Lca2jeX --- app/pubspec.yaml | 2 +- diet_guard/tests/_gate_fixtures.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 6961b75..c636132 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -2,7 +2,7 @@ name: diet_guard_app description: "Companion phone app for diet_guard: log meals on the go." publish_to: 'none' -version: 1.0.162+1 +version: 1.0.163+1 environment: sdk: ^3.12.2 diff --git a/diet_guard/tests/_gate_fixtures.py b/diet_guard/tests/_gate_fixtures.py index f09a406..c882814 100644 --- a/diet_guard/tests/_gate_fixtures.py +++ b/diet_guard/tests/_gate_fixtures.py @@ -93,8 +93,13 @@ def _hermetic_gatelock( real tkinter into unbounded mock recursion, so the suite **hangs** rather than failing. The runtime dir is redirected too, so no test can stand a production locker down through the arbiter. + + The queue's startup grace is zeroed too: ``wait_for_turn`` sleeps it for + real before its first look, which put 1.5 s on every test that builds a + gate and the suite far past the 60 s action cap. """ monkeypatch.setenv("GATELOCK_RUNTIME_DIR", str(tmp_path / "gatelock-runtime")) + monkeypatch.setattr("gatelock._queue.STARTUP_GRACE_SECONDS", 0.0) with ( patch("gatelock._surfaces.tk.Toplevel", side_effect=_make_toplevel), patch("gatelock._outputs.RandrBackend.create", return_value=None),