Files
meshcore-analyzer/cmd
dborupandClaude Sonnet 5 32d5f373a0 fix: exclude 1-byte hops from interior neighbor-edge creation
Review on upstream PR #1852 (SaarMesh, 1071 nodes, 18.9M hop
occurrences) flagged a large-mesh false-edge risk in 7fe3dd9's
interior-hop edges: resolvePrefix only requires a hop to be unique
among nodes known TODAY. At 1 byte that "uniqueness" is fragile --
SaarMesh measured ~1.2% of their nodes as currently-unique on 1 byte,
each one a silent miscall waiting for an unknown/new node sharing that
byte to appear. Unlike the two endpoint edges, an interior edge has no
ADVERT/ANON_REQ to double-check it against, so there's no way to catch
the mistake once made. 2+ byte prefixes don't have this problem
(SaarMesh: 99.4% of nodes uniquely resolvable there).

Adds minInteriorEdgeHashBytes=2, matching the conservative default
already chosen for the upstream #1824 pathTrust.minHashBytesForMapping
config -- inlined here rather than depending on that config landing
first, since it isn't wired into any call site yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 15:57:27 +02:00
..