The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(update): a supervised start says when it leaves the update tail owed
kshitijk4poora91a24ccdf42
diff --git a/hermes_cli/venv_sync.py b/hermes_cli/venv_sync.pyindex ea57eb38e7a..85b234ad0cd 100644--- a/hermes_cli/venv_sync.py+++ b/hermes_cli/venv_sync.py@@ -286,7 +286,11 @@ def prepare_launch(project_root: Path, argv: list[str]) -> Path | None:current = pm.venv_is_current(project_root=root)pending = completion_pending_path(root)- if not current or (pending.is_file() and not _supervised_child()):+ if current and pending.is_file() and _supervised_child():+ # Left owed, not dropped: say so where an operator of the unit will read it.+ print("hermes: a source update is unfinished; run `hermes update` from a shell to finish it",+ file=sys.stderr, flush=True)+ elif not current or pending.is_file():lock = UpdateLock()if not lock.acquire():raise RuntimeError("an update is still running; wait for it to exit, then relaunch Hermes")diff --git a/tests/hermes_cli/test_update_launch_completion.py b/tests/hermes_cli/test_update_launch_completion.pyindex 868fbb9f489..249f68b5029 100644--- a/tests/hermes_cli/test_update_launch_completion.py+++ b/tests/hermes_cli/test_update_launch_completion.py@@ -364,6 +364,7 @@ def test_supervised_launch_leaves_a_pending_tail_to_the_cli(if owed_by_cli:assert completion_tail == []assert pending.is_file(), "a supervised child discharged an obligation the CLI still owes"+ assert "run `hermes update`" in capsys.readouterr().errelse:assert len(completion_tail) == 1assert not pending.is_file()