Files
corescope-rx/src
Erwin FitenandClaude Opus 5 8d6254f8ce feat(config): regionDiscovery defaults ON in an existing config, OFF with none
Completes the default-on change. The transmitting feature's default now depends on
WHERE the silence comes from, which is the distinction that makes it safe:

- an absent key in a config.json that EXISTS -> on. That file is a deployment whose
  operator owns the repeaters being asked, and this is exactly the case that bit us:
  a config predating the key silently reported the feature off.
- no config loaded at all -> off. The app then knows nothing about whose mesh it is
  on, and repeaters rate-limit anonymous requests to 4 per 180s shared across every
  requester and type, so one client asking once a minute claims most of that budget.
  Collecting on an assumption spends our own bandwidth; transmitting on one spends a
  stranger's airtime.

FEATURE_DEFAULTS / NO_CONFIG_DEFAULTS make that split explicit, and every
regionDiscovery gate in app.js now goes through featureEnabled() so "which default
applies" has exactly one answer, in config.js. Those gates read
`!cfg || !cfg.regionDiscovery`, which happened to be equivalent for a normalized
config but restated the policy in five places.

Tests: 220 pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 09:53:19 +02:00
..