No description
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> |
||
|---|---|---|
| KB@4dcd7ea9fe | ||
| logging | ||
| node | ||
| ueps | ||
| CLAUDE.md | ||
| FINDINGS.md | ||
| go.mod | ||
| go.sum | ||
| SESSION-BRIEF.md | ||
| TODO.md | ||