Skip to content

Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355

Closed as not planned

Description

@mstomar125

Summary

Remove the Pro column from the transport contract in packages/proto/src/socket.rs. Daemon sockets, UI pid files and incompatible-database markers become release/dev only. That is the one service identity every NodeSpace daemon uses under ADR-084 decision 2(a) (proposed).

Update every consumer:

  • the daemon binary and its tray;
  • the daemon library's marker_path;
  • the CLI's socket discovery, its --socket help and uninstall;
  • the desktop app's identity functions;
  • the generated CLI reference in the skill.

Context

  • The tables. socket.rs holds three 4-entry tables keyed by (is_debug, is_pro):

    • DAEMON_SOCKET_NAMES (46-51), with daemon_socket_name and daemon_socket_relative;
    • UI_PID_NAMES (99), with ui_pid_name and ui_pid_relative;
    • INCOMPATIBLE_DATABASE_NAMES (138-143), with incompatible_database_name.

    After Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 and Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354, no core caller passes is_pro = true.

  • Who outside core still uses the Pro entries:

    • The CLI in the Pro .pkg. It is core's CLI. discover_socket_in (packages/cli/src/lib.rs 229-242) probes every name in DAEMON_SOCKET_NAMES, and that probe is how it finds a Pro daemon on daemon-pro.sock today. The shared-socket gate is what makes removing the probe safe.
    • nodespaced-pro. It calls incompatible_database::marker_path(true) (sync nodespaced-pro/src/main.rs:543). Nothing breaks at merge time, because the Pro daemon is pinned. sync changes the call to marker_path() in its pin-bump PR, which is the caller-supplied replacement ADR-082 §4 describes (see ADR-083 §7). No separate gate is needed.
  • Both sides pin the app/daemon socket agreement literally. The daemon's socket_fallback_variant_tests and the desktop app's each_variant_dials_the_socket_its_daemon_binds both shrink to two rows.

Scope

packages/proto/src/socket.rs

  • Module doc (1-31):
    • Use a two-row table: release daemon.sock and dev daemon-dev.sock.
    • Replace the Pro-discriminator paragraph. Say that is_debug is the calling binary's own cfg!(debug_assertions), and that every daemon registered under core's service identity uses these names, whichever product built it.
    • Name no product.
  • Sockets: DAEMON_SOCKET_NAMES: [&str; 2] (release, dev), daemon_socket_name(is_debug) and daemon_socket_relative(is_debug).
  • UI pid files: UI_PID_NAMES: [&str; 2], ui_pid_name(is_debug) and ui_pid_relative(is_debug).
  • Markers: INCOMPATIBLE_DATABASE_NAMES: [&str; 2] and incompatible_database_name(is_debug).
  • Tests (160-242):
    • Iterate over [false, true], and expect 2 distinct names per table.
    • Rename canonical_name_is_the_release_community_socket to canonical_name_is_the_release_socket.

packages/daemon

  • src/main.rs:
    • open_default_database (101) calls marker_path().
    • socket_path and default_socket_path_for(is_debug) (124-153). In their docs, "no Pro or dev app" becomes "no dev app".
    • socket_fallback_variant_tests (1971-2062):
      • EXPECTED has two rows;
      • the module doc (1971-1983) no longer names Pro;
      • the distinctness count is 2;
      • the env-override test uses default_socket_path_for(cfg!(debug_assertions)).
  • src/incompatible_database.rs:
    • Module doc (18-23): "every daemon built on this crate", without naming nodespaced-pro.
    • pub fn marker_path() -> Result<PathBuf> (34-50) joins incompatible_database_name(cfg!(debug_assertions)) onto nodespace_dir(). Rewrite its doc, because the caller-variant contract goes away.
    • Replace the_marker_name_follows_the_callers_variant_not_this_crates_features (228-234) with a test that the marker is nodespace_dir() joined with this flavour's name.
  • src/tray.rs ui_pid_path: use ui_pid_relative(cfg!(debug_assertions)).

packages/cli

  • src/lib.rs:
    • The Cli.socket doc (102-108) becomes: "...or auto-discovers a running dev daemon's socket if that one is absent...".
    • The discover_socket_in doc (222-228) says "release/dev".
    • The test at 660-681 uses daemon-dev.sock, and its comment says "Only a dev daemon is up".
  • src/commands/uninstall.rs remove_sock (126-136): the doc says "every build flavour's socket (release and dev)". The code is unchanged.
  • Generated reference: regenerate packages/skill/references/cli.md (line 598) with bun run skill:gen. packages/agent embeds that file with include_str!, so it needs no edit.

packages/desktop-app/src-tauri/src

  • daemon_socket_relative, ui_pid_relative, grpc_client::default_socket_path_for and incompatible_database::marker_path_in stop passing the false argument.

Out of scope

Steps

  1. Run the startup sequence, and assign the issue at pickup. Confirm the shared-socket gate is met, and read ADR-084 §4.
  2. Change proto first, so the signature changes surface every caller as a compile error. Then update the daemon, the CLI and the app.
  3. Run bun run skill:gen.
  4. Run bun run scripts/check-pro-boundary.ts and paste the printed BASELINES.
  5. Run bun run test:changed (a proto change reaches every Rust tier) and bun run quality:fix. Push and open the PR. Code comments must not cite GitHub issue numbers.

Acceptance criteria

  • Run both of these on packages/proto packages/daemon packages/cli packages/desktop-app/src-tauri/src packages/skill. Both print nothing:
    • git grep -nw is_pro
    • git grep -n -F -e daemon-pro.sock -e daemon-dev-pro.sock -e ui-pro.pid -e ui-dev-pro.pid -e incompatible-database-pro -e incompatible-database-dev-pro
  • The nodespace_proto::socket functions take only is_debug, and each table has two entries.
  • nodespace_daemon::incompatible_database::marker_path() takes no arguments.
  • CLI discovery still falls back from daemon.sock to daemon-dev.sock.
  • bun run skill:check passes.
  • For release and dev builds, the free app, the daemon and the CLI behave as before.
  • bun run scripts/check-pro-boundary.ts passes, with BASELINES lowered to the printed counts:
    • editionBranching falls: 33 in socket.rs, plus what is left in daemon/src/main.rs, daemon/src/incompatible_database.rs and cli/src/lib.rs;
    • proWording falls: 4 in socket.rs, the CLI docs, 1 in uninstall.rs, the daemon marker docs, and 1 in references/cli.md.

Tests and verification

  • Tests to update:
    • the proto tests module;
    • the daemon's socket_fallback_variant_tests;
    • the daemon's incompatible_database marker test;
    • the CLI's discover_socket_prefers_canonical_then_falls_back_to_a_variant;
    • the desktop app's each_variant_dials_the_socket_its_daemon_binds.
  • Commands:
    • bun run test:changed
    • cargo clippy -p nodespace-proto -p nodespace-daemon -p nodespace-cli -p nodespace-app --all-targets -- -D warnings -D clippy::unused-async
    • .tools/bin/cargo-nextest nextest run -p nodespace-proto -p nodespace-cli --lib --bins
    • .tools/bin/cargo-nextest nextest run -p nodespace-daemon --lib --bins
    • bun run skill:check

Dependencies

Risks and rollback

  • Merging before the shared-socket gate leaves core's CLI unable to reach the Pro daemons that shipped on daemon-pro.sock.
  • Intended break at sync's next pin bump: marker_path(true) stops compiling.
  • Rollback: revert the PR. It is one commit across the crates.

Plan key: C8.6 (pro-boundary DAG).

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. added
    pro-boundary
    on Sep 30, 2026
  3. mstomar125 commented on Oct 1, 2026

    @mstomar125
    ContributorAuthor

    Superseded by #3412 (umbrella against the final ADR-081–085)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pro-boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions