Make delivery and integration failures explicit

Persist reminder presentations and retry state, atomically complete collapsed deliveries, fall back across away reaches, and block permanent failures visibly (V-715, V-678). Fail closed when enabled integrations lack credentials and keep remote arms explicitly dark (V-691). Give mavweb one sanitized, request-correlated error contract (V-689). Owner explicitly requested direct commits to master.
This commit is contained in:
2026-08-13 02:50:59 +04:00
parent da9114b623
commit 35c6ff5a71
67 changed files with 3174 additions and 477 deletions
+18 -2
View File
@@ -67,14 +67,30 @@ Config path: `~/.config/maven/mavend.json`. Full example with all options.
Omit the `embedder` block entirely to use the deterministic HashEmbedder floor (no ML, no ONNX runtime dependency). Useful for testing or low-resource setups.
`${NTFY_TOKEN}` and the `${TELEGRAM_*}` vars are expanded from `deploy/telegram.env`, which is gitignored. Copy `deploy/telegram.env.example` and fill it in. Mint a scoped token rather than reusing an admin one. It needs write access to the `maven` topic and nothing else:
`deploy/telegram.env.example` is the canonical inventory for every deployed
secret, including values whose destination is the root `.env`, the workpc CW2
environment file, or `deploy/db_key.env`. Copy values only to the destination
named beside them; never commit the populated files. Maven expands the homesrv
sink, workstation, and Home Assistant variables from `deploy/telegram.env`.
Every written integration block is either explicitly disabled or live. A live
Telegram, ntfy, LAN workstation model/STT, Home Assistant, ambient, CW2, or
encrypted-database configuration with an empty credential fails startup. This
keeps a missing env file from quietly becoming fallback behavior. The deployed
ntfy is currently `disabled: true`, and the workstation model arm is
`model_disabled: true`; the separately credentialed CW2 STT arm remains live.
Remove a dark-state flag only after provisioning that arm's credential.
Mint a scoped ntfy token rather than reusing an admin one. It needs write access
to the `maven` topic and nothing else:
```sh
ntfy access maven maven write-only
ntfy token add --expires=never maven
```
Deleting the `ntfy` block turns the reach off, and that is not a no-op. The routing table sends sev3-away nudges and away reminders to ntfy and nowhere else. With no sink wired they hit a nil and vanish, leaving no log line and no `delivery_attempts` row (V-649).
`disabled: true` keeps a documented ntfy block dark. When enabled, reminders
try ntfy and fall through to Telegram; delivery attempts record each reach.
## mavsttd — STT worker (optional, remote whisper.cpp)