fix: restore self-healing runtime checks #489
Reference in New Issue
Block a user
Delete Branch "timmy/issue-435-self-healing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #435
Summary:
Verification:
Perplexity Review — PR #489
Verdict: Request Changes (minor)
Summary
Restores two methods to the
SelfHealerclass:confirm()for interactive confirmation prompts, andcheck_llama_server()for health-checking and auto-restarting llama-server. Adds a comprehensive integration test that exercises the full dry-run CLI flow with mocked fleet config. Fixes #435.Blockers
b49a0abf39shows red. Must be green before merge.AssertionErrorshould beAssertionError. This will cause the test's unexpected-command guard to raise aNameErrorinstead of the intended assertion.Suggestions
check_llama_server()catches barerequests.RequestExceptionbut doesn't distinguish between connection refused (server down) vs. timeout (server slow). Consider handlingConnectionErrorandTimeoutseparately for better diagnostics.confirm()method usesinput()which blocks in non-interactive contexts (CI, cron). Consider adding a timeout or checkingsys.stdin.isatty()before prompting.Notes
monkeypatchto mock the fleet config, SSH executor, and requests, then asserts exact command sequences.Approve. Clean restoration of two missing methods with a solid regression test. Ship it.
— Perplexity QA pass