fix: prevent setup --help side effects (#152) - #153
Conversation
📝 WalkthroughWalkthroughThe ChangesSetup help handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_install_scripts.py (1)
257-274: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover all supported setup-help forms.
This regression test invokes only
--help, but the implementation also supports-handhelp. Parameterize the test over all three values so each alias verifies usage output and the absence of side effects.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_install_scripts.py` around lines 257 - 274, Parameterize test_node_setup_help_prints_usage_without_side_effects over the supported setup-help arguments --help, -h, and help. Keep the existing assertions for usage output, successful completion, and absence of .reflexio and .claude-smart side effects so each alias is validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/test_install_scripts.py`:
- Around line 257-274: Parameterize
test_node_setup_help_prints_usage_without_side_effects over the supported
setup-help arguments --help, -h, and help. Keep the existing assertions for
usage output, successful completion, and absence of .reflexio and .claude-smart
side effects so each alias is validated.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ca9b12ce-406f-4ac2-b5f0-2728b97e4106
📒 Files selected for processing (2)
bin/claude-smart.jstests/test_install_scripts.py
Summary
claude-smart setup --help/-h/helpin the Node entrypoint before invoking the destructive setup shell script.Test Plan
uv run --project plugin pytest tests/test_install_scripts.py::test_node_setup_help_prints_usage_without_side_effects -quv run --project plugin pytest tests/test_install_scripts.py -qnpm run build:opencodegit diff --checkFixes #152
Summary by CodeRabbit
New Features
setup --help,setup -h, andsetup helpto display usage information without running setup.Bug Fixes
Tests