Isolated sandbox
The host RemoteCode (io.remotecode.desktop) stays up. Work in a linked git worktree and prove through scripts/isolated-sandbox.sh.
Identity, ports, and App Support are defined only in that script. Print them with scripts/isolated-sandbox.sh identity — do not invent bundle ids or ports.
Every session
- From the product checkout:
cd "$(scripts/isolated-sandbox.sh ensure)" - Edit only files under that printed path.
- Tests:
scripts/isolated-sandbox.sh testorscripts/isolated-sandbox.sh test --filter NameTests - Second GUI (optional):
scripts/isolated-sandbox.sh runand laterstop
ensure from the primary tree creates .sandbox-worktrees/<stamp> on branch sandbox/isolated-<stamp> at HEAD. Already inside a linked worktree, it reprints pwd. Use RC2_SANDBOX_REF=origin/main and RC2_SANDBOX_FETCH=1 when the sandbox must track origin, not the current HEAD.
Forbidden
pkill -x RemoteCodeosascriptquitio.remotecode.desktopscripts/run-app.sh(stable bundle id + quit host).script/build_and_run.shis allowed; it routes to this sandbox.git checkout production/ reset / commit in the primary worktree- Touching
~/.remote-code/binor~/.local/bin/distillfrom the sandbox; keepRC2_DISABLE_MANAGED_DISTILL_RECONCILE=1 open dist/RemoteCode.app(stable packaging)
RC2_SURFACE_ID in this shell means you are inside the host app. isolated-sandbox.sh run is still allowed; run-app.sh is not.
Proof
- File edits:
git -C <sandbox> statusis dirty; primarygit status --porcelainis unchanged aside from ignored sandbox dirs. - Tests:
swift testoutput from the sandbox path. - GUI:
identityshowslinked_worktree=yes,bundle_id=io.remotecode.desktop.debug,http_port=18218, and the running executable isdist/RemoteCodeDebug.app/Contents/MacOS/RemoteCode.