fix(context): preserve nonempty SOUL output directories - #2813
Open
tang-vu wants to merge 3 commits into
Open
Conversation
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
Why this matters
The installers invoke
scripts/build-installation-context.pyto renderdata/persona/SOUL.mdbefore 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 touchingdata/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.pypython -m py_compile ods/scripts/build-installation-context.py ods/tests/test-installation-context-output.pybash -n ods/installers/phases/11-services.shods/installers/windows/phases/06-directories.ps1git diff --checkGenerated with Codex