Commit graph

3 commits

Author SHA1 Message Date
Claude
132b69426a
ax(batch): replace prose comments with usage examples (AX Principle 2)
Convert "X returns the Y" / "X holds Y" / "X represents Y" style
comments to concrete usage examples across database/, logging/, and
mining/ packages. Comments now show how to call the function with
realistic values instead of restating what the signature already says.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 18:03:43 +01:00
Claude
8b22e9dda6
ax(database): replace prose interface comments with usage examples
AX Principle 2: comments must show how to call the function with real
values, not restate what the type signature already says. All six
HashrateStore interface methods now carry concrete call-site examples.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 14:22:42 +01: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