Commit d8b6c3f
authored
fix(test-classifier): --submit interactivity guard must probe /dev/tty, not fd 0 (#67)
Follow-up to #66. The helpfulness prompt reads from /dev/tty, but the early
'non-interactive' guard still tested fd 0 ([[ ! -t 0 ]]). During an OBSERVED run
the agent's Bash tool subprocesses (pnpm install, vitest, …) inherit the
dispatcher's fd 0 as their stdin and can leave it non-TTY / consumed-to-EOF by
the time --submit runs. The guard then reports 'non-interactive', returns early,
and the prompt is skipped silently — the comment posts but no 'Was this helpful?'
question appears and no Testing Events row is written. (Observed: a --submit run
ended at 'Comment posted … Awaiting the developer's reaction' with no prompt.)
Fix: gate on the SAME resource the prompt uses — whether /dev/tty can be opened
— instead of fd 0. CI / real non-TTY runs have no controlling terminal so they
still skip correctly. The probe ': <>/dev/tty' is set -e-safe inside the if.1 parent 55c1e4b commit d8b6c3f
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
749 | | - | |
750 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
751 | 759 | | |
752 | 760 | | |
753 | 761 | | |
| |||
0 commit comments