Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Description
Summary
Core's side of ADR-084 §5 (proposed) for the CLI: nodespace uninstall refuses to run when the installed app is not the free NodeSpace.
- When it refuses. On macOS,
/Applications/NodeSpace.appexists and itsInfo.plistdoes not declareNodeSpaceProduct = community. A bundle with no key counts as not community. - What it does then. It prints the ADR message and exits non-zero before it touches anything.
- Without an app. On a headless install with no app, it proceeds as today.
- Naming. The guard names no other product.
Context
- What
uninstalldoes today.run(packages/cli/src/commands/uninstall.rs18-30) calls, in order:stop_daemon(84-98), which boots outapp.nodespace.daemonand deletes the per-user plist;remove_bin_dir;remove_sock;- the skill removal.
- Why a Pro install needs the guard. Over Pro,
uninstallwould stop the Pro daemon and delete the per-user registration and~/.nodespace/bin. It would leave behind the app, the machine-wide registration and the credentials: a partial uninstall. - Older core apps. A core app from before the key existed is refused as well. That only happens when the CLI was updated separately from the app, for example through the
nodespace-cliformula, and the message tells the user to update NodeSpace first. ADR-084 accepts this. This issue depends on Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349, so every core app from that release on declares the key. - Reading the plist. Use the
plistcrate: 1.10.0 is already inCargo.lockas a Tauri dependency, and it reads both XML and binary plists.- Add it to the CLI under
[target.'cfg(target_os = "macos")'.dependencies]. - Add it under
[dev-dependencies]too, so the pure function is tested on every platform. - Don't shell out.
- Add it to the CLI under
Scope
uninstall.rs:- Add a pure
fn uninstall_blocker(app_bundle: &Path) -> Option<String>:Nonewhen the bundle doesn't exist;NonewhenContents/Info.plistdeclaresNodeSpaceProduct=community;Some(message)in every other case, including an unreadable plist.
- The message is ADR-084's: "The NodeSpace app on this Mac is a different NodeSpace product, or an older NodeSpace that does not say which product it is. Use that product's own uninstall, or update NodeSpace first; this command removes only the free NodeSpace."
- At the start of
run, add a#[cfg(target_os = "macos")]block that callsuninstall_blocker(Path::new("/Applications/NodeSpace.app")). OnSome, return the error before anything else runs. - Compile the pure function for
any(target_os = "macos", test).
- Add a pure
packages/cli/Cargo.toml: add theplistdependency, with a one-line comment that it is already in the lockfile.
Out of scope
- The
.pkgguard (Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349) and the cask guard (Add a Homebrew cask preflight for other NodeSpace products; keep databases out of zap #3350). - Pro's own uninstall (sync).
Steps
- Run the startup sequence, and assign the issue at pickup.
- Add the function, the call and the dependency.
- Add the tests.
- Run
bun run scripts/check-pro-boundary.ts. No marker should move; if one does, pasteBASELINES. - Run
bun run test:changedandbun run quality:fix, push, and open the PR. Code comments must not cite GitHub issue numbers.
Acceptance criteria
- On macOS, with a non-community
/Applications/NodeSpace.app,nodespace uninstallexits non-zero, prints the message, and changes nothing on disk or in launchd. - A community app, or no app, uninstalls exactly as before.
- Neither the message nor the code names another product.
-
bun run scripts/check-pro-boundary.tspasses, withBASELINESpasted.
Tests and verification
-
Unit tests on tempdir bundles, whose
Info.plistfiles the test writes with theplistcrate:Bundle Expected absent NonecommunityNoneproSomeotherSomekey missing Someunparseable plist Somebinary-format plist declaring communityNone -
Mutation check: flip the comparison, and the tests must fail.
-
No test touches the real
/Applications. -
Commands:
bun run test:changedcargo clippy -p nodespace-cli --all-targets -- -D warnings -D clippy::unused-async.tools/bin/cargo-nextest nextest run -p nodespace-cli --lib
Dependencies
- Move the .pkg guard to a static pre-install check and declare NodeSpaceProduct #3349: the core app declares the key.
- NodeSpaceAI/nodespace-docs#94 (ADR-084): ADR-084 decision 5 (proposed).
Risks and rollback
- Mixed releases. A user who updated only the CLI is refused until they update the app, as ADR-084 intends.
- Rollback: revert the PR.
Plan key: C8.8 (pro-boundary DAG).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
pro-boundaryPro/core boundary: Pro code moves to nodespace-sync (ADR-081..085)
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3415 (umbrella against the final ADR-081–085)