Steve Yegge
15b60b4ad0
Phase 4: Atomic operations and stress testing (bd-114, bd-110)
Completes daemon architecture implementation:
Features:
- Batch/transaction API (OpBatch) for multi-step atomic operations
- Request timeout and cancellation support (30s default, configurable)
- Comprehensive stress tests (4-10 concurrent agents, 800-1000 ops)
- Performance benchmarks (daemon 2x faster than direct mode)
Results:
- Zero ID collisions across 1000+ concurrent creates
- All acceptance criteria validated for bd-110
- Create: 2.4ms (daemon) vs 4.7ms (direct)
- Update/List: similar 2x improvement
Tests Added:
- TestStressConcurrentAgents (8 agents, 800 creates)
- TestStressBatchOperations (4 agents, 400 batch ops)
- TestStressMixedOperations (6 agents, mixed read/write)
- TestStressNoUniqueConstraintViolations (10 agents, 1000 creates)
- BenchmarkDaemonCreate/Update/List/Latency
- Fixed flaky TestConcurrentRequests (shared client issue)
Files:
- internal/rpc/protocol.go - Added OpBatch, BatchArgs, BatchResponse
- internal/rpc/server.go - Implemented handleBatch with stop-on-failure
- internal/rpc/client.go - Added SetTimeout and Batch methods
- internal/rpc/stress_test.go - All stress tests
- internal/rpc/bench_test.go - Performance benchmarks
- DAEMON_STRESS_TEST.md - Complete documentation
Closes bd-114, bd-110
Amp-Thread-ID: https://ampcode.com/threads/T-1c07c140-0420-49fe-add1-b0b83b1bdff5
Co-authored-by: Amp <amp@ampcode.com>
2025-10-16 23:46:12 -07:00
..
2025-10-16 17:11:54 -07:00
2025-10-16 17:44:58 -07:00
2025-10-16 20:50:40 -07:00
2025-10-16 13:10:19 -07:00
2025-10-16 23:46:12 -07:00
2025-10-16 19:18:23 -07:00
2025-10-16 13:18:07 -07:00
2025-10-15 14:52:29 -07:00
2025-10-15 17:19:16 -07:00
2025-10-15 02:57:10 -07:00
2025-10-15 20:09:24 -07:00
2025-10-16 15:00:54 -07:00
2025-10-15 17:51:09 -07:00
2025-10-15 23:38:47 -07:00
2025-10-16 23:13:22 -07:00
2025-10-16 00:49:41 -07:00
2025-10-16 23:13:22 -07:00
2025-10-15 23:38:47 -07:00
2025-10-16 23:13:22 -07:00
2025-10-16 17:05:27 -07:00
2025-10-16 21:29:20 -07:00
2025-10-16 21:21:17 -07:00
2025-10-16 21:51:35 -07:00
2025-10-15 17:06:59 -07:00
2025-10-15 16:31:11 -07:00
2025-10-16 18:06:53 -07:00
2025-10-16 17:11:54 -07:00
2025-10-16 12:43:43 -07:00
2025-10-16 15:10:43 -07:00