Repository navigation
Fix openXYOS $home clash and missing backend-dist migrations - #37
Merged
Merged
Conversation
Windows PowerShell treats $home/$HOME as read-only, so start-sidecar.ps1 was leaving SQLite under %USERPROFILE%\org-os. Use $freeosHome instead. Compiled server.js reads SQL from __dirname/migrations; include those files in openxyos-runtime.zip and heal existing live trees on provision. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
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.
Windows install-time openXYOS start still failed after #36 on a real machine: data landed under
%USERPROFILE%\org-os, then Node died on missing SQL and livez never came up.What changed
$home→$freeosHomeinstart-sidecar.ps1. Windows PowerShell treats$HOME/$homeas a read-only automatic variable. Assignment throwsSessionStateUnauthorizedAccessException; with$ErrorActionPreference = Continuethe script keeps going and$homestays the profile root (C:\Users\Lenovo), so SQLite is created atC:\Users\Lenovo\org-os\xiongyuan.dbinstead of%USERPROFILE%\.freeos\org-os\.Ship
backend-dist/migrations/*.sqlinopenxyos-runtime.zip. Compiledserver.jsreads SQL viapath.join(__dirname, "migrations/…"). After esbuild, that isbackend-dist/migrations, notbackend/migrations. Missing013_audit_bundle.sqlmakesinitDatabase()ENOENT and livez never becomes ready. Bundle + stage now copy allbackend/migrationsfiles next toserver.jsand refuse a compiled zip that lacks the four runtime SQL files (013–016).Provisioner heal for an already-extracted live tree that looks complete (node + dist) but is missing
backend-dist/migrations. Reinstall copies SQL frombackend/migrations(or the install-dir backup) without waiting for a 90s livez timeout.#36 fail-fast
start.log/UseShellExecute=false/ CORS env handoff is unchanged.start.lognow also recordsDATABASE_PATHandFREEOS_HOMEso a wrong data root is obvious.Target branch
develop(feature / fix — default)main(matches Fix openXYOS install start: pass CORS_ORIGIN and fail-fast on Node crash #36 / current installer line)Type of change
Test plan
tests/unit/desktop/test_openxyos_provisioner.py,test_stage_openxyos_runtime.py)python3 -m pytest --noconftest tests/unit/desktop/test_openxyos_provisioner.py tests/unit/desktop/test_stage_openxyos_runtime.py -q→ 17 passedruff check+ruff format --checkon changed Python filesmake allon this PR (this cloud image has nouv/ full Octop env)Checklist
CHANGELOG.md