Skip to content

The agent that grows with you

refactor(update): drop dead _gateway_restart_recovery_profiles; write sibling-snapshot cache via module attribute

Tekniume2d7a6f8b860
diff --git a/hermes_cli/update_cmd.py b/hermes_cli/update_cmd.py
index ed58c638b07..016c99de745 100644
--- a/hermes_cli/update_cmd.py
+++ b/hermes_cli/update_cmd.py
@@ -4640,8 +4640,9 @@ def _run_pre_update_backup(args) -> Optional[str]:
f"{k}={v}" for k, v in sorted(_sibling_snaps.items())
),
)
- global _LAST_SIBLING_SNAPSHOTS
- _LAST_SIBLING_SNAPSHOTS = _sibling_snaps
+ import hermes_cli.update_cmd as _u
+
+ _u._LAST_SIBLING_SNAPSHOTS = _sibling_snaps
except Exception as _sib_exc:
logging.getLogger(__name__).debug(
"Sibling profile snapshots failed: %s", _sib_exc
@@ -6729,14 +6730,6 @@ def _gateway_recovery_partition(
return candidates, skipped
-def _gateway_restart_recovery_profiles(
- plan, *, skip_profiles: set[str] | None = None
-) -> list[str]:
- """Supervised gateway profiles a fresh process may restart (kept: re-exported by ``hermes_cli.main``)."""
- candidates, _ = _gateway_recovery_partition(plan, skip_profiles=skip_profiles)
- return sorted(candidates)
-
-
def _warn_gateway_restart_phase_aborted(exc: BaseException, pids) -> None:
"""Print a recovery warning when the whole restart phase raised.