Commit 3013d26
authored
fix(test-classifier): export CI=true for OBSERVED suite runs (#59)
vitest browser mode (and other watch-defaulting runners) hung under the headless
agent shell: they printed a banner, waited for an interactive browser session
that never attached, collected zero tests, and the run fell back to INFERRED.
Set CI=true in invoke_ai when AI_RUN_SUITE=1 so the runner does a single,
headless, non-watch pass (vitest reads CI to force headless + run-once; jest and
others honor it too). The AI process and the test runner it spawns inherit it.
Subtlety handled: should_stream() is gated on CI != true, so the streaming
decision is now made in invoke_ai BEFORE exporting CI (stashed in
AI_REVIEW_DO_STREAM and read by invoke_claude) — otherwise OBSERVED runs would
silently lose live progress. The export lives in the `$(...)` subshell, so the
dispatcher's own color/stream state is untouched.
Verified end-to-end against a vitest-browser-mode repo: OBSERVED now runs the
suite (2 failed / 3 passed, stable across two runs) instead of hanging to
INFERRED. Runner-agnostic; applies to claude/codex/copilot via invoke_ai.1 parent 475059b commit 3013d26
1 file changed
Lines changed: 30 additions & 3 deletions
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| |||
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
498 | 525 | | |
499 | 526 | | |
500 | 527 | | |
| |||
0 commit comments