fix(install): add lib/ directory copy for response_analyzer.sh#4
Conversation
The install.sh was missing the lib/ directory copy, causing ralph_loop.sh to fail when sourcing response_analyzer.sh and circuit_breaker.sh. Changes: - Add mkdir -p "$RALPH_HOME/lib" to create_install_dirs() - Add cp -r "$SCRIPT_DIR/lib/"* "$RALPH_HOME/lib/" to install_scripts() - Add chmod +x for lib/*.sh scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughThe installation script is updated to create a lib directory in the Ralph home directory and copy library scripts with executable permissions during the installation process. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Updated both documentation files to reflect recent enhancements and fixes: CLAUDE.md Changes: - Added comprehensive Core Architecture section detailing main scripts and lib/ components - Documented lib/circuit_breaker.sh and lib/response_analyzer.sh modular architecture - Added detailed Exit Conditions and Thresholds section with circuit breaker thresholds - Documented advanced two-stage error detection process to eliminate false positives - Documented multi-line error matching for accurate stuck loop detection - Added Recent Improvements section highlighting v0.9.0 circuit breaker enhancements - Updated Global Installation section to include lib/ directory and ralph-import command - Test coverage details: 13 error detection + 9 stuck loop tests README.md Changes: - Updated "What's Working Now" section with circuit breaker enhancements - Added "Recent Improvements" section highlighting v0.9.0 updates - Updated test count from 75 to 97 tests (75 core + 13 error detection + 9 stuck loop) - Enhanced circuit breaker description with two-stage filtering details - Added circuit breaker thresholds to Exit Thresholds section - Updated test commands to include error detection and stuck loop test scripts - Updated current test status with specialized test file counts Key improvements documented: - Multi-line error matching fix for detect_stuck_loop function - JSON field false positive elimination (e.g., "is_error": false) - Two-stage error filtering for accurate error detection - Installation fix for lib/ directory components - 22 new tests added for circuit breaker functionality These updates ensure documentation accurately reflects the current state of the codebase following PR #6 (circuit-breaker false positives fix) and PR #4 (installation lib/ directory fix).
Summary
mkdir -p "$RALPH_HOME/lib"tocreate_install_dirs()to create the lib directorycp -r "$SCRIPT_DIR/lib/"* "$RALPH_HOME/lib/"toinstall_scripts()to copy lib scriptschmod +x "$RALPH_HOME/lib/"*.shto make lib scripts executableThis fixes the issue where
ralph_loop.shfails becauseresponse_analyzer.shandcircuit_breaker.sh(required at lines 10-11) are not installed to~/.ralph/lib/.Test plan
./install.shon a clean system~/.ralph/lib/directory existsresponse_analyzer.shandcircuit_breaker.share present and executableralph --monitorto confirm no sourcing errors🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.