Skip to content

Test hardening: unmocked setup/doctor e2e; drop stale setup.sh suite - #129

Merged
emp3thy merged 3 commits into
mainfrom
chore/setup-e2e-and-lint
Aug 31, 2026
Merged

Test hardening: unmocked setup/doctor e2e; drop stale setup.sh suite#129
emp3thy merged 3 commits into
mainfrom
chore/setup-e2e-and-lint

Conversation

@emp3thy

@emp3thy emp3thy commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the two follow-ups from the self-managing-setup reviews:

  • New 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 real better-memory setup / doctor CLI as subprocesses under an isolated home (hermetic env via isolated_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).
  • Deleted 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_dirs import and two stale references cleaned up.
  • Lint: wrapped the long docstring in tests/hooks/test_post_commit.pyruff check tests now fully clean.

Test plan

  • Full suite: 1817 passed, 22 skipped (8 fewer skips: the dead skip-marked module is gone).
  • New e2e: 3 passed, verified against real contracts (manifest constants, setup_cmd literals, engine.diff semantics) per review.

🤖 Generated with Claude Code

emp3thy and others added 3 commits August 31, 2026 14:43
…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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@emp3thy
emp3thy merged commit 9d3e35c into main Aug 31, 2026
2 checks passed
@emp3thy
emp3thy deleted the chore/setup-e2e-and-lint branch August 31, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant