The pytest suite used to complete in roughly 2 minutes and now takes around 20 minutes. That 10x regression is the dominant stall in fido's edit-test loop — every review-thread fix that touches code has to wait through a full run before it can commit.
Likely culprit: tests added in PR #456 (persistent claude stream) for subprocess / async lifecycle, where real sleep / real subprocess.Popen / retry loops with generous timeouts add wall time even when the logic under test is fast.
Work:
- Run
uv run pytest --durations=30 (or profile via pytest-durations) on the current tip to identify the slowest tests.
- For each slow test, replace real-time waits with
monkeypatch/freezegun/mocked subprocess streams; cut any fixture that does real I/O it doesn't need.
- Target: back under 2 minutes, ideally with headroom that survives more tests being added.
Related: #467 tracks running pytest in parallel via pytest-xdist, which compounds with this fix but isn't a substitute — a single 15-minute test will still stall a worker.
The pytest suite used to complete in roughly 2 minutes and now takes around 20 minutes. That 10x regression is the dominant stall in fido's edit-test loop — every review-thread fix that touches code has to wait through a full run before it can commit.
Likely culprit: tests added in PR #456 (persistent claude stream) for subprocess / async lifecycle, where real
sleep/ realsubprocess.Popen/ retry loops with generous timeouts add wall time even when the logic under test is fast.Work:
uv run pytest --durations=30(or profile viapytest-durations) on the current tip to identify the slowest tests.monkeypatch/freezegun/mocked subprocess streams; cut any fixture that does real I/O it doesn't need.Related: #467 tracks running pytest in parallel via
pytest-xdist, which compounds with this fix but isn't a substitute — a single 15-minute test will still stall a worker.