5628963e08
* Fix portable Python runtime layout * Ignore issue docs * Organize gitignore * ignored * fix: improve local dev build and runtime setup reliability - Remove redundant size check in verify_runtime_archive; SHA256 is sufficient and size varies across zstd builds of identical content - Extend PATH with Homebrew dirs in extract_tar_archive so tar can find zstd when running inside the app bundle - Skip runtime download in setup.js if archive is already present locally - Make DMG Finder AppleScript non-fatal (cosmetic only) - Poll for uvicorn startup log line instead of fixed sleep 1 - Ignore .local/ dev scripts in gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: extract runtime pack in pure Rust, no zstd system dependency Replace the system tar subprocess with native Rust crates (tar + zstd + flate2). macOS ships without a standalone zstd binary so tar would fail on any machine without Homebrew installed, breaking the setup flow for all new users. Pure Rust extraction has zero external dependencies. * fix: re-download runtime archive if local copy fails verification * fix: delete stale runtime archive on checksum mismatch so retry re-downloads * fix: bundle Python stdlib in runtime pack and set PYTHONHOME at launch UV standalone Python has /install as compiled-in base_prefix so the stdlib is unreachable on user machines. Copy the stdlib from the UV Python into the venv lib directory during runtime pack build, then set PYTHONHOME to the venv root at backend launch so Python finds it. * fix: locate Python stdlib via encodings import instead of path guessing The previous approach (exe.parent.parent/lib/pythonX.Y) fails on UV PBS Python builds where the actual stdlib location differs from expectations. Finding encodings via import is reliable regardless of compiled-in prefix. * fix: use copytree(dirs_exist_ok=True) for stdlib copy and add sanity check The item-by-item copy with if-not-exists was silently skipping files. Using copytree with dirs_exist_ok merges stdlib into the venv lib dir atomically. Added post-copy check that fails the build if encodings is missing so this can never ship silently broken again. * fix: bundle full PBS Python installation instead of venv to include stdlib python -m venv only creates site-packages/ — it relies on sys.base_prefix for stdlib, which is compiled into UV PBS Python as /install (a path that never exists on user machines). Copying the entire PBS installation to runtime/python/ gives us lib/pythonX.Y/ with the full stdlib in place. PYTHONHOME already set in start_backend points Python there at runtime. * fix: remove EXTERNALLY-MANAGED marker from copied PBS Python before installing packages * fix: validate Python stdlib in probe_runtime to detect broken installs