Test hardening: unmocked setup/doctor e2e; drop stale setup.sh suite - #129
Merged
Conversation
…p stale setup.sh suite Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Claude BugBot Analysis
This PR is almost entirely test-suite churn: it deletes the legacy shell-driven tests/e2e/test_setup_sh.py, adds a new unmocked tests/e2e/test_setup_cli.py that drives the real CLI, and updates related doc comments and meta-tests to match. Verified the new test's assumptions (MANAGED_HOOKS shape/count, isolated_env signature, setup/doctor exit codes and output strings) against the real source and found no logic defects, race conditions, or security issues in the added/modified lines.
No bugs were detected in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the two follow-ups from the self-managing-setup reviews:
tests/e2e/test_setup_cli.py— the first unmocked end-to-end coverage of the install path since the old install_hooks e2e was retired: runs the realbetter-memory setup/doctorCLI as subprocesses under an isolated home (hermetic env viaisolated_env), asserting the full wiring lands (all 8 hook specs, MCP entry, CLAUDE.md managed block exactly once, sqlite default, home layout), setup is byte-idempotent, and doctor reports wiring clean (exercising the junction fallback on symlink-less hosts).tests/e2e/test_setup_sh.py(619 lines) — every scenario pinned removed behavior (Ollama, install_hooks flags, old script line numbers) and the module was permanently skip-marked. Canary scope repointed at the new suite; a hidden_host_uv_dirsimport and two stale references cleaned up.tests/hooks/test_post_commit.py—ruff check testsnow fully clean.Test plan
🤖 Generated with Claude Code