factory-watch
Trigger: user types /factory-watch. Manual-only (disable-model-invocation: true).
It reads; it never starts, stops or merges a run, and never runs bin/factory run, stop, merge or next.
- Run
bin/factory statusonce, as one bare command from the factory's checkout on the runner, where the runs and the exports live. From any other host runbin/runner 'bin/factory status'; otherwise the table is empty and the preconditions fail falsely. When$ARGUMENTSholds-C <repo>, runbin/factory -C <repo> statusinstead; off the runner,bin/runner 'bin/factory -C <repo> status'with the runner's path for<repo>. - Compare its output with the previous call in this session.
A run has stopped when its status is anything but
running,waiting-limitorpr-opened:stopped*,stuck,no-change,ticket-defect,abandonor another exit. On the first call there is none: print one line counting the runs by status (as in step 3), each stopped run, and eachFAILline under preconditions, and keep this output as the baseline. Something is new when a run stops, a run reachespr-opened, or aFAILline appears under preconditions. - Print one line per new thing, leading with the ticket and what the owner should do, and one line counting the runs by status. Print nothing else.
If the command fails, say so in one line with its exit code and stop; the next call tries again.
