Skip to content

fix(command): publish command results with retain=False#461

Merged
nanomad merged 1 commit into
developfrom
fix/command-result-retained-stale
Jun 24, 2026
Merged

fix(command): publish command results with retain=False#461
nanomad merged 1 commit into
developfrom
fix/command-result-retained-stale

Conversation

@nanomad

@nanomad nanomad commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Command result topics (Success / Failed: …) were published with the default retain=True
  • A stale result from a previous command would persist on the broker and re-appear after a gateway restart
  • Fixed by passing retain=False on all three publish_str call sites in VehicleCommandHandler

Note

Stale results already present on the broker will persist until overwritten. An explicit clear-on-connect could be added as a follow-up if needed, but requires enumerating all result topic paths.

Test plan

  • All 22 TestVehicleCommandHandler tests updated and passing
  • 293 total tests passing
  • mypy clean

Command result topics ("Success" / "Failed: ...") were published with
the default retain=True, so a stale result from a previous run would
persist on the broker and re-appear after a gateway restart. Results
are transient responses — they should not survive a reconnect.
@nanomad nanomad merged commit 923038a into develop Jun 24, 2026
6 checks passed
@nanomad nanomad deleted the fix/command-result-retained-stale branch June 24, 2026 21:09
@nanomad nanomad mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant