docs(playback): formally document the "stopping" status/playback state (F-065)

Player::setStatus() publishes action "stopping" when the run-time cap is
reached and BellEngine is finishing the current melody loop, but the spec
only listed playing/paused/idle. Kept it (not suppressed): it is a real
state that can last a whole loop while bells still ring, suppressing it on
MQTT alone would break WS/MQTT parity, and v1 tablets already know it.

Adds a state table (entry/exit, stop/play behaviour) to mqtt-events.md and
updates the topic spec and API reference. No firmware change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 20:10:03 +03:00
co-authored by Claude Opus 5.5
parent 204b54fce1
commit fe5ab6223c
4 changed files with 39 additions and 3 deletions
+25
View File
@@ -77,6 +77,7 @@ Check `git log -- src/Version.hpp` for the real bump history before tagging a ne
| F-062 | MQTT topic spec v2 — restructured topics (`control/command`/`control/ack`/`control/reports`/`status/playback`/`system/*`), LWT, `req_id` correlation, per-topic ON/OFF switches (`mqtt.set_topics`) | v2.2.0 | Stable |
| F-063 | Fix: malformed `control/command` input (bad JSON, missing `cmd`) now gets an `ERROR` reply on `control/ack` instead of being silently dropped | v2.2.1 | Stable |
| F-064 | Richer `status/playback` — `pid`, `speed`, `duration`, `started_at`, `source`, `ts` (same fields on the WebSocket playback INFO event); command origin carried on `CommandEnvelope` | v2.3.0 | Stable |
| F-065 | `stopping` playback state formally documented (duration reached, bells finishing the current loop) — kept on `status/playback`, not suppressed | v2.3.0 | Stable |
---
@@ -1193,3 +1194,27 @@ bytes.
Verified: `pio run -e vesper-std-v1` and `pio run -e agnus-v1` both build clean.
Subsystem: `src/Player/PlaybackState.hpp` (new), `src/Player/Player.hpp`, `src/Player/Player.cpp`, `src/TimeKeeper/TimeKeeper.hpp`, `src/TimeKeeper/TimeKeeper.cpp`, `src/Communication/CommandBus/CommandEnvelope.hpp`, `src/Communication/Handlers/PlaybackHandler/PlaybackHandler.cpp`, `src/Communication/CommunicationRouter/CommunicationRouter.hpp`, `src/Communication/CommunicationRouter/CommunicationRouter.cpp`, all five transports (origin), `src/RFRemote/RFRemote.cpp`, `src/Version.hpp` (→ 2.3.0)
---
### F-065 — `stopping` playback state (documented, not suppressed)
`Player::setStatus()` has always published `action: "stopping"` (WebSocket and, since F-062, MQTT
`status/playback`), but the topic spec only listed `playing`/`paused`/`idle`. Decided to **document it**
rather than stop publishing it:
- It is a real, observable state that can last a while: when the run-time cap elapses,
`Player::stop()` asks BellEngine to finish the *current melody loop* — up to steps × `speed`, often
tens of seconds — and only `onMelodyLoopCompleted()` moves to `STOPPED`. The bells are still ringing.
- Hiding it on MQTT only would break the WebSocket/MQTT parity F-064 established, and the v1 tablet
app already understands `"stopping"` (via `ResponseBuilder` / `LegacyResponseAdapter`).
- Collapsing it into `playing` would leave the app no way to show "ending"; collapsing it into `idle`
would be false while bells still ring.
Documented semantics (mqtt-events.md → States): entered only from `playing` when the timer reaches
`duration`; leaves only to `idle`. `playback.stop` never passes through it (force-stop goes straight to
`idle`); `playback.play` is rejected during it. The heartbeat's independently-derived `state` reports
`idle` during `stopping` — unchanged.
No firmware change. Subsystem: `docs/reference/mqtt-events.md`, `docs/reference/vesper_mqtt_topic_spec_v2.md`,
`docs/reference/api-reference.md`