Repository navigation
fix(desktop): recover and upgrade existing libraries safely - #69
Merged
Merged
Conversation
Honor the PYTHON override and platform defaults used by neighboring tests so Linux hosts with only python3 can run the ONNX feature gate.
Select the 0.8.0-rc.1 attribution rather than the previous release and regenerate both inventories after changing the desktop manifest. Guard version alignment in the packaging tests.
Allow bounded filesystem and HTTP setup under parallel suite load while preserving cancellation and shutdown deadlines. Scale virtual deadline fixtures without weakening retry-reset or per-file budget assertions. Start ONNX and HTTP behavior watchdogs after their fixtures are ready.
Bound the reopened cooldown using independently measured elapsed time instead of assuming cache recreation completes within one second. Keep the upper clamp and single-request persistence assertions.
A parallel consumer process can inherit the native directory descriptor between fork and exec. The physical lease contract permits that brief extension after the parent drops its handle. Wait for bounded physical release while retaining claim-generation and abandoned-authority refusal assertions.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Keep failed backend starts in an actionable recovery window and publish readiness only after health confirmation. Check legacy acquisition schemas under the physical lease before ordinary startup claims ownership or starts workers, preserving repeated-open behavior and existing reserved-constructor custody. Add an explicit offline schema upgrade that requires historical writers to be stopped and syncs an exact private backup before conversion. Preserve runtime restart and shutdown failure receipts, and document cutover without automatic migration or old-binary rollback.
Replace the dead-end legacy-library prompt with an explicit metadata upgrade and healthy reopen. Require stopped-writer and no-downgrade acknowledgments, keep the selected root under main-process authority, and drain the entire operation during shutdown. Back up only downloads.json through the existing canonical migration helper. Preserve model files and prevent repeat conversion after failed or uncertain publication.
Keep retained download state and exact queue custody when its admitted destination was never created. Avoid finalizing nonexistent outputs so library startup can complete. Distinguish successful metadata upgrade from backend-open failure and cover packaged upgrade, clean close, and reopen with a retained failed download.
The cancellation waiter regression runs on every platform. Make its fixture readiness bound available to Windows and macOS test builds as well as Linux.
Use the runtime HF setting for the early schema check, matching client initialization so unsupported metadata is refused before registry admission even when the hf-client Cargo feature is disabled.
Select only the reviewed investigation and plan from the older acquisition branch. Require older-client compatibility disclosure and actual direct/RPC consumer proof before UI expansion, plus exact live destination-claim settlement, immediate reuse and stale-state rejection after durable release. Reconciliation remains planned; these documents do not implement recovery.
Preserve fixture runtime metadata even when recipe validation refuses, so its exact provider, interpreter and artifact selection can be compared against the pinned candidate. Keep all qualification checks unchanged. Record the regression verification, selective plan lineage and bounded audio diagnosis without claiming that the candidate is qualified.
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.
Legacy library selection could exit the desktop before showing recovery. After upgrading download metadata, a retained failed download whose recorded destination folder is absent could also abort backend startup and leave a claim that blocked reopening.
The desktop now shows actionable recovery and offers a metadata-only upgrade using the canonical helper. It backs up only downloads.json, preserves its lifecycle partitions, requires the stopped-reader/writer and no-downgrade acknowledgments, and opens the library in the same window after backend readiness. Cancellation makes no changes, and close waits for an active upgrade. Model files are never copied or rewritten by the upgrade.
Startup retains missing-destination download records and their exact queue custody without creating folders or finalizing nonexistent outputs. Other capability and inventory errors still propagate. The recovery screen distinguishes successful metadata conversion from failed backend opening. Generic failed-construction claims retain their existing conservative ownership contract; this change does not introduce automatic dead-PID claim takeover.
Release validation also fixes platform-aware Python invocation, current-version notice packaging, and tests that incorrectly included fixture setup or elapsed cooldown in their behavioral deadlines.
Repair verification — 2026-10-12
Current head:
036bed9cb60a91a440034b7324fd6f611ea58c2a. Four repair commits and one portable-fixture follow-up repair the reviewed desktop regressions and the two CI failure mechanisms. The existing branch and prior commits are preserved; no duplicate PR or playground code is included.Current-head Build 38247599905 passed: all nine applicable jobs succeeded, including full Rust quality, headless no-inference, frontend/desktop contracts, and native Torch QA on Ubuntu, macOS and Windows. The separate current-head CodeQL analyses also passed. Tag-only release/package jobs were skipped as designed; this is PR acceptance evidence, not release approval.
The audio qualification job installed and validated the exact frozen cohort, passed real Linux confinement, imported Torch/Cohere dependencies and performed a CPU operation. Its receipt reports
child_tree_drained=true,production_available=false; all three controlled private-session lifecycle tests passed. It did not load a pretrained model or transcribe audio. The Linux inference review built/extracted the exact-source archive and passed import/load/finite 256-dimensional embedding/unload/graceful shutdown through real pinned ORT with an untrained synthetic graph. This does not qualify Nomic or learned embedding quality. Audio and ONNX evidence artifacts are attached to the run with seven-day retention.Local verification:
test-support, plus one ignored doctest; all-target/all-feature Clippy and Rust formatting passed. The initial aggregate attempt failed nine tests because the sandbox home config directory was read-only; the complete rerun with a task-ownedXDG_CONFIG_HOMEpassed.Independent review covered desktop, GGUF and audio repairs with no remaining blocking finding. Local evidence does not claim native Electron packaging, live-library migration, complete installed audio confinement or pretrained-model inference. The earlier audio artifact transfer returned proxy HTTP 403; its exact differing selection field remains unverified. The source-level acquisition drift is repaired without guessing that artifact's contents. The playground's separate mixed-length ONNX batch limitation and planned download-location reconciliation are outside these changes.
Earlier author-reported validation (not all rerun at current head by this review):
Reviewed one observed failed-start claim separately under a native physical-root lock, with the exact unchanged generation rechecked in a transaction and a private metadata-only registry backup. Upgraded library metadata remained byte-identical; no model payloads were read or changed. No private configuration, registry data, binaries or original checkout edits are included in the commits.
The latest Debian artifact was rebuilt from commit 1a78ea8 (SHA256 7689df1f3b28fa9d8d0580193ab0c27fbabb4abaee5681d008f0e6917191efb7). Published history is preserved. The review worktree is retained and locked for PR/artifact consumers, owned by the user; no automatic sync/rewrite/merge, retirement only after PR disposition and artifact preservation with commit reachability verified.