Skip to content

Sandbox OMO_MEMORY_HOME in isolatedChildEnv - #9242

Merged
code-yeongyu merged 2 commits into
code-yeongyu:devfrom
drakeo338:claude/9239-fix
Sep 30, 2026
Merged

code-yeongyu merged 2 commits into
code-yeongyu:devfrom
drakeo338:claude/9239-fix

Conversation

@drakeo338

@drakeo338 drakeo338 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #9239.

isolatedChildEnv sandboxed the agent dir and XDG_CONFIG_HOME but left OMO_MEMORY_HOME alone, so the child's memory component still used the caller's real ~/.omo/memory (or its override), and the transient sweep ran against it. The helper now sets OMO_MEMORY_HOME to a memory directory beside the sandbox agent dir, with a test for it.

Changes

  • sandbox-child-env.mjs: set OMO_MEMORY_HOME inside the sandbox.
  • sandbox-child-env.test.mjs: assert the child env never points at the caller's memory root.

QA & Evidence

  • What was tested: sandbox-child-env.test.mjs
    Observed result: against the unfixed source, 2 passed, 2 failed; with the fix, 4 passed, 0 failed.
    Why sufficient: the failing cases are the new memory-root assertions.

Risks & Residuals

  • bun run typecheck and the full bun test were not run, so they are unticked.

Automated Checks

  • bun run typecheck
  • bun test

Screenshots

Not applicable.

Related Issues

Closes #9239


Summary by cubic

Sandboxes OMO_MEMORY_HOME in isolatedChildEnv so QA children no longer read or write the caller's real ~/.omo/memory (or its override), which the transient sweep previously ran against.

  • Points OMO_MEMORY_HOME at a memory directory beside the sandbox agent dir.
  • Adds a unit test asserting the child's memory root stays inside the sandbox.
  • Model-profile e2e now fails the run if a scenario's child resolves a memory root outside the sandbox or its output names the caller's real memory root.

Closes #9239.

Written for commit c95b544. Summary will update on new commits.

Review in cubic

…ngyu#9239)

isolatedChildEnv set every agent-dir lane but left OMO_MEMORY_HOME alone,
so a QA child resolved the caller's memory root: its inherited override,
or the default ~/.omo/memory. It now points OMO_MEMORY_HOME at a memory
directory beside the sandbox agent dir. Scripts that set their own
OMO_MEMORY_HOME after the spread are unaffected.
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added the omo-senpi Changes under packages/omo-senpi label Sep 30, 2026
@code-yeongyu

Copy link
Copy Markdown
Owner

Thank you @drakeo338, this is a clean, minimal fix for #9239, and the test pins exactly the right thing. Two things before it can merge: please sign the CLA (the bot comment above has the link), and I'm approving the CI run now. #9239 also asks for a before/after digest of the real memory tree in the driver; I'll add that on top of your branch as a small maintainer commit so you don't have to.

…memory root (code-yeongyu#9239)

Acceptance 2 of code-yeongyu#9239, on top of the isolatedChildEnv fix. Every model-profile e2e scenario now checks that its child resolves a memory root inside the sandbox and that no child output names the caller's real memory root (absolute or ~ form), so a transient sweep over the real ~/.omo/memory fails the run. The real tree is not content-digested because other live sessions on the same machine write to it during a run. Verified on one real scenario: PASS with the fix; with the helper's OMO_MEMORY_HOME line removed, both checks fail and the child output names the real root.
@drakeo338

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Sep 30, 2026
@code-yeongyu
code-yeongyu merged commit a5bec68 into code-yeongyu:dev Sep 30, 2026
30 of 31 checks passed
@code-yeongyu

Copy link
Copy Markdown
Owner

Merged, thanks @drakeo338! This makes the model-profile e2e QA driver run its child with a sandboxed memory root, so QA runs no longer touch the real ~/.omo/memory (#9239). We added two driver checks on top so any regression is caught.

code-yeongyu added a commit that referenced this pull request Sep 30, 2026
…form

isolatedChildEnv joins OMO_MEMORY_HOME with path.join since #9242, which
gives \tmp\sbx\memory on Windows, while the test expected the POSIX
literal, so senpi-compatibility (windows-latest) failed on every head.
The expectation is now built the way the code builds it; placing the
memory root anywhere but beside the agent dir still fails the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

omo-senpi Changes under packages/omo-senpi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

model-profile e2e QA reaches the real ~/.omo/memory root (memory component not sandboxed)

2 participants