foreman
foreman copied to clipboard
TUI worker status never finalizes (ghost 'running' workers after completion)
Summary
TUI worker status never finalizes. After a feature completes, controller.workers[...] entries stay status="running" forever, so the WorkerScreen shows ghost "running" workers.
Evidence (dogfood campaign — Pilot-surfaced)
- A no-TUI build returned
phase=donewhile('e2e','running')lingered incontroller.workers. - Caught directly by the Textual Pilot driver. This is the only TUI-state defect found across the whole campaign (every gate was otherwise fully driveable with no crashes and no state-vs-display mismatches).
Why it matters
Operators see workers that appear to still be running after the feature is done — a misleading state display.
Proposed fix
Finalize every WorkerLog on phase/run completion — set a terminal status (e.g. done/failed) so no worker is left running once its phase ends.
Acceptance criteria
- [ ] On phase/run completion, every worker entry transitions to a terminal status.
- [ ] No worker remains
status="running"once the controller reportsphase=done. - [ ] Regression test: drive a build to completion and assert no lingering
runningworkers.
Source: dogfood/ITERATION_REPORT.md MINOR-8; TUI/gate findings section.
I'll take this one. Plan is to finalize any still-running worker entries when the build phase completes, with a regression test.