old_updater_deps.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. """Retired dependency hooks requested by already-running historical updaters."""
  2. from typing import NoReturn
  3. from hermes_cli._old_updater import stop_for_relaunch
  4. def _capture_active_lazy_features() -> NoReturn:
  5. # PM owns the feature ledger; an old updater must not start a second install path.
  6. stop_for_relaunch()
  7. def _refresh_active_lazy_features(*args, **kwargs) -> NoReturn:
  8. # Historical signatures varied; none may mutate the new environment.
  9. stop_for_relaunch()
  10. def _refresh_active_memory_provider_dependencies() -> NoReturn:
  11. # Plugin dependencies participate in PM's union, not a last-writer reinstall.
  12. stop_for_relaunch()
  13. def _npm_lockfile_changed(hermes_root) -> NoReturn:
  14. # Do not authorize an old npm install through a fabricated currency result.
  15. stop_for_relaunch()
  16. def _update_node_dependencies() -> NoReturn:
  17. # Source builds use the shared Node dependency provider.
  18. stop_for_relaunch()
  19. def _rebuild_desktop_after_update(desktop_dir, *, had_desktop_app_before_update) -> NoReturn:
  20. # Old callers must not report completion after skipping the build.
  21. stop_for_relaunch()
  22. def _path_uid(path) -> NoReturn:
  23. # PM never mutates the old venv; do not re-enable its ownership preflight.
  24. stop_for_relaunch()
  25. # Historical main's lazy exports can request these after swapping the checkout.
  26. # No holder classification or tree kill is needed to prepare a new PM generation.
  27. def _leftover_pausable_gateway_pids(matches: list[tuple[int, str, str]]) -> NoReturn:
  28. stop_for_relaunch()
  29. def _ledger_manual_serve_holders(matches: list[tuple[int, str, str]]) -> NoReturn:
  30. stop_for_relaunch()
  31. def _relaunch_stopped_serves(token: dict) -> None:
  32. from hermes_cli._old_updater import relaunch_stopped_serves
  33. relaunch_stopped_serves(token)
  34. def _orphaned_desktop_backend_pids(matches: list[tuple[int, str, str]]) -> NoReturn:
  35. stop_for_relaunch()
  36. def _ledger_reapable_backend_pids(matches: list[tuple[int, str, str]]) -> NoReturn:
  37. stop_for_relaunch()
  38. def _handoff_reapable_backend_pids(matches: list[tuple[int, str, str]]) -> NoReturn:
  39. stop_for_relaunch()
  40. def _stop_process_trees(pids: list[int] | list[tuple[int, int]]) -> NoReturn:
  41. stop_for_relaunch()