Repository navigation
fix(doctor): do not prompt Fix/Skip in a non-interactive shell - #1671
Conversation
agentmemory doctor showed the Fix/Skip/More/Quit select for every auto-fixable failure even with CI set or without a terminal. It only avoided hanging because clack gave up on a closed stdin. Doctor now prompts only when stdin and stdout are terminals and CI is unset. Otherwise it reports each failure, skips the fix, and prints one hint to run `agentmemory doctor --all`.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Bug
agentmemory doctorwithCI=1(or without a terminal) still showed the interactive select:Found on a clean Windows Server 2022 run. It only avoided hanging because stdin was not a terminal; in a CI job with an attached pseudo-terminal it waits forever.
Cause
runDoctoraskedaskFixActionfor every auto-fixable failure unless--allwas passed. Nothing checkedCIor whether stdin/stdout are terminals.Fix
doctorPromptsAllowed(env, stdinIsTTY, stdoutIsTTY)insrc/cli/doctor-diagnostics.ts: true only with both terminals and noCI.agentmemory doctor --allto apply the fixes. Exit codes do not change.Testing
test/cli-doctor-env-file.test.ts: runs the built CLIdoctorwithCI=1and no env file. It fails on main (output contains the Fix prompt) and passes here.test/cli-doctor-fixes.test.ts: unit cases fordoctorPromptsAllowed.npm run build,npm run skills:check, both doctor test files pass (44 tests).Summary by CodeRabbit
agentmemory doctor --all.Windows verification
Clean Windows Server 2022, CI=1, stdin closed: doctor finished in 0.8 s with no Fix/Skip prompt and printed the
agentmemory doctor --allhint; exit 1 comes from two real failing checks (no .env, no LLM key). Devin session: https://app.devin.ai/sessions/19b3aff181f8433a8c776ced7a077a59