chore(central-ripout 2c): relocate gauge sites to env/gauge_sites.py (#163)

Moves the last non-fire live file out of central/. idaho_gauge_sites.py held
USGS stream-gauge site data + threshold ranking — pure hydro/gauge domain,
misfiled among the retired Central handlers.

Applied the owner's rule with a clean split:
- THRESHOLD_RANK (a 5-element list used ONLY by notifications/gating/hydro.py)
  inlined there — single consumer, belongs next to its use.
- The gauge-site lookup (used by env/usgs.py + persistence/curation.py) moved
  to env/gauge_sites.py, next to the usgs adapter that produces gauge data.
- Dropped the redundant "idaho_" prefix (the Idaho scoping is data, not code).

Consumers rewired: env/usgs.py, notifications/gating/hydro.py, and tests.
central/ is now down to firms_handler.py + wfigs_handler.py (the fire pair,
whose relocation is a separate PR because of their cross-file coupling).

Move + import-rewire only, no behavior change. Suite: 2059 passed, 0 failed.

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-07-17 16:04:34 -06:00 committed by GitHub
commit dd932b4ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 25 additions and 19 deletions

View file

@ -208,8 +208,8 @@ class TestGateSequenceParity:
def _canonical(self, fixture):
"""Build canonical data from a Central-style fixture (as the deleted
handler used to) via the still-live idaho_gauge_sites helpers."""
from meshai.central.idaho_gauge_sites import (
handler used to) via the still-live gauge_sites helpers."""
from meshai.env.gauge_sites import (
compute_threshold_state, lookup_site, normalize_site_id,
)
env = fixture["envelope"]