Files
corescope-rx/docs
efitenandClaude Opus 5 14df2e0438 feat: ask a repeater only while it is being heard, and refund an ask that never left
Twelve minutes of the 2026-09-11 v1.13.0 log: six region requests, one answer. The one
that was answered fired on a live reception and came back in two seconds. The other five
each charged their target an attempt and dropped it into the 5/15/30-minute backoff, so
e3d3f4d7edd0 (heard directly at 12:04:54 and 12:09:32) and 6b8c65b77cf3 (12:03:53,
12:08:02, 12:10:05) could not be asked while they were demonstrably in range.

Two separate causes, both in the ask bookkeeping rather than in the framing or the reply
matcher, and each fixed at its own site.

The 60s timer fallback is removed. selectNextTarget picked from the whole session pool
with no notion of range, which at road speed is a repeater already passed: 12:04:37 to
e470a7fd67fa, last heard 5m45s earlier, and 12:05:38 to 01fa326b4758 are the two clean
examples in the log, neither answered. Since 52b7ff5 those asks also stamp the shared
one-ask-per-60s airtime budget, so a blind ask blocked the heard path for the following
minute as well as backing its target off. maybeAskHeardTarget is now the whole
scheduler, and selectNextTarget, demoted and cursor go with the fallback they served.

A BLE write that throws now costs nothing. commitAndAsk charged attempts, lastAskedAt
and the airtime budget before the write, and askRegions only logged the rejection, so a
request that never reached the radio held the pending slot for its full 20s and then
printed "no reply ... within 20s" — indistinguishable from a repeater that heard us and
stayed silent. Two of the six asks were this: 12:00:00 and 12:02:36, both immediately
after "BLE: reconnecting". commitAsk now returns a receipt and undoAsk restores it,
refusing once the send-ack has captured a tag (that request IS on the air) or once
another target holds the slot. prepareAndAskRegions gained a try/catch for the same
reason: state.transport is nulled on disconnect and askRegions dereferences it, which
rejected unobserved and wedged the slot until it timed out.

Removing the timer removes the only line that narrated the scheduler once a minute, so
heardAskDecision reports why it said no (in flight, budget, answered, backoff, with the
remaining wait) and the heard path logs that at most once a minute. Those four states
were previously indistinguishable from each other and from silence.

Known trade-off, stated in the release notes: the stationary pause stops the discover
sweep, so a parked app now depends on organic traffic to raise a candidate. A repeater
in range that transmits nothing while you are parked next to it is no longer asked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HSoyBhrLLtSqLgBMEKMiJV
2026-09-11 12:47:02 +02:00
..