Skip to content

Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354

Closed as not planned

Description

@mstomar125

Summary

Once the Pro GUI builds from a pinned core revision, delete everything that still makes core's desktop app a Pro build:

  • The build switch: is_pro_build(), PRO_SUPABASE_URL and PRO_ANON_KEY (option_env!("NODESPACE_PRO_*")), PRO_DAEMON_BINARY_NAME, and the Pro arm of profile_for_build_env.
  • The Pro arms of the identity choices: the launchd labels .pro and .dev.pro, and the app's Pro socket, Pro UI pid file and Pro incompatible-database marker. The app then always uses core's shared identity (ADR-084 decision 2(a), proposed).
  • packages/desktop-app/src-tauri/tauri.pro.conf.json: merged into this issue from the former Delete the in-core Pro daemon profile, NODESPACE_PRO_* switch and tauri.pro.conf.json #3354.

After this issue, the app's default profile is DaemonProfile::community(). A Pro app supplies its own profile through AppExtensions::daemon_profile (#3347), and its own Tauri config overlay (ADR-082 §1).

Context

  • Where the Pro values live now. After Add a DaemonProfile for the app's daemon binary and service env (no behavior change) #3346 and Let an app built on core supply its DaemonProfile via AppExtensions::daemon_profile #3347, they sit in daemon_setup.rs's edition block: the constants at 66 and 72-86, and the Some arm of profile_for_build_env.
  • The identity arms:
    • launch_agent_label (134-144), daemon_socket_relative (130-132) and ui_pid_relative (327-330);
    • grpc_client::resolve_socket_path and default_socket_path_for (509-542);
    • incompatible_database::marker_path_in (31-40).
  • The last other reader of is_pro_build() is update_check::check_for_update, and Delete the Pro arm of core's built-in update source and its worker parsing #3323 removes it.
  • tauri.pro.conf.json is 15 lines. It adds nodespaced-pro to externalBin and resources.
    • Nothing in core reads it. git grep tauri.pro.conf matches only the file itself, and build.rs skips its reconciliation whenever TAURI_CONFIG is set.
    • sync passes it: build-pro-dmg.sh:150-152 and release.yml ~304-323.
    • Under ADR-082 §1, the overlay moves to nodespace-sync.
  • What the pin gate means here. Once the gate is met, the Pro build uses its pin, and this PR merges first. sync's pin bump past this commit must then:
    • pass DaemonProfile { binary_name: "nodespaced-pro", service_env: <the Supabase URL and anon key>, product: "pro" } through AppExtensions::daemon_profile, from its Pro app crate;
    • own its Tauri config overlay;
    • move to the shared label and socket, and remove the legacy app.nodespace.daemon.pro registrations plus daemon-pro.sock, ui-pro.pid and incompatible-database-pro.json (ADR-084 §3.3). Its daemon must also accept --tray (ADR-084 §4.2).
  • The free app does not change. It already uses the community values: label app.nodespace.daemon(.dev), daemon(-dev).sock, ui(-dev).pid and incompatible-database(-dev).json.

Scope

src/daemon_setup.rs

src/services/grpc_client.rs

  • resolve_socket_path calls default_socket_path_for(cfg!(debug_assertions)).
  • default_socket_path_for(is_debug: bool) is this module's own function. It passes false to proto. Update its doc.
  • In each_variant_dials_the_socket_its_daemon_binds, keep only the release and dev rows. In its doc, change "Pro or dev build" to "dev build".

Other files

  • src/incompatible_database.rs marker_path_in: call incompatible_database_name(cfg!(debug_assertions), false).
  • src/constants.rs (3-6): say the socket varies by build flavour (debug or release).
  • Delete packages/desktop-app/src-tauri/tauri.pro.conf.json.
  • Ratchet: paste BASELINES.

Out of scope

Steps

  1. Run the startup sequence, and assign the issue at pickup. Confirm three things, and record the last one in the PR:
  2. Make the deletions and doc edits. Code comments must not cite GitHub issue numbers.
  3. Run bun run scripts/check-pro-boundary.ts and paste the printed BASELINES.
  4. Run bun run test:changed and bun run quality:fix, push, and open the PR.

Acceptance criteria

  • Both commands below print nothing when run on packages/desktop-app/src-tauri/src/{daemon_setup,daemon_profile,incompatible_database,constants,update_check}.rs, packages/desktop-app/src-tauri/src/services/grpc_client.rs and packages/desktop-app/src-tauri/tauri.conf.json. If the library split moved these files, use their new paths.
    • git grep -nw is_pro_build
    • git grep -n -F -e NODESPACE_PRO_ -e NODESPACED_PRO_ -e nodespaced-pro -e PRO_DAEMON_BINARY_NAME -e daemon.pro -e daemon-pro -e daemon-dev-pro -e ui-pro -e ui-dev-pro -e incompatible-database-pro -e incompatible-database-dev-pro
  • tauri.pro.conf.json is gone, and git grep -n tauri.pro.conf prints nothing.
  • Setting NODESPACE_PRO_SUPABASE_URL at build time changes nothing.
  • The free app keeps the same plist, label, socket, pid file and marker, and tests pin all of them.
  • bun run scripts/check-pro-boundary.ts passes, with BASELINES lowered to the printed counts:
    • proNamedFiles drops by 1 (tauri.pro.conf.json);
    • editionBranching falls (daemon_setup, 8 in grpc_client, 1 in incompatible_database, 2 in tauri.pro.conf.json);
    • proWording falls (daemon_setup, the variant-test doc in grpc_client, 1 in constants);
    • cloudWording and tenantWording fall (the Supabase and tenant comments in the edition block).

Tests and verification

  • Update: each_variant_dials_the_socket_its_daemon_binds, which keeps two rows.
  • Delete: Add a DaemonProfile for the app's daemon binary and service env (no behavior change) #3346's Pro-profile assertions.
  • Must still pass: macos_plist_keepalive_tests, pkg_plist_matches_app_plist_tests and the marker tests.
  • Commands:
    • bun run test:changed
    • cargo clippy -p nodespace-app --all-targets -- -D warnings -D clippy::unused-async
    • cargo test -p nodespace-app --lib -- daemon_ grpc_client incompatible_database

Dependencies

Risks and rollback


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

🤖 Generated with Claude Code

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