From d48e1ea76b95c6db799ba053366ce768f1af71cc Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 5 Oct 2026 18:05:21 -0700 Subject: [PATCH] test(update): the utf8-children test stubs the treeless-checkout conversion main's convert_treeless_checkout_first (1c97b57a936) runs in update_completion._prepare before the completion children, and its git probe went through the Popen this test replaces to capture the children's argv, so it was counted as a third spawn. --- tests/hermes_cli/test_update_post_commit_followups.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/hermes_cli/test_update_post_commit_followups.py b/tests/hermes_cli/test_update_post_commit_followups.py index b985bc0c3d..43c7d31643 100644 --- a/tests/hermes_cli/test_update_post_commit_followups.py +++ b/tests/hermes_cli/test_update_post_commit_followups.py @@ -293,7 +293,7 @@ def test_both_completion_children_run_in_utf8_mode(tmp_path, monkeypatch): into a pipe: each argv carries -X utf8 (win-utf8 review; the bootstrap child got it first).""" import pm from pm import client, environments, receipt - from hermes_cli import update_completion, venv_sync + from hermes_cli import gitlock, update_completion, venv_sync calls = [] @@ -303,9 +303,10 @@ def test_both_completion_children_run_in_utf8_mode(tmp_path, monkeypatch): monkeypatch.setattr(subprocess, "call", lambda command, **kw: calls.append(command) or 0) monkeypatch.setattr(subprocess, "Popen", popen) + # The treeless-checkout conversion's git probe would be captured as a third spawn. for module, name in ((venv_sync, "refuse_foreign_owned_venv"), (venv_sync, "arm_completion"), (venv_sync, "collect_superseded_generations"), (client, "ensure_tools_for_sync"), - (pm, "sync_venv")): + (pm, "sync_venv"), (gitlock, "convert_treeless_checkout_first")): monkeypatch.setattr(module, name, lambda *a, **k: None) monkeypatch.setattr(receipt, "last_for_update", lambda *a, **k: None) monkeypatch.setattr(environments, "project_python", lambda root: "python")