Pip dependency installs are tracked as download tasks but finish with the runner's "=== Process exited with code 0 ===" sentinel and pip's "Successfully installed" line — never the HuggingFace download markers (DONE / 100% / /snapshots/ / DOWNLOAD_OK) the download heuristics look for. Once the tmux pane is gone, the backend's only completion check is the HF cache lookup, which a pip package (e.g. llama-cpp-python[server], no "/") never matches, so it reports "stopped" — and the frontend maps a stopped download to "crashed". The reconnect loop's session-gone heuristic had the same gap. Result: a clean install (exit 0) showed "crashed" in the Running tab while the Dependencies tab correctly showed it installed. Add a shared _depInstallSucceeded() helper that keys off the exit-0 sentinel (falling back to pip's success line, rejecting ERROR/Traceback) and wire it into both the session-gone heuristic and the background status reconciler, gated on payload._dep so real model downloads are unaffected. Also fixes the pre-existing test_background_status_poll_reconciles_into_local_tasks assertion that no longer matched the evolved reconciler, and adds regression coverage for both paths.
3.6 KiB
3.6 KiB