Repository navigation
Remove leftover openxyos-runtime zip and folder after a successful Windows install - #43
Merged
Merged
Conversation
Once provision writes .install-ready, delete the install-dir zip and openxyos-runtime folder (plus a LocalAppData sibling if present). Keep the live openxyos tree and leave staging in place when provision fails. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Co-authored-by: XYAI Labs <haoboy8@gmail.com>
XYAIStudio
marked this pull request as ready for review
September 17, 2026 08:25
This was referenced Sep 17, 2026
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
After a successful FreeOS Windows install,
$INSTDIRstill contained the temporaryopenxyos-runtimezip/archive and the same-named staging folder next to the realopenxyosworkdir andFreeOS.exe. Those leftovers waste disk space.This change cleans them up only after provision succeeds.
Cleanup trigger
Single source of truth:
desktop/src/build/windows/nsis/provision-openxyos.ps1.http://127.0.0.1:3780/api/health/livez.Complete-OpenXYOSSuccesswrites.install-ready.Remove-OpenXYOSStagingdeletes:$INSTDIR\openxyos-runtime\(recursive)$INSTDIR\openxyos-runtime.zipand similarly named archives (openxyos-runtime/.zip/.7z/.tar/.tgz/.tar.gz)%LOCALAPPDATA%\FreeOS\openxyos-runtimefolder or archive, if one was staged thereProtected paths are never deleted:
$INSTDIR\openxyos(sealed install copy the app can still heal from)%LOCALAPPDATA%\FreeOS\openxyos(live workdir)If provision fails (zip missing, extract/start/livez/marker errors), staging stays in place for debugging. Cleanup is idempotent and silent when the files are already gone. NSIS still copies the zip and
nsExecs the provisioner; it does not add extra delete macros, so an aborted Setup does not wipe debug artifacts.Files changed
desktop/src/build/windows/nsis/provision-openxyos.ps1— success-path cleanuptests/unit/desktop/test_openxyos_provisioner.py— asserts cleanup only after.install-readytests/unit/desktop/test_nsis_uninstall.py— NSIS still does not own the deletedesktop/README.md,CHANGELOG.md— document the new install-dir layoutTarget branch
develop(feature / fix — default)main(requested for this fix)Type of change
Test plan
python3 -m pytest tests/unit/desktop/test_openxyos_provisioner.py tests/unit/desktop/test_nsis_uninstall.py --noconftest -qruff format/ruff checkon the changed test filesmake allwas not run here (uv/ editableoctopinstall are not present in this environment). CI on this PR is the ship bar.Checklist
CHANGELOG.md(if user-facing)