fix(update): preserve activated extras and hermes-tools deps across managed runtime rebuilds (#72924) - #86728
Merged
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on ffdf652 — chore: map hbasheer@student.42abudhabi.ae -> hxwvaa for cont
|
This was referenced Aug 15, 2026
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.
Closes #72924
Problem
The SQLite-repair managed-runtime rebuild (
uv sync --extra all --lockedinhermes_cli/managed_uv.py) replaces site-packages wholesale, andhermes updateonly re-detected "active lazy features" after the rebuild — by which point the anchor packages that prove a feature was active are already gone. Result: lazy-installed platform backends (Telegram, Matrix), voice deps, andhermes tools-installed packages (langfuse, ddgs, piper, faster-whisper, kittentts) silently vanished on update. Reproduced by users on macOS, Linux, and Windows across v0.18–v0.20.Fix (salvaged from #73310, authorship preserved)
This is a cherry-pick salvage of @hxwvaa's #73310 (3 commits, authorship preserved), rebased onto current main across the #86687 update_cmd.py/main.py restructuring.
_cmd_update_implcaptures_capture_active_lazy_features()+_capture_active_tool_dependencies()at the very top, while the old environment can still prove which optional backends were activated._refresh_active_lazy_features(..., features=snapshot)threads the pre-rebuild snapshot through; when a snapshot is supplied it useslazy_deps.restore_features()instead of re-probing the (already wiped) environment. Wired into the git-pull repair path, the tail of_cmd_update_impl, and_update_via_zip._RESTORABLE_PYTHON_TOOL_DEPENDENCIESintools_config.py+_restore_active_tool_dependencies()inupdate_cmd.pyrestoreshermes tools-installed Python packages (langfuse, ddgs, piper, faster-whisper, kittentts) into the rebuilt venv, probing the target interpreter first so already-present packages are skipped.ensure(feature, prompt=False)path, sosecurity.allow_lazy_installs: falseyields askipped:result and never invokes pip — an explicit opt-out leaves the feature absent, reported as skipped (review blocker Terminal tool #1, addressed).hermes tools, instead of silent trace loss.Scope note (honest)
The issue's "[dev] extras" framing maps onto Hermes' lazy-feature +
hermes toolsdependency system — that is what a managed rebuild can and does drop, and that is what this restores. Arbitrary user-pip-installed packages outside the lazy-feature/allowlist system are untouched (a rebuild from the lockfile cannot know about them).Verification
test_lazy_refresh_venv_repair.py,test_lazy_deps.py,test_langfuse_plugin.py,test_cmd_update.py,test_update_interrupted_recovery.py(190 passed, 1 skipped).test_cmd_update_captures_and_propagates_pre_rebuild_snapshotexercises snapshot capture/propagation through_cmd_update_impl(review blocker Support passing morph snapshot id #2, addressed).update_cmd.py/tools_config.py/lazy_deps.pyto main makes the new tests fail (collection error — helpers absent); restoring the fix returns green.Infographic