Files
corescope-rx/vite.config.js
efitenandClaude Opus 5 8bfadeaac8 feat: pace region discovery by what the radio hears, not by a clock
The scheduler had three limits and four drives showed each one costing answers rather
than protecting anything. All three are gone; what replaces them is bounded by the
repeater firmware's own limiter instead of by a clock of our own invention.

The shared one-ask-per-60s airtime budget. One ask, from wherever, blocked every
repeater heard in the following minute. The 2026-09-11 80 km log has a2cf63b9fd89 asked
at 18:24:55 on rssi -120 and silent, then heard at 18:25:26 on -102 — 18 dB stronger —
and skipped, because the budget had gone on the weaker reception 31 seconds earlier and
that same ask had put it into backoff.

The 5/15/30-minute per-target backoff, counted per session. A repeater asked once from a
bad spot was locked out for the rest of the drive. It is replaced by an encounter: three
unanswered asks at least 30s apart, then left alone until it has been out of earshot for
five minutes, after which the next reception is a new encounter with a fresh run. Three
asks 30s apart is 3 in any 180s window, inside simple_repeater's 4 anon requests per
180s shared across all requesters — the cap is what keeps us there, not the spacing.

The single in-flight slot. It capped the feature at three asks a minute, and at one per
session whenever a request went unanswered. Several requests can now be outstanding, so
replies are attributed on the 4-byte tag the companion echoes back and an unmatched
reply is dropped rather than guessed at: "something is pending" would file one
repeater's declared regions under another and store it as fact.

Measured, not assumed. A build without the three limits sent 15 asks and got 6 answers;
v1.14.0 on a comparable run sent 5 and got 1. That build is the one merged here (the
beta/regions-sprint commits below), with the pacing tightened from 15s/6 asks to
30s/3 asks so one repeater sees strictly less than the firmware allows one client.

Also here: every ask now carries the snr and rssi of the reception that triggered it,
into the reply or into the timeout. Four drives point at a split — every ask at snr
+1.75 dB or better was answered, every one at -1.25 dB or worse was not — that until now
had to be assembled by hand from pairs of log lines the ring buffer rolls out mid-drive.
No signal floor is applied; this is the measurement that would justify one.

Deleted rather than left behind: selectNextTarget's successors (heardAskDecision,
commitAsk, undoAsk, isTargetDue, dueDelayMs, retryBackoffFor, recordCandidate,
applyRegionsReply, pendingExpired) and monitor's regionDiscoverDue/REGION_INTERVAL_MS.
regionreq.js is framing only now; regionsched.js owns the scheduling.

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

12 lines
347 B
JavaScript

import { defineConfig } from 'vite';
import { readFileSync } from 'fs';
// Inject the package.json version so the app can display which build is running.
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
});