From 6c5107592900aac96ed76bb13bbcc7358d50124e Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Fri, 2 Oct 2026 01:11:43 +0530 Subject: [PATCH] test(security): pass repo_root to _worktree_is_dirty after the include-symlink change #130595 made repo_root a required argument; the filter-injection test still called the one-argument form. --- tests/security/test_gitspawn_config_injection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/security/test_gitspawn_config_injection.py b/tests/security/test_gitspawn_config_injection.py index d8f0db5feb..3a4687240a 100644 --- a/tests/security/test_gitspawn_config_injection.py +++ b/tests/security/test_gitspawn_config_injection.py @@ -208,7 +208,7 @@ def test_index_reading_probes_and_kanban_gc_git_are_safe(malicious_repo, tmp_pat kw._ensure_git_worktree(repo, tmp_path / "wt2", "safe2") assert (tmp_path / "wt2" / "README").exists() assert worktree_gc._git(["status", "--porcelain"], cwd=str(repo)).returncode == 0 - dirty = worktree_ops._worktree_is_dirty(str(tmp_path / "wt2")) + dirty = worktree_ops._worktree_is_dirty(str(tmp_path / "wt2"), str(repo)) assert _fired(marker) == [] assert dirty is False # the probe ran: a skipped one reads as dirty @@ -316,7 +316,7 @@ def test_repo_named_filters_never_run_from_kanban_gc_or_hints(tmp_path, attrs, c for tree in (Path(sub["path"]), tmp_path / "wt"): os.utime(tree / "README", (time.time() + 120, time.time() + 120)) assert "inspection_failed" not in finalize_subagent_worktree(sub, prune=False) - assert worktree_ops._worktree_is_dirty(str(tmp_path / "wt")) is False + assert worktree_ops._worktree_is_dirty(str(tmp_path / "wt"), str(repo)) is False assert worktree_ops._worktree_add(str(repo), tmp_path / "wt-w", "hermes/filters", "HEAD", "HEAD") assert sorted(p.name for p in tmp_path.glob("FILTER.*")) == []