Skip to content

fix(context): preserve nonempty SOUL output directories - #2813

Open
tang-vu wants to merge 3 commits into
Osmantic:mainfrom
tang-vu:fix/context-preserve-nonempty-output-dir
Open

fix(context): preserve nonempty SOUL output directories#2813
tang-vu wants to merge 3 commits into
Osmantic:mainfrom
tang-vu:fix/context-preserve-nonempty-output-dir

Conversation

@tang-vu

@tang-vu tang-vu commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace recursive deletion of unexpected SOUL output directories with empty-only removal
  • cover the Python builder plus Linux and Windows installer call sites
  • preserve Docker bind-mount self-healing when the auto-created directory is empty
  • add CLI-boundary and integration-contract regression coverage for empty and non-empty output paths

Why this matters

The installers invoke scripts/build-installation-context.py to render data/persona/SOUL.md before Hermes starts. Docker can legitimately auto-create that file path as an empty directory, which ODS should repair. The builder, Linux phase 11, and the Windows fallback all used recursive deletion, so an unexpected non-empty directory at the same path—including operator files—could be deleted. The new behavior repairs only the known empty-directory state and preserves any non-empty state while reporting the failure.

Overlap check

Searched open and closed PRs for SOUL output directory rmtree, build-installation-context directory, persona SOUL.md directory, and all callers touching data/persona/SOUL.md. No PR covers this deletion boundary. Existing context PRs concern payload validation and snapshot content, not output-path recovery.

Test plan

  • python ods/tests/test-installation-context-output.py
  • python -m py_compile ods/scripts/build-installation-context.py ods/tests/test-installation-context-output.py
  • bash -n ods/installers/phases/11-services.sh
  • PowerShell parser accepts ods/installers/windows/phases/06-directories.ps1
  • git diff --check

Generated with Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant