9 Commits

Author SHA1 Message Date
Daniel Pupius
8130158c1e feat(cache): priority-based eviction with age protection and Bélády approximation
Replace the flat circular buffer with NodeAwareCache, a smarter eviction
strategy for historical mesh packet data:

- Packets younger than 1 hour are never evicted (recent traffic preserved)
- Under pressure, evict from the lowest-priority type first (neighbor-info
  outlasts node-info; chat messages outlast everything)
- Within a priority tier, evict from the most recently active source node —
  that node will resend soonest, so its old packet is cheapest to lose
  (Bélády approximation; protects flaky/distant node history)
- Node retention window still applies: silent nodes' packets are excluded
  from GetAll and pruned proactively before priority eviction runs

Also:
- Add --cache-retention flag (default 3h) and raise --cache-size default to 5000
- Fix decoder error strings (replace verbose Go errors with short codes)
- Add HTTP security headers middleware to server
- Fix broker dispatchLoop deadlock on source channel close
- Fix make gen-proto scanning web/node_modules for .proto files
- Fix tools target always reinstalling protoc-gen-go (handles stale arch binary)
- Move server port from 8080 to 5446; update Dockerfile, docker-compose, moat.yaml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:23:50 +00:00
Daniel Pupius
dc36070355 Better error cards for private messages, neighbor info rendering 2025-06-23 09:47:14 -07:00
Daniel Pupius
5b8bee8736 Script for building and pushing docker to ECR 2025-05-02 14:39:38 -07:00
Daniel Pupius
908c851f02 Remove accidentally checked in proto generator 2025-05-02 13:57:35 -07:00
Daniel Pupius
1c7bfcd330 Another try at fixing proto in CI 2025-05-02 12:32:09 -07:00
Daniel Pupius
6844d575c4 Initial skeleton for web application 2025-04-22 13:26:35 -07:00
Daniel Pupius
86380cccf9 Refactor protos 2025-04-21 15:40:10 -07:00
Daniel Pupius
bc9aff9d02 Enhance message decoder with additional port support
- Add support for decoding MAP_REPORT_APP, TRACEROUTE_APP, and NEIGHBORINFO_APP messages
- Create formatters for RouteDiscovery and NeighborInfo messages
- Remove JSON output from all formatters for cleaner display
- Update tests to check for proper formatting

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 17:40:17 -07:00
Daniel Pupius
5b8d0c6326 Update build process and add proper .gitignore and .env.example 2025-04-18 16:18:16 -07:00