You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show CI environment name in non-interactive message when in CI #50
When running in a CI environment like GitHub Actions, the non-interactive mode message shows the stdin reason instead of the CI environment name:
Current behavior:
⚡ Non-interactive mode detected (stdin is not a terminal (piped input detected))
Expected behavior:
⚡ Non-interactive mode detected (running in CI environment (github actions))
Root Cause
In src/lib/tty.ts, getNonInteractiveReason() checks in this order:
stdin not TTY → returns immediately
stdout not TTY
CI environment
Since CI environments typically have non-TTY stdin, the stdin reason fires first.
Proposed Solution
Reorder the checks to prioritize CI detection:
exportfunctiongetNonInteractiveReason(): string|null{// Check CI first - more informative for usersif(isCI()){for(constenvVarofCI_ENV_VARS){if(process.env[envVar]){constciName=envVar.replace(/_/g," ").toLowerCase();return`running in CI environment (${ciName})`;}}return"running in CI environment";}// Then check TTYif(!isStdinTTY()){return"stdin is not a terminal (piped input detected)";}if(!isStdoutTTY()){return"stdout is not a terminal";}returnnull;}
Acceptance Criteria
CI environment name shown when CI env var is set (even if stdin is non-TTY)
Update tests to verify new priority order
Existing non-CI piped input detection still works
Priority
Low - cosmetic UX improvement, core functionality works correctly.
Activity
admarble commentedon Jan 11, 2026
Plan Review (Phase 1: /spec)
Acceptance Criteria with Verification
AC-1: CI environment name shown when CI env var is set (even if stdin is non-TTY)
Verification Method: Unit Test
Test Scenario:
GITHUB_ACTIONS=trueis set ANDstdin.isTTY=falsegetNonInteractiveReason()is called"running in CI environment (github actions)"(NOT the stdin reason)AC-2: Update tests to verify new priority order
Verification Method: Unit Test
Test Scenario:
src/lib/tty.test.tsAC-3: Existing non-CI piped input detection still works
Verification Method: Unit Test
Test Scenario:
stdin.isTTY=falsegetNonInteractiveReason()is called"stdin is not a terminal (piped input detected)"Implementation Plan
Phase 1: Reorder CI Check
src/lib/tty.ts- MoveisCI()check to top ofgetNonInteractiveReason()Phase 2: Update Tests
2. Modify
src/lib/tty.test.ts- Add tests for CI priority over TTY checksPhase 3: Verification
3. Run test suite to confirm all tests pass
Recommended Workflow
Phases:
exec → qaQuality Loop: disabled
Reasoning: Small, well-defined bug fix with clear AC and existing test infrastructure.
🤖 Generated by
/specplanning agentfeat(#50): prioritize CI environment in non-interactive message
admarble commentedon Jan 11, 2026
Implementation Complete (Phase 2: /exec)
AC Coverage Summary
getNonInteractiveReason()Files Changed
src/lib/tty.tsgetNonInteractiveReason()to check CI firstsrc/lib/tty.test.tsBuild/Test Results
npm test: ✅ 284 tests passednpm run build: ✅ PassedPR Status
✅ Created: #65
Next Steps
Ready for
/qareview.🤖 Generated by
/execimplementation agentfeat(#50): prioritize CI environment in non-interactive message