meshai/work/meshai
malice f06bf3ce92
refactor(phase0): source-agnostic formatter/gating scaffold + harness (inert) (#28)
Foundation for making all hazard formatting+gating source-agnostic. ZERO
behavior change — the formatter/decider registries are empty (get_formatter/
get_decider return None → existing precomposed/Mode-B path preserved), and the
shadow comparator is off unless MESHAI_SHADOW_CATEGORIES is set.

- notifications/formatters/ (registry+dispatch with family fallback), gating/
  (GateResult + deferred-commit contract), both empty registries.
- notifications/clock.py determinism seam; route wfigs/quake/nws gating time
  reads through it (identical values) so goldens can freeze time.
- formatters/_budget.py = copy of central/budget.py; central/budget.py is now a
  re-export shim (import-smoke test guards it).
- compose_mesh_message consults the registry first (verbatim, no Mode-B re-cap),
  falls back to legacy; _resolve_budget injects per-category budget.
- notifications/shadow.py + two DRY-RUN hooks (consumer._normalize, dispatcher
  render): compute the new result and diff-log SHADOW_MISMATCH JSONL, but NEVER
  commit/emit/write tables and always broadcast the OLD result. Inert by default.
- tests/harness (pinned_time/pinned_tz, byte-golden, gate-sequence) +
  scripts/capture_fixtures.py (ephemeral read-only NATS capture); tzdata pinned.

Tests: +60 (18 scaffold + 42 harness/shadow); 0 new failures (34 baseline).

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 12:55:48 -06:00
..
adapter_config feat(broadcast): fit all mesh message formats to the packet budget (#8) 2026-07-02 16:49:33 -06:00
backends refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
central refactor(phase0): source-agnostic formatter/gating scaffold + harness (inert) (#28) 2026-07-04 12:55:48 -06:00
cli refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
commands Phase A — 4-section nav; move Scheduled Broadcasts + Danger Zones off Routing (#15) 2026-07-03 14:57:24 -06:00
dashboard fix(meshcore): deliver DM replies (flood/ACK), save meshcore_context, test-llm, inbound logging (#21) 2026-07-03 19:54:16 -06:00
data refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
env refactor: move source tree into work/, multi-stage Docker build, fix satpass 2026-06-16 03:40:31 +00:00
notifications refactor(phase0): source-agnostic formatter/gating scaffold + harness (inert) (#28) 2026-07-04 12:55:48 -06:00
persistence Phase A — 4-section nav; move Scheduled Broadcasts + Danger Zones off Routing (#15) 2026-07-03 14:57:24 -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 fix(meshcore): reply to DMs via discovered DIRECT route, not flood (#23) 2026-07-03 22:25:40 -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 feat(meshcore): decouple per-mesh LLM DM gate + mesh-scoped chat context (#19) 2026-07-03 18:39:26 -06:00
config_loader.py fix(meshcore): deliver DM replies (flood/ACK), save meshcore_context, test-llm, inbound logging (#21) 2026-07-03 19:54:16 -06:00
connector.py feat(dashboard): MeshCore transport + per-family routing GUI controls (#10) 2026-07-02 16:49:59 -06:00
context.py feat(context): GUI control for chat-context retention (days) + live apply (#20) 2026-07-03 19:03:37 -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 fix(central): don't crash boot when Central is unreachable at startup (#26) 2026-07-04 01:13:50 -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
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): CompositeTransport for dual Meshtastic+MeshCore (Phase 4) (#6) 2026-07-02 12:33:17 -06:00
router.py feat(meshcore): decouple per-mesh LLM DM gate + mesh-scoped chat context (#19) 2026-07-03 18:39:26 -06:00