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, ...)fromscripts/sandbox/store-check.tsunder the same env (or re-discover and match on the ported title/id). - Verify — resume (terminal):
probeResume(dest, portedDestId, {...writeEnv(dest), ...ledgerEnv()})fromscripts/sandbox/resume-probe.ts. Assert the reply containsok. - Verify — desktop app (interactive sessions only): launch the app binary from
config.appLaunch(dest)withappReadEnv(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({...})fromscripts/sandbox/issues.tswith the failedphaseand captured output, then continue. - Clean up:
bun run sandbox:clear --harness allthenbun 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-debugsubagent with the issue + captured log. - Record outcomes as a decision page under
docs/brain/decisions/.