docs: avy danger_level scale TODO + fix deploy instructions (no bind mount)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson (via Claude) 2026-06-09 06:23:29 +00:00
commit 2aa528ae12
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,55 @@
# MeshAI Handoff — 2026-06-09
## Container Architecture
The MeshAI Docker container (`meshai`) does **not** bind-mount `/opt/meshai`
into the container. The only mount is:
meshai_data:/data (persistent SQLite DB + config)
The Python source and frontend bundle are **baked into the image** at
build time via `COPY` in the Dockerfile.
## DEPLOY (ALL changes — Python or frontend)
```bash
sudo docker compose build meshai && sudo docker compose up -d
```
**Python-only shortcut does NOT exist** — the repo is not bind-mounted
into the container. A bare `restart` re-execs the baked image; your `.py`
change will not load. Always use `build + up`.
### Verify Python changes loaded after build
```bash
sudo docker logs meshai --tail 20
```
(look for import errors or the handler name in startup logs)
### Verify frontend bundle shipped after build
```bash
sudo docker exec meshai cat /app/meshai/dashboard/static/index.html \
| grep assets/index
```
(confirm hash changed from prior build)
## Session Changes (feature/mesh-intelligence)
| Commit | Description |
|--------|-------------|
| `ae884b9` | Avalanche multi-line wire format, danger-level re-emit, GUI panel |
| `bf5b346` | Avalanche wire format — use `_meshai_precomposed` bypass |
| `5624a0b` | Wire avalanche to CENTRAL_AVY — central handler + consumer routing |
| `a9d4ede` | Nullsafe `broadcast_pager_alerts` in quake panel |
| `8e810d6` | Enable central feed source toggle for avalanche adapter |
| `376b0db` | Add `reminders_wfigs.enabled` kill switch, default disabled |
| `862d2dc` | Auto-cleanup stale fires (>7d unflagged + >30d tombstones hourly) |
| `45ca536` | Fire digest — tighter format, 220-byte budget, 7d freshness gate |
## Open Items
- **Avalanche danger_level scale**: TODO in `avy_handler.py` — verify
Central's `data.data.danger_level` uses NAADS 5-point scale before
flipping `feed_source="central"`. See docstring for details.

View file

@ -8,6 +8,21 @@ Wire format: multi-line, _meshai_precomposed=True (bypasses composer
whitespace-collapse). Same pattern as nws_handler / quake_handler.
Severity gate: uses danger_level (0-5) from data.data directly.
TODO (verify before Central swap, October+):
Confirm data.data.danger_level uses the NAADS 5-point scale:
1=Low, 2=Moderate, 3=Considerable, 4=High, 5=Extreme
The native path uses this scale and min_danger_level=3 means
"Considerable and above" correct for southern Idaho touring.
Central's centralseverity uses a COMPRESSED scale (2=Considerable,
3=High, 4=Extreme). If Central's danger_level follows centralseverity
rather than NAADS, min_danger_level=3 silently becomes "High and above"
at flip time, dropping every Considerable advisory.
CHECK: read data.data.danger_level from a live CENTRAL_AVY envelope
for a zone known to be rated Considerable. If the value is 2 (not 3),
either remap min_danger_level=2 at flip time OR normalize inside
handle_avy() before the gate comparison.
Do not flip feed_source="central" without confirming this first.
Do NOT use centralseverity as a gate Central's scale is higher=more
severe (4=Extreme, 3=High, 2=Considerable), which is the inverse of
meshai's broadcast priority convention. Gate on danger_level only.