SPIKE-10 Conductor Watch Task Brief¶
Implement live operator monitoring for tnh-conductor status.
Goal¶
Add a watch mode so operators can monitor one run until it reaches a terminal lifecycle state without manually rerunning the command.
Example target shape:
Expected Behavior¶
- Add
--watchtotnh-conductor status. - Add a configurable polling interval flag.
- When
--watchis enabled, print status snapshots repeatedly until the run reaches a terminal state. - Terminal states should include at least
completed,failed, andblocked. - Preserve the current one-shot status behavior when
--watchis not supplied. - Keep output machine-readable JSON, one snapshot per line.
Likely Files¶
src/tnh_scholar/cli_tools/tnh_conductor/tnh_conductor.pytests/cli_tools/test_tnh_conductor.py- optional CLI docs if the implementation naturally reaches them
Validation¶
At minimum, run:
Success Criteria¶
- one-shot
statusstill works unchanged status --watchexits once the run reaches a terminal state- repeated snapshots are emitted while the run is still active
- invalid or missing runs still fail clearly
- tests cover both one-shot and watch behavior