Skip to content

feat: report the running daemon's version (status + version command)#38

Merged
StuBehan merged 1 commit into
mainfrom
feat/daemon-version-command
Jul 10, 2026
Merged

feat: report the running daemon's version (status + version command)#38
StuBehan merged 1 commit into
mainfrom
feat/daemon-version-command

Conversation

@StuBehan

@StuBehan StuBehan commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Playback happens in the long-running stackvox serve daemon, so if the daemon isn't restarted after an upgrade it keeps running the old engine while the installed package moves ahead — and engine fixes silently don't take effect. There was no way to see this: the socket was only ever probed for existence, never asked its version. This adds a version query and surfaces client/daemon skew in stackvox status.

Changes

  • {"command": "version"} daemon protocol request → replies with the running daemon's stackvox version.
  • daemon.version() client helper returning (got_version, version_or_error).
  • stackvox status now prints a skew warning when the running daemon's version differs from the installed package — e.g. daemon running 0.5.0, but 0.8.0 is installed — restart the daemon (…) to pick it up.
  • Daemons that predate the command reply with an error and are treated as "unknown", so there are no false positives.

Testing

  • pytest — adds a protocol-level version test, a daemon.version() client test, and a status skew-warning test; ruff check . clean.
  • Manual: echo '{"command":"version"}' | nc -U ~/.cache/stackvox/daemon.sock returns the running daemon's version; stackvox status against a stale daemon prints the skew line.

Related issues

Complements StackOneHQ/stack-nudge#124 (restart the daemon on app update) — together they close the "new client, stale daemon" skew that motivated this.

@StuBehan StuBehan merged commit 452354b into main Jul 10, 2026
11 checks passed
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