docs(req_id): confirm req_id survives playback.play/stop incl. the download path
Verified: MQTTTransport reads req_id into the envelope, CommandBus::dispatch() runs the handler and calls reply() synchronously on the same task, and Player::command() returns immediately in every case — the download path only signals MelodyDL and never defers the ACK. So req_id is echoed on every playback.play/stop ACK, including v1 "playback" translated by LegacyAdapter. Documents the invariant in CommandBus::dispatch() and the topic spec, plus the cases where no reply is sent at all (heap guard, command switch off, broker down). No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,10 @@ void CommandBus::dispatch(CommandEnvelope& envelope) {
|
||||
|
||||
LOG_DEBUG(TAG, "Dispatching: %s", envelope.command.c_str());
|
||||
CommandResult result = it->second->execute(envelope);
|
||||
// The reply always goes out here, synchronously, on the transport's own task —
|
||||
// which is what guarantees req_id is echoed. Work that finishes later (e.g. a
|
||||
// playback.play that must download first, F-068) must NOT defer the reply;
|
||||
// its outcome is published on its own topic (status/playback, control/reports).
|
||||
result.reqId = envelope.reqId;
|
||||
envelope.reply(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user