8000 feat(mesh): observability — peer conns/score/bandwidth, activity feed, SSE events (Track 63) by stpinkie · Pull Request #9 · stpinkie/rhizome · GitHub
[go: up one dir, main page]

Skip to content

feat(mesh): observability — peer conns/score/bandwidth, activity feed, SSE events (Track 63) - #9

Merged
stpinkie merged 1 commit into
mainfrom
devin/track-63-mesh-observability
Sep 15, 2026
Merged

stpinkie merged 1 commit into
mainfrom
devin/track-63-mesh-observability

Conversation

@stpinkie
Copy link
Copy Markdown
Owner

Summary

  • PeerStatus gains conns[] (remote_multiaddr, direction, transport detected via /p2p-circuit and quic/tcp, stream count, opened_at), latency_ms (peerstore LatencyEWMA), score (PeerScoreStore), last_seen
  • libp2p.BandwidthReporter(metrics.NewBandwidthCounter()) wired into host options; aggregate + per-peer in/out totals and rates surface on NetworkStatus/PeerStatus
  • Bounded in-memory activity ring (200 entries) capturing mesh.*/swarm.* events — sync.Once-guarded since daemon and gateway both wire the bus; mesh-audit.jsonl remains the durable trail
  • Daemon: GET /network/activity?tail=N + unified GET /network/events SSE; launcher proxies /api/network/activity + /api/network/events
  • CLI: rhizome mesh activity [--tail N], rhizome mesh peer <id> detail view, mesh status prints conn/score per peer
  • Dashboard: transport/relay badges, score tooltips, peer detail drawer, new Activity panel (SSE with polling fallback), node bandwidth row

Stacked on #8 (Track 62) — retargets to main on merge.

Test plan

  • go test -tags goolm,stdjson ./pkg/rhizome/mesh ./pkg/gateway — ring order/capacity, kind filter, bus collection, SSE lifecycle, auth, tail, two-node observability (conns/transport/bandwidth/score)
  • go build -tags goolm,stdjson ./... + -p 1 tests on touched packages
  • golangci-lint run --build-tags goolm,stdjson — 0 issues
  • npm run build + eslint + prettier — clean
  • Live daemon: mesh status, mesh activity, mesh peer <id> against a connected peer

Generated with Devin

@stpinkie
stpinkie changed the base branch from main to de 8000 vin/track-62-acp-client September 15, 2026 03:15
@stpinkie
stpinkie force-pushed the devin/track-62-acp-client branch from e77fd10 to 1a6b36e Compare September 15, 2026 08:18
…, SSE events (Track 63)

PeerStatus gains conns[] (remote_multiaddr, direction, transport detected
from /p2p-circuit and quic/tcp in the remote addr, stream count, opened_at),
latency_ms from peerstore LatencyEWMA, score from PeerScoreStore, and
last_seen. libp2p.BandwidthReporter(metrics.NewBandwidthCounter()) is wired
into the host; aggregate and per-peer in/out totals+rates surface on
NetworkStatus/PeerStatus via Node.BandwidthTotals/BandwidthForPeer.

Activity feed: a bounded in-memory ring (200 entries) captures mesh.* and
swarm.* runtime events, subscribed once via sync.Once since both the daemon
and the gateway wire the event bus. In-memory only — mesh-audit.jsonl stays
the durable trail.

Daemon APIs: GET /network/activity?tail=N and a unified GET /network/events
SSE stream, both behind the existing bearer auth. Launcher proxies them as
/api/network/activity (daemon required) and /api/network/events.

CLI: mesh status/--peers print per-peer conn transport/direction/streams,
latency, and score; new rhizome mesh activity [--tail N] and rhizome mesh
peer <id> detail view (conns, score, capabilities, manifest fingerprints,
recent tasks).

Dashboard: peers panel gains transport/relay badges, score tooltips, and a
click-through detail Sheet; new Activity panel streams /api/network/events
via EventSource with a 10 s polling fallback; node panel shows aggregate
bandwidth. No graph viz — topology stays queued.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@stpinkie
stpinkie force-pushed the devin/track-63-mesh-observability branch from 407145c to b3aba5c Compare September 15, 2026 08:19
@stpinkie
stpinkie changed the base branch from devin/track-62-acp-client to main September 15, 2026 10:04
@stpinkie
stpinkie merged commit bd49c08 into main Sep 15, 2026
13 checks passed
@stpinkie
stpinkie deleted the devin/track-63-mesh-observability branch September 15, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0