fix(admin): rebuild deps for system-python (rebase of #323 + integration tests) - #392
Merged
Conversation
…scape hatch The admin_update endpoint only ran `pip install` if `.venv/bin/pip` existed, which silently skipped dependency rebuilds on system-python deployments (Homebrew/Debian). Result: pyproject pin bumps merged to main but the live daemon kept running stale package versions. Fix: - Fall back to `sys.executable -m pip install --break-system-packages` when no in-tree venv is present (PEP 668 externally-managed envs). - Trigger rebuild when pyproject.toml or uv.lock changed in the pulled diff, OR when the new `force_deps=true` query param is set. - Surface `deps_error` in the response so silent failures stop being silent. - Wire `force_deps` through the `update_and_restart` MCP tool. Tests: added 3 cases covering force_deps URL wiring, branch+force_deps combo, and deps_error surfacing. All 172 pinky_self tool tests pass. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Adds 4 tests in TestAdminUpdateForceDepsIntegration verifying: - force_deps=True triggers pip install on a clean (no-op) pull - force=True + force_deps=True combine correctly (reset + reinstall) - default behavior skips pip when pyproject.toml is unchanged - pip install failures surface as deps_error in the response Mirrors the matching MCP-tool-level coverage in test_pinky_self_tools.py. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
3 tasks
olegbrok
added a commit
that referenced
this pull request
May 6, 2026
release: admin force_deps escape hatch (cherry-pick of #392)
This was referenced May 8, 2026
Closed
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.
Summary
Rebases #323 (sat OPEN since 2026-04-25, conflicting after main's api.py refactor stack #362-#372) onto current beta and adds integration tests covering the interaction with the recently-landed `force=true` flag from #390.
This supersedes #323 — same intent, conflict-resolved against beta + extra coverage.
What's in the box
From #323 (Brad's original, now `c51b578` after conflict resolution):
New integration tests (`65004ce`):
Why this matters
`force` (PR #390) and `force_deps` (this PR) are orthogonal escape hatches:
Both useful. Combined: `update_and_restart(force=True, force_deps=True)` is the nuclear-recovery option for any deploy that's stuck.
Test plan
Suggested follow-up
Close #323 as superseded once this lands.
🤖 Opened by Barsik