Skip to content

fix(omo-senpi): initialize reflection runtime directories - #7024

Open
dajiaohuang wants to merge 3 commits into
code-yeongyu:devfrom
dajiaohuang:fix/7012-reflection-runtime-dirs
Open

fix(omo-senpi): initialize reflection runtime directories#7024
dajiaohuang wants to merge 3 commits into
code-yeongyu:devfrom
dajiaohuang:fix/7012-reflection-runtime-dirs

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Initialize every memory identity runtime directory before the first reflection sandbox is built. This prevents realpathSync from throwing ENOENT for a fresh identity whose runtime/reflection-sessions directory has not been created yet.

The regression test starts with an initialized identity repository but no runtime directories, invokes the real lazy sandbox seam, and verifies the required directories are materialized.

Tests / QA

  • npx --yes bun@1.3.12 test packages/omo-senpi/src/components/memory/identity-runtime.test.ts packages/omo-senpi/src/components/memory/context.test.ts — 3 pass, 4 platform skips, 0 fail.
  • npx --yes bun@1.3.12 test packages/omo-senpi/src/components/memory/sandbox.test.ts packages/omo-senpi/src/components/memory/sandbox-facts.test.ts packages/omo-senpi/src/components/memory/sandbox-lock-invariants.test.ts — 17 pass, 6 platform skips, 0 fail.
  • npx --yes bun@1.3.12 run --cwd packages/omo-senpi typecheck — pass.
  • Targeted Bun bundle of identity-runtime.ts — pass (56 modules).
  • Isolated fresh-XDG data-plane probe — pass; runtime dirs began absent, existed before forced Linux canonicalization, the canonical reflection-sessions bind grant rendered, XDG env was restored, and the temp sandbox was removed.
  • Evidence: .omo/evidence/20260819-issue-7012/qa-summary.md and adjacent RED/GREEN/probe artifacts.

A broader diagnostic memory sweep was not used as a gate: it surfaced an unrelated Windows symlink-permission failure and an existing memory-usage fixture failure outside the touched paths. All scoped reflection/context/sandbox gates above are green.

Risk

Low. The change reuses the existing idempotent first-write helper and runs it once before lazy sandbox construction. Read-only identity context creation remains unchanged; the new filesystem writes occur only when a reflection launch reaches its sandbox seam.

Related: #7012

@github-actions github-actions Bot added the omo-senpi Changes under packages/omo-senpi label Aug 18, 2026
…ntime-dirs

# Conflicts:
#	packages/omo-senpi/plugin/extensions/omo.js
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.

1 participant