docs(catalog): add F-028 logging calibration, expand F-014 NVS migration

F-014 updated from scaffold stub to full description: key rename table
(device_uid/hw_type/hw_version → serial/hw_family/hw_revision), hw_family
lookup table, idempotency behaviour.

F-028 new entry: default channel levels (Serial INFO, MQTT WARNING, SD
WARNING), per-subsystem MQTT caps table, and all secondary fixes from the
refactor(Logging) commit (early setLevel removal, heartbeat to VERBOSE,
HealthMonitor polling noise, FirmwareValidator boot lines, ConfigManager
VERBOSE cleanup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-09 10:09:03 +03:00
co-authored by Claude Sonnet 4.6
parent 3d90ed4292
commit 825ffce5f5
+57 -3
View File
@@ -23,7 +23,7 @@ Every feature — user-facing or significant internal mechanism — is listed he
| F-011 | MQTT dynamic auth (HMAC-SHA256 device password) | v2.x | Stable |
| F-012 | HAL variant system (multi-board build flags) | v2.x | Stable |
| F-013 | RF Remote subsystem (HAS_RF variant) | v2.x | Stable |
| F-014 | NVS migration scaffold | v2.x | Stable |
| F-014 | NVS device-identity migration (`device_uid`/`hw_type`/`hw_version` → `serial`/`hw_family`/`hw_revision`) | v2.x | Stable |
| F-015 | Two-tier factory reset (5 s WiFi wipe / 10 s full reset) | v2.0.3 | Stable |
| F-016 | WiFi credential fallback chain (saved → failsafe → portal) | v2.0.3 | Stable |
| F-017 | SettingsWebServer (captive-portal config UI) | v2.0.3 | Stable |
@@ -37,6 +37,7 @@ Every feature — user-facing or significant internal mechanism — is listed he
| F-025 | V2 playback command namespace (`playback.play` / `playback.stop`) | v2.0.4 | Stable |
| F-026 | V2 playback `mode` field (`single` / `timed` / `interval` / `infinite`) | v2.0.4 | Stable |
| F-027 | FileManager HTTPS removed — melody downloads over plain HTTP only | v2.0.4 | Stable |
| F-028 | Logging level calibration — sane defaults + per-subsystem MQTT caps | v2.0.5 | Stable |
---
@@ -146,9 +147,24 @@ When compiled with `HAS_RF`, the device can receive IR/RF remote control signals
---
### F-014 — NVS migration scaffold
### F-014 — NVS device-identity migration
Versioned NVS key layout with a migration path. Allows future changes to stored settings without wiping existing devices. Migration code in `src/NvsMigration/`.
Runs once at the very start of `setup()`, before `ConfigManager::begin()`, to upgrade the NVS device-identity keys written by pre-v2 factory firmware.
**Key renames (namespace `device_id`):**
| Old key | New key | Notes |
|---|---|---|
| `device_uid` | `serial` | Value carried forward unchanged |
| `hw_type` | `hw_family` | Value translated via lookup table (e.g. `"VS"` → `"vesper"`) |
| `hw_version` | `hw_revision` | Value carried forward unchanged |
**Lookup table** (`hw_type` → `hw_family`) covers all codes ever written by factory firmware:
`VS` → `vesper`, `VP` → `vesper_plus`, `VX` → `vesper_pro`, `bell_core` → `vesper`, `bell_plus` → `vesper_plus`, `bell_pro` → `vesper_pro`, `agnus_mini` → `agnus_mini`. Unknown codes are carried forward as-is.
**Behaviour:** Each step is idempotent — if the new key already exists the old one is just erased. If none of the old keys are present, the migration exits immediately with no NVS writes. Safe to leave in permanently.
Subsystem: `src/NvsMigration/NvsMigration.cpp`
---
@@ -307,6 +323,44 @@ Subsystem: `src/FileManager/FileManager.cpp`, `src/FileManager/FileManager.hpp`
---
### F-028 — Logging level calibration
Establishes sane production defaults for all three log channels and suppresses high-frequency noise on MQTT.
**Default channel levels (ConfigManager defaults):**
| Channel | Old default | New default | Effective behaviour |
|---|---|---|---|
| Serial | VERBOSE (5) | INFO (3) | Clean boot log; DEBUG/VERBOSE only when explicitly set |
| MQTT | NONE (0) | WARNING (2) | Error and warning events flow to server by default |
| SD | NONE (0) | WARNING (2) | Ready for SD log callback when wired up |
**Per-subsystem MQTT caps** (set in `CommunicationRouter::begin()`):
| Subsystem | MQTT cap | Reason |
|---|---|---|
| BellEngine | WARNING | Per-note STRIKE/FIRE logs are VERBOSE/DEBUG — would flood MQTT on every bell strike |
| OutputManager | WARNING | Per-output AUTO-EXTINGUISH log fires on every note |
| HealthMonitor | WARNING | Health-check runs every few seconds; only failures matter remotely |
| ConfigManager | WARNING | NVS read trace and isHealthy debug chatter |
| MQTTClient | NONE | Prevents feedback loop (MQTT driver logging over MQTT) |
| CommRouter | WARNING | Internal dispatch noise |
| Logger | NONE | Prevents recursion |
| Player | INFO | State transitions (PLAY/STOP/PAUSE) are useful to see remotely |
| Telemetry | INFO | Load data useful for fleet monitoring |
| OTAManager | INFO | Update events are important to track |
**Other fixes in this change:**
- Early `Logging::setLevel()` call in `main.cpp` removed — `CommunicationRouter::begin()` applies all three channels at once once the MQTT callback is wired, removing a redundant partial application.
- Loop heartbeat downgraded `LOG_DEBUG` → `LOG_VERBOSE` (only visible at VERBOSE level).
- HealthMonitor periodic "skipping/performing" polling lines removed entirely. Per-subsystem status lines and completion timing: VERBOSE → DEBUG.
- FirmwareValidator boot-path health check lines: VERBOSE → INFO (one-shot boot events worth seeing at INFO).
- ConfigManager: all remaining VERBOSE lines → DEBUG.
Subsystem: `src/ConfigManager/ConfigManager.hpp`, `src/Communication/CommunicationRouter/CommunicationRouter.cpp`, `src/HealthMonitor/HealthMonitor.cpp`, `src/FirmwareValidator/FirmwareValidator.cpp`, `src/main.cpp`
---
### F-023 — Telemetry bell max load default raised to 500
`bellMaxLoad[i]` initialised to `500` (was `200`). This is the denominator used to calculate bell load percentage in telemetry reports. The old value caused false "overload" warnings on normal use patterns.