Files
meshcore-bot/modules/commands
agessaman 33ed32a6c1 fix: address Codex round 3 findings
Path distance was still leaking between concurrent requests three ways,
all of which Codex reproduced:

- The formatter fell back to shared instance state whenever the request's
  own value was None, so a request with no measurable distance rendered
  another request's. It now consults instance state only when there is no
  request to read from.
- One extraction branch still called _decode_path without the request, so
  that route stored its distance on shared state alone.
- _get_sender_location read the shared _current_message, so an
  interleaved command could measure from the wrong sender. It takes the
  request's message, falling back to the shared value only for direct
  calls that pass nothing.

Scope authorisation: '*' permits unscoped global traffic, not traffic of
unknown scope. When a scope-eligible packet was heard but could not be
tied to this message, its scope is unknown and '*' no longer admits it.
Deliberately narrower than the reviewer suggested: when no scope-eligible
packet was heard at all, '*' still applies, because nothing scoped being
heard is what a genuinely global message looks like. Requiring positive
proof of FLOOD in that case would silence legitimate global replies
whenever correlation is unavailable, which is too much availability to
trade for the residual risk.
2026-08-22 00:42:08 -07:00
..