meshai/work/meshai
malice 9f06930a0d
chore: excise the dead Central NATS consumer path (-11,328 LOC) (#144)
* chore: excise the dead Central NATS consumer path

Central was retired and its database dropped 2026-07-15; its NATS broker no
longer exists. Verified against the live CT108 deployment: all 12 adapters
run feed_source=native, zero on central, and central.enabled is False
(default, never overridden). The consumer and its handlers were unreachable.

Removed:
- central/consumer.py and 6 dead handlers (nws, quake, swpc, nwis, avy,
  incident) -- their handle_* entrypoints were reachable only from the
  consumer's dispatch
- the Central wiring in main.py (init, guarded start, retry loop, stop path)
- the dead config surface: CentralConsumerConfig, EnvironmentalConfig.central,
  adapter_config ("central","severity_thresholds") and its display block
- the nats-py dependency (consumer.py was its only importer)
- 19 test files that exercised only the dead path

KEPT -- these live under central/ but are imported directly by native
adapters, and deleting them would break production:
- wfigs_handler.py: firms_handler._handle_pass_boundary() calls its _render()
  on the live FIRMS growth-fire path (env/firms.py -> ingest_hotspot_pixel)
- firms_handler, satpass_handler, tle_handler: split files whose handle_*
  entrypoints are dead but whose engines are live. Left intact; splitting
  them is separate work.
- pass_predictor, budget, idaho_gauge_sites: fully live.

The usgs_quake keys global_mag_floor / regional_mag_floor / regional_centroid
/ regional_radius_mi / broadcast_pager_alerts are NOT removed despite comments
labelling them "CENTRAL-PATH ONLY" -- notifications/gating/quake.py reads them
unconditionally in the native path. Those comments are corrected separately.

Test-count note: the suite drops ~425 tests. Most were migration PARITY tests
whose sole purpose was proving the native rewrite byte-matched the Central
handler (golden byte-parity, cross-source identity, gate-sequence replay).
With the handler deleted there is nothing left to compare against, so they
cannot exist. Native-only tests were kept and reworked where a test reached
for a central symbol incidentally. This is a real coverage loss, accepted
deliberately: the parity harness proved the refactor faithful, and git
history preserves the originals.

Suite: 1984 passed, 6 failed -- the same 6 pre-existing failures as main
(stale SCHEMA_VERSION x3, expired TLE fixtures x2, one order-dependent),
all being fixed on fix/green-test-suite. No new failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(nws): restore native-only golden coverage for the wire formatter

Commit ca751fb5 deleted the Central nws_handler parity harness along with
the handler itself, which took the ONLY tests that pinned formatters.nws
.format()'s literal wire output. Gate-sequence and schema-conformance
tests already survived natively; the formatter's actual rendered text did
not have any native-only regression net.

Add TestFormatterGolden to test_nws_refactor.py: 3 real-fixture cases plus
6 hand-built pathological cases mined from the deleted test_nws_handler.py
(SVR path-sampling, the "no dangling separator" regression, TOR on-ground
vs radar-indicated, FFW flood-cause detection). Every literal was verified
by temporarily restoring the pre-excision central.nws_handler._render()
from git history (ca751fb5^) in a throwaway, uncommitted script, confirming
byte-identical output against the current native format() for all 37 real
fixtures (nws/ + nws_last/) and all 9 pathological cases, then pinning the
confirmed-matching string as the literal -- not a blind snapshot of
current behavior.

quake/swpc/avalanche/hydro/incident/fire were checked and already carry
equivalent native-only golden coverage (added directly in ca751fb5), so no
changes were needed there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 14:03:40 -06:00
..
adapter_config chore: excise the dead Central NATS consumer path (-11,328 LOC) (#144) 2026-07-17 14:03:40 -06:00
backends refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
central chore: excise the dead Central NATS consumer path (-11,328 LOC) (#144) 2026-07-17 14:03:40 -06:00
cli chore: remove legacy TUI configurator; surface last config gap in GUI (#45) 2026-07-05 16:21:32 -06:00
commands feat(phase4a): peak_compass end-to-end + repair stale satpass test suite (#35) 2026-07-05 01:06:29 -06:00
dashboard fix(ipaws): route county-only CAP alerts + auto-refresh toggles live (#159) 2026-07-17 12:08:29 -06:00
data refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
env fix(ipaws): route county-only CAP alerts + auto-refresh toggles live (#159) 2026-07-17 12:08:29 -06:00
notifications feat(dashboard): bring ipaws adapter + emergency family to full GUI parity (#158) 2026-07-17 11:36:13 -06:00
persistence fix(persistence): derive SCHEMA_VERSION from migrations; unbreak the red suite (#140) 2026-07-17 13:03:40 -06:00
scripts refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
sources refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
transport feat(meshcore): report the true connection + add roster/channel management (#153) 2026-07-16 22:24:49 -06:00
__init__.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
__main__.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
alert_engine.py Phase A — 4-section nav; move Scheduled Broadcasts + Danger Zones off Routing (#15) 2026-07-03 14:57:24 -06:00
central_normalizer.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
chunker.py feat(reply): cap interactive LLM replies to 3 mesh packets (#7) 2026-07-02 16:49:10 -06:00
config.py chore: excise the dead Central NATS consumer path (-11,328 LOC) (#144) 2026-07-17 14:03:40 -06:00
config_loader.py feat(generic): config-driven REST/GeoJSON source adapter (ported from Central) (#78) 2026-07-07 00:20:02 -06:00
connector.py feat(send-queue): jittered pacing (default 2.2-2.6s) per radio instead of fixed 2.0s (#95) 2026-07-08 11:12:28 -06:00
context.py feat(context): durable SQLite-backed retention for MeshContext observations (#114) 2026-07-11 02:20:16 -06:00
county_centroids.py fix(ipaws): route county-only CAP alerts + auto-refresh toggles live (#159) 2026-07-17 12:08:29 -06:00
coverage.py feat(ipaws): add FEMA IPAWS-OPEN civil-alert adapter (disabled by default) (#138) 2026-07-16 09:05:01 -06:00
coverage_area.py feat(region-routing): tag satpass events by observer coordinates so they region-route; add satpass to VALID_TOGGLES (#90) 2026-07-07 21:43:49 -06:00
geo.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
history.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
knowledge.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
main.py chore: excise the dead Central NATS consumer path (-11,328 LOC) (#144) 2026-07-17 14:03:40 -06:00
memory.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
mesh_data_store.py refactor(danger-zones): drop min_severity + position_max_age; table snow (grayed/inert) 2026-06-21 06:56:22 +00:00
mesh_health.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
mesh_models.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
mesh_reporter.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
mesh_sources.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
meshcore_roster.py feat(meshcore): report the true connection + add roster/channel management (#153) 2026-07-16 22:24:49 -06:00
meshmonitor.py refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
responder.py feat(transport): per-radio serialized+paced outbound send queue (#93) 2026-07-08 09:38:08 -06:00
router.py MeshCore: channel provisioning, key sharing, location-based recommendations & transport-aware identity (#113) 2026-07-10 23:30:57 -06:00
secrets_store.py feat(meshcore): route MeshCore cells to room servers (open rooms) (#110) 2026-07-09 22:14:42 -06:00
serial_ports.py fix(serial): detect passed-through /dev USB-serial nodes (container GUI detect) (#53) 2026-07-05 23:01:08 -06:00