|
| 1 | +# Airlock 0.5.14 — TODO |
| 2 | + |
| 3 | +## TUI test-harness lifecycle optimization |
| 4 | + |
| 5 | +**Why this is scheduled:** the 0.5.12 release verification ran |
| 6 | +`uv run pytest --tb=short -q -m 'not live' --durations=40`. The suite reached |
| 7 | +94% quickly, but the final TUI-heavy segment dominated wall time: every entry |
| 8 | +in the slowest 40 was a TUI test, at 14.77–27.62 seconds each. The full local |
| 9 | +suite took 19 minutes. |
| 10 | + |
| 11 | +Each `AirlockApp.run_test()` constructs all panes and their lifecycle work, not |
| 12 | +just the view asserted by the test. That includes overview external-probe and |
| 13 | +state-refresh workers, config/MCP refresh, the JSONL tailer, MCP health loop, |
| 14 | +and Textual worker cancellation during teardown. This is useful integration |
| 15 | +coverage in a few tests, but unnecessarily expensive for simple composition, |
| 16 | +navigation, and rendering assertions. |
| 17 | + |
| 18 | +### Work |
| 19 | + |
| 20 | +- Establish an explicit test-harness mode or fixture that prevents irrelevant |
| 21 | + background I/O and lifecycle workers while retaining the real widget tree. |
| 22 | +- Migrate pure TUI composition/navigation/rendering tests to that harness. |
| 23 | +- Keep a small, named integration set exercising real worker dispatch, |
| 24 | + cancellation, shutdown, and the stale-callback guard; do not turn those |
| 25 | + behaviours into untested mocks. |
| 26 | +- Add duration evidence to the closeout and ensure the full non-live suite |
| 27 | + remains order-independent. |
| 28 | + |
| 29 | +### Done when |
| 30 | + |
| 31 | +- `pytest --durations=40` shows a material reduction in the TUI-dominated tail. |
| 32 | +- Lifecycle-specific tests still cover `call_from_thread`, worker cancellation, |
| 33 | + app teardown, JSONL/MCP shutdown, and the OverviewPane stale-refresh path. |
| 34 | +- No production TUI behaviour is gated on the test-harness setting. |
0 commit comments