Skip to content

Remove Pro edition branching from the core app, daemon, CLI and installer #3357

Closed as not planned
11 of 11 issues completed
Closed as not planned

Description

@mstomar125

Goal

Core's desktop app, daemon, CLI and installer stop branching on a Pro edition (ADR-081, proposed: core ships no Pro code).

  • What a product supplies comes in as a DaemonProfile. That is its daemon binary name, extra service environment and product name, passed through the app-builder hook (ADR-082 §3.6, proposed).
  • Core and the Pro app share one daemon service identity, guarded by a single-instance lock.
  • Core's installer, Homebrew cask and CLI recognise another NodeSpace product from static bundle data (ADR-084 decisions 2 and 5, proposed).

Pro branching in core today (main @ af8ddb6)

Locate code by symbol. Line numbers are hints only: they shift once #3322's library split (ADR-082 §3.1) moves the src-tauri/src modules into the library package.

  • Desktop app, daemon_setup.rs:
    • is_pro_build(), which is option_env!("NODESPACE_PRO_SUPABASE_URL").is_some(), plus PRO_SUPABASE_URL and PRO_ANON_KEY;
    • PRO_DAEMON_BINARY_NAME and daemon_binary_name_for;
    • the .pro launchd labels in launch_agent_label;
    • the Pro socket in daemon_socket_relative and the Pro UI pid file in ui_pid_relative;
    • the Windows image name in daemon_image_name_for;
    • the Supabase env in write_plist's pro_env block.
  • Desktop app, elsewhere:
    • the Pro socket in services/grpc_client.rs resolve_socket_path;
    • the Pro marker in incompatible_database.rs marker_path_in;
    • tauri.pro.conf.json, the overlay sync passes to core's tauri build.
  • packages/daemon:
    • an unused pro cargo feature;
    • is_pro_build(), edition() and --edition in src/main.rs;
    • cfg!(feature = "pro") in src/tray.rs;
    • the public incompatible_database::marker_path(is_pro).
  • packages/proto/src/socket.rs: 4-way (is_debug, is_pro) tables for sockets, UI pid files and markers.
  • packages/cli:
    • Pro-socket discovery in discover_socket_in, and its --socket help, which is regenerated into packages/skill/references/cli.md;
    • Pro-socket removal in uninstall::remove_sock.
  • scripts/pkg-resources/postinstall: a Pro guard that runs nodespaced --edition as root after the payload is written. It never fires.

Constraints that shape the plan

  1. The Pro GUI builds from core HEAD today.
    • sync's build-pro-dmg.sh and release.yml check out core with no ref, set NODESPACE_PRO_* and pass --config src-tauri/tauri.pro.conf.json.
    • So every Remove Pro edition branching from the core app, daemon, CLI and installer #3357 change that the Pro GUI build consumes waits for the canonical pin gate, SYNC:Pro GUI and Pro daemon build from one pinned core rev.
    • Once that gate is met, core merges first, and nodespace-sync adapts in the PR that moves its pin past the change (ADR-083 §7).
  2. The Pro daemon is already pinned.
  3. nodespaced ignores unknown arguments and starts serving. Once --edition is gone, anything that runs nodespaced --edition as root inside $(...) would start a daemon and hang. So Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 rejects unknown arguments in the same PR that removes the flag.
  4. Identity is not part of the profile.
  5. After every sub-issue, core builds, all core tests pass, and the free app behaves as before. The exceptions are the ADR-084 behaviours a sub-issue adds on purpose, each named in that issue: the installer, cask and CLI guards, the zap list, the lock, and the product check.
  6. The Guardrail: stop new Pro code from landing in core #3302 ratchet.
    • Every sub-issue runs bun run scripts/check-pro-boundary.ts and pastes the printed BASELINES.
    • A test that must name a retired Pro string builds it from fragments (Guardrail: stop new Pro code from landing in core #3302's absence-test convention).
    • ADR-084 §5 names three core files that may recognise another product: scripts/pkg-resources/preinstall, scripts/build-pkg.sh and scripts/update-homebrew-cask.ts. They get per-file, per-marker exemptions, commented with that reason.

Sub-issues

Key Title Size Direct dependencies
#3346 Add a DaemonProfile for the app's daemon binary and service env M NodeSpaceAI/nodespace-docs#90 (ADR-082), #3299
#3347 Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile S #3346, #3306
#3348 Remove the pro feature and --edition from nodespaced; reject unknown arguments M NodeSpaceAI/nodespace-docs#90 (ADR-082), #3299
#3349 Move the .pkg guard to a static pre-install check; declare NodeSpaceProduct M NodeSpaceAI/nodespace-docs#94 (ADR-084), #3299, pin gate
#3354 Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json M #3347, #3323, NodeSpaceAI/nodespace-docs#94 (ADR-084), pin gate
#3355 Collapse the proto socket/pid/marker tables to debug/release; drop CLI Pro discovery M #3348, #3354, NodeSpaceAI/nodespace-docs#94 (ADR-084), shared-socket gate
#3350 Homebrew cask preflight; keep databases out of zap S NodeSpaceAI/nodespace-docs#94 (ADR-084), #3299
#3351 nodespace uninstall refuses a non-community app S #3349, NodeSpaceAI/nodespace-docs#94 (ADR-084)
#3352 Single-instance daemon lock; export the launcher's argument list M #3348, NodeSpaceAI/nodespace-docs#94 (ADR-084)
#3353 Product check: the running daemon's executable vs the app's DaemonProfile M #3346, #3352, NodeSpaceAI/nodespace-docs#94 (ADR-084), pin gate
#3356 Notices for another product's running or machine-wide daemon M #3353

#3354 (delete tauri.pro.conf.json) is merged into #3354. Both waited on the same gate, and under ADR-082 §1 the overlay moves into nodespace-sync with the Pro app crate.

Order:

  1. Once their ADRs and Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 are in: Add a DaemonProfile for the app's daemon binary and service env (no behavior change) #3346, Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348 and Add a Homebrew cask preflight for other NodeSpace products; keep databases out of zap #3350.
  2. Next: Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile #3347 (after Route the desktop app through run(extensions, context) with no extensions in core #3306), Add a single-instance daemon lock and export the launcher's argument list #3352 (after Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348), and Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349 (once the pin gate is met).
  3. Then: Make nodespace uninstall refuse when the installed app is not the free NodeSpace #3351 (after Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349), Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 (after Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile #3347, Delete the Pro arm of core's built-in update source and its worker parsing #3323 and the pin gate), and Check the running daemon's executable against the app's DaemonProfile at startup #3353 (after Add a single-instance daemon lock and export the launcher's argument list #3352 and the pin gate).
  4. Last: Collapse proto socket, pid and marker tables to debug/release; drop CLI Pro discovery #3355 (after Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354 and the shared-socket gate) and Tell the user when another NodeSpace product's daemon is running or registered #3356 (after Check the running daemon's executable against the app's DaemonProfile at startup #3353).

The blockers listed on this parent stay on the parent. Never copy them onto the sub-issues: each sub-issue lists its own direct dependencies.

SYNC gates (nodespace-sync items, filed later)

These two gates replace the earlier SYNC:profile, SYNC:overlay, SYNC:cli and SYNC:marker gates.

Findings for the sync owner (not fixed in core)

  • The Pro daemon likely fails to start. This is inferred from code, not run.
  • Pro builds likely ship without the bundled skill. tauri.pro.conf.json restates externalBin and resources, and a JSON merge replaces arrays whole (ADR-082 §1).
  • Other stale paths in sync:
    • build-pro-dmg.sh:157-174 checks a dead Contents/Resources/binaries path;
    • nothing reads ui-pro.pid;
    • the Supabase env reaches the launchd plist only.
  • sync's Pro postinstall probes nodespaced --edition. After Remove the pro feature and --edition from nodespaced and reject unknown arguments #3348, that probe exits 2 and reads unknown, which is harmless.

Acceptance criteria

<#3357 paths> below stands for:

packages/proto packages/cli packages/skill/references/cli.md packages/daemon/Cargo.toml packages/daemon/src/main.rs packages/daemon/src/tray.rs packages/daemon/src/incompatible_database.rs packages/desktop-app/src-tauri/src/daemon_setup.rs packages/desktop-app/src-tauri/src/daemon_profile.rs packages/desktop-app/src-tauri/src/incompatible_database.rs packages/desktop-app/src-tauri/src/constants.rs packages/desktop-app/src-tauri/src/update_check.rs packages/desktop-app/src-tauri/src/services/grpc_client.rs packages/desktop-app/src-tauri/tauri.conf.json scripts/pkg-resources .github

Pro prose in files that #3336, #3362 or #3372 own is out of scope for these greps.

  • Every sub-issue is merged.
  • Both of these print nothing:
    • git grep -nw -e is_pro -e is_pro_build -- <#3357 paths>
    • git grep -n -F -e NODESPACE_PRO_ -e NODESPACED_PRO_ -e PRO_DAEMON_BINARY_NAME -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 -e app.nodespace.daemon.pro -e app.nodespace.daemon.dev.pro -e tauri.pro.conf -e 'feature = "pro"' -- <#3357 paths>
  • git grep -n -F -e --edition -- packages scripts .github prints nothing.
  • git grep -n -F -e nodespaced-pro -e FORCE_COMMUNITY -- <#3357 paths> scripts/build-pkg.sh scripts/update-homebrew-cask.ts scripts/update-homebrew-cask.test.ts prints lines only in the sanctioned ADR-084 recognition points:
    • scripts/pkg-resources/preinstall;
    • scripts/build-pkg.sh;
    • scripts/update-homebrew-cask.ts, with its rendered-cask test fixture.
  • packages/desktop-app/src-tauri/tauri.pro.conf.json is deleted.
  • AppExtensions::none() yields DaemonProfile::community(), and an app built on core supplies its own profile through AppExtensions::daemon_profile.
  • nodespaced exits 2 on unknown arguments. It takes the single-instance lock, and exits 0 when another daemon holds it.
  • LAUNCHER_ARGS is exported, and the community daemon's tests parse it.
  • nodespace_proto::socket has only a debug/release axis.
  • Core's app declares NodeSpaceProduct = community.
  • Core refuses to replace or remove another product at every entry point:
    • the .pkg refuses, with the NODESPACE_FORCE_COMMUNITY override;
    • the cask's preflight refuses;
    • nodespace uninstall refuses.
  • The cask's zap keeps ~/.nodespace/database.
  • The app evicts a daemon whose executable does not match its profile. It tells the user when it cannot.
  • bun run scripts/check-pro-boundary.ts passes. Every remaining editionBranching hit is in an exempt recognition-point file.
  • At every step, the free app kept the same plist, label, socket, pid file and marker, apart from the intended ADR-084 behaviours.
  • The Pro build from sync never broke: no change merged before its gate.

Dependencies

Out of scope


Plan key: C8 (pro-boundary DAG).

🤖 Generated with Claude Code

Sub-issues

Sub-issues

11 of 11 Issues completed
Loading 11 sub-issues

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