Skip to content

Product check compares supported extension ids, not the daemon's executable name - #3692

Merged
malibio merged 1 commit into
mainfrom
issue-3689-daemon-extension-ids
Oct 7, 2026
Merged

malibio merged 1 commit into
mainfrom
issue-3689-daemon-extension-ids

Conversation

@malibio

@malibio malibio commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #3689.

  • GetDaemonVersion reports supported_extensions (from DaemonExtensions::supported_extension); the executable-path field is gone from the proto and daemon.
  • DaemonProfile gains extensions (core: empty); the product check compares the sets and re-registers on a mismatch. Core names no id.
  • binary_name stays as the sidecar to install. Launchd-plist program check keeps a file-name comparison (runs_profile_binary).
  • Tests: set mismatch evicted, equal set kept, extension-carrying daemon with a core profile not used; real-daemon seam test reports an empty set.

🤖 Generated with Claude Code

@malibio

malibio commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Code Review Summary

Verdict: APPROVE (initial review; no prior reviews or comments). The change does what #3689 asks, deletes the old path with no carry-over, and core names no extension id in production code. Static review only; I did not run the test suite.

Acceptance criteria

  • GetDaemonVersion carries the ids and the executable-name field is gone: met. supported_extensions is repeated string, set from shared.extensions.supported_extensions() at both service construction sites in assembly.rs. No executable_path or running_daemon_executable is left in packages/.
  • DaemonProfile.extensions, empty for core, compared as a set: met. product_check compares BTreeSets, so order and repeats don't matter, and no id is named.
  • Test that a different set is booted out and an equal set is kept: met by a_daemon_without_the_profiles_extensions_is_booted_out_and_an_equal_set_is_kept, plus the unit tests in product_check_tests and product_eviction_tests.
  • Test with an extension-carrying daemon on the socket and a core profile: met. The existing another_products_daemon_that_...keeps_the_hold_on tests now report ["fixture"] against community().
  • types:check and gen:types: not applicable, since the wire type is proto, not a promoted nodespace-types type. Run bun run test:changed before queueing.

CLAUDE.md rules

  • No backward compatibility: clean. The "predates the report" empty-string special case is deleted. An old daemon that sends the path at tag 2 decodes as a one-element id set, so it mismatches and is evicted, which is the right outcome.
  • No dead code or suppressions.
  • Sync boundary: ids such as "fixture", "custom" and "other" appear only in tests and doc comments. runs_profile_binary keeps the file-name comparison for the foreign launchd plist check in coexistence.rs. That is a separate question (what a registration runs, not what a daemon reports) and is legitimately retained.

Findings

Critical Issues

None.

Suggested Improvements

  • packages/desktop-app/src/lib/components/layout/other-daemon-banner.svelte (lines 18-52): the banner still reads "Another NodeSpace background service is running ({executable})" and the variable is still named executable. It now renders a list of extension ids, which means nothing to a user. When the other daemon reports no ids, the user sees the id-less variant. Either drop the parenthetical or reword it, and rename the variable. The doc comment was updated but the user-visible copy was not. Check whether a banner test asserts the old text.
  • Docs: architecture/daemon-cli-lifecycle.md (Startup Ordering table, around lines 132-135) still says "answers with its binary", "Another binary answers" and "never says which binary it runs". The issue asks for this file to be updated in the same change. extension-points.md already describes extensions correctly. The docs repo is outside this PR, so push the lifecycle update before bun run merge.

Nitpicks

  • Nit: Answering::Other(String) and record_other_daemon(Option<String>) carry the ids as a ", "-joined string, which round-trips through get_other_daemon to the frontend. A Vec<String> would keep the data structured, and joining would then happen only at the display edge. Acceptable for now since the only consumer is a notice.
  • Nit: coexistence.rs doc line wraps awkwardly after the edit ("...reported here, and the app reports ... until a").
  • Nit: the nested fn ids inside product_check could be a closure or a one-line collect::<BTreeSet<_>>() at each call site.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: APPROVE (initial review; no prior reviews or comments). The change does what #3689 asks, deletes the old path with no carry-over, and core names no extension id in production code. Static review only; I did not run the test suite.

Acceptance criteria

  • GetDaemonVersion carries the ids and the executable-name field is gone: met. supported_extensions is repeated string, set from shared.extensions.supported_extensions() at both service construction sites in assembly.rs. No executable_path or running_daemon_executable is left in packages/.
  • DaemonProfile.extensions, empty for core, compared as a set: met. product_check compares BTreeSets, so order and repeats don't matter, and no id is named.
  • Test that a different set is booted out and an equal set is kept: met by a_daemon_without_the_profiles_extensions_is_booted_out_and_an_equal_set_is_kept, plus the unit tests in product_check_tests and product_eviction_tests.
  • Test with an extension-carrying daemon on the socket and a core profile: met. The existing another_products_daemon_that_...keeps_the_hold_on tests now report ["fixture"] against community().
  • types:check and gen:types: not applicable, since the wire type is proto, not a promoted nodespace-types type. Run bun run test:changed before queueing.

CLAUDE.md rules

  • No backward compatibility: clean. The "predates the report" empty-string special case is deleted. An old daemon that sends the path at tag 2 decodes as a one-element id set, so it mismatches and is evicted, which is the right outcome.
  • No dead code or suppressions.
  • Sync boundary: ids such as "fixture", "custom" and "other" appear only in tests and doc comments. runs_profile_binary keeps the file-name comparison for the foreign launchd plist check in coexistence.rs. That is a separate question (what a registration runs, not what a daemon reports) and is legitimately retained.

Findings

Critical Issues

None.

Suggested Improvements

  • packages/desktop-app/src/lib/components/layout/other-daemon-banner.svelte (lines 18-52): the banner still reads "Another NodeSpace background service is running ({executable})" and the variable is still named executable. It now renders a list of extension ids, which means nothing to a user. When the other daemon reports no ids, the user sees the id-less variant. Either drop the parenthetical or reword it, and rename the variable. The doc comment was updated but the user-visible copy was not. Check whether a banner test asserts the old text.
  • Docs: architecture/daemon-cli-lifecycle.md (Startup Ordering table, around lines 132-135) still says "answers with its binary", "Another binary answers" and "never says which binary it runs". The issue asks for this file to be updated in the same change. extension-points.md already describes extensions correctly. The docs repo is outside this PR, so push the lifecycle update before bun run merge.

Nitpicks

  • Nit: Answering::Other(String) and record_other_daemon(Option<String>) carry the ids as a ", "-joined string, which round-trips through get_other_daemon to the frontend. A Vec<String> would keep the data structured, and joining would then happen only at the display edge. Acceptable for now since the only consumer is a notice.
  • Nit: coexistence.rs doc line wraps awkwardly after the edit ("...reported here, and the app reports ... until a").
  • Nit: the nested fn ids inside product_check could be a closure or a one-line collect::<BTreeSet<_>>() at each call site.

@malibio

malibio commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Address-review summary (no code changes in this PR):

  • Addressed: daemon-cli-lifecycle.md Startup Ordering table now speaks of the reported extension set (pushed to nodespace-docs main).
  • Skipped: banner copy/variable rename. The wording is a decided one with its own tests; ids in the parenthetical are acceptable until product decides the copy.
  • Skipped nits: ids stay a joined string (single display consumer); module-doc wrap; nested fn ids is clearer than repeating the collect.

Re-review: not needed (docs-only follow-up).

@malibio
malibio force-pushed the issue-3689-daemon-extension-ids branch from 863c3bb to 0a2793c Compare October 7, 2026 11:39
@malibio
malibio merged commit 4f29efe into main Oct 7, 2026
@malibio
malibio deleted the issue-3689-daemon-extension-ids branch October 7, 2026 11:39
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.

Product check compares supported extension ids, not the daemon's executable name

1 participant