fix: address code review feedback
README.md: - Update version badge to v0.9.3 - Update test count to 165 in all locations - Update test coverage breakdown (111 unit + 54 integration) test_installation.bats: - Add missing mock setup.sh in setup() function - Fix dependency test to mock all three deps (jq, git, node/npx) - Remove unused source_install_functions helper function
This commit is contained in:
parent
31ba3eb2bc
commit
3503b9b27b
2 changed files with 34 additions and 37 deletions
31
README.md
31
README.md
|
|
@ -1,8 +1,8 @@
|
|||
# Ralph for Claude Code
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/hesreallyhim/awesome-claude-code)
|
||||
[](https://x.com/FrankBria18044)
|
||||
|
|
@ -15,9 +15,9 @@ Ralph is an implementation of the Geoffrey Huntley's technique for Claude Code t
|
|||
|
||||
## Project Status
|
||||
|
||||
**Version**: v0.9.1 - Active Development
|
||||
**Version**: v0.9.3 - Active Development
|
||||
**Core Features**: Working and tested
|
||||
**Test Coverage**: 145 tests, 100% pass rate
|
||||
**Test Coverage**: 165 tests, 100% pass rate
|
||||
|
||||
### What's Working Now
|
||||
- Autonomous development loops with intelligent exit detection
|
||||
|
|
@ -32,7 +32,7 @@ Ralph is an implementation of the Geoffrey Huntley's technique for Claude Code t
|
|||
- tmux integration for live monitoring
|
||||
- PRD import functionality
|
||||
- **CI/CD pipeline with GitHub Actions**
|
||||
- 151 passing tests across 7 test files
|
||||
- 165 passing tests across 8 test files
|
||||
|
||||
### Recent Improvements
|
||||
|
||||
|
|
@ -361,8 +361,8 @@ If you want to run the test suite:
|
|||
# Install BATS testing framework
|
||||
npm install -g bats bats-support bats-assert
|
||||
|
||||
# Run all tests (145 tests)
|
||||
bats tests/
|
||||
# Run all tests (165 tests)
|
||||
npm test
|
||||
|
||||
# Run specific test suites
|
||||
bats tests/unit/test_rate_limiting.bats
|
||||
|
|
@ -378,10 +378,10 @@ bats tests/integration/test_loop_execution.bats
|
|||
```
|
||||
|
||||
Current test status:
|
||||
- **145 tests** across 7 test files
|
||||
- **100% pass rate** (145/145 passing)
|
||||
- **165 tests** across 8 test files
|
||||
- **100% pass rate** (165/165 passing)
|
||||
- Comprehensive unit and integration tests
|
||||
- Specialized tests for JSON parsing, CLI flags, and circuit breaker functionality
|
||||
- Specialized tests for JSON parsing, CLI flags, circuit breaker, and installation workflows
|
||||
|
||||
> **Note on Coverage**: Bash code coverage measurement with kcov has fundamental limitations when tracing subprocess executions. Test pass rate (100%) is the quality gate. See [bats-core#15](https://github.com/bats-core/bats-core/issues/15) for details.
|
||||
|
||||
|
|
@ -598,23 +598,24 @@ tmux attach -t <name> # Reattach to detached session
|
|||
|
||||
Ralph is under active development with a clear path to v1.0.0. See [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) for the complete roadmap.
|
||||
|
||||
### Current Status: v0.9.1
|
||||
### Current Status: v0.9.3
|
||||
|
||||
**What's Delivered:**
|
||||
- Core loop functionality with intelligent exit detection
|
||||
- Rate limiting (100 calls/hour) and circuit breaker pattern
|
||||
- Response analyzer with semantic understanding
|
||||
- 145 comprehensive tests (100% pass rate)
|
||||
- 165 comprehensive tests (100% pass rate)
|
||||
- tmux integration and live monitoring
|
||||
- PRD import functionality
|
||||
- Installation system and project templates
|
||||
- Modern CLI commands with JSON output support
|
||||
- CI/CD pipeline with GitHub Actions
|
||||
- Comprehensive installation test suite
|
||||
|
||||
**Test Coverage Breakdown:**
|
||||
- Unit Tests: 105 (CLI parsing, JSON, exit detection, rate limiting)
|
||||
- Integration Tests: 40 (loop execution, edge cases)
|
||||
- Test Files: 7
|
||||
- Unit Tests: 111 (CLI parsing, JSON, exit detection, rate limiting)
|
||||
- Integration Tests: 54 (loop execution, edge cases, installation)
|
||||
- Test Files: 8
|
||||
|
||||
### Path to v1.0.0 (~4 weeks)
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ EOF
|
|||
#!/bin/bash
|
||||
# Mock ralph_import.sh
|
||||
echo "Ralph import running"
|
||||
EOF
|
||||
|
||||
cat > "$MOCK_SOURCE_DIR/setup.sh" << 'EOF'
|
||||
#!/bin/bash
|
||||
# Mock setup.sh
|
||||
echo "Setup running"
|
||||
EOF
|
||||
|
||||
chmod +x "$MOCK_SOURCE_DIR"/*.sh
|
||||
|
|
@ -89,23 +95,6 @@ teardown() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Helper: Source install.sh functions for testing
|
||||
# This overrides SCRIPT_DIR to use our mock source
|
||||
source_install_functions() {
|
||||
# Override SCRIPT_DIR before sourcing
|
||||
export SCRIPT_DIR="$MOCK_SOURCE_DIR"
|
||||
export INSTALL_DIR="$TEST_INSTALL_DIR"
|
||||
export RALPH_HOME="$TEST_RALPH_HOME"
|
||||
|
||||
# Source only functions, not main execution
|
||||
source <(grep -E '^(log|check_dependencies|create_install_dirs|install_scripts|install_ralph_loop|install_setup|check_path)\s*\(\)|^(log|check_dependencies|create_install_dirs|install_scripts|install_ralph_loop|install_setup|check_path)\(\)|^[A-Z_]+=|^function ' "$PROJECT_ROOT/install.sh" | head -100)
|
||||
|
||||
# Re-source with sed to extract functions
|
||||
eval "$(sed -n '/^log()/,/^}/p' "$PROJECT_ROOT/install.sh")"
|
||||
eval "$(sed -n '/^create_install_dirs()/,/^}/p' "$PROJECT_ROOT/install.sh")"
|
||||
eval "$(sed -n '/^check_path()/,/^}/p' "$PROJECT_ROOT/install.sh")"
|
||||
}
|
||||
|
||||
# Helper: Run install.sh in isolated environment
|
||||
run_install() {
|
||||
local action="${1:-install}"
|
||||
|
|
@ -244,10 +233,14 @@ run_install() {
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Override command to simulate missing jq
|
||||
# Override command to simulate missing jq, git, and node/npx
|
||||
command() {
|
||||
if [[ "$1" == "-v" && "$2" == "jq" ]]; then
|
||||
return 1
|
||||
if [[ "$1" == "-v" ]]; then
|
||||
case "$2" in
|
||||
jq|git|node|npx)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
builtin command "$@"
|
||||
}
|
||||
|
|
@ -286,8 +279,11 @@ EOF
|
|||
# Should fail
|
||||
[[ "$status" -ne 0 ]]
|
||||
|
||||
# Should mention missing dependencies
|
||||
[[ "$output" =~ "Missing required dependencies" ]] || [[ "$output" =~ "jq" ]]
|
||||
# Should mention missing dependencies (all three)
|
||||
[[ "$output" =~ "Missing required dependencies" ]]
|
||||
[[ "$output" =~ "jq" ]]
|
||||
[[ "$output" =~ "git" ]]
|
||||
[[ "$output" =~ "Node.js" ]]
|
||||
|
||||
rm -f "$temp_script"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue