No description
Find a file
Claude a60dfdf93b
feat: implement UEPS packet dispatcher with threat circuit breaker
Implements Phase 4 of the go-p2p task queue. The Dispatcher routes
HMAC-verified UEPS packets to registered IntentHandlers by IntentID,
enforcing a threat circuit breaker that drops packets with ThreatScore
exceeding 50,000 (logged as threat events at WARN level).

Design choices:
- IntentHandler is a func type (not interface) for lightweight registration
- 1:1 mapping of IntentID to handler, replacement on re-register
- Threat check fires before intent routing (hostile packets never reach handlers)
- Sentinel errors (ErrThreatScoreExceeded, ErrUnknownIntent, ErrNilPacket)
- RWMutex protects handler map for concurrent safety

Tests: 10 test functions, 17 subtests — 100% dispatcher coverage.
Race detector clean. All 102 existing tests continue to pass.

Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 00:23:10 +00:00
KB@4dcd7ea9fe test: add UEPS wire protocol tests (Phase 1) — 0% to 88.5% coverage 2026-02-19 23:44:09 +00:00
logging feat: extract P2P networking and UEPS protocol from Mining repo 2026-02-16 15:47:10 +00:00
node feat: implement UEPS packet dispatcher with threat circuit breaker 2026-02-20 00:23:10 +00:00
ueps test: add UEPS wire protocol tests (Phase 1) — 0% to 88.5% coverage 2026-02-19 23:44:09 +00:00
CLAUDE.md docs: add CLAUDE.md, TODO.md, and FINDINGS.md for expert session 2026-02-19 17:42:52 +00:00
FINDINGS.md test: add controller tests (Phase 3) — node/ coverage 63.5% to 72.1% 2026-02-20 00:17:31 +00:00
go.mod test: add controller tests (Phase 3) — node/ coverage 63.5% to 72.1% 2026-02-20 00:17:31 +00:00
go.sum test: add controller tests (Phase 3) — node/ coverage 63.5% to 72.1% 2026-02-20 00:17:31 +00:00
SESSION-BRIEF.md docs: add session brief for expert agent work 2026-02-19 17:39:03 +00:00
TODO.md docs: mark Phase 3 complete in TODO.md with commit hash 2026-02-20 00:17:45 +00:00