Skip to content

Test app/daemon default registry agreement; document scratch-HOME isolation - #4317

Merged
mstomar125 merged 1 commit into
mainfrom
issue-4244-scratch-home
Nov 20, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-4244-scratch-home

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Part of #4244 (does not close it: the live macOS launch is still open).

What

  • New integration test default_registry_agreement_test (app-lib): starts a real nodespaced with no socket/database override (FIFO model path, no model load) and checks (1) under one home the app's default socket is the daemon's socket and the default database the app lists equals the registry file's default; (2) with NODESPACE_HOME apart from HOME, the daemon serves under the redirect, writes nothing under HOME, and an app in HOME does not reach it.
  • default_socket_path_in(home, is_debug) made public (the existing helper now calls it); test-support gains SpawnedDaemon::spawn_in_homes.
  • run-app skill: table of what a scratch launch isolates vs shares, WKWebView storage location and why HOME does not move it, the NODESPACE_HOME=/tmp/nsh (not /tmp/nsh/.nodespace) correction, and what a Linux systemctl --user run must check.

Findings

  • The app does not resolve the registry; it asks the daemon. Frontend already drops an unregistered remembered id (existing store tests). No code mismatch found in resolution; the divergence is by design: NODESPACE_HOME moves only the daemon, HOME moves only the app's socket. A scratch launch must set both.
  • Webview storage: WKWebView default data store under real ~/Library/WebKit/com.nodespace.desktop / ~/Library/Caches/..., keyed by origin (http://localhost:1422 in dev), not moved by HOME. Smallest fix (not implemented, not testable without a device): build the main window in code with a data store identifier derived from NODESPACE_HOME when set (macOS 14+).

Verified

  • Test passes; fails when the app socket derivation is mutated. bun run quality:fix clean; bun run test:changed passed (rust, scripts).
  • Not verified: live app launch, WKWebView location (read from wry/tauri source, not observed), Linux.

🤖 Generated with Claude Code

…ocument scratch-HOME isolation

An integration test starts a real daemon with no socket or database
override and checks that, under one home, the app's default socket is the
daemon's and the default database the app lists is the registry file's;
and that a daemon redirected with NODESPACE_HOME alone is not reached by an
app in the account's home. The run-app skill now states what a scratch launch
moves and what it still shares (webview storage, the service registration),
and what a Linux systemctl --user run must check.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-4244-scratch-home branch from 34d561a to 92939e4 Compare November 20, 2026 06:44
@mstomar125
mstomar125 merged commit 4d5db96 into main Nov 20, 2026
@mstomar125
mstomar125 deleted the issue-4244-scratch-home branch November 20, 2026 06:44
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.

1 participant