Skip to content

PacketProcessor is built with a fresh empty NodeDb, discarding handshake/NodeInfo-discovered nodes #198

Description

@forkwright

Finding

connect_and_handshake populates self.node_db with every node the radio reports during the config dump, and at runtime the NodeInfo arm of process_packet inserts further nodes into self.node_db. But the PacketProcessor that owns the topology graph and emits GeoSignals is constructed with a brand-new, empty NodeDb::new() that is never reconciled with self.node_db. Runtime NodeInfo frames are routed only to self.node_db, never to the processor. The processor therefore only ever knows the subset of nodes that appear in raw mesh packets it processes.

Evidence

crates/kerykeion/src/collector.rs:362 passes NodeDb::new(), into PacketProcessor::new, while handshake-discovered nodes were written to self.node_db (handshake::handshake_with_config(&mut conn, &mut db, ...) at line 213) and runtime NodeInfo is inserted via self.node_db.lock().await.insert(...) at line 145 — neither reaches the processor.

Why this matters

If the topology/GeoSignal emission relies on node identity, position, or user info (which NodeInfo carries: lat/lon, hw model, names), those are absent from the processor's view, producing incomplete or incorrect topology and signal attribution that mislead the operator. This contradicts the apparent intent that the processor owns signal emission; confirm against the documented design.

Desired correction

Seed the processor with the handshake known_nodes and route runtime NodeInfo updates to the processor's NodeDb (or share one Arc<Mutex<NodeDb>>). Done when: a node learned only via NodeInfo (no subsequent mesh packet) is visible to the PacketProcessor's topology, verified by a test.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions