mirror of
https://github.com/ruvnet/RuView.git
synced 2026-10-21 22:22:33 -05:00
`MultistaticFuser::fuse` addressed node positions by the frame's index in the cohort it was handed. That index is a rank, not an identity: the cohort from `node_frames_from_states_with_guard` is compacted -- stale, out-of-guard and empty-history nodes are dropped before `fuse` ever sees them. So one board missing a beacon re-ranked every node above it and handed each of them its neighbour's coordinates, silently and fleet-wide. `MultiBandCsiFrame` already carries its own `node_id`, so the identity was present at the boundary and simply unused. Positions are now stored keyed by node id and resolved per frame by that id. - `set_node_positions_by_id` takes the keyed map; `main` passes the same `node_positions_by_id` map that already feeds `NodeInfo`, so one parsed identity now serves both the metadata and the effectful path (#1860 fixed only the former). - `set_node_positions(Vec)` is kept as a documented compatibility mapping: entry `i` is node `i`, which is exactly what a bare `--node-positions` list has always meant. `node_positions()` returns that dense view unchanged. - `FusedSensingFrame::node_positions` stays parallel to `node_frames`, but each entry is resolved from its own frame's id, so the pairing survives compaction. Behaviour change: with a bare (unprefixed) `--node-positions` list on a fleet whose ids are not dense and zero-based, a node now reads the entry declared for its id rather than the entry at its rank. That is the defect being fixed; ids given explicitly as `node_id:x,y,z` are unaffected, and so is any fleet whose ids are dense from zero with every node reporting. Tests: sparse ids, reversed configuration order, a configured-but-absent node, an unconfigured node, join/leave churn, the preserved legacy positional mapping, and a negative control pinning the compacted-cohort case. Six of the eight fail against the pre-fix lookup; the legacy-mapping test is expected to pass both ways, and order-independence became structural with keyed storage. Software-only scope. No hardware-accuracy claim is made. Closes #1866 Refs #1860 Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01BHNNWbmKvxXrVaEDwXEBNo