Skip to content

feat(kerykeion): gateway bridge, MQTT parsing, collector run loop, and mesh CLI#62

Merged
forkwright merged 1 commit intomainfrom
p2-05/gateway-bridge
Mar 22, 2026
Merged

feat(kerykeion): gateway bridge, MQTT parsing, collector run loop, and mesh CLI#62
forkwright merged 1 commit intomainfrom
p2-05/gateway-bridge

Conversation

@forkwright
Copy link
Owner

Summary

  • GatewayBridge (bridge.rs): multi-gateway selection by priority and health rank, automatic failover with 30s cooldown, health monitoring with Healthy → Degraded → Offline state transitions, periodic health check loop with CancellationToken shutdown
  • MQTT message parsing (mqtt.rs): decode ServiceEnvelope, MapReport, and MqttClientProxyMessage protobuf envelopes; extract gateway info from !hex gateway ID strings; lat/lon conversion from fixed-point integers
  • MeshCollector run loop (collector.rs): transport connection, config handshake, heartbeat and health monitor background task spawning via JoinSet, main receive loop with biased tokio::select!, graceful shutdown draining all tasks
  • Mesh CLI (mesh/mod.rs): akroasis mesh status, mesh nodes, mesh send, mesh topology subcommands with comfy-table formatted output; live-data helpers (build_status_table, build_nodes_table, format_node_row, format_gateway_health) for daemon integration
  • Integration wiring: MQTT proto compilation, module declarations, lib.rs re-exports, CLI registration, akroasis → kerykeion dependency

Test plan

  • 48 new tests: bridge (12), mqtt (10), collector (11), mesh CLI (15)
  • cargo fmt --all -- --check clean
  • cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo test --workspace — 462 tests pass, 0 failures
  • cargo test --workspace --doc clean

Validation gate

cargo fmt --all -- --check    ✓
cargo clippy --workspace --all-targets -- -D warnings    ✓
cargo test --workspace    ✓ (462 passed)

…d mesh CLI

Implement the final Wave 4 kerykeion modules:

- GatewayBridge: multi-gateway selection by priority and health rank,
  automatic failover with cooldown, health monitoring (Healthy → Degraded
  → Offline transitions), periodic health check loop
- MQTT message parsing: decode ServiceEnvelope, MapReport, and
  MqttClientProxyMessage protobuf envelopes; extract gateway info from
  envelope gateway_id strings
- MeshCollector run loop: connect transports, perform config handshake,
  spawn heartbeat and health monitor background tasks, main receive loop
  with biased select and CancellationToken shutdown
- Mesh CLI commands: status, nodes, send, topology with formatted table
  output and live-data helpers for daemon integration

48 new tests across bridge (12), mqtt (10), collector (11), mesh CLI (15).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

⚠️ Large PR detected — 12 files, 1797 lines changed.

Consider splitting into smaller PRs for easier review. Not a blocker, just a signal.

@forkwright forkwright merged commit 86b5eb2 into main Mar 22, 2026
11 of 12 checks passed
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