Commit 13bec96
authored
fix(test-classifier): stream gate must test stderr (-t 2), not stdout (#56)
The live-progress streaming never engaged in a real terminal. should_stream
checked `[[ -t 1 ]]`, but invoke_ai's stdout is captured by the dispatcher via
`classifier_output="$(ai_review::invoke_ai)"` — so inside the function stdout is
always a pipe, never a TTY, and `-t 1` was false even with a human watching.
Test stderr (`-t 2`) instead: stderr is not captured (it flows to the terminal),
so it's the correct "a terminal is watching" signal — and it's exactly where we
narrate the ⏺/⏎ progress. CI / pipes (stderr not a TTY) still take the silent
captured path.
Logic verified inside a simulated `$(...)` capture; full live confirmation is a
real-terminal check (this CI env has no TTY).1 parent 525b30f commit 13bec96
1 file changed
Lines changed: 10 additions & 4 deletions
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
355 | 361 | | |
356 | 362 | | |
357 | | - | |
| 363 | + | |
358 | 364 | | |
359 | 365 | | |
360 | 366 | | |
| |||
0 commit comments