Skip to content

Remove leftover openxyos-runtime zip and folder after a successful Windows install - #43

Merged
XYAIStudio merged 2 commits into
mainfrom
cursor/clean-openxyos-staging-6e21
Sep 17, 2026
Merged

XYAIStudio merged 2 commits into
mainfrom
cursor/clean-openxyos-staging-6e21

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

After a successful FreeOS Windows install, $INSTDIR still contained the temporary openxyos-runtime zip/archive and the same-named staging folder next to the real openxyos workdir and FreeOS.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.

  1. Provision extracts, heals, starts FE/BE, and waits for http://127.0.0.1:3780/api/health/livez.
  2. Complete-OpenXYOSSuccess writes .install-ready.
  3. Only if that write succeeds, Remove-OpenXYOSStaging deletes:
    • $INSTDIR\openxyos-runtime\ (recursive)
    • $INSTDIR\openxyos-runtime.zip and similarly named archives (openxyos-runtime / .zip / .7z / .tar / .tgz / .tar.gz)
    • A sibling %LOCALAPPDATA%\FreeOS\openxyos-runtime folder or archive, if one was staged there
  4. Exit 0.

Protected 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 cleanup
  • tests/unit/desktop/test_openxyos_provisioner.py — asserts cleanup only after .install-ready
  • tests/unit/desktop/test_nsis_uninstall.py — NSIS still does not own the delete
  • desktop/README.md, CHANGELOG.md — document the new install-dir layout

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (requested for this fix)

Type of change

  • Bug fix

Test plan

  • Desktop provisioner + NSIS unit tests: 26 passed
    python3 -m pytest tests/unit/desktop/test_openxyos_provisioner.py tests/unit/desktop/test_nsis_uninstall.py --noconftest -q
  • ruff format / ruff check on the changed test files
  • Full make all was not run here (uv / editable octop install are not present in this environment). CI on this PR is the ship bar.

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 17, 2026 07:49
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
XYAIStudio marked this pull request as ready for review September 17, 2026 08:25
@XYAIStudio
XYAIStudio merged commit a8f5c02 into main Sep 17, 2026
12 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/clean-openxyos-staging-6e21 branch September 17, 2026 08:25
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.

2 participants