claudebox/.planning/phases/05-per-project-instance-isolation/05-UAT.md

2.8 KiB

status phase source started updated
complete 05-per-project-instance-isolation
05-01-SUMMARY.md
05-02-SUMMARY.md
2026-04-13T14:03:08Z 2026-04-16T00:00:00Z

Current Test

[testing complete]

Tests

1. Per-Project Instance Directory Created

expected: When claudebox starts in a project, ~/.claudebox/projects/<16-char-hex-hash>/ is created (or already exists) with a project-root file containing the canonical project path. Verify with: ls ~/.claudebox/projects/ shows a hex-named dir, and cat ~/.claudebox/projects/*/project-root shows your project path. result: pass

2. Direct ~/.claude Bind — Config and Skills Visible

expected: Inside the sandbox, Claude Code has access to your full ~/.claude config — plugins, skills, hooks, MCP configs, settings, commands. Not a bare empty dir. You can confirm by checking that custom skills or MCP servers you've added to ~/.claude/ are available inside a claudebox session. result: pass

3. Per-Project projects/ Isolation

expected: Two different projects get different ~/.claude/projects/ dirs inside the sandbox. The conversation history and project state for project A does not appear when running claudebox from project B. Each project's instance dir is isolated under ~/.claudebox/projects/<hash>/. result: pass

4. Worktree Uses Same Instance Dir as Main Worktree

expected: Running claudebox from a git worktree of a repo resolves to the same instance directory as running it from the main worktree. Both show the same <hash> in ~/.claudebox/projects/. The project-root file in both cases points to the main worktree root. result: pass

5. /bin/sh Available — Git Hooks Work

expected: Inside the sandbox, /bin/sh exists (symlinked to bash). Git hooks that reference #!/bin/sh or exec /bin/sh do not fail with ENOENT. Verify by running a git commit or git status in a repo that has shell hooks. result: pass

6. --gc Removes Stale Instance Dirs

expected: Running claudebox --gc scans ~/.claudebox/projects/ and removes any directory whose project-root file points to a path that no longer exists on disk. It prints Removed: <dir> (project root gone: <path>) for each removed dir and ends with GC complete: N instance(s) removed. result: pass

7. --gc Preserves Valid Instance Dirs

expected: Running claudebox --gc does NOT remove instance dirs for projects that still exist on disk. After --gc, ~/.claudebox/projects/<hash>/ for currently existing projects is still present. result: pass

8. --gc Exits Without Launching Claude

expected: Running claudebox --gc completes and returns to the shell without launching Claude Code. It does not start bwrap or open an interactive session. result: pass

Summary

total: 8 passed: 8 issues: 0 pending: 0 skipped: 0 blocked: 0

Gaps

[none yet]