From 973d02f0cbe9b3b5673a4b21b894dc57beaa26f6 Mon Sep 17 00:00:00 2001 From: NetDevAutomate Date: Wed, 23 Sep 2026 12:35:04 +0100 Subject: [PATCH] test(gate): coverage-gate self-test carries its own timeout test_gate_fails_when_a_new_route_is_untested scans every test file twice: 26 s locally, and on 2026-09-23 it crossed the 60 s unit ceiling under --cov on the python 3.13 CI lane (3.12 passed; green on rerun; PR #41 run 35850516033). pyproject.toml already states the rule: a module whose honest cost sits near the ceiling carries an explicit pytest.mark.timeout rather than flaking against the global bound. 180 s, module-level, reason recorded in the file. --- .../studyloop/tests/test_e2e_coverage_gate_selftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/studyloop/tests/test_e2e_coverage_gate_selftest.py b/packages/studyloop/tests/test_e2e_coverage_gate_selftest.py index 3bfefc714..0adc63880 100644 --- a/packages/studyloop/tests/test_e2e_coverage_gate_selftest.py +++ b/packages/studyloop/tests/test_e2e_coverage_gate_selftest.py @@ -16,6 +16,14 @@ import pytest +# ``test_gate_fails_when_a_new_route_is_untested`` scans every test file for route +# references twice (route test + full-stack test): 26 s on a laptop, and on +# 2026-09-23 it crossed the 60 s unit ceiling under ``--cov`` on a shared CI runner +# (python 3.13 lane; 3.12 passed; green on rerun). pyproject.toml's policy is that a +# module whose honest cost is near the ceiling carries its own bound rather than +# flaking against the global one. +pytestmark = pytest.mark.timeout(180) + _tests_dir = str(Path(__file__).resolve().parent) if _tests_dir not in sys.path: sys.path.insert(0, _tests_dir)