Skip to content

Report the hosting binary's version beside the core version in daemon diagnostics - #4405

Merged
mstomar125 merged 1 commit into
mainfrom
issue-diagnostics-binary-version
Nov 27, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-diagnostics-binary-version

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

What changed

GetDaemonVersionResponse gains a second version: binary_version (field 3), the version of the binary that hosts the daemon. The existing version field is unchanged and stays the core daemon crate's version, so the version-skew checks (version_skew.rs, diagnostics_version) still read it and are unchanged.

  • Setter API: DaemonExtensions::none().binary_version("0.1.9") (documented on the method). The assembly code copies it into every database's NodeServiceImpl (with_binary_version), both the per-database and the unrouted set. A host that does not call it leaves the field empty.
  • Core's own nodespaced sets its own version at its four serving paths.
  • nodespace diagnostics prints Daemon binary: and Core version: on separate lines (replacing the single Daemon version: line); a missing or empty binary version prints unknown. JSON output keeps daemon_version (core version) and adds daemon_binary_version (null when unreported).
  • The Sync repo will call the setter in a later PR; not in scope here.

Compatibility: additive

This is an additive change: one new optional proto field with a new tag, no existing field renumbered or retyped.

  • Older CLI/client against a newer daemon: protobuf decoding skips the unknown field 3; the old client keeps reading version and supported_extensions as before.
  • Newer CLI against an older daemon: the field is absent, decodes as empty, and the CLI prints Daemon binary: unknown; no warning, no failure.

Tests and mutation results

  • nodespace-proto daemon_version_wire_tests (2): a local old-shape message (fields 1 and 2 only) decodes a new response and ignores field 3; a new message decodes an old-shape reply with empty binary_version. Mutation (swap field numbers 1 and 3): both fail.
  • get_daemon_version_reports_the_hosting_binary_version_apart_from_the_core_version (node_service): mutation (response sends empty string): fails.
  • the_binary_version_is_empty_until_the_host_sets_it (extensions): mutation (getter returns empty): fails.
  • required_extensions_e2e assert (unrouted set) and the_binary_version_is_reported_by_every_database (per-database set): removing the with_binary_version line at each assembly site fails the test guarding it (the e2e survived the first site, which the new fixture test then caught).
  • CLI version_lines_show_binary_and_core_on_separate_lines, an_unset_binary_version_shows_as_unknown: mutations (drop "unknown" fallback; drop empty filter) fail; diagnostics_collect_reports_counts_and_recency extended: mutation (collect ignores the field) fails.
  • Not covered by a test: the four nodespaced call sites in main.rs (they pass the crate's own CARGO_PKG_VERSION).

Checks run: cargo fmt --check, cargo clippy -D warnings on proto/daemon/cli, bun run test:changed (all green).

Not security-sensitive.

🤖 Generated with Claude Code

…monVersion

Add an optional binary_version field (3) to GetDaemonVersionResponse, set by
the host through DaemonExtensions::binary_version; the existing version field
stays the core library version. nodespace diagnostics prints both on separate
lines, with unknown when the field is empty. nodespaced sets its own version.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-diagnostics-binary-version branch from 4bb9d00 to 63bbed4 Compare November 27, 2026 10:04
@mstomar125
mstomar125 merged commit a6e88ef into main Nov 27, 2026
@mstomar125
mstomar125 deleted the issue-diagnostics-binary-version branch November 27, 2026 10:04
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