Update integration_test.sh to use new daemon management commands
instead of manual background processes and PIDs:
- Replace `kvs config.yaml &` with `kvs start config.yaml`
- Replace `kill $pid` with `kvs stop config.yaml`
- Update log file paths to use ~/.kvs/logs/
- Add integration_test/ directory to gitignore
All tests now use clean daemon lifecycle management.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add systemd-style subcommands for managing KVS instances:
- start <config> - Daemonize and run in background
- stop <config> - Gracefully stop daemon
- restart <config> - Restart daemon
- status [config] - Show status of all or specific instances
Key features:
- PID files stored in ~/.kvs/pids/ (global across all directories)
- Logs stored in ~/.kvs/logs/
- Config names support both 'node1' and 'node1.yaml' formats
- Backward compatible: 'kvs config.yaml' still runs in foreground
- Proper stale PID detection and cleanup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features completed:
- Sophisticated conflict resolution with majority vote system
- Oldest node tie-breaker for even cluster scenarios
- Two-phase conflict resolution (majority vote → oldest node)
- Comprehensive logging for conflict resolution decisions
- Member querying for distributed voting
- Graceful fallback to oldest node rule when no quorum available
Technical implementation:
- resolveConflict() function implementing full design specification
- resolveByOldestNode() for 2-node scenarios and tie-breaking
- queryMemberForData() for distributed consensus gathering
- Detailed logging of vote counts, winners, and decision rationale
Configuration improvements:
- Updated .gitignore for data directories and build artifacts
- Test configurations for 3-node cluster setup
- Faster sync intervals for development/testing
The KVS now fully implements the design specification:
✅ Hierarchical key-value storage with BadgerDB
✅ HTTP REST API with full CRUD operations
✅ Gossip protocol for membership discovery
✅ Eventual consistency with timestamp-based resolution
✅ Sophisticated conflict resolution (majority vote + oldest node)
✅ Gradual bootstrapping for new nodes
✅ Operational modes (normal, read-only, syncing)
✅ Structured logging with configurable levels
✅ YAML configuration with auto-generation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>