fix(omo-senpi): initialize reflection runtime directories - #7024
Open
dajiaohuang wants to merge 3 commits into
Open
fix(omo-senpi): initialize reflection runtime directories#7024dajiaohuang wants to merge 3 commits into
dajiaohuang wants to merge 3 commits into
Conversation
…ntime-dirs # Conflicts: # packages/omo-senpi/plugin/extensions/omo.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Initialize every memory identity runtime directory before the first reflection sandbox is built. This prevents
realpathSyncfrom throwing ENOENT for a fresh identity whoseruntime/reflection-sessionsdirectory 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.identity-runtime.ts— pass (56 modules).reflection-sessionsbind grant rendered, XDG env was restored, and the temp sandbox was removed..omo/evidence/20260819-issue-7012/qa-summary.mdand 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