Commit graph

2 commits

Author SHA1 Message Date
snider
185bfd13dd test: Add error path unit tests for context cancellation and cleanup
- Add context cancellation tests for database InsertHashratePoint
- Add context timeout tests for database operations
- Add NopStore context handling tests
- Add container shutdown timeout and double-shutdown tests
- Add repository concurrent update, corrupt file, and permission tests
- Verify all error paths handle edge cases gracefully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 13:04:20 +00:00
snider
34f860309f refactor: Add reliability fixes and architecture improvements
Reliability fixes:
- Fix HTTP response body drainage in xmrig, ttminer, miner
- Fix database init race condition (nil before close)
- Fix empty minerType bug in P2P StartMinerPayload
- Add context timeout to InsertHashratePoint (5s default)

Architecture improvements:
- Extract HashrateStore interface with DefaultStore/NopStore
- Create ServiceContainer for centralized initialization
- Extract protocol response handler (ValidateResponse, ParseResponse)
- Create generic FileRepository[T] with atomic writes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 12:43:46 +00:00