fix: restore side-effect imports in test files (test_kanban_tools, test_command_guards)

The previous ruff prune commit removed two categories of test-file
imports whose value is the side effect of importing them, not their
binding:

  tests/tools/test_kanban_tools.py — 5 sites
    `import tools.kanban_tools  # ensure registered`
    The import itself runs tools/kanban_tools.py's @registry.register
    calls; without it, the kanban tool registry is empty and
    test_kanban_tools_visible_with_env_var asserts {} != {7 kanban tools}.

  tests/tools/test_command_guards.py — 1 site
    `import tools.tirith_security  # Ensure the module is importable so we can patch it`
    The comment names the requirement: keep the bare module reference
    so subsequent mock.patch("tools.tirith_security.<fn>") calls find
    a registered submodule.

CI failure: test (5) shard, tests/tools/test_kanban_tools.py:58
  AssertionError: expected {kanban_*}, got set()
This commit is contained in:
Teknium 2026-05-28 21:35:19 -07:00
parent e371bf5d68
commit 00b8204cf4
2 changed files with 9 additions and 0 deletions

View file

@ -10,9 +10,12 @@ from tools.approval import (
approve_session,
check_all_command_guards,
is_approved,
set_current_session_key,
reset_current_session_key,
)
# Ensure the module is importable so we can patch it
import tools.tirith_security
# ---------------------------------------------------------------------------