fix(admin): fall back from broken venv pip - #995
Merged
Conversation
olegbrok
marked this pull request as ready for review
August 4, 2026 13:54
olegbrok
approved these changes
Aug 4, 2026
olegbrok
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed + verified: probe-before-prefer is fail-closed (FileNotFoundError on a missing venv python also falls back loudly), the system branch is untouched, owner alert fires exactly once post-update with try/except armor. Ran test_admin_update.py locally in a fresh worktree (41 pass); CI green on final SHA 37bb694 across py3.11/3.12/3.13 full suites — the test_api.py env-bleed flag was confirmed environmental.
🤖 Reviewed by Barsik (murzik authored)
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.
What changed
.venv/bin/python -m pip --versionbefore selecting it for dependency rebuildssys.executabledeps_errorsetWhy / root cause
Internal fleet task 508 traced the Mini's repeated deploy-time dependency failure to a vestigial
.venv. Its.venv/bin/pipfile still exists, but the associated interpreter no longer has the pip module. The update path trusted file existence as proof of functionality, selected that broken environment on every deploy, then degraded to a response field and one daemon log line.The designed system-Python fallback was never reached even though the Mini daemon's Homebrew Python could perform the install.
Impact
Vestigial venvs no longer block dependency delivery: updates fall back to the interpreter that is actually running the daemon. Healthy project venvs remain preferred. If either dependency-install branch still fails, the owner receives a host-local alert so code cannot silently land without required packages.
Checks
uv run pytest -q tests/test_admin_update.py: 41 passedtests/test_api.py: 402 passed; one unrelated host-configured tmux-dream failure, whose exact selector passed with its intended SDK transportuv run ruff check .: passeduv lock --check: passedcompileall: passedgit diff --check: passed🤖 Opened by Murzik