Answer stability round 1: 1 🔴, 6 🟡 (2 misread); read the scoring rule from the clone, hand windows XDG_DATA_HOME, retry the home check where nobody watches, tell an unreadable sign-in status and settings file apart, and bound the claude commands that build the home
CI / tests (pull_request) Successful in 4m35s

This commit is contained in:
2026-12-04 02:45:02 +01:00
parent 71865e0479
commit 3519922f01
19 changed files with 153 additions and 69 deletions
+23
View File
@@ -153,6 +153,29 @@ class ClaudeHomeEffect(unittest.TestCase):
self.assertEqual(ran[-1], f"{built} auth status")
self.assertIn(f"{built} plugin install code-review@claude-plugins-official", ran)
def test_a_plugin_that_does_not_install_stops_naming_the_command_and_what_claude_said(self):
with tempfile.TemporaryDirectory() as folder:
claude = pathlib.Path(folder, "claude")
claude.write_text('#!/bin/sh\nif [ "$*" = "plugin install code-review@claude-plugins-official" ]; then echo "no such plugin" >&2; exit 1; fi\n')
claude.chmod(0o755)
home = pathlib.Path(folder, "home")
reason = system_effects(home, without_xdg_folders(os.environ) | {"PATH": f"{folder}:{os.environ['PATH']}"}).claude_home()
self.assertEqual(reason, f"could not build the loop's Claude home, {home}/.local/share/build-release/claude-home: claude plugin install code-review@claude-plugins-official failed: no such plugin")
def test_a_claude_that_outlasts_its_time_is_stopped_and_the_home_is_not_built(self):
with tempfile.TemporaryDirectory() as folder:
claude = pathlib.Path(folder, "claude")
claude.write_text("#!/bin/sh\nexec sleep 5\n")
claude.chmod(0o755)
home = pathlib.Path(folder, "home")
reason = system_effects(home, without_xdg_folders(os.environ) | {"PATH": f"{folder}:{os.environ['PATH']}"}, home_timeout=0.2).claude_home() or ""
self.assertTrue(reason.startswith(f"could not build the loop's Claude home, {home}/.local/share/build-release/claude-home: Command '['claude', 'plugin', "), reason)
self.assertTrue(reason.endswith("' timed out after 0.2 seconds"), reason)
class ForgeEffect(unittest.TestCase):
def test_runs_the_forges_cli_in_the_checkout_it_is_given(self):