Answer stability round 1: 0 🔴, 2 🟡 (0 misread); name the signed-out check beside its message, and report a signal as a shell does; the 🟢 for a claude that cannot start is declined, as the home's build fails first

This commit is contained in:
2026-12-04 06:01:58 +01:00
parent ba4cc2c90f
commit 0cd46f95aa
4 changed files with 21 additions and 9 deletions
+3 -1
View File
@@ -8,7 +8,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from failure import Failure
from claude_home.home import unready
from claude_home.home import only_signed_out, unready
SETTINGS = {
"enabledPlugins": {"code-review@official": True, "frontend-design@official": False, "lsp@other": True},
@@ -141,6 +141,7 @@ class Home(unittest.TestCase):
self.status = SIGNED_OUT
self.assertEqual(self.unready(), f"nobody is signed in to the loop's Claude home; run `CLAUDE_CONFIG_DIR={self.home} claude` and type /login there, once")
self.assertTrue(only_signed_out(self.unready() or ""))
def test_a_status_that_says_nobody_is_signed_in_or_out_quotes_what_claude_said(self) -> None:
for stdout, stderr, said in (("", "Error: the settings\nare broken\n", "Error: the settings are broken"), ("Not logged in\n", "", "Not logged in"), ('{"authMethod": "none"}', "", '{"authMethod": "none"}'), ("3", "", "3"), ('{"loggedIn": "yes"}', "", '{"loggedIn": "yes"}'), ("", "", "it printed nothing and exited 1")):
@@ -192,6 +193,7 @@ class Home(unittest.TestCase):
reason = unready(self.home, self.clone, self.reports, missing, lambda *args, cwd=None: "1a2b3c\n")
self.assertEqual(reason, f"could not build the loop's Claude home, {self.home}: [Errno 2] No such file or directory: 'claude'")
self.assertFalse(only_signed_out(reason))
def test_a_claude_that_is_stopped_after_its_time_stops(self) -> None:
def stalled(args: list[str]) -> subprocess.CompletedProcess[str]: