From 2f0d3d563ed62bd61074eda244c9fe13a80f0b94 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 30 Oct 2026 20:31:12 -0400 Subject: [PATCH 1/3] Give the suite time to finish so its failures can be counted The suite needs about 44 minutes on 2 workers (#1375) and was cut off at 30, around 70%, on every branch. No run has ever reported the last 30%. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a2b25f30..7981f9fd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: suite: runs-on: ubuntu-latest # A hung test must turn red in minutes, not burn GitHub's 6-hour default. - timeout-minutes: 30 + timeout-minutes: 60 steps: - uses: actions/checkout@v4 with: From 81207e6793fdf117ecadafd2f872e56aaf9bdab9 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 30 Oct 2026 20:31:45 -0400 Subject: [PATCH 2/3] Print the 40 slowest tests from every suite run A 60-minute limit lets the suite report; it does not make it fast. These timings name what to fix next. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7981f9fd8..bfe19439f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,4 +85,4 @@ jobs: # xdist reports a collection error as a worker crash; collect alone first so it reads as one. - run: .venv/bin/pytest --collect-only -q # A test stuck past 120 s dumps every thread, so the red names where it hung. - - run: .venv/bin/pytest -n auto --basetemp .artifacts/pilots -o faulthandler_timeout=120 -rfE -vv --tb=short + - run: .venv/bin/pytest -n auto --basetemp .artifacts/pilots -o faulthandler_timeout=120 -rfE -vv --tb=short --durations=40 From b775e2be4f8600dc5ada98f7416d6dcef3885e47 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 30 Oct 2026 21:39:01 -0400 Subject: [PATCH 3/3] Stop a failed test's helpers so it does not sit out its whole timeout Helpers inherit the child pytest's pipes and BoundedRun reads until they close, so a test whose app close failed reported in 13 s and then held its worker for the full 165 s. The child now stops its own helpers as it exits. 7 tests hit this on the last run, 1156 of 7006 worker seconds. Co-Authored-By: Claude Opus 5.5 --- tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index eead05fcc..09e3ab779 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -121,6 +121,15 @@ def pytest_collection_modifyitems(config, items): item.add_report_section("call", "Recorded defect", note) +def pytest_unconfigure(config): + """Helpers inherit this process's pipes; the runner reads until they close, so a test + whose close failed would otherwise run out its whole timeout after it already reported.""" + if (attempt := os.environ.get(ATTEMPT)) is not None: + from support.processes import stop_test_children + + asyncio.run(stop_test_children(attempt)) + + def pytest_runtest_logreport(report): if (path := os.environ.get(RESULT)) is None: return