| name | port-sandbox-test |
| description | End-to-end sandbox test of conversation porting across Claude Code / Codex / OpenCode. Seeds real convos into an isolated store, ports them, verifies visibility + resumability, logs failures as issues without touching real conversations. Use when asked to test porting end-to-end, verify a harness pair, or sweep all conversations. |
Port Sandbox Test
All commands run from cli/. Never write a real store without a backup first.
The sandbox lives at ~/.openmemory-sandbox/ (OPENMEMORY_SANDBOX_ROOT overrides).
This flow is a pure reporter: on ANY failure, log an issue and CONTINUE — never abort the run.
Deep flow (one conversation, resumability proof)
- Back up everything:
bun run sandbox:backup --harness all. Confirm backup dirs printed.
- Seed:
bun run sandbox:seed --projects 3 --convos 5. Note the seeded session filenames (session id = basename minus .jsonl).
- Pick source + dest (ask the user if unspecified; default source claude-code) and ONE seeded session id.
- Port under sandbox env (env vars must be in the SAME shell invocation — they don't persist between Bash calls):
eval "$(bun run sandbox:reroute --harness <source>)" && \
eval "$(bun run sandbox:reroute --harness <dest>)" && \
bun run cli port --from <source> --to <dest> --id <sessionId> --json
- Verify — store:
sessionExists(dest, ...) from scripts/sandbox/store-check.ts under the same env (or re-discover and match on the ported title/id).
- Verify — resume (terminal):
probeResume(dest, portedDestId, {...writeEnv(dest), ...ledgerEnv()}) from scripts/sandbox/resume-probe.ts. Assert the reply contains ok.
- Verify — desktop app (interactive sessions only): launch the app binary from
config.appLaunch(dest) with appReadEnv(dest) set, screenshot (screencapture -x), confirm the conversation shows in the sidebar and no "failed to open project" popup. Skip in autonomous runs; note the skip in the report.
- On ANY failure:
logIssue({...}) from scripts/sandbox/issues.ts with the failed phase and captured output, then continue.
- Clean up:
bun run sandbox:clear --harness all then bun run sandbox:restore --harness all (only needed if a real store was written; clear is always safe).
Bulk sweep (all conversations)
For every seeded session (or --all real sessions if the user explicitly says so), port to each destination and verify with sessionExists only — no launches. Log an issue per failure, never abort. This surfaces convos that break (e.g. projects that moved).
Fixing is decoupled
Do NOT fix during the run. After the run:
readIssues(); group by root-cause signature (harness pair + phase + message).
- For each distinct root cause, dispatch a
hard-debug subagent with the issue + captured log.
- Record outcomes as a decision page under
docs/brain/decisions/.