The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: make tests/ mirror the source tree; drop issue numbers from filenames
teknium1d10bb2ab6fb9
diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.ymlindex 2477c839f45..58374492c0d 100644--- a/.github/workflows/tests-os.yml+++ b/.github/workflows/tests-os.yml@@ -31,7 +31,7 @@ on:desktop_updater:description: >-Run the Windows desktop-update hand-off integration tests- (tests/test_desktop_update_windows_*.py). These spawn the real+ (tests/scripts/desktop_update/test_desktop_update_windows_*.py). These spawn the realscripts/desktop-update/windows.ps1 and poll its loopback server, sothey carry process-timing noise a shared runner amplifies; thecaller gates them on the classifier's desktop_updater lane so a PR@@ -156,7 +156,7 @@ jobs:# an unbound-variable error, hence the ``${arr[@]+...}`` idiom.)EXTRA_ARGS=()if [ "${{ inputs.desktop_updater }}" != "true" ]; then- echo "desktop_updater lane off: skipping tests/test_desktop_update_windows_*.py"+ echo "desktop_updater lane off: skipping tests/scripts/desktop_update/test_desktop_update_windows_*.py"EXTRA_ARGS+=(--ignore-glob='*test_desktop_update_windows_*.py')fidiff --git a/AGENTS.md b/AGENTS.mdindex fca7cee1d94..b8db958cd9e 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -330,7 +330,12 @@ scripts/run_tests.sh -v --tb=long # pytest flags pass thro`HERMES_TEST_FILE_RETRIES=0` disables). Pass-on-retry is green but printed under `⚠ FLAKY`with both outputs — a bug to fix, not noise. Timing tests must not assume a quiet runner:wall-clock bounds ≥ 2s, event-based sync, no `assert not _wait_until(...)` races.-- **Placement:** `scripts/ci/classify_changes.py` picks jobs by changed files. A Python test+- **Placement mirrors the source tree.** A test lives in `tests/<top-level source dir>/` (`tests/hermes_cli/`,+ `tests/agent/`, `tests/hermes_state/`, `tests/gateway/relay/`, ...); installer/updater script tests+ under `tests/scripts/{install,desktop_update}/`. Only tests of root-level modules (`batch_runner`,+ `utils`, `hermes_constants`, packaging) sit directly in `tests/`. No issue numbers in filenames —+ cite the issue in the module docstring (`test_89315_x.py` → `test_x.py`, "Regression for #89315").+- **Placement (CI lanes):** `scripts/ci/classify_changes.py` picks jobs by changed files. A Python testasserting about `package.json`, `package-lock.json`, `tsconfig.json`, or `.ts/.tsx/.js/.mjs/.cjs` sources will not run on a JS-only PR (green on PR, red on `main` where theclassifier fails open). Such tests belong in the vitest suite, not `tests/*.py`.diff --git a/agent/activity_tracking.py b/agent/activity_tracking.pyindex 0f2a3852088..f456f9f448c 100644--- a/agent/activity_tracking.py+++ b/agent/activity_tracking.py@@ -49,7 +49,7 @@ class ActivityTrackingMixin:kanban heartbeat when this is a dispatcher-spawned worker, and to the durable SessionDB activityprojection. ``provenance`` names special writers (compression); ``force_persist`` bypasses theSessionDB rate limit. Module-level lock helper, not ``self._liveness_activity_lock()``: doubles bind- only ``_touch_activity`` (tests/run_agent/test_session_activity_persist.py).+ only ``_touch_activity`` (tests/agent/test_session_activity_persist.py).Bridge is rate-limited (60s) and best-effort — it never raises into the agent loop. See #31752.See #72016, #72039.diff --git a/agent/agent_runtime_helpers.py b/agent/agent_runtime_helpers.pyindex 658f156bac4..4c49896d5c9 100644--- a/agent/agent_runtime_helpers.py+++ b/agent/agent_runtime_helpers.py@@ -1735,7 +1735,7 @@ def create_openai_client(agent, client_kwargs: dict, *, reason: str, shared: booreturn client# TCP keepalives so dead provider connections are detected (~60s) instead of hanging in# CLOSE-WAIT. Injected into the local copy only, so each client gets its own httpx.Client;- # pinned by tests/run_agent/test_create_openai_client_reuse.py and+ # pinned by tests/agent/test_create_openai_client_reuse.py and# test_sequential_chats_live.py. What IS shared across those per-client wrappers is the# connection pool: ``build_keepalive_http_client`` mounts a process-shared ``HTTPTransport``# behind a per-client view whose ``close()`` is a no-op for the pool, so a closed wrapper@@ -2320,7 +2320,7 @@ def repair_tool_call(agent, tool_name: str) -> str | None:# character so the rest of the repair pipeline (lowercase / snake_case / fuzzy match) can resolve the# cleaned name to a real tool. Crucially we DO NOT split on whitespace: legitimate inputs like "write# file" must keep flowing through ``_norm`` -> ``write_file`` (covered by test_space_to_underscore in- # tests/run_agent/test_repair_tool_call_name.py). See #33007.+ # tests/agent/test_repair_tool_call_name.py). See #33007.for _xml_sep in ('"', "'", "<", ">"):_idx = tool_name.find(_xml_sep)if _idx > 0:diff --git a/cli.py b/cli.pyindex dc45f5b837a..e4680ce9e03 100644--- a/cli.py+++ b/cli.py@@ -2147,7 +2147,7 @@ def _terminal_may_leak_cpr() -> bool:Delayed CPR replies (``ESC[<row>;<col>R`` / visible ``^[[<row>;<col>R``) leak into the status line andcan freeze input when the reply is slow (#13870 on SSH/slow PTYs). The same race hits local POSIX TTYs- under heavy subagent / status-line load — see ``tests/cli/test_cpr_local_leak.py``.+ under heavy subagent / status-line load — see ``tests/hermes_cli/test_cpr_local_leak.py``."""return os.environ.get("PROMPT_TOOLKIT_NO_CPR", "") == "1" or sys.platform != "win32"diff --git a/hermes_cli/cli_info_mixin.py b/hermes_cli/cli_info_mixin.pyindex 0d7fbbd6ca5..7ff260fdfe4 100644--- a/hermes_cli/cli_info_mixin.py+++ b/hermes_cli/cli_info_mixin.py@@ -459,7 +459,7 @@ class CLIInfoMixin:Dispatched from the input loop BEFORE slash routing and before anything is queued for theagent, so a bang command never becomes a turn: nothing touches ``conversation_history``,zero tokens, role alternation / prompt caching untouched by construction- (tests/cli/test_bang_shell_mode.py). Returns False when the text is not a bang command or+ (tests/hermes_cli/test_bang_shell_mode.py). Returns False when the text is not a bang command orbang mode is disabled for this context (gateway/cron), so the caller routes normally."""from cli import _rich_text_from_ansidiff --git a/hermes_cli/default_soul.py b/hermes_cli/default_soul.pyindex 3c99d404ddc..3a194050217 100644--- a/hermes_cli/default_soul.py+++ b/hermes_cli/default_soul.py@@ -49,7 +49,7 @@ _LEGACY_TEMPLATE_SOULS = ("investigations."),# ASCII-dashed variant seeded by scripts/install.ps1 (must stay pure ASCII, see- # tests/test_install_ps1_ascii_only.py); upgrading converges Windows installs on the em-dash text.+ # tests/scripts/install/test_install_ps1_ascii_only.py); upgrading converges Windows installs on the em-dash text.DEFAULT_SOUL_MD.replace("\u2014", "--"),)diff --git a/hermes_state_portability.py b/hermes_state_portability.pyindex 2a960ec0387..7132f0b22aa 100644--- a/hermes_state_portability.py+++ b/hermes_state_portability.py@@ -534,7 +534,7 @@ class SessionPortabilityMixin:/ ``last_activity_description`` / ``last_activity_provenance``) because they are part of the durablerow, but import deliberately RESETS them to NULL. This asymmetry is intentional and covered byregression- (tests/gateway/test_watchdog_review_76354.py::test_s4_export_includes_activity_import_resets_it).+ (tests/gateway/test_watchdog_review.py::test_s4_export_includes_activity_import_resets_it)."""if not isinstance(sessions, list):raise ValueError("sessions must be a list")diff --git a/scripts/ci/classify_changes.py b/scripts/ci/classify_changes.pyindex 558ccc12d55..6bf01febeef 100644--- a/scripts/ci/classify_changes.py+++ b/scripts/ci/classify_changes.py@@ -131,7 +131,7 @@ _INSTALLER_FILES = {"scripts/install.ps1", "scripts/install.cmd"}# Windows desktop-update hand-off (scripts/desktop-update/windows.ps1 + the# Electron side that launches it) and the pytest files that spawn it._DESKTOP_UPDATER_PATHS = ("scripts/desktop-update/",)-_DESKTOP_UPDATER_TEST_PREFIX = "tests/test_desktop_update_"+_DESKTOP_UPDATER_TEST_PREFIX = "tests/scripts/desktop_update/"_DESKTOP_UPDATER_FILES = {"apps/desktop/electron/updater-process.ts","apps/desktop/electron/managed-ssh-update.ts",diff --git a/scripts/desktop-update/posix.sh b/scripts/desktop-update/posix.shindex 063d41bbab5..7f73d69bebc 100755--- a/scripts/desktop-update/posix.sh+++ b/scripts/desktop-update/posix.sh@@ -629,7 +629,7 @@ tcc_pick_update_invoke() { # sets UPDATE_INVOKE; safety net past a failed heal# ── self-tests: no update, touch nothing ────────────────────────────────────if [ "$SELF_TEST_TCC_HEAL" -eq 1 ]; then# Runs the REAL heal + invoke selection against --install-root and reports;- # tests/test_desktop_update_tcc_heal.py drives the state matrix through it.+ # tests/scripts/desktop_update/test_desktop_update_tcc_heal.py drives the state matrix through it.trap - EXITtcc_anchor_heal "$INSTALL_ROOT/venv/bin" || truetcc_pick_update_invoke "$INSTALL_ROOT/venv/bin"diff --git a/scripts/run_tests.sh b/scripts/run_tests.shindex 4445d6d5428..77eedc6d1cc 100755--- a/scripts/run_tests.sh+++ b/scripts/run_tests.sh@@ -17,7 +17,7 @@# scripts/run_tests.sh # full suite# scripts/run_tests.sh -j 4 # cap parallelism# scripts/run_tests.sh tests/agent/ # discover only here-# scripts/run_tests.sh tests/agent/ tests/acp/ # multiple roots+# scripts/run_tests.sh tests/agent/ tests/acp_adapter/ # multiple roots# scripts/run_tests.sh tests/foo.py # single file# scripts/run_tests.sh tests/foo.py -q # path + bare pytest flag# scripts/run_tests.sh tests/foo.py -v --tb=long # bare flags "just work"diff --git a/scripts/run_tests_parallel.py b/scripts/run_tests_parallel.pyindex eb923cc9b43..5e20caf3cb7 100755--- a/scripts/run_tests_parallel.py+++ b/scripts/run_tests_parallel.py@@ -508,8 +508,8 @@ def _parse_pytest_summary(output: str) -> dict[str, int]:def _format_file(file: Path, repo_root: Path) -> str:"""Render a test-file path for display: strip the repo-root prefix- when possible so output reads ``tests/acp/test_auth.py`` instead of- ``/home/runner/work/hermes-agent/hermes-agent/tests/acp/test_auth.py``.+ when possible so output reads ``tests/acp_adapter/test_auth.py`` instead of+ ``/home/runner/work/hermes-agent/hermes-agent/tests/acp_adapter/test_auth.py``.Falls back to the absolute path for anything outside the repo root."""diff --git a/tests/acp/__init__.py b/tests/acp_adapter/__init__.pysimilarity index 100%rename from tests/acp/__init__.pyrename to tests/acp_adapter/__init__.pydiff --git a/tests/acp/conftest.py b/tests/acp_adapter/conftest.pysimilarity index 96%rename from tests/acp/conftest.pyrename to tests/acp_adapter/conftest.pyindex 4d5e1a37e9e..620f9d3b6e6 100644--- a/tests/acp/conftest.py+++ b/tests/acp_adapter/conftest.py@@ -1,4 +1,4 @@-"""Shared fixtures for tests/acp.+"""Shared fixtures for tests/acp_adapter.Keeps the ACP server tests offline: ``HermesACPAgent._build_model_state``calls ``hermes_cli.inventory.build_models_payload``, which (without thisdiff --git a/tests/acp/test_approval_isolation.py b/tests/acp_adapter/test_approval_isolation.pysimilarity index 98%rename from tests/acp/test_approval_isolation.pyrename to tests/acp_adapter/test_approval_isolation.pyindex b45e96789ad..bd3658ca7df 100644--- a/tests/acp/test_approval_isolation.py+++ b/tests/acp_adapter/test_approval_isolation.py@@ -23,7 +23,7 @@ from tools import approval_contextdef _isolate_approval_state(monkeypatch):"""Keep these security regression tests hermetic.- Earlier tests (e.g. tests/acp/test_permissions.py) lazily load the+ Earlier tests (e.g. tests/acp_adapter/test_permissions.py) lazily load thedeveloper's real ``~/.hermes/config.yaml`` command allowlist into``tools.approval._permanent_approved``. If that allowlist contains apattern like "recursive delete", ``rm -rf …`` is auto-approved beforediff --git a/tests/acp/test_auth.py b/tests/acp_adapter/test_auth.pysimilarity index 100%rename from tests/acp/test_auth.pyrename to tests/acp_adapter/test_auth.pydiff --git a/tests/acp/test_edit_approval.py b/tests/acp_adapter/test_edit_approval.pysimilarity index 100%rename from tests/acp/test_edit_approval.pyrename to tests/acp_adapter/test_edit_approval.pydiff --git a/tests/acp/test_empty_session_persistence.py b/tests/acp_adapter/test_empty_session_persistence.pysimilarity index 100%rename from tests/acp/test_empty_session_persistence.pyrename to tests/acp_adapter/test_empty_session_persistence.pydiff --git a/tests/acp/test_entry.py b/tests/acp_adapter/test_entry.pysimilarity index 100%rename from tests/acp/test_entry.pyrename to tests/acp_adapter/test_entry.pydiff --git a/tests/acp/test_events.py b/tests/acp_adapter/test_events.pysimilarity index 100%rename from tests/acp/test_events.pyrename to tests/acp_adapter/test_events.pydiff --git a/tests/acp/test_mcp_e2e.py b/tests/acp_adapter/test_mcp_e2e.pysimilarity index 100%rename from tests/acp/test_mcp_e2e.pyrename to tests/acp_adapter/test_mcp_e2e.pydiff --git a/tests/acp/test_named_provider_catalogs.py b/tests/acp_adapter/test_named_provider_catalogs.pysimilarity index 100%rename from tests/acp/test_named_provider_catalogs.pyrename to tests/acp_adapter/test_named_provider_catalogs.pydiff --git a/tests/acp/test_permissions.py b/tests/acp_adapter/test_permissions.pysimilarity index 100%rename from tests/acp/test_permissions.pyrename to tests/acp_adapter/test_permissions.pydiff --git a/tests/acp/test_ping_suppression.py b/tests/acp_adapter/test_ping_suppression.pysimilarity index 100%rename from tests/acp/test_ping_suppression.pyrename to tests/acp_adapter/test_ping_suppression.pydiff --git a/tests/acp/test_server.py b/tests/acp_adapter/test_server.pysimilarity index 100%rename from tests/acp/test_server.pyrename to tests/acp_adapter/test_server.pydiff --git a/tests/acp/test_session.py b/tests/acp_adapter/test_session.pysimilarity index 100%rename from tests/acp/test_session.pyrename to tests/acp_adapter/test_session.pydiff --git a/tests/acp/test_session_db_private_access.py b/tests/acp_adapter/test_session_db_private_access.pysimilarity index 100%rename from tests/acp/test_session_db_private_access.pyrename to tests/acp_adapter/test_session_db_private_access.pydiff --git a/tests/acp/test_session_provenance.py b/tests/acp_adapter/test_session_provenance.pysimilarity index 100%rename from tests/acp/test_session_provenance.pyrename to tests/acp_adapter/test_session_provenance.pydiff --git a/tests/acp/test_tools.py b/tests/acp_adapter/test_tools.pysimilarity index 100%rename from tests/acp/test_tools.pyrename to tests/acp_adapter/test_tools.pydiff --git a/tests/run_agent/conftest.py b/tests/agent/conftest.pysimilarity index 96%rename from tests/run_agent/conftest.pyrename to tests/agent/conftest.pyindex f786b8467f5..5dde64145c1 100644--- a/tests/run_agent/conftest.py+++ b/tests/agent/conftest.py@@ -1,4 +1,4 @@-"""Fast-path fixtures shared across tests/run_agent/.+"""Fast-path fixtures shared across tests/agent/.Many tests in this directory exercise the retry/backoff paths in theagent loop. Production code uses ``jittered_backoff(base_delay=5.0)``diff --git a/tests/run_agent/repro_48013_image_shrink_brick.py b/tests/agent/repro_image_shrink_brick.pysimilarity index 98%rename from tests/run_agent/repro_48013_image_shrink_brick.pyrename to tests/agent/repro_image_shrink_brick.pyindex ee099f48dcf..5c2e17ca195 100644--- a/tests/run_agent/repro_48013_image_shrink_brick.py+++ b/tests/agent/repro_image_shrink_brick.py@@ -16,11 +16,11 @@ brought under the cap and that the helper reports success.Run directly to see a human-readable report:- python tests/run_agent/repro_48013_image_shrink_brick.py+ python tests/agent/repro_image_shrink_brick.pyOr as a pytest smoke test (skipped automatically when Pillow is absent):- scripts/run_tests.sh tests/run_agent/repro_48013_image_shrink_brick.py+ scripts/run_tests.sh tests/agent/repro_image_shrink_brick.py"""from __future__ import annotationsdiff --git a/tests/run_agent/test_31273_402_not_retried.py b/tests/agent/test_402_not_retried.pysimilarity index 100%rename from tests/run_agent/test_31273_402_not_retried.pyrename to tests/agent/test_402_not_retried.pydiff --git a/tests/run_agent/test_413_compression.py b/tests/agent/test_413_compression.pysimilarity index 100%rename from tests/run_agent/test_413_compression.pyrename to tests/agent/test_413_compression.pydiff --git a/tests/run_agent/test_860_dedup.py b/tests/agent/test_860_dedup.pysimilarity index 100%rename from tests/run_agent/test_860_dedup.pyrename to tests/agent/test_860_dedup.pydiff --git a/tests/test_account_usage.py b/tests/agent/test_account_usage_fetch.pysimilarity index 100%rename from tests/test_account_usage.pyrename to tests/agent/test_account_usage_fetch.pydiff --git a/tests/run_agent/test_agent_guardrails.py b/tests/agent/test_agent_guardrails.pysimilarity index 100%rename from tests/run_agent/test_agent_guardrails.pyrename to tests/agent/test_agent_guardrails.pydiff --git a/tests/run_agent/test_anthropic_mid_tool_call_drop.py b/tests/agent/test_anthropic_mid_tool_call_drop.pysimilarity index 100%rename from tests/run_agent/test_anthropic_mid_tool_call_drop.pyrename to tests/agent/test_anthropic_mid_tool_call_drop.pydiff --git a/tests/run_agent/test_anthropic_prompt_cache_policy.py b/tests/agent/test_anthropic_prompt_cache_policy.pysimilarity index 100%rename from tests/run_agent/test_anthropic_prompt_cache_policy.pyrename to tests/agent/test_anthropic_prompt_cache_policy.pydiff --git a/tests/run_agent/test_anthropic_response_header_capture.py b/tests/agent/test_anthropic_response_header_capture.pysimilarity index 100%rename from tests/run_agent/test_anthropic_response_header_capture.pyrename to tests/agent/test_anthropic_response_header_capture.pydiff --git a/tests/run_agent/test_28161_anthropic_stream_pool_cleanup.py b/tests/agent/test_anthropic_stream_pool_cleanup.pysimilarity index 100%rename from tests/run_agent/test_28161_anthropic_stream_pool_cleanup.pyrename to tests/agent/test_anthropic_stream_pool_cleanup.pydiff --git a/tests/run_agent/test_anthropic_third_party_oauth_guard.py b/tests/agent/test_anthropic_third_party_oauth_guard.pysimilarity index 100%rename from tests/run_agent/test_anthropic_third_party_oauth_guard.pyrename to tests/agent/test_anthropic_third_party_oauth_guard.pydiff --git a/tests/run_agent/test_anthropic_truncation_continuation.py b/tests/agent/test_anthropic_truncation_continuation.pysimilarity index 100%rename from tests/run_agent/test_anthropic_truncation_continuation.pyrename to tests/agent/test_anthropic_truncation_continuation.pydiff --git a/tests/run_agent/test_api_max_retries_config.py b/tests/agent/test_api_max_retries_config.pysimilarity index 100%rename from tests/run_agent/test_api_max_retries_config.pyrename to tests/agent/test_api_max_retries_config.pydiff --git a/tests/run_agent/test_async_httpx_del_neuter.py b/tests/agent/test_async_httpx_del_neuter.pysimilarity index 100%rename from tests/run_agent/test_async_httpx_del_neuter.pyrename to tests/agent/test_async_httpx_del_neuter.pydiff --git a/tests/run_agent/test_auth_provider_failover.py b/tests/agent/test_auth_provider_failover.pysimilarity index 100%rename from tests/run_agent/test_auth_provider_failover.pyrename to tests/agent/test_auth_provider_failover.pydiff --git a/tests/run_agent/test_authorization_gate.py b/tests/agent/test_authorization_gate.pysimilarity index 100%rename from tests/run_agent/test_authorization_gate.pyrename to tests/agent/test_authorization_gate.pydiff --git a/tests/agent/test_auxiliary_client_base_url_host_validation_52608.py b/tests/agent/test_auxiliary_client_base_url_host_validation.pysimilarity index 100%rename from tests/agent/test_auxiliary_client_base_url_host_validation_52608.pyrename to tests/agent/test_auxiliary_client_base_url_host_validation.pydiff --git a/tests/agent/test_auxiliary_user_default_headers.py b/tests/agent/test_auxiliary_user_default_headers.pyindex 2e9fafdb16c..aff5b2ecc44 100644--- a/tests/agent/test_auxiliary_user_default_headers.py+++ b/tests/agent/test_auxiliary_user_default_headers.py@@ -1,6 +1,6 @@"""Tests for user-configured ``model.default_headers`` in the auxiliary client.-Companion to ``tests/run_agent/test_provider_attribution_headers.py`` (which+Companion to ``tests/agent/test_provider_attribution_headers.py`` (whichcovers the main agent client). The main agent turn and the auxiliary client(title generation, context compression, vision routing) build separate OpenAIclients, so a ``custom`` endpoint behind a gateway/WAF that rejects the OpenAIdiff --git a/tests/run_agent/test_background_review.py b/tests/agent/test_background_review.pysimilarity index 100%rename from tests/run_agent/test_background_review.pyrename to tests/agent/test_background_review.pydiff --git a/tests/run_agent/test_background_review_cache_parity.py b/tests/agent/test_background_review_cache_parity.pysimilarity index 100%rename from tests/run_agent/test_background_review_cache_parity.pyrename to tests/agent/test_background_review_cache_parity.pydiff --git a/tests/run_agent/test_background_review_cost_controls.py b/tests/agent/test_background_review_cost_controls.pysimilarity index 100%rename from tests/run_agent/test_background_review_cost_controls.pyrename to tests/agent/test_background_review_cost_controls.pydiff --git a/tests/run_agent/test_background_review_input_budget.py b/tests/agent/test_background_review_input_budget.pysimilarity index 100%rename from tests/run_agent/test_background_review_input_budget.pyrename to tests/agent/test_background_review_input_budget.pydiff --git a/tests/test_background_review_list_shapes.py b/tests/agent/test_background_review_list_shapes.pysimilarity index 99%rename from tests/test_background_review_list_shapes.pyrename to tests/agent/test_background_review_list_shapes.pyindex cc22d2825a4..1589774b53f 100644--- a/tests/test_background_review_list_shapes.py+++ b/tests/agent/test_background_review_list_shapes.py@@ -43,7 +43,7 @@ import sysimport types-REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))def _isolate_hermes_home():diff --git a/tests/run_agent/test_background_review_summary.py b/tests/agent/test_background_review_summary.pysimilarity index 100%rename from tests/run_agent/test_background_review_summary.pyrename to tests/agent/test_background_review_summary.pydiff --git a/tests/run_agent/test_background_review_toolset_restriction.py b/tests/agent/test_background_review_toolset_restriction.pysimilarity index 100%rename from tests/run_agent/test_background_review_toolset_restriction.pyrename to tests/agent/test_background_review_toolset_restriction.pydiff --git a/tests/test_bitwarden_secrets.py b/tests/agent/test_bitwarden_secrets.pysimilarity index 99%rename from tests/test_bitwarden_secrets.pyrename to tests/agent/test_bitwarden_secrets.pyindex 420605416c9..f304d64740b 100644--- a/tests/test_bitwarden_secrets.py+++ b/tests/agent/test_bitwarden_secrets.py@@ -24,7 +24,7 @@ import pytest# Make the worktree importable without depending on the installed wheel.-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]if str(ROOT) not in sys.path:sys.path.insert(0, str(ROOT))diff --git a/tests/run_agent/test_callable_api_key.py b/tests/agent/test_callable_api_key.pysimilarity index 100%rename from tests/run_agent/test_callable_api_key.pyrename to tests/agent/test_callable_api_key.pydiff --git a/tests/agent/test_cascading_interrupt_6600.py b/tests/agent/test_cascading_interrupt.pysimilarity index 100%rename from tests/agent/test_cascading_interrupt_6600.pyrename to tests/agent/test_cascading_interrupt.pydiff --git a/tests/run_agent/test_codex_app_server_compaction.py b/tests/agent/test_codex_app_server_compaction.pysimilarity index 100%rename from tests/run_agent/test_codex_app_server_compaction.pyrename to tests/agent/test_codex_app_server_compaction.pydiff --git a/tests/run_agent/test_codex_app_server_integration.py b/tests/agent/test_codex_app_server_integration.pysimilarity index 100%rename from tests/run_agent/test_codex_app_server_integration.pyrename to tests/agent/test_codex_app_server_integration.pydiff --git a/tests/run_agent/test_codex_app_server_lifecycle.py b/tests/agent/test_codex_app_server_lifecycle.pysimilarity index 100%rename from tests/run_agent/test_codex_app_server_lifecycle.pyrename to tests/agent/test_codex_app_server_lifecycle.pydiff --git a/tests/run_agent/test_codex_multimodal_tool_result.py b/tests/agent/test_codex_multimodal_tool_result.pysimilarity index 100%rename from tests/run_agent/test_codex_multimodal_tool_result.pyrename to tests/agent/test_codex_multimodal_tool_result.pydiff --git a/tests/run_agent/test_codex_no_tools_nonetype.py b/tests/agent/test_codex_no_tools_nonetype.pysimilarity index 100%rename from tests/run_agent/test_codex_no_tools_nonetype.pyrename to tests/agent/test_codex_no_tools_nonetype.pydiff --git a/tests/run_agent/test_codex_sdk_transform_bypass.py b/tests/agent/test_codex_sdk_transform_bypass.pysimilarity index 100%rename from tests/run_agent/test_codex_sdk_transform_bypass.pyrename to tests/agent/test_codex_sdk_transform_bypass.pydiff --git a/tests/run_agent/test_codex_silent_hang_hint.py b/tests/agent/test_codex_silent_hang_hint.pysimilarity index 100%rename from tests/run_agent/test_codex_silent_hang_hint.pyrename to tests/agent/test_codex_silent_hang_hint.pydiff --git a/tests/run_agent/test_codex_xai_oauth_recovery.py b/tests/agent/test_codex_xai_oauth_recovery.pysimilarity index 100%rename from tests/run_agent/test_codex_xai_oauth_recovery.pyrename to tests/agent/test_codex_xai_oauth_recovery.pydiff --git a/tests/test_command_secret_source.py b/tests/agent/test_command_secret_source.pysimilarity index 99%rename from tests/test_command_secret_source.pyrename to tests/agent/test_command_secret_source.pyindex 2cfd9e5c475..6e05a884f1a 100644--- a/tests/test_command_secret_source.py+++ b/tests/agent/test_command_secret_source.py@@ -27,7 +27,7 @@ from pathlib import Pathimport pytest-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]if str(ROOT) not in sys.path:sys.path.insert(0, str(ROOT))diff --git a/tests/run_agent/test_commit_memory_session_context_engine.py b/tests/agent/test_commit_memory_session_context_engine.pysimilarity index 100%rename from tests/run_agent/test_commit_memory_session_context_engine.pyrename to tests/agent/test_commit_memory_session_context_engine.pydiff --git a/tests/test_compaction_prompt_rebuild.py b/tests/agent/test_compaction_prompt_rebuild.pysimilarity index 100%rename from tests/test_compaction_prompt_rebuild.pyrename to tests/agent/test_compaction_prompt_rebuild.pydiff --git a/tests/run_agent/test_compress_context_fallback_shim.py b/tests/agent/test_compress_context_fallback_shim.pysimilarity index 100%rename from tests/run_agent/test_compress_context_fallback_shim.pyrename to tests/agent/test_compress_context_fallback_shim.pydiff --git a/tests/run_agent/test_compress_focus_plugin_fallback.py b/tests/agent/test_compress_focus_plugin_fallback.pysimilarity index 100%rename from tests/run_agent/test_compress_focus_plugin_fallback.pyrename to tests/agent/test_compress_focus_plugin_fallback.pydiff --git a/tests/run_agent/test_compression_abort_state_reset.py b/tests/agent/test_compression_abort_state_reset.pysimilarity index 100%rename from tests/run_agent/test_compression_abort_state_reset.pyrename to tests/agent/test_compression_abort_state_reset.pydiff --git a/tests/run_agent/test_compression_boundary.py b/tests/agent/test_compression_boundary.pysimilarity index 100%rename from tests/run_agent/test_compression_boundary.pyrename to tests/agent/test_compression_boundary.pydiff --git a/tests/run_agent/test_compression_boundary_hook.py b/tests/agent/test_compression_boundary_hook.pysimilarity index 100%rename from tests/run_agent/test_compression_boundary_hook.pyrename to tests/agent/test_compression_boundary_hook.pydiff --git a/tests/run_agent/test_compression_budget_rearm.py b/tests/agent/test_compression_budget_rearm.pysimilarity index 100%rename from tests/run_agent/test_compression_budget_rearm.pyrename to tests/agent/test_compression_budget_rearm.pydiff --git a/tests/run_agent/test_compression_budget_refund.py b/tests/agent/test_compression_budget_refund.pysimilarity index 100%rename from tests/run_agent/test_compression_budget_refund.pyrename to tests/agent/test_compression_budget_refund.pydiff --git a/tests/run_agent/test_compression_closed_adoption.py b/tests/agent/test_compression_closed_adoption.pysimilarity index 100%rename from tests/run_agent/test_compression_closed_adoption.pyrename to tests/agent/test_compression_closed_adoption.pydiff --git a/tests/agent/test_compression_count_warning_36908.py b/tests/agent/test_compression_count_warning.pysimilarity index 100%rename from tests/agent/test_compression_count_warning_36908.pyrename to tests/agent/test_compression_count_warning.pydiff --git a/tests/run_agent/test_compression_feasibility.py b/tests/agent/test_compression_feasibility.pysimilarity index 100%rename from tests/run_agent/test_compression_feasibility.pyrename to tests/agent/test_compression_feasibility.pydiff --git a/tests/run_agent/test_compression_lock_defer.py b/tests/agent/test_compression_lock_defer.pysimilarity index 99%rename from tests/run_agent/test_compression_lock_defer.pyrename to tests/agent/test_compression_lock_defer.pyindex 1eb5e69553d..4e8459ad695 100644--- a/tests/run_agent/test_compression_lock_defer.py+++ b/tests/agent/test_compression_lock_defer.py@@ -35,7 +35,7 @@ LOCK_HOLDER = "pid=4242:tid=1:agent=deadbeef:nonce=abcd1234"# ----------------------------------------------------------------------------# Helpers (mirrors tests/run_agent/test_413_compression.py)+# Helpers (mirrors tests/agent/test_413_compression.py)# ---------------------------------------------------------------------------diff --git a/tests/run_agent/test_compression_persistence.py b/tests/agent/test_compression_persistence.pysimilarity index 100%rename from tests/run_agent/test_compression_persistence.pyrename to tests/agent/test_compression_persistence.pydiff --git a/tests/agent/test_compression_review_76354.py b/tests/agent/test_compression_review.pysimilarity index 100%rename from tests/agent/test_compression_review_76354.pyrename to tests/agent/test_compression_review.pydiff --git a/tests/agent/test_compression_stall_fallback_78981.py b/tests/agent/test_compression_stall_fallback.pysimilarity index 100%rename from tests/agent/test_compression_stall_fallback_78981.pyrename to tests/agent/test_compression_stall_fallback.pydiff --git a/tests/agent/test_compression_stall_interrupt_96775.py b/tests/agent/test_compression_stall_interrupt.pysimilarity index 100%rename from tests/agent/test_compression_stall_interrupt_96775.pyrename to tests/agent/test_compression_stall_interrupt.pydiff --git a/tests/run_agent/test_compression_timeout_terminal.py b/tests/agent/test_compression_timeout_terminal.pysimilarity index 100%rename from tests/run_agent/test_compression_timeout_terminal.pyrename to tests/agent/test_compression_timeout_terminal.pydiff --git a/tests/run_agent/test_compression_trigger_excludes_reasoning.py b/tests/agent/test_compression_trigger_excludes_reasoning.pysimilarity index 100%rename from tests/run_agent/test_compression_trigger_excludes_reasoning.pyrename to tests/agent/test_compression_trigger_excludes_reasoning.pydiff --git a/tests/agent/test_compression_worker_isolation_76354.py b/tests/agent/test_compression_worker_isolation.pysimilarity index 100%rename from tests/agent/test_compression_worker_isolation_76354.pyrename to tests/agent/test_compression_worker_isolation.pydiff --git a/tests/run_agent/test_compressor_fallback_update.py b/tests/agent/test_compressor_fallback_update.pysimilarity index 100%rename from tests/run_agent/test_compressor_fallback_update.pyrename to tests/agent/test_compressor_fallback_update.pydiff --git a/tests/run_agent/test_concurrent_interrupt.py b/tests/agent/test_concurrent_interrupt.pysimilarity index 100%rename from tests/run_agent/test_concurrent_interrupt.pyrename to tests/agent/test_concurrent_interrupt.pydiff --git a/tests/run_agent/test_18028_content_policy_blocked.py b/tests/agent/test_content_policy_blocked.pysimilarity index 100%rename from tests/run_agent/test_18028_content_policy_blocked.pyrename to tests/agent/test_content_policy_blocked.pydiff --git a/tests/run_agent/test_1630_context_overflow_loop.py b/tests/agent/test_context_overflow_loop.pysimilarity index 100%rename from tests/run_agent/test_1630_context_overflow_loop.pyrename to tests/agent/test_context_overflow_loop.pydiff --git a/tests/run_agent/test_context_token_tracking.py b/tests/agent/test_context_token_tracking.pysimilarity index 100%rename from tests/run_agent/test_context_token_tracking.pyrename to tests/agent/test_context_token_tracking.pydiff --git a/tests/run_agent/test_continuation_ceiling_wedge.py b/tests/agent/test_continuation_ceiling_wedge.pysimilarity index 100%rename from tests/run_agent/test_continuation_ceiling_wedge.pyrename to tests/agent/test_continuation_ceiling_wedge.pydiff --git a/tests/run_agent/test_continuation_repetition_guard.py b/tests/agent/test_continuation_repetition_guard.pysimilarity index 100%rename from tests/run_agent/test_continuation_repetition_guard.pyrename to tests/agent/test_continuation_repetition_guard.pydiff --git a/tests/run_agent/test_conversation_fallback_state.py b/tests/agent/test_conversation_fallback_state.pysimilarity index 100%rename from tests/run_agent/test_conversation_fallback_state.pyrename to tests/agent/test_conversation_fallback_state.pydiff --git a/tests/test_copilot_initiator.py b/tests/agent/test_copilot_initiator.pysimilarity index 100%rename from tests/test_copilot_initiator.pyrename to tests/agent/test_copilot_initiator.pydiff --git a/tests/run_agent/test_copilot_native_vision_headers.py b/tests/agent/test_copilot_native_vision_headers.pysimilarity index 100%rename from tests/run_agent/test_copilot_native_vision_headers.pyrename to tests/agent/test_copilot_native_vision_headers.pydiff --git a/tests/run_agent/test_corruption_recovery_guidance.py b/tests/agent/test_corruption_recovery_guidance.pysimilarity index 100%rename from tests/run_agent/test_corruption_recovery_guidance.pyrename to tests/agent/test_corruption_recovery_guidance.pydiff --git a/tests/run_agent/test_create_openai_client_disables_sdk_retries.py b/tests/agent/test_create_openai_client_disables_sdk_retries.pysimilarity index 100%rename from tests/run_agent/test_create_openai_client_disables_sdk_retries.pyrename to tests/agent/test_create_openai_client_disables_sdk_retries.pydiff --git a/tests/run_agent/test_create_openai_client_kwargs_isolation.py b/tests/agent/test_create_openai_client_kwargs_isolation.pysimilarity index 100%rename from tests/run_agent/test_create_openai_client_kwargs_isolation.pyrename to tests/agent/test_create_openai_client_kwargs_isolation.pydiff --git a/tests/run_agent/test_create_openai_client_proxy_env.py b/tests/agent/test_create_openai_client_proxy_env.pysimilarity index 100%rename from tests/run_agent/test_create_openai_client_proxy_env.pyrename to tests/agent/test_create_openai_client_proxy_env.pydiff --git a/tests/run_agent/test_create_openai_client_reuse.py b/tests/agent/test_create_openai_client_reuse.pysimilarity index 100%rename from tests/run_agent/test_create_openai_client_reuse.pyrename to tests/agent/test_create_openai_client_reuse.pydiff --git a/tests/run_agent/test_create_openai_client_ssl_verify.py b/tests/agent/test_create_openai_client_ssl_verify.pysimilarity index 100%rename from tests/run_agent/test_create_openai_client_ssl_verify.pyrename to tests/agent/test_create_openai_client_ssl_verify.pydiff --git a/tests/run_agent/test_63425_credential_pool_auto_detect.py b/tests/agent/test_credential_pool_auto_detect.pysimilarity index 100%rename from tests/run_agent/test_63425_credential_pool_auto_detect.pyrename to tests/agent/test_credential_pool_auto_detect.pydiff --git a/tests/run_agent/test_credential_pool_interrupt.py b/tests/agent/test_credential_pool_interrupt.pysimilarity index 100%rename from tests/run_agent/test_credential_pool_interrupt.pyrename to tests/agent/test_credential_pool_interrupt.pydiff --git a/tests/run_agent/test_credential_rotation_route_settings.py b/tests/agent/test_credential_rotation_route_settings.pysimilarity index 100%rename from tests/run_agent/test_credential_rotation_route_settings.pyrename to tests/agent/test_credential_rotation_route_settings.pydiff --git a/tests/run_agent/test_credits_notices_toggle.py b/tests/agent/test_credits_notices_toggle.pysimilarity index 100%rename from tests/run_agent/test_credits_notices_toggle.pyrename to tests/agent/test_credits_notices_toggle.pydiff --git a/tests/agent/test_cron_inflight_prompt_reappend_100818.py b/tests/agent/test_cron_inflight_prompt_reappend.pysimilarity index 100%rename from tests/agent/test_cron_inflight_prompt_reappend_100818.pyrename to tests/agent/test_cron_inflight_prompt_reappend.pydiff --git a/tests/agent/test_cron_inline_api_call_62151.py b/tests/agent/test_cron_inline_api_call.pysimilarity index 100%rename from tests/agent/test_cron_inline_api_call_62151.pyrename to tests/agent/test_cron_inline_api_call.pydiff --git a/tests/run_agent/test_cross_process_turn_lease.py b/tests/agent/test_cross_process_turn_lease.pysimilarity index 100%rename from tests/run_agent/test_cross_process_turn_lease.pyrename to tests/agent/test_cross_process_turn_lease.pydiff --git a/tests/test_ctx_halving_fix.py b/tests/agent/test_ctx_halving_fix.pysimilarity index 100%rename from tests/test_ctx_halving_fix.pyrename to tests/agent/test_ctx_halving_fix.pydiff --git a/tests/run_agent/test_custom_provider_extra_headers_client.py b/tests/agent/test_custom_provider_extra_headers_client.pysimilarity index 100%rename from tests/run_agent/test_custom_provider_extra_headers_client.pyrename to tests/agent/test_custom_provider_extra_headers_client.pydiff --git a/tests/run_agent/test_deepseek_reasoning_content_echo.py b/tests/agent/test_deepseek_reasoning_content_echo.pysimilarity index 100%rename from tests/run_agent/test_deepseek_reasoning_content_echo.pyrename to tests/agent/test_deepseek_reasoning_content_echo.pydiff --git a/tests/run_agent/test_deepseek_v4_thinking_live.py b/tests/agent/test_deepseek_v4_thinking_live.pysimilarity index 98%rename from tests/run_agent/test_deepseek_v4_thinking_live.pyrename to tests/agent/test_deepseek_v4_thinking_live.pyindex b938c274131..9092333a233 100644--- a/tests/run_agent/test_deepseek_v4_thinking_live.py+++ b/tests/agent/test_deepseek_v4_thinking_live.py@@ -1,7 +1,7 @@"""Live DeepSeek V4 thinking-mode tool-call replay smoke test.Opt-in only:- HERMES_LIVE_TESTS=1 pytest tests/run_agent/test_deepseek_v4_thinking_live.py -q+ HERMES_LIVE_TESTS=1 pytest tests/agent/test_deepseek_v4_thinking_live.py -qRequires DEEPSEEK_API_KEY in the process environment. The key is captured atmodule import time because tests/conftest.py intentionally removes credentialdiff --git a/tests/run_agent/test_dict_tool_call_args.py b/tests/agent/test_dict_tool_call_args.pysimilarity index 100%rename from tests/run_agent/test_dict_tool_call_args.pyrename to tests/agent/test_dict_tool_call_args.pydiff --git a/tests/run_agent/test_direct_contexts_stream_inline.py b/tests/agent/test_direct_contexts_stream_inline.pysimilarity index 100%rename from tests/run_agent/test_direct_contexts_stream_inline.pyrename to tests/agent/test_direct_contexts_stream_inline.pydiff --git a/tests/run_agent/test_dropped_tool_call_recovery.py b/tests/agent/test_dropped_tool_call_recovery.pysimilarity index 100%rename from tests/run_agent/test_dropped_tool_call_recovery.pyrename to tests/agent/test_dropped_tool_call_recovery.pydiff --git a/tests/run_agent/test_empty_response_recovery_persistence.py b/tests/agent/test_empty_response_recovery_persistence.pysimilarity index 100%rename from tests/run_agent/test_empty_response_recovery_persistence.pyrename to tests/agent/test_empty_response_recovery_persistence.pydiff --git a/tests/run_agent/test_empty_terminal_reasoning_surface.py b/tests/agent/test_empty_terminal_reasoning_surface.pysimilarity index 100%rename from tests/run_agent/test_empty_terminal_reasoning_surface.pyrename to tests/agent/test_empty_terminal_reasoning_surface.pydiff --git a/tests/run_agent/test_entitlement_fail_closed.py b/tests/agent/test_entitlement_fail_closed.pysimilarity index 100%rename from tests/run_agent/test_entitlement_fail_closed.pyrename to tests/agent/test_entitlement_fail_closed.pydiff --git a/tests/run_agent/test_env_credential_turn_refresh.py b/tests/agent/test_env_credential_turn_refresh.pysimilarity index 100%rename from tests/run_agent/test_env_credential_turn_refresh.pyrename to tests/agent/test_env_credential_turn_refresh.pydiff --git a/tests/test_env_loader_applied_homes.py b/tests/agent/test_env_loader_applied_homes.pysimilarity index 100%rename from tests/test_env_loader_applied_homes.pyrename to tests/agent/test_env_loader_applied_homes.pydiff --git a/tests/test_env_loader_secret_sources.py b/tests/agent/test_env_loader_secret_sources.pysimilarity index 99%rename from tests/test_env_loader_secret_sources.pyrename to tests/agent/test_env_loader_secret_sources.pyindex ff4805064a2..3ae55b94c16 100644--- a/tests/test_env_loader_secret_sources.py+++ b/tests/agent/test_env_loader_secret_sources.py@@ -14,7 +14,7 @@ from pathlib import Pathimport pytest-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]if str(ROOT) not in sys.path:sys.path.insert(0, str(ROOT))diff --git a/tests/agent/test_estimator_parity_84371.py b/tests/agent/test_estimator_parity.pysimilarity index 100%rename from tests/agent/test_estimator_parity_84371.pyrename to tests/agent/test_estimator_parity.pydiff --git a/tests/run_agent/test_exit_cleanup_interrupt.py b/tests/agent/test_exit_cleanup_interrupt.pysimilarity index 100%rename from tests/run_agent/test_exit_cleanup_interrupt.pyrename to tests/agent/test_exit_cleanup_interrupt.pydiff --git a/tests/run_agent/test_export_current_turn_boundary.py b/tests/agent/test_export_current_turn_boundary.pysimilarity index 100%rename from tests/run_agent/test_export_current_turn_boundary.pyrename to tests/agent/test_export_current_turn_boundary.pydiff --git a/tests/run_agent/test_32646_fallback_429_after_timeout.py b/tests/agent/test_fallback_429_after_timeout.pysimilarity index 100%rename from tests/run_agent/test_32646_fallback_429_after_timeout.pyrename to tests/agent/test_fallback_429_after_timeout.pydiff --git a/tests/run_agent/test_fallback_api_mode_preservation.py b/tests/agent/test_fallback_api_mode_preservation.pysimilarity index 100%rename from tests/run_agent/test_fallback_api_mode_preservation.pyrename to tests/agent/test_fallback_api_mode_preservation.pydiff --git a/tests/run_agent/test_fallback_credential_isolation.py b/tests/agent/test_fallback_credential_isolation.pysimilarity index 100%rename from tests/run_agent/test_fallback_credential_isolation.pyrename to tests/agent/test_fallback_credential_isolation.pydiff --git a/tests/run_agent/test_24996_fallback_exhaustion_cooldown.py b/tests/agent/test_fallback_exhaustion_cooldown.pysimilarity index 100%rename from tests/run_agent/test_24996_fallback_exhaustion_cooldown.pyrename to tests/agent/test_fallback_exhaustion_cooldown.pydiff --git a/tests/run_agent/test_fallback_reasoning_override.py b/tests/agent/test_fallback_reasoning_override.pysimilarity index 100%rename from tests/run_agent/test_fallback_reasoning_override.pyrename to tests/agent/test_fallback_reasoning_override.pydiff --git a/tests/run_agent/test_file_mutation_verifier.py b/tests/agent/test_file_mutation_verifier.pysimilarity index 100%rename from tests/run_agent/test_file_mutation_verifier.pyrename to tests/agent/test_file_mutation_verifier.pydiff --git a/tests/run_agent/test_fireworks_live.py b/tests/agent/test_fireworks_live.pysimilarity index 97%rename from tests/run_agent/test_fireworks_live.pyrename to tests/agent/test_fireworks_live.pyindex ad7864c8526..970ef456625 100644--- a/tests/run_agent/test_fireworks_live.py+++ b/tests/agent/test_fireworks_live.py@@ -2,7 +2,7 @@Opt-in only:HERMES_LIVE_TESTS=1 FIREWORKS_API_KEY=fw_... \\- pytest tests/run_agent/test_fireworks_live.py -q+ pytest tests/agent/test_fireworks_live.py -qUnlike a bare OpenAI() client pointed at the endpoint, this drives Hermes'own provider resolution — ``resolve_provider_client('fireworks')`` — so itdiff --git a/tests/run_agent/test_first_chunk_at_hook.py b/tests/agent/test_first_chunk_at_hook.pysimilarity index 100%rename from tests/run_agent/test_first_chunk_at_hook.pyrename to tests/agent/test_first_chunk_at_hook.pydiff --git a/tests/run_agent/test_flush_diverts_on_corrupt_state_db.py b/tests/agent/test_flush_diverts_on_corrupt_state_db.pysimilarity index 100%rename from tests/run_agent/test_flush_diverts_on_corrupt_state_db.pyrename to tests/agent/test_flush_diverts_on_corrupt_state_db.pydiff --git a/tests/run_agent/test_gemini_native_reservation.py b/tests/agent/test_gemini_native_reservation.pysimilarity index 100%rename from tests/run_agent/test_gemini_native_reservation.pyrename to tests/agent/test_gemini_native_reservation.pydiff --git a/tests/test_hermetic_side_effect_guards.py b/tests/agent/test_hermetic_side_effect_guards.pysimilarity index 100%rename from tests/test_hermetic_side_effect_guards.pyrename to tests/agent/test_hermetic_side_effect_guards.pydiff --git a/tests/run_agent/test_identity_flush.py b/tests/agent/test_identity_flush.pysimilarity index 100%rename from tests/run_agent/test_identity_flush.pyrename to tests/agent/test_identity_flush.pydiff --git a/tests/run_agent/test_69078_image_corrupt_recovery.py b/tests/agent/test_image_corrupt_recovery.pysimilarity index 99%rename from tests/run_agent/test_69078_image_corrupt_recovery.pyrename to tests/agent/test_image_corrupt_recovery.pyindex 51b834fa1ac..400b0aab0b3 100644--- a/tests/run_agent/test_69078_image_corrupt_recovery.py+++ b/tests/agent/test_image_corrupt_recovery.py@@ -214,7 +214,7 @@ def _mock_response(content: str):def _make_agent():"""Build a minimal AIAgent, mirroring the idiom in- tests/run_agent/test_32646_fallback_429_after_timeout.py."""+ tests/agent/test_fallback_429_after_timeout.py."""from run_agent import AIAgentwith (diff --git a/tests/run_agent/test_image_generate_parallel.py b/tests/agent/test_image_generate_parallel.pysimilarity index 100%rename from tests/run_agent/test_image_generate_parallel.pyrename to tests/agent/test_image_generate_parallel.pydiff --git a/tests/run_agent/test_image_rejection_fallback.py b/tests/agent/test_image_rejection_fallback.pysimilarity index 100%rename from tests/run_agent/test_image_rejection_fallback.pyrename to tests/agent/test_image_rejection_fallback.pydiff --git a/tests/run_agent/test_image_shrink_recovery.py b/tests/agent/test_image_shrink_recovery.pysimilarity index 100%rename from tests/run_agent/test_image_shrink_recovery.pyrename to tests/agent/test_image_shrink_recovery.pydiff --git a/tests/run_agent/test_in_place_commit_rollback_99477.py b/tests/agent/test_in_place_commit_rollback.pysimilarity index 100%rename from tests/run_agent/test_in_place_commit_rollback_99477.pyrename to tests/agent/test_in_place_commit_rollback.pydiff --git a/tests/run_agent/test_in_place_compaction.py b/tests/agent/test_in_place_compaction.pysimilarity index 100%rename from tests/run_agent/test_in_place_compaction.pyrename to tests/agent/test_in_place_compaction.pydiff --git a/tests/run_agent/test_in_place_persist_marker_98450.py b/tests/agent/test_in_place_persist_marker.pysimilarity index 100%rename from tests/run_agent/test_in_place_persist_marker_98450.pyrename to tests/agent/test_in_place_persist_marker.pydiff --git a/tests/run_agent/test_infinite_compaction_loop.py b/tests/agent/test_infinite_compaction_loop.pysimilarity index 100%rename from tests/run_agent/test_infinite_compaction_loop.pyrename to tests/agent/test_infinite_compaction_loop.pydiff --git a/tests/run_agent/test_init_fallback_on_exhausted_pool.py b/tests/agent/test_init_fallback_on_exhausted_pool.pysimilarity index 100%rename from tests/run_agent/test_init_fallback_on_exhausted_pool.pyrename to tests/agent/test_init_fallback_on_exhausted_pool.pydiff --git a/tests/run_agent/test_interactive_interrupt.py b/tests/agent/test_interactive_interrupt.pysimilarity index 100%rename from tests/run_agent/test_interactive_interrupt.pyrename to tests/agent/test_interactive_interrupt.pydiff --git a/tests/run_agent/test_interpreter_shutdown_turn_exit.py b/tests/agent/test_interpreter_shutdown_turn_exit.pysimilarity index 100%rename from tests/run_agent/test_interpreter_shutdown_turn_exit.pyrename to tests/agent/test_interpreter_shutdown_turn_exit.pydiff --git a/tests/run_agent/test_interrupt_propagation.py b/tests/agent/test_interrupt_propagation.pysimilarity index 100%rename from tests/run_agent/test_interrupt_propagation.pyrename to tests/agent/test_interrupt_propagation.pydiff --git a/tests/run_agent/test_invalid_context_length_warning.py b/tests/agent/test_invalid_context_length_warning.pysimilarity index 100%rename from tests/run_agent/test_invalid_context_length_warning.pyrename to tests/agent/test_invalid_context_length_warning.pydiff --git a/tests/test_iron_proxy.py b/tests/agent/test_iron_proxy.pysimilarity index 99%rename from tests/test_iron_proxy.pyrename to tests/agent/test_iron_proxy.pyindex cdd563041b7..995c771f627 100644--- a/tests/test_iron_proxy.py+++ b/tests/agent/test_iron_proxy.py@@ -7,7 +7,7 @@ extraction + checksum verification fully mocked), the subprocess lifecycledocker backend's egress arg builder.Live network and the real ``iron-proxy`` binary are NEVER touched. See-``tests/test_iron_proxy_e2e.py`` (gated behind a marker) for the real-binary+``tests/agent/test_iron_proxy_e2e.py`` (gated behind a marker) for the real-binarysmoke test."""diff --git a/tests/test_iron_proxy_e2e.py b/tests/agent/test_iron_proxy_e2e.pysimilarity index 100%rename from tests/test_iron_proxy_e2e.pyrename to tests/agent/test_iron_proxy_e2e.pydiff --git a/tests/run_agent/test_iteration_budget_race.py b/tests/agent/test_iteration_budget_race.pysimilarity index 100%rename from tests/run_agent/test_iteration_budget_race.pyrename to tests/agent/test_iteration_budget_race.pydiff --git a/tests/run_agent/test_jsondecodeerror_retryable.py b/tests/agent/test_jsondecodeerror_retryable.pysimilarity index 100%rename from tests/run_agent/test_jsondecodeerror_retryable.pyrename to tests/agent/test_jsondecodeerror_retryable.pydiff --git a/tests/run_agent/test_last_reasoning_per_turn.py b/tests/agent/test_last_reasoning_per_turn.pysimilarity index 100%rename from tests/run_agent/test_last_reasoning_per_turn.pyrename to tests/agent/test_last_reasoning_per_turn.pydiff --git a/tests/run_agent/test_length_continuation_thinking_exhaustion.py b/tests/agent/test_length_continuation_thinking_exhaustion.pysimilarity index 100%rename from tests/run_agent/test_length_continuation_thinking_exhaustion.pyrename to tests/agent/test_length_continuation_thinking_exhaustion.pydiff --git a/tests/run_agent/test_lmstudio_load_mode.py b/tests/agent/test_lmstudio_load_mode.pysimilarity index 100%rename from tests/run_agent/test_lmstudio_load_mode.pyrename to tests/agent/test_lmstudio_load_mode.pydiff --git a/tests/agent/test_load_time_durability_stamp_92231.py b/tests/agent/test_load_time_durability_stamp.pysimilarity index 100%rename from tests/agent/test_load_time_durability_stamp_92231.pyrename to tests/agent/test_load_time_durability_stamp.pydiff --git a/tests/run_agent/test_long_context_tier_429.py b/tests/agent/test_long_context_tier_429.pysimilarity index 100%rename from tests/run_agent/test_long_context_tier_429.pyrename to tests/agent/test_long_context_tier_429.pydiff --git a/tests/run_agent/test_malformed_tool_arguments.py b/tests/agent/test_malformed_tool_arguments.pysimilarity index 100%rename from tests/run_agent/test_malformed_tool_arguments.pyrename to tests/agent/test_malformed_tool_arguments.pydiff --git a/tests/run_agent/test_materialize_data_url_cleanup.py b/tests/agent/test_materialize_data_url_cleanup.pysimilarity index 100%rename from tests/run_agent/test_materialize_data_url_cleanup.pyrename to tests/agent/test_materialize_data_url_cleanup.pydiff --git a/tests/run_agent/test_memory_nudge_counter_hydration.py b/tests/agent/test_memory_nudge_counter_hydration.pysimilarity index 100%rename from tests/run_agent/test_memory_nudge_counter_hydration.pyrename to tests/agent/test_memory_nudge_counter_hydration.pydiff --git a/tests/run_agent/test_memory_provider_init.py b/tests/agent/test_memory_provider_init.pysimilarity index 100%rename from tests/run_agent/test_memory_provider_init.pyrename to tests/agent/test_memory_provider_init.pydiff --git a/tests/run_agent/test_memory_sync_interrupted.py b/tests/agent/test_memory_sync_interrupted.pysimilarity index 98%rename from tests/run_agent/test_memory_sync_interrupted.pyrename to tests/agent/test_memory_sync_interrupted.pyindex e879676d1fa..8cf07a80638 100644--- a/tests/run_agent/test_memory_sync_interrupted.py+++ b/tests/agent/test_memory_sync_interrupted.py@@ -25,7 +25,7 @@ import pytestdef _bare_agent():"""Build an ``AIAgent`` with only the attributes``_sync_external_memory_for_turn`` touches — matches the bare-agent- pattern used across ``tests/run_agent/test_interrupt_propagation.py``.+ pattern used across ``tests/agent/test_interrupt_propagation.py``."""from run_agent import AIAgentdiff --git a/tests/test_message_reactions.py b/tests/agent/test_message_reactions.pysimilarity index 100%rename from tests/test_message_reactions.pyrename to tests/agent/test_message_reactions.pydiff --git a/tests/run_agent/test_message_sequence_repair.py b/tests/agent/test_message_sequence_repair.pysimilarity index 100%rename from tests/run_agent/test_message_sequence_repair.pyrename to tests/agent/test_message_sequence_repair.pydiff --git a/tests/agent/test_meta_agent_init.py b/tests/agent/test_meta_agent_init.pyindex 2d56453d108..c916d513859 100644--- a/tests/agent/test_meta_agent_init.py+++ b/tests/agent/test_meta_agent_init.py@@ -116,7 +116,7 @@ def test_agent_init_anthropic_url_implies_provider_and_api_mode():def test_agent_init_anthropic_url_preserves_credential_pool():"""Anthropic-scoped credential pool must survive provider auto-detection.- Mirrors tests/run_agent/test_63425_credential_pool_auto_detect.py at the+ Mirrors tests/agent/test_credential_pool_auto_detect.py at thepublic AIAgent surface (provider=None URL detection)."""from types import SimpleNamespacediff --git a/tests/agent/test_moa_cold_start_cache_66793.py b/tests/agent/test_moa_cold_start_cache.pysimilarity index 100%rename from tests/agent/test_moa_cold_start_cache_66793.pyrename to tests/agent/test_moa_cold_start_cache.pydiff --git a/tests/run_agent/test_moa_fanout_cadence.py b/tests/agent/test_moa_fanout_cadence.pysimilarity index 100%rename from tests/run_agent/test_moa_fanout_cadence.pyrename to tests/agent/test_moa_fanout_cadence.pydiff --git a/tests/run_agent/test_moa_loop_mode.py b/tests/agent/test_moa_loop_mode.pysimilarity index 100%rename from tests/run_agent/test_moa_loop_mode.pyrename to tests/agent/test_moa_loop_mode.pydiff --git a/tests/test_moa_prepared_request_leak_78382.py b/tests/agent/test_moa_prepared_request_leak.pysimilarity index 100%rename from tests/test_moa_prepared_request_leak_78382.pyrename to tests/agent/test_moa_prepared_request_leak.pydiff --git a/tests/run_agent/test_moa_privacy_filter.py b/tests/agent/test_moa_privacy_filter.pysimilarity index 100%rename from tests/run_agent/test_moa_privacy_filter.pyrename to tests/agent/test_moa_privacy_filter.pydiff --git a/tests/run_agent/test_moa_streaming.py b/tests/agent/test_moa_streaming.pysimilarity index 100%rename from tests/run_agent/test_moa_streaming.pyrename to tests/agent/test_moa_streaming.pydiff --git a/tests/run_agent/test_model_streaming_config.py b/tests/agent/test_model_streaming_config.pysimilarity index 100%rename from tests/run_agent/test_model_streaming_config.pyrename to tests/agent/test_model_streaming_config.pydiff --git a/tests/run_agent/test_66267_multimodal_interim.py b/tests/agent/test_multimodal_interim.pysimilarity index 100%rename from tests/run_agent/test_66267_multimodal_interim.pyrename to tests/agent/test_multimodal_interim.pydiff --git a/tests/run_agent/test_multimodal_tool_content_recovery.py b/tests/agent/test_multimodal_tool_content_recovery.pysimilarity index 100%rename from tests/run_agent/test_multimodal_tool_content_recovery.pyrename to tests/agent/test_multimodal_tool_content_recovery.pydiff --git a/tests/run_agent/test_native_compaction.py b/tests/agent/test_native_compaction.pysimilarity index 100%rename from tests/run_agent/test_native_compaction.pyrename to tests/agent/test_native_compaction.pydiff --git a/tests/run_agent/test_native_compaction_nontext_retention.py b/tests/agent/test_native_compaction_nontext_retention.pysimilarity index 100%rename from tests/run_agent/test_native_compaction_nontext_retention.pyrename to tests/agent/test_native_compaction_nontext_retention.pydiff --git a/tests/run_agent/test_native_compaction_summary_retention.py b/tests/agent/test_native_compaction_summary_retention.pysimilarity index 100%rename from tests/run_agent/test_native_compaction_summary_retention.pyrename to tests/agent/test_native_compaction_summary_retention.pydiff --git a/tests/run_agent/test_native_compaction_switch_capabilities.py b/tests/agent/test_native_compaction_switch_capabilities.pysimilarity index 100%rename from tests/run_agent/test_native_compaction_switch_capabilities.pyrename to tests/agent/test_native_compaction_switch_capabilities.pydiff --git a/tests/run_agent/test_nonretryable_error_html_summary.py b/tests/agent/test_nonretryable_error_html_summary.pysimilarity index 100%rename from tests/run_agent/test_nonretryable_error_html_summary.pyrename to tests/agent/test_nonretryable_error_html_summary.pydiff --git a/tests/run_agent/test_notice_spine.py b/tests/agent/test_notice_spine.pysimilarity index 98%rename from tests/run_agent/test_notice_spine.pyrename to tests/agent/test_notice_spine.pyindex b928e6e9caf..2587cc73318 100644--- a/tests/run_agent/test_notice_spine.py+++ b/tests/agent/test_notice_spine.py@@ -5,7 +5,7 @@ Covers:object.__new__ — same pattern as test_steer.py and test_file_mutation_verifier.py).B. Constructor / init_agent signature threading.C. TUI _agent_cbs notice binding — mirrors the status_callback tests already- in tests/test_tui_gateway_server.py.+ in tests/tui_gateway/test_tui_gateway_server.py."""from __future__ import annotationsdiff --git a/tests/run_agent/test_nous_429_fallback_reentry.py b/tests/agent/test_nous_429_fallback_reentry.pysimilarity index 100%rename from tests/run_agent/test_nous_429_fallback_reentry.pyrename to tests/agent/test_nous_429_fallback_reentry.pydiff --git a/tests/run_agent/test_nous_fallback_unavailable.py b/tests/agent/test_nous_fallback_unavailable.pysimilarity index 100%rename from tests/run_agent/test_nous_fallback_unavailable.pyrename to tests/agent/test_nous_fallback_unavailable.pydiff --git a/tests/test_ollama_num_ctx.py b/tests/agent/test_ollama_num_ctx.pysimilarity index 100%rename from tests/test_ollama_num_ctx.pyrename to tests/agent/test_ollama_num_ctx.pydiff --git a/tests/test_onepassword_secrets.py b/tests/agent/test_onepassword_secrets.pysimilarity index 99%rename from tests/test_onepassword_secrets.pyrename to tests/agent/test_onepassword_secrets.pyindex 8f2da661a4e..cafcf60ad3f 100644--- a/tests/test_onepassword_secrets.py+++ b/tests/agent/test_onepassword_secrets.py@@ -19,7 +19,7 @@ import pytest# Make the worktree importable without depending on the installed wheel.-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]if str(ROOT) not in sys.path:sys.path.insert(0, str(ROOT))diff --git a/tests/run_agent/test_openai_client_lifecycle.py b/tests/agent/test_openai_client_lifecycle.pysimilarity index 100%rename from tests/run_agent/test_openai_client_lifecycle.pyrename to tests/agent/test_openai_client_lifecycle.pydiff --git a/tests/run_agent/test_opencode_free_client_headers.py b/tests/agent/test_opencode_free_client_headers.pysimilarity index 100%rename from tests/run_agent/test_opencode_free_client_headers.pyrename to tests/agent/test_opencode_free_client_headers.pydiff --git a/tests/run_agent/test_92450_outer_error_retry_bound.py b/tests/agent/test_outer_error_retry_bound.pysimilarity index 100%rename from tests/run_agent/test_92450_outer_error_retry_bound.pyrename to tests/agent/test_outer_error_retry_bound.pydiff --git a/tests/test_output_cap_parsing.py b/tests/agent/test_output_cap_parsing.pysimilarity index 100%rename from tests/test_output_cap_parsing.pyrename to tests/agent/test_output_cap_parsing.pydiff --git a/tests/run_agent/test_overflow_overhead_aware_tokens.py b/tests/agent/test_overflow_overhead_aware_tokens.pysimilarity index 100%rename from tests/run_agent/test_overflow_overhead_aware_tokens.pyrename to tests/agent/test_overflow_overhead_aware_tokens.pydiff --git a/tests/run_agent/test_overflow_partial_terminal_106260.py b/tests/agent/test_overflow_partial_terminal.pysimilarity index 100%rename from tests/run_agent/test_overflow_partial_terminal_106260.pyrename to tests/agent/test_overflow_partial_terminal.pydiff --git a/tests/run_agent/test_partial_stream_finish_reason.py b/tests/agent/test_partial_stream_finish_reason.pysimilarity index 100%rename from tests/run_agent/test_partial_stream_finish_reason.pyrename to tests/agent/test_partial_stream_finish_reason.pydiff --git a/tests/run_agent/test_per_model_compression_threshold.py b/tests/agent/test_per_model_compression_threshold.pysimilarity index 100%rename from tests/run_agent/test_per_model_compression_threshold.pyrename to tests/agent/test_per_model_compression_threshold.pydiff --git a/tests/run_agent/test_per_model_threshold_init_ordering.py b/tests/agent/test_per_model_threshold_init_ordering.pysimilarity index 100%rename from tests/run_agent/test_per_model_threshold_init_ordering.pyrename to tests/agent/test_per_model_threshold_init_ordering.pydiff --git a/tests/run_agent/test_percentage_clamp.py b/tests/agent/test_percentage_clamp.pysimilarity index 100%rename from tests/run_agent/test_percentage_clamp.pyrename to tests/agent/test_percentage_clamp.pydiff --git a/tests/run_agent/test_plugin_context_engine_init.py b/tests/agent/test_plugin_context_engine_init.pysimilarity index 100%rename from tests/run_agent/test_plugin_context_engine_init.pyrename to tests/agent/test_plugin_context_engine_init.pydiff --git a/tests/run_agent/test_plugin_stream_hooks.py b/tests/agent/test_plugin_stream_hooks.pysimilarity index 100%rename from tests/run_agent/test_plugin_stream_hooks.pyrename to tests/agent/test_plugin_stream_hooks.pydiff --git a/tests/run_agent/test_post_tool_compression_attempt_cap.py b/tests/agent/test_post_tool_compression_attempt_cap.pysimilarity index 100%rename from tests/run_agent/test_post_tool_compression_attempt_cap.pyrename to tests/agent/test_post_tool_compression_attempt_cap.pydiff --git a/tests/run_agent/test_pre_compress_memory_context.py b/tests/agent/test_pre_compress_memory_context_handoff.pysimilarity index 100%rename from tests/run_agent/test_pre_compress_memory_context.pyrename to tests/agent/test_pre_compress_memory_context_handoff.pydiff --git a/tests/run_agent/test_preflight_compression_cap_e2e.py b/tests/agent/test_preflight_compression_cap_e2e.pysimilarity index 100%rename from tests/run_agent/test_preflight_compression_cap_e2e.pyrename to tests/agent/test_preflight_compression_cap_e2e.pydiff --git a/tests/agent/test_preflight_lock_defer.py b/tests/agent/test_preflight_lock_defer.pyindex 4a0e9e6b11c..006ba811459 100644--- a/tests/agent/test_preflight_lock_defer.py+++ b/tests/agent/test_preflight_lock_defer.py@@ -1,6 +1,6 @@"""Preflight lock-defer must not arm the insufficient-progress blocker.-Companion to ``tests/run_agent/test_compression_lock_defer.py`` — pins the+Companion to ``tests/agent/test_compression_lock_defer.py`` — pins the``build_turn_context`` preflight loop's handling of a lock-contendedcompression no-op (#69870 lock-skip signal, consumer salvaged from #49874):diff --git a/tests/run_agent/test_preflight_timeout_typed_result.py b/tests/agent/test_preflight_timeout_typed_result.pysimilarity index 100%rename from tests/run_agent/test_preflight_timeout_typed_result.pyrename to tests/agent/test_preflight_timeout_typed_result.pydiff --git a/tests/run_agent/test_primary_runtime_restore.py b/tests/agent/test_primary_runtime_restore.pysimilarity index 100%rename from tests/run_agent/test_primary_runtime_restore.pyrename to tests/agent/test_primary_runtime_restore.pydiff --git a/tests/test_private_credential_writers.py b/tests/agent/test_private_credential_writers.pysimilarity index 100%rename from tests/test_private_credential_writers.pyrename to tests/agent/test_private_credential_writers.pydiff --git a/tests/run_agent/test_proactive_prune_loop_wiring.py b/tests/agent/test_proactive_prune_loop_wiring.pysimilarity index 100%rename from tests/run_agent/test_proactive_prune_loop_wiring.pyrename to tests/agent/test_proactive_prune_loop_wiring.pydiff --git a/tests/agent/test_protected_tail_pressure_61932.py b/tests/agent/test_protected_tail_pressure.pysimilarity index 100%rename from tests/agent/test_protected_tail_pressure_61932.pyrename to tests/agent/test_protected_tail_pressure.pydiff --git a/tests/run_agent/test_provider_attribution_headers.py b/tests/agent/test_provider_attribution_headers.pysimilarity index 100%rename from tests/run_agent/test_provider_attribution_headers.pyrename to tests/agent/test_provider_attribution_headers.pydiff --git a/tests/run_agent/test_provider_fallback.py b/tests/agent/test_provider_fallback.pysimilarity index 100%rename from tests/run_agent/test_provider_fallback.pyrename to tests/agent/test_provider_fallback.pydiff --git a/tests/run_agent/test_provider_parity.py b/tests/agent/test_provider_parity.pysimilarity index 100%rename from tests/run_agent/test_provider_parity.pyrename to tests/agent/test_provider_parity.pydiff --git a/tests/run_agent/test_reasoning_echo_resolver_e2e.py b/tests/agent/test_reasoning_echo_resolver_e2e.pysimilarity index 100%rename from tests/run_agent/test_reasoning_echo_resolver_e2e.pyrename to tests/agent/test_reasoning_echo_resolver_e2e.pydiff --git a/tests/test_redaction_registry.py b/tests/agent/test_redaction_registry.pysimilarity index 100%rename from tests/test_redaction_registry.pyrename to tests/agent/test_redaction_registry.pydiff --git a/tests/run_agent/test_repair_reanchors_current_turn_user_idx.py b/tests/agent/test_repair_reanchors_current_turn_user_idx.pysimilarity index 100%rename from tests/run_agent/test_repair_reanchors_current_turn_user_idx.pyrename to tests/agent/test_repair_reanchors_current_turn_user_idx.pydiff --git a/tests/run_agent/test_repair_tool_call_arguments.py b/tests/agent/test_repair_tool_call_arguments.pysimilarity index 100%rename from tests/run_agent/test_repair_tool_call_arguments.pyrename to tests/agent/test_repair_tool_call_arguments.pydiff --git a/tests/run_agent/test_repair_tool_call_name.py b/tests/agent/test_repair_tool_call_name.pysimilarity index 100%rename from tests/run_agent/test_repair_tool_call_name.pyrename to tests/agent/test_repair_tool_call_name.pydiff --git a/tests/run_agent/test_request_client_reuse_abort_races.py b/tests/agent/test_request_client_reuse_abort_races.pysimilarity index 100%rename from tests/run_agent/test_request_client_reuse_abort_races.pyrename to tests/agent/test_request_client_reuse_abort_races.pydiff --git a/tests/run_agent/test_reset_aware_primary_restore.py b/tests/agent/test_reset_aware_primary_restore.pysimilarity index 100%rename from tests/run_agent/test_reset_aware_primary_restore.pyrename to tests/agent/test_reset_aware_primary_restore.pydiff --git a/tests/run_agent/test_retry_status_buffer.py b/tests/agent/test_retry_status_buffer.pysimilarity index 100%rename from tests/run_agent/test_retry_status_buffer.pyrename to tests/agent/test_retry_status_buffer.pydiff --git a/tests/test_retry_utils.py b/tests/agent/test_retry_utils.pysimilarity index 100%rename from tests/test_retry_utils.pyrename to tests/agent/test_retry_utils.pydiff --git a/tests/run_agent/test_review_prompt_class_first.py b/tests/agent/test_review_prompt_class_first.pysimilarity index 100%rename from tests/run_agent/test_review_prompt_class_first.pyrename to tests/agent/test_review_prompt_class_first.pydiff --git a/tests/agent/test_rotation_flush_persisted_boundary_68196.py b/tests/agent/test_rotation_flush_persisted_boundary.pysimilarity index 100%rename from tests/agent/test_rotation_flush_persisted_boundary_68196.pyrename to tests/agent/test_rotation_flush_persisted_boundary.pydiff --git a/tests/run_agent/test_run_agent.py b/tests/agent/test_run_agent.pysimilarity index 100%rename from tests/run_agent/test_run_agent.pyrename to tests/agent/test_run_agent.pydiff --git a/tests/run_agent/test_run_agent_codex_responses.py b/tests/agent/test_run_agent_codex_responses.pysimilarity index 100%rename from tests/run_agent/test_run_agent_codex_responses.pyrename to tests/agent/test_run_agent_codex_responses.pydiff --git a/tests/run_agent/test_run_agent_multimodal_prologue.py b/tests/agent/test_run_agent_multimodal_prologue.pysimilarity index 100%rename from tests/run_agent/test_run_agent_multimodal_prologue.pyrename to tests/agent/test_run_agent_multimodal_prologue.pydiff --git a/tests/run_agent/test_sanitiser_escalation.py b/tests/agent/test_sanitiser_escalation.pysimilarity index 100%rename from tests/run_agent/test_sanitiser_escalation.pyrename to tests/agent/test_sanitiser_escalation.pydiff --git a/tests/run_agent/test_sequential_chats_live.py b/tests/agent/test_sequential_chats_live.pysimilarity index 98%rename from tests/run_agent/test_sequential_chats_live.pyrename to tests/agent/test_sequential_chats_live.pyindex f6b9937bda7..9a32c15cd9c 100644--- a/tests/run_agent/test_sequential_chats_live.py+++ b/tests/agent/test_sequential_chats_live.py@@ -11,7 +11,7 @@ reproduction against a real provider so we have a true end-to-end smoke testfor any future keepalive / transport plumbing.Opt-in — not part of default CI:- HERMES_LIVE_TESTS=1 pytest tests/run_agent/test_sequential_chats_live.py -v+ HERMES_LIVE_TESTS=1 pytest tests/agent/test_sequential_chats_live.py -vRequires ``OPENROUTER_API_KEY`` to be set (or sourced via ~/.hermes/.env)."""diff --git a/tests/run_agent/test_sequential_tool_timeout.py b/tests/agent/test_sequential_tool_timeout.pysimilarity index 100%rename from tests/run_agent/test_sequential_tool_timeout.pyrename to tests/agent/test_sequential_tool_timeout.pydiff --git a/tests/run_agent/test_session_activity_persist.py b/tests/agent/test_session_activity_persist.pysimilarity index 100%rename from tests/run_agent/test_session_activity_persist.pyrename to tests/agent/test_session_activity_persist.pydiff --git a/tests/run_agent/test_session_id_env.py b/tests/agent/test_session_id_env.pysimilarity index 100%rename from tests/run_agent/test_session_id_env.pyrename to tests/agent/test_session_id_env.pydiff --git a/tests/run_agent/test_session_meta_filtering.py b/tests/agent/test_session_meta_filtering.pysimilarity index 100%rename from tests/run_agent/test_session_meta_filtering.pyrename to tests/agent/test_session_meta_filtering.pydiff --git a/tests/run_agent/test_session_reset_fix.py b/tests/agent/test_session_reset_fix.pysimilarity index 100%rename from tests/run_agent/test_session_reset_fix.pyrename to tests/agent/test_session_reset_fix.pydiff --git a/tests/agent/test_session_rotation_flush_cold_resume_68454.py b/tests/agent/test_session_rotation_flush_cold_resume.pysimilarity index 100%rename from tests/agent/test_session_rotation_flush_cold_resume_68454.pyrename to tests/agent/test_session_rotation_flush_cold_resume.pydiff --git a/tests/run_agent/test_session_source.py b/tests/agent/test_session_source.pysimilarity index 100%rename from tests/run_agent/test_session_source.pyrename to tests/agent/test_session_source.pydiff --git a/tests/run_agent/test_70773_shared_client_fd_corruption.py b/tests/agent/test_shared_client_fd_corruption.pysimilarity index 100%rename from tests/run_agent/test_70773_shared_client_fd_corruption.pyrename to tests/agent/test_shared_client_fd_corruption.pydiff --git a/tests/run_agent/test_skill_applied_notifications.py b/tests/agent/test_skill_applied_notifications.pysimilarity index 100%rename from tests/run_agent/test_skill_applied_notifications.pyrename to tests/agent/test_skill_applied_notifications.pydiff --git a/tests/agent/test_skip_memory_store_65429.py b/tests/agent/test_skip_memory_store.pysimilarity index 100%rename from tests/agent/test_skip_memory_store_65429.pyrename to tests/agent/test_skip_memory_store.pydiff --git a/tests/test_sql_injection.py b/tests/agent/test_sql_injection.pysimilarity index 100%rename from tests/test_sql_injection.pyrename to tests/agent/test_sql_injection.pydiff --git a/tests/run_agent/test_start_order_gate.py b/tests/agent/test_start_order_gate.pysimilarity index 100%rename from tests/run_agent/test_start_order_gate.pyrename to tests/agent/test_start_order_gate.pydiff --git a/tests/run_agent/test_steer.py b/tests/agent/test_steer.pysimilarity index 100%rename from tests/run_agent/test_steer.pyrename to tests/agent/test_steer.pydiff --git a/tests/run_agent/test_stream_drop_logging.py b/tests/agent/test_stream_drop_logging.pysimilarity index 100%rename from tests/run_agent/test_stream_drop_logging.pyrename to tests/agent/test_stream_drop_logging.pydiff --git a/tests/run_agent/test_stream_interrupt_retry.py b/tests/agent/test_stream_interrupt_retry.pysimilarity index 100%rename from tests/run_agent/test_stream_interrupt_retry.pyrename to tests/agent/test_stream_interrupt_retry.pydiff --git a/tests/run_agent/test_stream_single_writer_65991.py b/tests/agent/test_stream_single_writer.pysimilarity index 100%rename from tests/run_agent/test_stream_single_writer_65991.pyrename to tests/agent/test_stream_single_writer.pydiff --git a/tests/run_agent/test_stream_stale_breaker_reset.py b/tests/agent/test_stream_stale_breaker_reset.pysimilarity index 98%rename from tests/run_agent/test_stream_stale_breaker_reset.pyrename to tests/agent/test_stream_stale_breaker_reset.pyindex 919b9ea8657..297a1cd7f41 100644--- a/tests/run_agent/test_stream_stale_breaker_reset.py+++ b/tests/agent/test_stream_stale_breaker_reset.py@@ -27,7 +27,7 @@ from run_agent import AIAgentdef _make_agent_openrouter():"""Minimal openrouter agent (skips __init__), mirroring- tests/run_agent/test_switch_model_rollback.py."""+ tests/agent/test_switch_model_rollback.py."""agent = AIAgent.__new__(AIAgent)agent.provider = "openrouter"@@ -58,7 +58,7 @@ def _make_agent_openrouter():def _make_fallback_agent(fallback_model):"""Full-constructor agent for the fallback path, mirroring- tests/run_agent/test_24996_fallback_exhaustion_cooldown.py."""+ tests/agent/test_fallback_exhaustion_cooldown.py."""with (patch("model_tools.get_tool_definitions", return_value=[]),patch("model_tools.check_toolset_requirements", return_value={}),diff --git a/tests/run_agent/test_stream_stale_circuit_breaker.py b/tests/agent/test_stream_stale_circuit_breaker.pysimilarity index 98%rename from tests/run_agent/test_stream_stale_circuit_breaker.pyrename to tests/agent/test_stream_stale_circuit_breaker.pyindex af6e6c26d62..a2bddeaa338 100644--- a/tests/run_agent/test_stream_stale_circuit_breaker.py+++ b/tests/agent/test_stream_stale_circuit_breaker.py@@ -11,7 +11,7 @@ These tests cover the guard added to ``interruptible_streaming_api_call``:- a successful stream resets the consecutive-stale streak;- a stale-stream kill increments the consecutive-stale streak.-The harness mirrors tests/run_agent/test_28161_anthropic_stream_pool_cleanup.py.+The harness mirrors tests/agent/test_anthropic_stream_pool_cleanup.py."""import threadingdiff --git a/tests/run_agent/test_streamed_text_accumulation.py b/tests/agent/test_streamed_text_accumulation.pysimilarity index 100%rename from tests/run_agent/test_streamed_text_accumulation.pyrename to tests/agent/test_streamed_text_accumulation.pydiff --git a/tests/run_agent/test_streaming.py b/tests/agent/test_streaming.pysimilarity index 100%rename from tests/run_agent/test_streaming.pyrename to tests/agent/test_streaming.pydiff --git a/tests/run_agent/test_streaming_tool_call_repair.py b/tests/agent/test_streaming_tool_call_repair.pysimilarity index 100%rename from tests/run_agent/test_streaming_tool_call_repair.pyrename to tests/agent/test_streaming_tool_call_repair.pydiff --git a/tests/run_agent/test_strict_api_validation.py b/tests/agent/test_strict_api_validation.pysimilarity index 100%rename from tests/run_agent/test_strict_api_validation.pyrename to tests/agent/test_strict_api_validation.pydiff --git a/tests/run_agent/test_strip_reasoning_tags_cli.py b/tests/agent/test_strip_reasoning_tags_cli.pysimilarity index 100%rename from tests/run_agent/test_strip_reasoning_tags_cli.pyrename to tests/agent/test_strip_reasoning_tags_cli.pydiff --git a/tests/run_agent/test_summarize_api_error.py b/tests/agent/test_summarize_api_error.pysimilarity index 100%rename from tests/run_agent/test_summarize_api_error.pyrename to tests/agent/test_summarize_api_error.pydiff --git a/tests/run_agent/test_switch_model_bedrock_sigv4.py b/tests/agent/test_switch_model_bedrock_sigv4.pysimilarity index 100%rename from tests/run_agent/test_switch_model_bedrock_sigv4.pyrename to tests/agent/test_switch_model_bedrock_sigv4.pydiff --git a/tests/run_agent/test_switch_model_context.py b/tests/agent/test_switch_model_context.pysimilarity index 100%rename from tests/run_agent/test_switch_model_context.pyrename to tests/agent/test_switch_model_context.pydiff --git a/tests/run_agent/test_switch_model_fallback_prune.py b/tests/agent/test_switch_model_fallback_prune.pysimilarity index 100%rename from tests/run_agent/test_switch_model_fallback_prune.pyrename to tests/agent/test_switch_model_fallback_prune.pydiff --git a/tests/run_agent/test_switch_model_pool_reload_52727.py b/tests/agent/test_switch_model_pool_reload.pysimilarity index 100%rename from tests/run_agent/test_switch_model_pool_reload_52727.pyrename to tests/agent/test_switch_model_pool_reload.pydiff --git a/tests/run_agent/test_switch_model_reapplies_headers.py b/tests/agent/test_switch_model_reapplies_headers.pysimilarity index 100%rename from tests/run_agent/test_switch_model_reapplies_headers.pyrename to tests/agent/test_switch_model_reapplies_headers.pydiff --git a/tests/run_agent/test_switch_model_reasoning_override.py b/tests/agent/test_switch_model_reasoning_override.pysimilarity index 100%rename from tests/run_agent/test_switch_model_reasoning_override.pyrename to tests/agent/test_switch_model_reasoning_override.pydiff --git a/tests/run_agent/test_switch_model_rollback.py b/tests/agent/test_switch_model_rollback.pysimilarity index 100%rename from tests/run_agent/test_switch_model_rollback.pyrename to tests/agent/test_switch_model_rollback.pydiff --git a/tests/run_agent/test_switch_model_stale_base_url.py b/tests/agent/test_switch_model_stale_base_url.pysimilarity index 100%rename from tests/run_agent/test_switch_model_stale_base_url.pyrename to tests/agent/test_switch_model_stale_base_url.pydiff --git a/tests/run_agent/test_81641_text_turn_incremental_persistence.py b/tests/agent/test_text_turn_incremental_persistence.pysimilarity index 100%rename from tests/run_agent/test_81641_text_turn_incremental_persistence.pyrename to tests/agent/test_text_turn_incremental_persistence.pydiff --git a/tests/run_agent/test_thinking_only_sanitizer.py b/tests/agent/test_thinking_only_sanitizer.pysimilarity index 100%rename from tests/run_agent/test_thinking_only_sanitizer.pyrename to tests/agent/test_thinking_only_sanitizer.pydiff --git a/tests/run_agent/test_thinking_prefill_trailing_turn.py b/tests/agent/test_thinking_prefill_trailing_turn.pysimilarity index 100%rename from tests/run_agent/test_thinking_prefill_trailing_turn.pyrename to tests/agent/test_thinking_prefill_trailing_turn.pydiff --git a/tests/run_agent/test_thinking_sig_recovery_persistence.py b/tests/agent/test_thinking_sig_recovery_persistence.pysimilarity index 100%rename from tests/run_agent/test_thinking_sig_recovery_persistence.pyrename to tests/agent/test_thinking_sig_recovery_persistence.pydiff --git a/tests/run_agent/test_tls_fd_recycle_corruption.py b/tests/agent/test_tls_fd_recycle_corruption.pysimilarity index 100%rename from tests/run_agent/test_tls_fd_recycle_corruption.pyrename to tests/agent/test_tls_fd_recycle_corruption.pydiff --git a/tests/run_agent/test_token_persistence_non_cli.py b/tests/agent/test_token_persistence_non_cli.pysimilarity index 100%rename from tests/run_agent/test_token_persistence_non_cli.pyrename to tests/agent/test_token_persistence_non_cli.pydiff --git a/tests/run_agent/test_tool_activity_heartbeat.py b/tests/agent/test_tool_activity_heartbeat.pysimilarity index 100%rename from tests/run_agent/test_tool_activity_heartbeat.pyrename to tests/agent/test_tool_activity_heartbeat.pydiff --git a/tests/run_agent/test_tool_arg_coercion.py b/tests/agent/test_tool_arg_coercion.pysimilarity index 100%rename from tests/run_agent/test_tool_arg_coercion.pyrename to tests/agent/test_tool_arg_coercion.pydiff --git a/tests/run_agent/test_tool_batch_segmentation.py b/tests/agent/test_tool_batch_segmentation.pysimilarity index 100%rename from tests/run_agent/test_tool_batch_segmentation.pyrename to tests/agent/test_tool_batch_segmentation.pydiff --git a/tests/run_agent/test_tool_call_args_sanitizer.py b/tests/agent/test_tool_call_args_sanitizer.pysimilarity index 100%rename from tests/run_agent/test_tool_call_args_sanitizer.pyrename to tests/agent/test_tool_call_args_sanitizer.pydiff --git a/tests/run_agent/test_tool_call_guardrail_runtime.py b/tests/agent/test_tool_call_guardrail_runtime.pysimilarity index 100%rename from tests/run_agent/test_tool_call_guardrail_runtime.pyrename to tests/agent/test_tool_call_guardrail_runtime.pydiff --git a/tests/run_agent/test_tool_call_incremental_persistence.py b/tests/agent/test_tool_call_incremental_persistence.pysimilarity index 100%rename from tests/run_agent/test_tool_call_incremental_persistence.pyrename to tests/agent/test_tool_call_incremental_persistence.pydiff --git a/tests/run_agent/test_tool_executor_contextvar_propagation.py b/tests/agent/test_tool_executor_contextvar_propagation.pysimilarity index 100%rename from tests/run_agent/test_tool_executor_contextvar_propagation.pyrename to tests/agent/test_tool_executor_contextvar_propagation.pydiff --git a/tests/run_agent/test_tool_name_db_persistence.py b/tests/agent/test_tool_name_db_persistence.pysimilarity index 100%rename from tests/run_agent/test_tool_name_db_persistence.pyrename to tests/agent/test_tool_name_db_persistence.pydiff --git a/tests/run_agent/test_turn_completion_explainer.py b/tests/agent/test_turn_completion_explainer.pysimilarity index 99%rename from tests/run_agent/test_turn_completion_explainer.pyrename to tests/agent/test_turn_completion_explainer.pyindex 61374232913..160bc18dc0d 100644--- a/tests/run_agent/test_turn_completion_explainer.py+++ b/tests/agent/test_turn_completion_explainer.py@@ -27,7 +27,7 @@ from run_agent import AIAgent# ---------------------------------------------------------------------------# Fixtures (mirrors tests/run_agent/test_tool_call_guardrail_runtime.py)+# Fixtures (mirrors tests/agent/test_tool_call_guardrail_runtime.py)# --------------------------------------------------------------------------def _mock_response(content="Hello", finish_reason="stop", tool_calls=None):msg = SimpleNamespace(content=content, tool_calls=tool_calls)diff --git a/tests/run_agent/test_turn_liveness_watchdog.py b/tests/agent/test_turn_liveness_watchdog.pysimilarity index 100%rename from tests/run_agent/test_turn_liveness_watchdog.pyrename to tests/agent/test_turn_liveness_watchdog.pydiff --git a/tests/run_agent/test_unicode_ascii_codec.py b/tests/agent/test_unicode_ascii_codec.pysimilarity index 100%rename from tests/run_agent/test_unicode_ascii_codec.pyrename to tests/agent/test_unicode_ascii_codec.pydiff --git a/tests/run_agent/test_verification_continuation_budget.py b/tests/agent/test_verification_continuation_budget.pysimilarity index 100%rename from tests/run_agent/test_verification_continuation_budget.pyrename to tests/agent/test_verification_continuation_budget.pydiff --git a/tests/run_agent/test_vision_aware_preprocessing.py b/tests/agent/test_vision_aware_preprocessing.pysimilarity index 100%rename from tests/run_agent/test_vision_aware_preprocessing.pyrename to tests/agent/test_vision_aware_preprocessing.pydiff --git a/tests/agent/test_vision_routing_31179.py b/tests/agent/test_vision_routing.pysimilarity index 100%rename from tests/agent/test_vision_routing_31179.pyrename to tests/agent/test_vision_routing.pydiff --git a/tests/run_agent/test_vision_tool_messages.py b/tests/agent/test_vision_tool_messages.pysimilarity index 100%rename from tests/run_agent/test_vision_tool_messages.pyrename to tests/agent/test_vision_tool_messages.pydiff --git a/tests/run_agent/test_wait_state_visibility.py b/tests/agent/test_wait_state_visibility.pysimilarity index 100%rename from tests/run_agent/test_wait_state_visibility.pyrename to tests/agent/test_wait_state_visibility.pydiff --git a/tests/ci/test_classify_changes.py b/tests/ci/test_classify_changes.pyindex c3c12e9c9e3..e5f312c18c3 100644--- a/tests/ci/test_classify_changes.py+++ b/tests/ci/test_classify_changes.py@@ -170,7 +170,7 @@ CASES = {_lanes(python=True, frontend=True, desktop_updater=True),),"desktop-update test → desktop_updater": (- ["tests/test_desktop_update_windows_progress.py"],+ ["tests/scripts/desktop_update/test_desktop_update_windows_progress.py"],_lanes(python=True, python_prod=False, scan=True, desktop_updater=True),),"updater-process.ts → desktop_updater": (@@ -380,14 +380,14 @@ def test_pull_request_changed_files_parses_gh_output(tmp_path, monkeypatch):return subprocess.CompletedProcess(args[0],0,- stdout="scripts/install.sh\ntests/test_install_sh_node_deps_workspaces.py\n",+ stdout="scripts/install.sh\ntests/scripts/install/test_install_sh_node_deps_workspaces.py\n",stderr="",)monkeypatch.setattr(_mod.subprocess, "run", fake_run)assert pull_request_changed_files() == ["scripts/install.sh",- "tests/test_install_sh_node_deps_workspaces.py",+ "tests/scripts/install/test_install_sh_node_deps_workspaces.py",]@@ -408,7 +408,7 @@ def test_main_recovers_pr_files_instead_of_fail_open_ci_review(monkeypatch, capsmonkeypatch.setattr(_mod,"pull_request_changed_files",- lambda: ["scripts/install.sh", "tests/test_install_sh_node_deps_workspaces.py"],+ lambda: ["scripts/install.sh", "tests/scripts/install/test_install_sh_node_deps_workspaces.py"],)monkeypatch.setattr(sys, "stdin", io.StringIO("\n"))monkeypatch.delenv("GITHUB_OUTPUT", raising=False)diff --git a/tests/cli/__init__.py b/tests/cli/__init__.pydeleted file mode 100644index e69de29bb2d..00000000000diff --git a/tests/cli/conftest.py b/tests/cli/conftest.pydeleted file mode 100644index f3afb042764..00000000000--- a/tests/cli/conftest.py+++ /dev/null@@ -1,50 +0,0 @@-"""Shared fixtures for CLI tests.--prompt_toolkit / capsys isolation-----------------------------------``cli._cprint`` renders through ``prompt_toolkit.print_formatted_text``,-which — when called with no explicit ``output=`` — lazily creates an-``Output`` from ``sys.stdout`` **and caches it on the process-global default-``AppSession``** (``prompt_toolkit.application.current._current_app_session``,-a ``ContextVar`` with a module-level default). The cache is keyed to nothing-and never re-reads ``sys.stdout``.--Under pytest, ``capsys`` swaps ``sys.stdout`` for a fresh buffer per test.-So the first CLI test that emits through ``_cprint`` (e.g. one exercising-``/queue``, which prints a "Queued: …" line) locks prompt_toolkit's cached-output onto *its* captured stdout. Every later ``capsys`` test that asserts-on ``_cprint`` output then reads an empty buffer, because the render went to-the first test's now-dead capture target. That is the mechanism behind the-order-dependent ``test_resume_quiet_stderr`` failure: it passes in isolation-and in its own file, but fails in a full ``tests/cli`` run.--Reset the cached output before every CLI test so each one re-creates a fresh-prompt_toolkit ``Output`` bound to its own ``sys.stdout`` on first use. This-is a no-op when prompt_toolkit isn't importable and cheap otherwise (the-property re-creates lazily).-"""--import pytest--[email protected](autouse=True)-def _reset_prompt_toolkit_output_cache():- """Clear prompt_toolkit's cached AppSession output around each CLI test.-- See the module docstring for the capsys/prompt_toolkit interaction this- guards against.- """-- def _clear() -> None:- try:- from prompt_toolkit.application.current import get_app_session-- get_app_session()._output = None- except Exception:- # prompt_toolkit not importable / internal shape changed — the- # tests that rely on this simply keep their prior behavior.- pass-- _clear()- yield- _clear()diff --git a/tests/cli/test_cli_skin_integration.py b/tests/cli/test_cli_skin_integration.pydeleted file mode 100644index 4fa73c10e9c..00000000000--- a/tests/cli/test_cli_skin_integration.py+++ /dev/null@@ -1,89 +0,0 @@-from types import SimpleNamespace-from unittest.mock import MagicMock, patch--from cli import HermesCLI, _rich_text_from_ansi-from hermes_cli.skin_engine import get_active_skin, set_active_skin---def _make_cli_stub():- cli = HermesCLI.__new__(HermesCLI)- cli._sudo_state = None- cli._secret_state = None- cli._approval_state = None- cli._clarify_state = None- cli._clarify_freetext = False- cli._command_running = False- cli._agent_running = False- cli._voice_recording = False- cli._voice_processing = False- cli._voice_mode = False- cli._command_spinner_frame = lambda: "⟳"- cli._tui_style_base = {- "prompt": "#fff",- "input-area": "#fff",- "input-rule": "#aaa",- "prompt-working": "#888 italic",- }- cli._app = SimpleNamespace(style=None)- cli._invalidate = MagicMock()- return cli---class TestCliSkinPromptIntegration:-- def test_ares_prompt_fragments_use_skin_symbol(self):- cli = _make_cli_stub()-- set_active_skin("ares")- assert cli._get_tui_prompt_fragments() == [("class:prompt", "⚔ ")]-- def test_secret_prompt_fragments_preserve_secret_state(self):- cli = _make_cli_stub()- cli._secret_state = {"response_queue": object()}-- set_active_skin("ares")- assert cli._get_tui_prompt_fragments() == [("class:sudo-prompt", "🔑 ⚔ ")]--- def test_narrow_terminals_compact_voice_recording_prompt_fragments(self):- cli = _make_cli_stub()- cli._voice_recording = True- cli._voice_recorder = SimpleNamespace(current_rms=3000)-- with patch.object(HermesCLI, "_get_tui_terminal_width", return_value=50):- frags = cli._get_tui_prompt_fragments()-- assert frags[0][0] == "class:voice-recording"- assert frags[0][1].startswith("●")- assert "❯" not in frags[0][1]---- def test_apply_tui_skin_style_updates_running_app(self):- cli = _make_cli_stub()-- set_active_skin("ares")- assert cli._apply_tui_skin_style() is True- assert cli._app.style is not None- cli._invalidate.assert_called_once_with(min_interval=0.0)-- def test_handle_skin_command_refreshes_live_tui(self, capsys):- cli = _make_cli_stub()-- with patch("cli.save_config_value", return_value=True):- cli._handle_skin_command("/skin ares")-- output = capsys.readouterr().out- assert "Skin set to: ares (saved)" in output- assert "Prompt + TUI colors updated." in output- assert cli._app.style is not None---class TestAnsiRichTextHelper:- def test_preserves_literal_brackets(self):- text = _rich_text_from_ansi("[notatag] literal")- assert text.plain == "[notatag] literal"-- def test_strips_ansi_but_keeps_plain_text(self):- text = _rich_text_from_ansi("\x1b[31mred\x1b[0m")- assert text.plain == "red"diff --git a/tests/conftest.py b/tests/conftest.pyindex f69c015404a..45d67cf7a96 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -820,7 +820,7 @@ def _state_db_write_guard(request, monkeypatch):# ``_methods`` dict at import time and keeps per-session state in module# globals (sessions, child-run registry, config cache, DB handle). The# canonical per-file process isolation above hides any leakage, but a direct-# multi-file invocation (``pytest tests/tui_gateway/ tests/test_tui_gateway_server.py``,+# multi-file invocation (``pytest tests/tui_gateway/ tests/tui_gateway/test_tui_gateway_server.py``,# or plain ``pytest tests/``) shares one interpreter: a test that stubs# ``_methods["slash.exec"]`` or leaves an active-session lease behind breaks# unrelated tests in later files. This fixture snapshots the cheap-to-copy@@ -1064,7 +1064,7 @@ def _wal_is_usable() -> bool:# Same class of incident as the live-system guard above, different primitive:# a test run spoke the string "partial answer complete" out of the developer's# speakers. That string is a test fixture-# (``tests/test_tui_gateway_server.py``'s fake ``final_response``), and the+# (``tests/tui_gateway/test_tui_gateway_server.py``'s fake ``final_response``), and the# route it took is fully in-process — no leaked shell variable required:## 1. ``test_voice_toggle_tts_branch_also_carries_record_key`` drives thediff --git a/tests/cron/test_cron_direct_api_call_62151.py b/tests/cron/test_cron_direct_api_call.pysimilarity index 100%rename from tests/cron/test_cron_direct_api_call_62151.pyrename to tests/cron/test_cron_direct_api_call.pydiff --git a/tests/cron/test_cron_emfile_stall_87644.py b/tests/cron/test_cron_emfile_stall.pysimilarity index 100%rename from tests/cron/test_cron_emfile_stall_87644.pyrename to tests/cron/test_cron_emfile_stall.pydiff --git a/tests/test_cron_manage_profile_scope.py b/tests/cron/test_cron_manage_profile_scope.pysimilarity index 100%rename from tests/test_cron_manage_profile_scope.pyrename to tests/cron/test_cron_manage_profile_scope.pydiff --git a/tests/cron/test_cron_run_stale_claim_reap_86721.py b/tests/cron/test_cron_run_stale_claim_reap.pysimilarity index 100%rename from tests/cron/test_cron_run_stale_claim_reap_86721.pyrename to tests/cron/test_cron_run_stale_claim_reap.pydiff --git a/tests/cron/test_87033_cronjob_gateway_liveness.py b/tests/cron/test_cronjob_gateway_liveness.pysimilarity index 100%rename from tests/cron/test_87033_cronjob_gateway_liveness.pyrename to tests/cron/test_cronjob_gateway_liveness.pydiff --git a/tests/test_estop.py b/tests/cron/test_estop.pysimilarity index 100%rename from tests/test_estop.pyrename to tests/cron/test_estop.pydiff --git a/tests/cron/test_jobs_shrink_merge_80624.py b/tests/cron/test_jobs_shrink_merge.pysimilarity index 100%rename from tests/cron/test_jobs_shrink_merge_80624.pyrename to tests/cron/test_jobs_shrink_merge.pydiff --git a/tests/cron/test_ticker_stall_60703.py b/tests/cron/test_ticker_stall.pysimilarity index 100%rename from tests/cron/test_ticker_stall_60703.pyrename to tests/cron/test_ticker_stall.pydiff --git a/tests/test_timezone.py b/tests/cron/test_timezone.pysimilarity index 100%rename from tests/test_timezone.pyrename to tests/cron/test_timezone.pydiff --git a/tests/relay/test_relay_format_hints.py b/tests/gateway/relay/test_relay_format_hints.pysimilarity index 100%rename from tests/relay/test_relay_format_hints.pyrename to tests/gateway/relay/test_relay_format_hints.pydiff --git a/tests/relay/test_relay_inchannel_continuable.py b/tests/gateway/relay/test_relay_inchannel_continuable.pysimilarity index 100%rename from tests/relay/test_relay_inchannel_continuable.pyrename to tests/gateway/relay/test_relay_inchannel_continuable.pydiff --git a/tests/relay/test_relay_prompt_ack_stream_isolation.py b/tests/gateway/relay/test_relay_prompt_ack_stream_isolation.pysimilarity index 100%rename from tests/relay/test_relay_prompt_ack_stream_isolation.pyrename to tests/gateway/relay/test_relay_prompt_ack_stream_isolation.pydiff --git a/tests/gateway/test_35809_auto_reset_clean_context.py b/tests/gateway/test_auto_reset_clean_context.pysimilarity index 100%rename from tests/gateway/test_35809_auto_reset_clean_context.pyrename to tests/gateway/test_auto_reset_clean_context.pydiff --git a/tests/gateway/test_10710_auto_reset_evicts_cached_agent.py b/tests/gateway/test_auto_reset_evicts_cached_agent.pysimilarity index 100%rename from tests/gateway/test_10710_auto_reset_evicts_cached_agent.pyrename to tests/gateway/test_auto_reset_evicts_cached_agent.pydiff --git a/tests/gateway/test_53175_cleanup_off_loop.py b/tests/gateway/test_cleanup_off_loop.pysimilarity index 100%rename from tests/gateway/test_53175_cleanup_off_loop.pyrename to tests/gateway/test_cleanup_off_loop.pydiff --git a/tests/gateway/test_compression_interrupt_demotion_56391.py b/tests/gateway/test_compression_interrupt_demotion.pysimilarity index 100%rename from tests/gateway/test_compression_interrupt_demotion_56391.pyrename to tests/gateway/test_compression_interrupt_demotion.pydiff --git a/tests/gateway/test_42039_duplicate_user_message.py b/tests/gateway/test_duplicate_user_message.pysimilarity index 100%rename from tests/gateway/test_42039_duplicate_user_message.pyrename to tests/gateway/test_duplicate_user_message.pydiff --git a/tests/test_empty_model_fallback.py b/tests/gateway/test_empty_model_fallback.pysimilarity index 100%rename from tests/test_empty_model_fallback.pyrename to tests/gateway/test_empty_model_fallback.pydiff --git a/tests/gateway/test_env_override_explicit_disable_48820.py b/tests/gateway/test_env_override_explicit_disable.pysimilarity index 100%rename from tests/gateway/test_env_override_explicit_disable_48820.pyrename to tests/gateway/test_env_override_explicit_disable.pydiff --git a/tests/gateway/test_71671_faulthandler_no_stderr.py b/tests/gateway/test_faulthandler_no_stderr.pysimilarity index 100%rename from tests/gateway/test_71671_faulthandler_no_stderr.pyrename to tests/gateway/test_faulthandler_no_stderr.pydiff --git a/tests/test_gateway_streaming_nested_config.py b/tests/gateway/test_gateway_streaming_nested_config.pysimilarity index 100%rename from tests/test_gateway_streaming_nested_config.pyrename to tests/gateway/test_gateway_streaming_nested_config.pydiff --git a/tests/gateway/test_internal_notification_marker_82888.py b/tests/gateway/test_internal_notification_marker.pysimilarity index 100%rename from tests/gateway/test_internal_notification_marker_82888.pyrename to tests/gateway/test_internal_notification_marker.pydiff --git a/tests/gateway/test_73771_media_resend_dedup.py b/tests/gateway/test_media_resend_dedup.pysimilarity index 100%rename from tests/gateway/test_73771_media_resend_dedup.pyrename to tests/gateway/test_media_resend_dedup.pydiff --git a/tests/gateway/test_73297_memory_flush_on_reset.py b/tests/gateway/test_memory_flush_on_reset.pysimilarity index 100%rename from tests/gateway/test_73297_memory_flush_on_reset.pyrename to tests/gateway/test_memory_flush_on_reset.pydiff --git a/tests/gateway/test_48031_model_switch_after_auto_reset.py b/tests/gateway/test_model_switch_after_auto_reset.pysimilarity index 100%rename from tests/gateway/test_48031_model_switch_after_auto_reset.pyrename to tests/gateway/test_model_switch_after_auto_reset.pydiff --git a/tests/gateway/test_64674_multiplex_primary_token_scope.py b/tests/gateway/test_multiplex_primary_token_scope.pysimilarity index 100%rename from tests/gateway/test_64674_multiplex_primary_token_scope.pyrename to tests/gateway/test_multiplex_primary_token_scope.pydiff --git a/tests/gateway/test_priority_path_compression_demotion_56391.py b/tests/gateway/test_priority_path_compression_demotion.pysimilarity index 100%rename from tests/gateway/test_priority_path_compression_demotion_56391.pyrename to tests/gateway/test_priority_path_compression_demotion.pydiff --git a/tests/test_profile_isolation_runtime.py b/tests/gateway/test_profile_isolation_runtime.pysimilarity index 100%rename from tests/test_profile_isolation_runtime.pyrename to tests/gateway/test_profile_isolation_runtime.pydiff --git a/tests/test_89315_replace_ownership_guard.py b/tests/gateway/test_replace_ownership_guard.pysimilarity index 100%rename from tests/test_89315_replace_ownership_guard.pyrename to tests/gateway/test_replace_ownership_guard.pydiff --git a/tests/gateway/test_35994_reset_button_deadlock.py b/tests/gateway/test_reset_button_deadlock.pysimilarity index 100%rename from tests/gateway/test_35994_reset_button_deadlock.pyrename to tests/gateway/test_reset_button_deadlock.pydiff --git a/tests/gateway/test_session_continuity_82616.py b/tests/gateway/test_session_continuity.pysimilarity index 100%rename from tests/gateway/test_session_continuity_82616.pyrename to tests/gateway/test_session_continuity.pydiff --git a/tests/gateway/test_session_split_brain_11016.py b/tests/gateway/test_session_split_brain.pysimilarity index 100%rename from tests/gateway/test_session_split_brain_11016.pyrename to tests/gateway/test_session_split_brain.pydiff --git a/tests/gateway/test_13121_shutdown_inflight_transcript_flush.py b/tests/gateway/test_shutdown_inflight_transcript_flush.pysimilarity index 100%rename from tests/gateway/test_13121_shutdown_inflight_transcript_flush.pyrename to tests/gateway/test_shutdown_inflight_transcript_flush.pydiff --git a/tests/gateway/test_silent_partial_delivery_95382.py b/tests/gateway/test_silent_partial_delivery.pysimilarity index 100%rename from tests/gateway/test_silent_partial_delivery_95382.pyrename to tests/gateway/test_silent_partial_delivery.pydiff --git a/tests/test_slack_thread_require_mention.py b/tests/gateway/test_slack_thread_require_mention.pysimilarity index 100%rename from tests/test_slack_thread_require_mention.pyrename to tests/gateway/test_slack_thread_require_mention.pydiff --git a/tests/gateway/test_25107_stale_base_url_api_mode.py b/tests/gateway/test_stale_base_url_api_mode.pysimilarity index 100%rename from tests/gateway/test_25107_stale_base_url_api_mode.pyrename to tests/gateway/test_stale_base_url_api_mode.pydiff --git a/tests/gateway/test_subagent_protection_30170.py b/tests/gateway/test_subagent_protection.pysimilarity index 100%rename from tests/gateway/test_subagent_protection_30170.pyrename to tests/gateway/test_subagent_protection.pydiff --git a/tests/gateway/test_telegram_closewait_limits_31599.py b/tests/gateway/test_telegram_closewait_limits.pysimilarity index 100%rename from tests/gateway/test_telegram_closewait_limits_31599.pyrename to tests/gateway/test_telegram_closewait_limits.pydiff --git a/tests/gateway/test_telegram_fallback_pool_release_71593.py b/tests/gateway/test_telegram_fallback_pool_release.pysimilarity index 100%rename from tests/gateway/test_telegram_fallback_pool_release_71593.pyrename to tests/gateway/test_telegram_fallback_pool_release.pydiff --git a/tests/gateway/test_telegram_prune_stale_topic_binding_31501.py b/tests/gateway/test_telegram_prune_stale_topic_binding.pysimilarity index 100%rename from tests/gateway/test_telegram_prune_stale_topic_binding_31501.pyrename to tests/gateway/test_telegram_prune_stale_topic_binding.pydiff --git a/tests/gateway/test_telegram_topic_profile_isolation_76423.py b/tests/gateway/test_telegram_topic_profile_isolation.pysimilarity index 100%rename from tests/gateway/test_telegram_topic_profile_isolation_76423.pyrename to tests/gateway/test_telegram_topic_profile_isolation.pydiff --git a/tests/gateway/test_telegram_topic_profile_routing_76423.py b/tests/gateway/test_telegram_topic_profile_routing.pysimilarity index 100%rename from tests/gateway/test_telegram_topic_profile_routing_76423.pyrename to tests/gateway/test_telegram_topic_profile_routing.pydiff --git a/tests/test_tini_shim.py b/tests/gateway/test_tini_shim.pysimilarity index 98%rename from tests/test_tini_shim.pyrename to tests/gateway/test_tini_shim.pyindex 737cbaa8d1a..aee5a63b6e3 100644--- a/tests/test_tini_shim.py+++ b/tests/gateway/test_tini_shim.py@@ -12,7 +12,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parents[1]+REPO_ROOT = Path(__file__).resolve().parents[2]SHIM = REPO_ROOT / "docker" / "tini-shim.sh"diff --git a/tests/gateway/test_transcript_read_failure_100788.py b/tests/gateway/test_transcript_read_failure.pysimilarity index 100%rename from tests/gateway/test_transcript_read_failure_100788.pyrename to tests/gateway/test_transcript_read_failure.pydiff --git a/tests/gateway/test_7100_transient_failure_transcript.py b/tests/gateway/test_transient_failure_transcript.pysimilarity index 100%rename from tests/gateway/test_7100_transient_failure_transcript.pyrename to tests/gateway/test_transient_failure_transcript.pydiff --git a/tests/gateway/test_watchdog_review_76354.py b/tests/gateway/test_watchdog_review.pysimilarity index 100%rename from tests/gateway/test_watchdog_review_76354.pyrename to tests/gateway/test_watchdog_review.pydiff --git a/tests/gateway/test_75349_whatsapp_multiplex_secret_scope.py b/tests/gateway/test_whatsapp_multiplex_secret_scope.pysimilarity index 100%rename from tests/gateway/test_75349_whatsapp_multiplex_secret_scope.pyrename to tests/gateway/test_whatsapp_multiplex_secret_scope.pydiff --git a/tests/test_yuanbao_integration.py b/tests/gateway/test_yuanbao_integration.pysimilarity index 99%rename from tests/test_yuanbao_integration.pyrename to tests/gateway/test_yuanbao_integration.pyindex 7382dcd5527..b40c1ea0c23 100644--- a/tests/test_yuanbao_integration.py+++ b/tests/gateway/test_yuanbao_integration.py@@ -15,7 +15,7 @@ import sysimport os# 确保 hermes-agent 根目录在 sys.path 中-_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))if _REPO_ROOT not in sys.path:sys.path.insert(0, _REPO_ROOT)diff --git a/tests/test_yuanbao_markdown.py b/tests/gateway/test_yuanbao_markdown.pysimilarity index 96%rename from tests/test_yuanbao_markdown.pyrename to tests/gateway/test_yuanbao_markdown.pyindex 1d038e960a4..42ce50028e0 100644--- a/tests/test_yuanbao_markdown.py+++ b/tests/gateway/test_yuanbao_markdown.py@@ -3,10 +3,10 @@ test_yuanbao_markdown.py - Unit tests for yuanbao_markdown.pyRun (no pytest needed):cd /root/.openclaw/workspace/hermes-agent- python3 tests/test_yuanbao_markdown.py -v+ python3 tests/gateway/test_yuanbao_markdown.py -vOr with pytest if available:- python3 -m pytest tests/test_yuanbao_markdown.py -v+ python3 -m pytest tests/gateway/test_yuanbao_markdown.py -v"""import sys@@ -14,7 +14,7 @@ import osimport unittest# Ensure project root is on the path-sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))from gateway.platforms import helpers as _mdchunkfrom gateway.platforms.yuanbao import MarkdownProcessordiff --git a/tests/test_yuanbao_pipeline.py b/tests/gateway/test_yuanbao_pipeline.pysimilarity index 99%rename from tests/test_yuanbao_pipeline.pyrename to tests/gateway/test_yuanbao_pipeline.pyindex f15a5074fac..a8ee914e34e 100644--- a/tests/test_yuanbao_pipeline.py+++ b/tests/gateway/test_yuanbao_pipeline.py@@ -16,7 +16,7 @@ import osimport json# Ensure project root is on the path-_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))if _REPO_ROOT not in sys.path:sys.path.insert(0, _REPO_ROOT)diff --git a/tests/test_yuanbao_proto.py b/tests/gateway/test_yuanbao_proto.pysimilarity index 99%rename from tests/test_yuanbao_proto.pyrename to tests/gateway/test_yuanbao_proto.pyindex dcf1f92f2cb..faf6f678ae0 100644--- a/tests/test_yuanbao_proto.py+++ b/tests/gateway/test_yuanbao_proto.py@@ -15,7 +15,7 @@ import sysimport os# 确保 hermes-agent 根目录在 sys.path 中-_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))if _REPO_ROOT not in sys.path:sys.path.insert(0, _REPO_ROOT)diff --git a/tests/test_yuanbao_reconnect_set_active.py b/tests/gateway/test_yuanbao_reconnect_set_active.pysimilarity index 97%rename from tests/test_yuanbao_reconnect_set_active.pyrename to tests/gateway/test_yuanbao_reconnect_set_active.pyindex 9bb8a020405..b52bc66e473 100644--- a/tests/test_yuanbao_reconnect_set_active.py+++ b/tests/gateway/test_yuanbao_reconnect_set_active.py@@ -12,7 +12,7 @@ import osimport asynciofrom unittest.mock import AsyncMock, MagicMock, patch-_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))if _REPO_ROOT not in sys.path:sys.path.insert(0, _REPO_ROOT)diff --git a/tests/test_yuanbao_shutdown.py b/tests/gateway/test_yuanbao_shutdown.pysimilarity index 97%rename from tests/test_yuanbao_shutdown.pyrename to tests/gateway/test_yuanbao_shutdown.pyindex be535f46c70..0b65cf53ded 100644--- a/tests/test_yuanbao_shutdown.py+++ b/tests/gateway/test_yuanbao_shutdown.py@@ -17,7 +17,7 @@ import sysimport osimport asyncio-_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))if _REPO_ROOT not in sys.path:sys.path.insert(0, _REPO_ROOT)diff --git a/tests/hermes_cli/conftest.py b/tests/hermes_cli/conftest.pyindex 60728cdc8dd..1db3887b7ec 100644--- a/tests/hermes_cli/conftest.py+++ b/tests/hermes_cli/conftest.py@@ -85,3 +85,49 @@ def isolated_update_runtime(monkeypatch, tmp_path, request):monkeypatch.setattr(update_cmd_fleet, "_restart_macos_launchd_gateways", lambda *a, **k: None)monkeypatch.setattr(update_inventory, "collect_runtime_inventory", lambda: None)monkeypatch.setattr(update_receipt, "collect_fleet_versions", lambda *a, **k: [])+++# ---- prompt_toolkit / capsys isolation ----+# ``cli._cprint`` renders through ``prompt_toolkit.print_formatted_text``,+# which — when called with no explicit ``output=`` — lazily creates an+# ``Output`` from ``sys.stdout`` **and caches it on the process-global default+# ``AppSession``** (``prompt_toolkit.application.current._current_app_session``,+# a ``ContextVar`` with a module-level default). The cache is keyed to nothing+# and never re-reads ``sys.stdout``.+#+# Under pytest, ``capsys`` swaps ``sys.stdout`` for a fresh buffer per test.+# So the first CLI test that emits through ``_cprint`` (e.g. one exercising+# ``/queue``, which prints a "Queued: …" line) locks prompt_toolkit's cached+# output onto *its* captured stdout. Every later ``capsys`` test that asserts+# on ``_cprint`` output then reads an empty buffer, because the render went to+# the first test's now-dead capture target. That is the mechanism behind the+# order-dependent ``test_resume_quiet_stderr`` failure: it passes in isolation+# and in its own file, but fails in a full ``tests/cli`` run.+#+# Reset the cached output before every CLI test so each one re-creates a fresh+# prompt_toolkit ``Output`` bound to its own ``sys.stdout`` on first use. This+# is a no-op when prompt_toolkit isn't importable and cheap otherwise (the+# property re-creates lazily).++[email protected](autouse=True)+def _reset_prompt_toolkit_output_cache():+ """Clear prompt_toolkit's cached AppSession output around each CLI test.++ See the module docstring for the capsys/prompt_toolkit interaction this+ guards against.+ """++ def _clear() -> None:+ try:+ from prompt_toolkit.application.current import get_app_session++ get_app_session()._output = None+ except Exception:+ # prompt_toolkit not importable / internal shape changed — the+ # tests that rely on this simply keep their prior behavior.+ pass++ _clear()+ yield+ _clear()diff --git a/tests/test_active_session_exclusivity.py b/tests/hermes_cli/test_active_session_exclusivity.pysimilarity index 100%rename from tests/test_active_session_exclusivity.pyrename to tests/hermes_cli/test_active_session_exclusivity.pydiff --git a/tests/test_audio_playback_guard.py b/tests/hermes_cli/test_audio_playback_guard.pysimilarity index 98%rename from tests/test_audio_playback_guard.pyrename to tests/hermes_cli/test_audio_playback_guard.pyindex c20c4cbe9e8..4250be844ac 100644--- a/tests/test_audio_playback_guard.py+++ b/tests/hermes_cli/test_audio_playback_guard.py@@ -2,7 +2,7 @@The incident: a plain test run spoke the words "partial answer complete" outof a developer's speakers. That string is a fake ``final_response`` from-``tests/test_tui_gateway_server.py``. The route was entirely in-process — no+``tests/tui_gateway/test_tui_gateway_server.py``. The route was entirely in-process — noleaked shell variable, so ``scripts/run_tests.sh``'s ``env -i`` was no help:1. A test drives the ``voice.toggle`` RPC with ``action="tts"``. Thediff --git a/tests/hermes_cli/test_auth_toctou_file_modes.py b/tests/hermes_cli/test_auth_toctou_file_modes.pyindex a9d92c2666c..084f3dea639 100644--- a/tests/hermes_cli/test_auth_toctou_file_modes.py+++ b/tests/hermes_cli/test_auth_toctou_file_modes.py@@ -8,7 +8,7 @@ create and chmod the file existed at the process umask (typically ``0o644``),briefly exposing OAuth tokens to other local users on multi-user hosts. Thewriters now go through ``utils.atomic_json_write(mode=0o600)`` whose mkstemp tempfile is ``O_EXCL`` at 0600 on creation (the cross-writer invariant lives in-``tests/test_private_credential_writers.py``).+``tests/agent/test_private_credential_writers.py``).These tests stay green only while the token file and its parent directoryend up at ``0o600`` / ``0o700`` after every write. POSIX-only — the mode-bitdiff --git a/tests/cli/test_bang_shell_mode.py b/tests/hermes_cli/test_bang_shell_mode.pysimilarity index 100%rename from tests/cli/test_bang_shell_mode.pyrename to tests/hermes_cli/test_bang_shell_mode.pydiff --git a/tests/cli/test_bracketed_paste_timeout.py b/tests/hermes_cli/test_bracketed_paste_timeout.pysimilarity index 100%rename from tests/cli/test_bracketed_paste_timeout.pyrename to tests/hermes_cli/test_bracketed_paste_timeout.pydiff --git a/tests/cli/test_branch_command.py b/tests/hermes_cli/test_branch_command.pysimilarity index 100%rename from tests/cli/test_branch_command.pyrename to tests/hermes_cli/test_branch_command.pydiff --git a/tests/cli/test_busy_input_mode_command.py b/tests/hermes_cli/test_busy_input_mode_command.pysimilarity index 100%rename from tests/cli/test_busy_input_mode_command.pyrename to tests/hermes_cli/test_busy_input_mode_command.pydiff --git a/tests/cli/test_chat_q_exit_clear.py b/tests/hermes_cli/test_chat_q_exit_clear.pysimilarity index 100%rename from tests/cli/test_chat_q_exit_clear.pyrename to tests/hermes_cli/test_chat_q_exit_clear.pydiff --git a/tests/cli/test_cli_active_agent_ref_wiring.py b/tests/hermes_cli/test_cli_active_agent_ref_wiring.pysimilarity index 100%rename from tests/cli/test_cli_active_agent_ref_wiring.pyrename to tests/hermes_cli/test_cli_active_agent_ref_wiring.pydiff --git a/tests/cli/test_cli_approval_ui.py b/tests/hermes_cli/test_cli_approval_ui.pysimilarity index 100%rename from tests/cli/test_cli_approval_ui.pyrename to tests/hermes_cli/test_cli_approval_ui.pydiff --git a/tests/cli/test_cli_async_delegation_delivery.py b/tests/hermes_cli/test_cli_async_delegation_delivery.pysimilarity index 100%rename from tests/cli/test_cli_async_delegation_delivery.pyrename to tests/hermes_cli/test_cli_async_delegation_delivery.pydiff --git a/tests/cli/test_cli_background_busy_path.py b/tests/hermes_cli/test_cli_background_busy_path.pysimilarity index 98%rename from tests/cli/test_cli_background_busy_path.pyrename to tests/hermes_cli/test_cli_background_busy_path.pyindex 9af07b0da16..e22ce84f13b 100644--- a/tests/cli/test_cli_background_busy_path.py+++ b/tests/hermes_cli/test_cli_background_busy_path.py@@ -15,7 +15,7 @@ the UI thread; the command's own ``CommandDef`` already declaresnever consulted.These tests exercise the detector without starting a prompt_toolkit app,-mirroring tests/cli/test_cli_steer_busy_path.py.+mirroring tests/hermes_cli/test_cli_steer_busy_path.py."""from __future__ import annotationsdiff --git a/tests/cli/test_cli_background_status_indicator.py b/tests/hermes_cli/test_cli_background_status_indicator.pysimilarity index 100%rename from tests/cli/test_cli_background_status_indicator.pyrename to tests/hermes_cli/test_cli_background_status_indicator.pydiff --git a/tests/cli/test_cli_background_tui_refresh.py b/tests/hermes_cli/test_cli_background_tui_refresh.pysimilarity index 100%rename from tests/cli/test_cli_background_tui_refresh.pyrename to tests/hermes_cli/test_cli_background_tui_refresh.pydiff --git a/tests/cli/test_cli_bracketed_paste_sanitizer.py b/tests/hermes_cli/test_cli_bracketed_paste_sanitizer.pysimilarity index 100%rename from tests/cli/test_cli_bracketed_paste_sanitizer.pyrename to tests/hermes_cli/test_cli_bracketed_paste_sanitizer.pydiff --git a/tests/cli/test_cli_browser_connect.py b/tests/hermes_cli/test_cli_browser_connect.pysimilarity index 100%rename from tests/cli/test_cli_browser_connect.pyrename to tests/hermes_cli/test_cli_browser_connect.pydiff --git a/tests/cli/test_cli_clarify_batch.py b/tests/hermes_cli/test_cli_clarify_batch.pysimilarity index 99%rename from tests/cli/test_cli_clarify_batch.pyrename to tests/hermes_cli/test_cli_clarify_batch.pyindex a19575956cd..809dbe42bd4 100644--- a/tests/cli/test_cli_clarify_batch.py+++ b/tests/hermes_cli/test_cli_clarify_batch.py@@ -5,7 +5,7 @@ thread (the way the agent thread calls it) and simulates the keybindinghandlers by calling the same helper methods they call(``_clarify_batch_set_active`` for Tab, ``_clarify_batch_enter`` forEnter, ``_clarify_batch_lock`` for the freetext submit path). No real-terminal needed — mirrors tests/cli/test_cli_approval_ui.py.+terminal needed — mirrors tests/hermes_cli/test_cli_approval_ui.py."""import jsondiff --git a/tests/cli/test_cli_cmd_backspace.py b/tests/hermes_cli/test_cli_cmd_backspace.pysimilarity index 100%rename from tests/cli/test_cli_cmd_backspace.pyrename to tests/hermes_cli/test_cli_cmd_backspace.pydiff --git a/tests/cli/test_cli_codex_context_reference.py b/tests/hermes_cli/test_cli_codex_context_reference.pysimilarity index 100%rename from tests/cli/test_cli_codex_context_reference.pyrename to tests/hermes_cli/test_cli_codex_context_reference.pydiff --git a/tests/cli/test_cli_context_warning.py b/tests/hermes_cli/test_cli_context_warning.pysimilarity index 100%rename from tests/cli/test_cli_context_warning.pyrename to tests/hermes_cli/test_cli_context_warning.pydiff --git a/tests/cli/test_cli_copy_command.py b/tests/hermes_cli/test_cli_copy_command.pysimilarity index 100%rename from tests/cli/test_cli_copy_command.pyrename to tests/hermes_cli/test_cli_copy_command.pydiff --git a/tests/cli/test_cli_delegate_background_notice.py b/tests/hermes_cli/test_cli_delegate_background_notice.pysimilarity index 100%rename from tests/cli/test_cli_delegate_background_notice.pyrename to tests/hermes_cli/test_cli_delegate_background_notice.pydiff --git a/tests/cli/test_cli_extension_hooks.py b/tests/hermes_cli/test_cli_extension_hooks.pysimilarity index 100%rename from tests/cli/test_cli_extension_hooks.pyrename to tests/hermes_cli/test_cli_extension_hooks.pydiff --git a/tests/cli/test_cli_external_editor.py b/tests/hermes_cli/test_cli_external_editor.pysimilarity index 100%rename from tests/cli/test_cli_external_editor.pyrename to tests/hermes_cli/test_cli_external_editor.pydiff --git a/tests/cli/test_cli_file_drop.py b/tests/hermes_cli/test_cli_file_drop.pysimilarity index 100%rename from tests/cli/test_cli_file_drop.pyrename to tests/hermes_cli/test_cli_file_drop.pydiff --git a/tests/cli/test_cli_first_run_setup.py b/tests/hermes_cli/test_cli_first_run_setup.pysimilarity index 100%rename from tests/cli/test_cli_first_run_setup.pyrename to tests/hermes_cli/test_cli_first_run_setup.pydiff --git a/tests/cli/test_cli_force_redraw.py b/tests/hermes_cli/test_cli_force_redraw.pysimilarity index 100%rename from tests/cli/test_cli_force_redraw.pyrename to tests/hermes_cli/test_cli_force_redraw.pydiff --git a/tests/cli/test_cli_goal_interrupt.py b/tests/hermes_cli/test_cli_goal_interrupt.pysimilarity index 100%rename from tests/cli/test_cli_goal_interrupt.pyrename to tests/hermes_cli/test_cli_goal_interrupt.pydiff --git a/tests/cli/test_cli_goal_kick_prompt.py b/tests/hermes_cli/test_cli_goal_kick_prompt.pysimilarity index 100%rename from tests/cli/test_cli_goal_kick_prompt.pyrename to tests/hermes_cli/test_cli_goal_kick_prompt.pydiff --git a/tests/cli/test_cli_goal_parked_resume.py b/tests/hermes_cli/test_cli_goal_parked_resume.pysimilarity index 100%rename from tests/cli/test_cli_goal_parked_resume.pyrename to tests/hermes_cli/test_cli_goal_parked_resume.pydiff --git a/tests/cli/test_cli_image_command.py b/tests/hermes_cli/test_cli_image_command.pysimilarity index 100%rename from tests/cli/test_cli_image_command.pyrename to tests/hermes_cli/test_cli_image_command.pydiff --git a/tests/cli/test_cli_init.py b/tests/hermes_cli/test_cli_init.pysimilarity index 99%rename from tests/cli/test_cli_init.pyrename to tests/hermes_cli/test_cli_init.pyindex 059508991ff..1438cd08ee7 100644--- a/tests/cli/test_cli_init.py+++ b/tests/hermes_cli/test_cli_init.py@@ -256,7 +256,7 @@ class TestPromptToolkitTerminalCompatibility:The native-Windows arm (``_terminal_may_leak_cpr() is False``, plusthe ``PROMPT_TOOLKIT_NO_CPR`` override that outranks it) lives in- ``tests/cli/test_cpr_local_leak.py`` under ``windows_only``, where it+ ``tests/hermes_cli/test_cpr_local_leak.py`` under ``windows_only``, where itruns against a real Windows console."""from cli import _terminal_may_leak_cprdiff --git a/tests/cli/test_cli_insights_command.py b/tests/hermes_cli/test_cli_insights_command.pysimilarity index 100%rename from tests/cli/test_cli_insights_command.pyrename to tests/hermes_cli/test_cli_insights_command.pydiff --git a/tests/cli/test_cli_interrupt_ack_race.py b/tests/hermes_cli/test_cli_interrupt_ack_race.pysimilarity index 100%rename from tests/cli/test_cli_interrupt_ack_race.pyrename to tests/hermes_cli/test_cli_interrupt_ack_race.pydiff --git a/tests/cli/test_cli_interrupt_drain_regression.py b/tests/hermes_cli/test_cli_interrupt_drain_regression.pysimilarity index 100%rename from tests/cli/test_cli_interrupt_drain_regression.pyrename to tests/hermes_cli/test_cli_interrupt_drain_regression.pydiff --git a/tests/cli/test_cli_interrupt_subagent.py b/tests/hermes_cli/test_cli_interrupt_subagent.pysimilarity index 100%rename from tests/cli/test_cli_interrupt_subagent.pyrename to tests/hermes_cli/test_cli_interrupt_subagent.pydiff --git a/tests/cli/test_cli_light_mode.py b/tests/hermes_cli/test_cli_light_mode.pysimilarity index 100%rename from tests/cli/test_cli_light_mode.pyrename to tests/hermes_cli/test_cli_light_mode.pydiff --git a/tests/cli/test_cli_loading_indicator.py b/tests/hermes_cli/test_cli_loading_indicator.pysimilarity index 100%rename from tests/cli/test_cli_loading_indicator.pyrename to tests/hermes_cli/test_cli_loading_indicator.pydiff --git a/tests/test_cli_manual_compress.py b/tests/hermes_cli/test_cli_manual_compress.pysimilarity index 100%rename from tests/test_cli_manual_compress.pyrename to tests/hermes_cli/test_cli_manual_compress.pydiff --git a/tests/cli/test_cli_markdown_rendering.py b/tests/hermes_cli/test_cli_markdown_rendering.pysimilarity index 100%rename from tests/cli/test_cli_markdown_rendering.pyrename to tests/hermes_cli/test_cli_markdown_rendering.pydiff --git a/tests/cli/test_cli_mcp_config_watch.py b/tests/hermes_cli/test_cli_mcp_config_watch.pysimilarity index 100%rename from tests/cli/test_cli_mcp_config_watch.pyrename to tests/hermes_cli/test_cli_mcp_config_watch.pydiff --git a/tests/cli/test_cli_new_session.py b/tests/hermes_cli/test_cli_new_session.pysimilarity index 99%rename from tests/cli/test_cli_new_session.pyrename to tests/hermes_cli/test_cli_new_session.pyindex f35e218b6ff..cbad4d58aca 100644--- a/tests/cli/test_cli_new_session.py+++ b/tests/hermes_cli/test_cli_new_session.py@@ -135,7 +135,7 @@ def _prepare_cli_with_active_session(tmp_path):# Bypass the destructive-slash confirmation gate — these tests focus on# the new-session mechanics, not the confirm prompt itself (covered in- # tests/cli/test_destructive_slash_confirm.py).+ # tests/hermes_cli/test_destructive_slash_confirm.py).cli._confirm_destructive_slash = lambda *_a, **_kw: "once"return clidiff --git a/tests/hermes_cli/test_cli_partial_update_hint_96900.py b/tests/hermes_cli/test_cli_partial_update_hint.pysimilarity index 100%rename from tests/hermes_cli/test_cli_partial_update_hint_96900.pyrename to tests/hermes_cli/test_cli_partial_update_hint.pydiff --git a/tests/cli/test_cli_pet_pane.py b/tests/hermes_cli/test_cli_pet_pane.pysimilarity index 100%rename from tests/cli/test_cli_pet_pane.pyrename to tests/hermes_cli/test_cli_pet_pane.pydiff --git a/tests/cli/test_cli_prefix_matching.py b/tests/hermes_cli/test_cli_prefix_matching.pysimilarity index 100%rename from tests/cli/test_cli_prefix_matching.pyrename to tests/hermes_cli/test_cli_prefix_matching.pydiff --git a/tests/cli/test_cli_preloaded_skills.py b/tests/hermes_cli/test_cli_preloaded_skills.pysimilarity index 100%rename from tests/cli/test_cli_preloaded_skills.pyrename to tests/hermes_cli/test_cli_preloaded_skills.pydiff --git a/tests/cli/test_cli_provider_resolution.py b/tests/hermes_cli/test_cli_provider_resolution.pysimilarity index 100%rename from tests/cli/test_cli_provider_resolution.pyrename to tests/hermes_cli/test_cli_provider_resolution.pydiff --git a/tests/cli/test_cli_queue_paste.py b/tests/hermes_cli/test_cli_queue_paste.pysimilarity index 100%rename from tests/cli/test_cli_queue_paste.pyrename to tests/hermes_cli/test_cli_queue_paste.pydiff --git a/tests/test_cli_quiet_stdout_leak.py b/tests/hermes_cli/test_cli_quiet_stdout_leak.pysimilarity index 100%rename from tests/test_cli_quiet_stdout_leak.pyrename to tests/hermes_cli/test_cli_quiet_stdout_leak.pydiff --git a/tests/cli/test_cli_reload_skills.py b/tests/hermes_cli/test_cli_reload_skills.pysimilarity index 100%rename from tests/cli/test_cli_reload_skills.pyrename to tests/hermes_cli/test_cli_reload_skills.pydiff --git a/tests/cli/test_cli_resume_command.py b/tests/hermes_cli/test_cli_resume_command.pysimilarity index 100%rename from tests/cli/test_cli_resume_command.pyrename to tests/hermes_cli/test_cli_resume_command.pydiff --git a/tests/cli/test_cli_retry.py b/tests/hermes_cli/test_cli_retry.pysimilarity index 100%rename from tests/cli/test_cli_retry.pyrename to tests/hermes_cli/test_cli_retry.pydiff --git a/tests/cli/test_cli_save_config_value.py b/tests/hermes_cli/test_cli_save_config_value.pysimilarity index 100%rename from tests/cli/test_cli_save_config_value.pyrename to tests/hermes_cli/test_cli_save_config_value.pydiff --git a/tests/cli/test_cli_secret_capture.py b/tests/hermes_cli/test_cli_secret_capture.pysimilarity index 100%rename from tests/cli/test_cli_secret_capture.pyrename to tests/hermes_cli/test_cli_secret_capture.pydiff --git a/tests/test_cli_session_store_shared_registry.py b/tests/hermes_cli/test_cli_session_store_shared_registry.pysimilarity index 100%rename from tests/test_cli_session_store_shared_registry.pyrename to tests/hermes_cli/test_cli_session_store_shared_registry.pydiff --git a/tests/cli/test_cli_shift_enter_newline.py b/tests/hermes_cli/test_cli_shift_enter_newline.pysimilarity index 100%rename from tests/cli/test_cli_shift_enter_newline.pyrename to tests/hermes_cli/test_cli_shift_enter_newline.pydiff --git a/tests/cli/test_cli_shutdown_memory_messages.py b/tests/hermes_cli/test_cli_shutdown_memory_messages.pysimilarity index 100%rename from tests/cli/test_cli_shutdown_memory_messages.pyrename to tests/hermes_cli/test_cli_shutdown_memory_messages.pydiff --git a/tests/test_cli_skin_integration.py b/tests/hermes_cli/test_cli_skin_integration.pysimilarity index 86%rename from tests/test_cli_skin_integration.pyrename to tests/hermes_cli/test_cli_skin_integration.pyindex 02d7b11dc0a..c094bcacfaf 100644--- a/tests/test_cli_skin_integration.py+++ b/tests/hermes_cli/test_cli_skin_integration.py@@ -45,6 +45,20 @@ class TestCliSkinPromptIntegration:assert cli._get_tui_prompt_fragments() == [("class:sudo-prompt", "🔑 ⚔ ")]+ def test_narrow_terminals_compact_voice_recording_prompt_fragments(self):+ cli = _make_cli_stub()+ cli._voice_recording = True+ cli._voice_recorder = SimpleNamespace(current_rms=3000)++ with patch.object(HermesCLI, "_get_tui_terminal_width", return_value=50):+ frags = cli._get_tui_prompt_fragments()++ assert frags[0][0] == "class:voice-recording"+ assert frags[0][1].startswith("●")+ assert "❯" not in frags[0][1]+++def test_build_tui_style_dict_uses_skin_overrides(self):cli = _make_cli_stub()@@ -111,3 +125,6 @@ class TestAnsiRichTextHelper:text = _rich_text_from_ansi("[notatag] literal")assert text.plain == "[notatag] literal"+ def test_strips_ansi_but_keeps_plain_text(self):+ text = _rich_text_from_ansi("\x1b[31mred\x1b[0m")+ assert text.plain == "red"diff --git a/tests/cli/test_cli_status_bar.py b/tests/hermes_cli/test_cli_status_bar.pysimilarity index 100%rename from tests/cli/test_cli_status_bar.pyrename to tests/hermes_cli/test_cli_status_bar.pydiff --git a/tests/cli/test_cli_status_bar_goal.py b/tests/hermes_cli/test_cli_status_bar_goal.pysimilarity index 100%rename from tests/cli/test_cli_status_bar_goal.pyrename to tests/hermes_cli/test_cli_status_bar_goal.pydiff --git a/tests/cli/test_cli_status_command.py b/tests/hermes_cli/test_cli_status_command.pysimilarity index 100%rename from tests/cli/test_cli_status_command.pyrename to tests/hermes_cli/test_cli_status_command.pydiff --git a/tests/cli/test_cli_steer_busy_path.py b/tests/hermes_cli/test_cli_steer_busy_path.pysimilarity index 100%rename from tests/cli/test_cli_steer_busy_path.pyrename to tests/hermes_cli/test_cli_steer_busy_path.pydiff --git a/tests/cli/test_cli_terminal_response_sanitizer.py b/tests/hermes_cli/test_cli_terminal_response_sanitizer.pysimilarity index 100%rename from tests/cli/test_cli_terminal_response_sanitizer.pyrename to tests/hermes_cli/test_cli_terminal_response_sanitizer.pydiff --git a/tests/cli/test_cli_terminal_shortcuts.py b/tests/hermes_cli/test_cli_terminal_shortcuts.pysimilarity index 100%rename from tests/cli/test_cli_terminal_shortcuts.pyrename to tests/hermes_cli/test_cli_terminal_shortcuts.pydiff --git a/tests/cli/test_cli_tools_command.py b/tests/hermes_cli/test_cli_tools_command.pysimilarity index 100%rename from tests/cli/test_cli_tools_command.pyrename to tests/hermes_cli/test_cli_tools_command.pydiff --git a/tests/cli/test_cli_user_message_preview.py b/tests/hermes_cli/test_cli_user_message_preview.pysimilarity index 100%rename from tests/cli/test_cli_user_message_preview.pyrename to tests/hermes_cli/test_cli_user_message_preview.pydiff --git a/tests/cli/test_cli_yolo_resume_persistence.py b/tests/hermes_cli/test_cli_yolo_resume_persistence.pysimilarity index 100%rename from tests/cli/test_cli_yolo_resume_persistence.pyrename to tests/hermes_cli/test_cli_yolo_resume_persistence.pydiff --git a/tests/cli/test_cli_yolo_toggle.py b/tests/hermes_cli/test_cli_yolo_toggle.pysimilarity index 100%rename from tests/cli/test_cli_yolo_toggle.pyrename to tests/hermes_cli/test_cli_yolo_toggle.pydiff --git a/tests/test_code_skew.py b/tests/hermes_cli/test_code_skew.pysimilarity index 100%rename from tests/test_code_skew.pyrename to tests/hermes_cli/test_code_skew.pydiff --git a/tests/cli/test_command_palette.py b/tests/hermes_cli/test_command_palette.pysimilarity index 100%rename from tests/cli/test_command_palette.pyrename to tests/hermes_cli/test_command_palette.pydiff --git a/tests/test_compat_manifest_targets.py b/tests/hermes_cli/test_compat_manifest_targets.pysimilarity index 98%rename from tests/test_compat_manifest_targets.pyrename to tests/hermes_cli/test_compat_manifest_targets.pyindex 461636586e2..41ca26f557b 100644--- a/tests/test_compat_manifest_targets.py+++ b/tests/hermes_cli/test_compat_manifest_targets.py@@ -16,7 +16,7 @@ from pathlib import Pathimport pytest-ROOT = Path(__file__).resolve().parent.parent+ROOT = Path(__file__).resolve().parent.parent.parentMANIFEST = ROOT / "compat_manifest.json"# This file resolves every pointer on purpose; the once-per-name plugin warning is expected here.diff --git a/tests/cli/test_completion_backlog.py b/tests/hermes_cli/test_completion_backlog.pysimilarity index 100%rename from tests/cli/test_completion_backlog.pyrename to tests/hermes_cli/test_completion_backlog.pydiff --git a/tests/cli/test_compress_flags.py b/tests/hermes_cli/test_compress_flags.pysimilarity index 100%rename from tests/cli/test_compress_flags.pyrename to tests/hermes_cli/test_compress_flags.pydiff --git a/tests/cli/test_compress_focus.py b/tests/hermes_cli/test_compress_focus.pysimilarity index 100%rename from tests/cli/test_compress_focus.pyrename to tests/hermes_cli/test_compress_focus.pydiff --git a/tests/cli/test_compress_here.py b/tests/hermes_cli/test_compress_here.pysimilarity index 100%rename from tests/cli/test_compress_here.pyrename to tests/hermes_cli/test_compress_here.pydiff --git a/tests/cli/test_compress_type_ahead.py b/tests/hermes_cli/test_compress_type_ahead.pysimilarity index 100%rename from tests/cli/test_compress_type_ahead.pyrename to tests/hermes_cli/test_compress_type_ahead.pydiff --git a/tests/cli/test_cpr_local_leak.py b/tests/hermes_cli/test_cpr_local_leak.pysimilarity index 100%rename from tests/cli/test_cpr_local_leak.pyrename to tests/hermes_cli/test_cpr_local_leak.pydiff --git a/tests/cli/test_cprint_bg_thread.py b/tests/hermes_cli/test_cprint_bg_thread.pysimilarity index 100%rename from tests/cli/test_cprint_bg_thread.pyrename to tests/hermes_cli/test_cprint_bg_thread.pydiff --git a/tests/cli/test_ctrl_enter_newline.py b/tests/hermes_cli/test_ctrl_enter_newline.pysimilarity index 100%rename from tests/cli/test_ctrl_enter_newline.pyrename to tests/hermes_cli/test_ctrl_enter_newline.pydiff --git a/tests/cli/test_cwd_env_respect.py b/tests/hermes_cli/test_cwd_env_respect.pysimilarity index 100%rename from tests/cli/test_cwd_env_respect.pyrename to tests/hermes_cli/test_cwd_env_respect.pydiff --git a/tests/cli/test_destructive_slash_confirm.py b/tests/hermes_cli/test_destructive_slash_confirm.pysimilarity index 100%rename from tests/cli/test_destructive_slash_confirm.pyrename to tests/hermes_cli/test_destructive_slash_confirm.pydiff --git a/tests/cli/test_destructive_slash_inline_skip_e2e.py b/tests/hermes_cli/test_destructive_slash_inline_skip_e2e.pysimilarity index 100%rename from tests/cli/test_destructive_slash_inline_skip_e2e.pyrename to tests/hermes_cli/test_destructive_slash_inline_skip_e2e.pydiff --git a/tests/test_empty_session_hygiene.py b/tests/hermes_cli/test_empty_session_hygiene.pysimilarity index 100%rename from tests/test_empty_session_hygiene.pyrename to tests/hermes_cli/test_empty_session_hygiene.pydiff --git a/tests/hermes_cli/test_ensure_hermes_home_uid_34107.py b/tests/hermes_cli/test_ensure_hermes_home_uid.pysimilarity index 100%rename from tests/hermes_cli/test_ensure_hermes_home_uid_34107.pyrename to tests/hermes_cli/test_ensure_hermes_home_uid.pydiff --git a/tests/test_env_loader_op_bootstrap.py b/tests/hermes_cli/test_env_loader_op_bootstrap.pysimilarity index 99%rename from tests/test_env_loader_op_bootstrap.pyrename to tests/hermes_cli/test_env_loader_op_bootstrap.pyindex f58dd11334f..a562cd52441 100644--- a/tests/test_env_loader_op_bootstrap.py+++ b/tests/hermes_cli/test_env_loader_op_bootstrap.py@@ -29,7 +29,7 @@ from unittest import mockimport pytest# Make the worktree importable without depending on the installed wheel.-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]if str(ROOT) not in sys.path:sys.path.insert(0, str(ROOT))diff --git a/tests/cli/test_exit_delete_session.py b/tests/hermes_cli/test_exit_delete_session.pysimilarity index 100%rename from tests/cli/test_exit_delete_session.pyrename to tests/hermes_cli/test_exit_delete_session.pydiff --git a/tests/cli/test_exit_summary_resume_hint.py b/tests/hermes_cli/test_exit_summary_resume_hint.pysimilarity index 100%rename from tests/cli/test_exit_summary_resume_hint.pyrename to tests/hermes_cli/test_exit_summary_resume_hint.pydiff --git a/tests/cli/test_exit_watchdog_signal_arm.py b/tests/hermes_cli/test_exit_watchdog_signal_arm.pysimilarity index 100%rename from tests/cli/test_exit_watchdog_signal_arm.pyrename to tests/hermes_cli/test_exit_watchdog_signal_arm.pydiff --git a/tests/cli/test_fast_command.py b/tests/hermes_cli/test_fast_command.pysimilarity index 100%rename from tests/cli/test_fast_command.pyrename to tests/hermes_cli/test_fast_command.pydiff --git a/tests/cli/test_finite_chat_delegation.py b/tests/hermes_cli/test_finite_chat_delegation.pysimilarity index 100%rename from tests/cli/test_finite_chat_delegation.pyrename to tests/hermes_cli/test_finite_chat_delegation.pydiff --git a/tests/cli/test_focus_view.py b/tests/hermes_cli/test_focus_view.pysimilarity index 100%rename from tests/cli/test_focus_view.pyrename to tests/hermes_cli/test_focus_view.pydiff --git a/tests/test_gitlock.py b/tests/hermes_cli/test_gitlock.pysimilarity index 100%rename from tests/test_gitlock.pyrename to tests/hermes_cli/test_gitlock.pydiff --git a/tests/hermes_cli/test_25106_global_switch_persists_base_url_api_mode.py b/tests/hermes_cli/test_global_switch_persists_base_url_api_mode.pysimilarity index 100%rename from tests/hermes_cli/test_25106_global_switch_persists_base_url_api_mode.pyrename to tests/hermes_cli/test_global_switch_persists_base_url_api_mode.pydiff --git a/tests/cli/test_handoff_cleanup_race.py b/tests/hermes_cli/test_handoff_cleanup_race.pysimilarity index 100%rename from tests/cli/test_handoff_cleanup_race.pyrename to tests/hermes_cli/test_handoff_cleanup_race.pydiff --git a/tests/cli/test_handoff_slow_dispatch_timeout.py b/tests/hermes_cli/test_handoff_slow_dispatch_timeout.pysimilarity index 100%rename from tests/cli/test_handoff_slow_dispatch_timeout.pyrename to tests/hermes_cli/test_handoff_slow_dispatch_timeout.pydiff --git a/tests/cli/test_indicator_command.py b/tests/hermes_cli/test_indicator_command.pysimilarity index 100%rename from tests/cli/test_indicator_command.pyrename to tests/hermes_cli/test_indicator_command.pydiff --git a/tests/cli/test_interrupt_output_history_regression.py b/tests/hermes_cli/test_interrupt_output_history_regression.pysimilarity index 100%rename from tests/cli/test_interrupt_output_history_regression.pyrename to tests/hermes_cli/test_interrupt_output_history_regression.pydiff --git a/tests/test_iron_proxy_cli.py b/tests/hermes_cli/test_iron_proxy_cli.pysimilarity index 100%rename from tests/test_iron_proxy_cli.pyrename to tests/hermes_cli/test_iron_proxy_cli.pydiff --git a/tests/cli/test_kitty_keypad_parity.py b/tests/hermes_cli/test_kitty_keypad_parity.pysimilarity index 100%rename from tests/cli/test_kitty_keypad_parity.pyrename to tests/hermes_cli/test_kitty_keypad_parity.pydiff --git a/tests/test_lazy_secrets_dispatch.py b/tests/hermes_cli/test_lazy_secrets_dispatch.pysimilarity index 98%rename from tests/test_lazy_secrets_dispatch.pyrename to tests/hermes_cli/test_lazy_secrets_dispatch.pyindex e48a6135886..32e925001d7 100644--- a/tests/test_lazy_secrets_dispatch.py+++ b/tests/hermes_cli/test_lazy_secrets_dispatch.py@@ -35,7 +35,7 @@ def _run_hermes(args: list[str], timeout: int = 30) -> subprocess.CompletedProcestill exercises its full parser/dispatch/fetch code and exits 1, whichthe assertions already accept."""- repo_root = Path(__file__).parent.parent+ repo_root = Path(__file__).parent.parent.parentenv = dict(os.environ)env.update({@@ -216,7 +216,7 @@ if 'cryptography.hazmat.bindings._rust' in sys.modules:print('PASS: main() update --check path never loaded cryptography._rust')sys.exit(0)"""- repo_root = Path(__file__).parent.parent+ repo_root = Path(__file__).parent.parent.parentprobe = repo_root / "_test_main_update_crypto_probe.py"probe.write_text(script)try:diff --git a/tests/test_lazy_secrets_import.py b/tests/hermes_cli/test_lazy_secrets_import.pysimilarity index 96%rename from tests/test_lazy_secrets_import.pyrename to tests/hermes_cli/test_lazy_secrets_import.pyindex 7261c10000f..8e3f4b5d7e0 100644--- a/tests/test_lazy_secrets_import.py+++ b/tests/hermes_cli/test_lazy_secrets_import.py@@ -8,7 +8,7 @@ from pathlib import Pathdef _run_isolated(code: str) -> subprocess.CompletedProcess[str]:"""Run a Python snippet in the repo root (not tests/)."""- repo_root = Path(__file__).parent.parent+ repo_root = Path(__file__).parent.parent.parentreturn subprocess.run([sys.executable, "-c", code],capture_output=True,@@ -78,7 +78,7 @@ sys.exit(0)"""Running hermes update --check should NOT load cryptography._rust."""# Write a small script in the repo root so hermes_cli is importable,# and use a filename that doesn't trigger the live-system guard.- repo_root = Path(__file__).parent.parent+ repo_root = Path(__file__).parent.parent.parentscript = repo_root / "_test_lazy_secrets_check.py"script.write_text("""diff --git a/tests/test_list_recent_user_messages_handoffs.py b/tests/hermes_cli/test_list_recent_user_messages_handoffs.pysimilarity index 100%rename from tests/test_list_recent_user_messages_handoffs.pyrename to tests/hermes_cli/test_list_recent_user_messages_handoffs.pydiff --git a/tests/cli/test_manual_compress.py b/tests/hermes_cli/test_manual_compress.pysimilarity index 100%rename from tests/cli/test_manual_compress.pyrename to tests/hermes_cli/test_manual_compress.pydiff --git a/tests/test_minimax_model_validation.py b/tests/hermes_cli/test_minimax_model_validation.pysimilarity index 100%rename from tests/test_minimax_model_validation.pyrename to tests/hermes_cli/test_minimax_model_validation.pydiff --git a/tests/test_minimax_oauth.py b/tests/hermes_cli/test_minimax_oauth.pysimilarity index 100%rename from tests/test_minimax_oauth.pyrename to tests/hermes_cli/test_minimax_oauth.pydiff --git a/tests/cli/test_moa_command.py b/tests/hermes_cli/test_moa_command.pysimilarity index 100%rename from tests/cli/test_moa_command.pyrename to tests/hermes_cli/test_moa_command.pydiff --git a/tests/hermes_cli/test_model_alias_credentials_83612.py b/tests/hermes_cli/test_model_alias_credentials.pysimilarity index 100%rename from tests/hermes_cli/test_model_alias_credentials_83612.pyrename to tests/hermes_cli/test_model_alias_credentials.pydiff --git a/tests/cli/test_model_picker_filter.py b/tests/hermes_cli/test_model_picker_filter.pysimilarity index 100%rename from tests/cli/test_model_picker_filter.pyrename to tests/hermes_cli/test_model_picker_filter.pydiff --git a/tests/hermes_cli/test_model_prefix_routing_87189.py b/tests/hermes_cli/test_model_prefix_routing.pysimilarity index 100%rename from tests/hermes_cli/test_model_prefix_routing_87189.pyrename to tests/hermes_cli/test_model_prefix_routing.pydiff --git a/tests/cli/test_modify_other_keys_aliases.py b/tests/hermes_cli/test_modify_other_keys_aliases.pysimilarity index 100%rename from tests/cli/test_modify_other_keys_aliases.pyrename to tests/hermes_cli/test_modify_other_keys_aliases.pydiff --git a/tests/cli/test_oneshot_resumed_session_persist.py b/tests/hermes_cli/test_oneshot_resumed_session_persist.pysimilarity index 100%rename from tests/cli/test_oneshot_resumed_session_persist.pyrename to tests/hermes_cli/test_oneshot_resumed_session_persist.pydiff --git a/tests/cli/test_partial_compress.py b/tests/hermes_cli/test_partial_compress.pysimilarity index 100%rename from tests/cli/test_partial_compress.pyrename to tests/hermes_cli/test_partial_compress.pydiff --git a/tests/cli/test_personality_none.py b/tests/hermes_cli/test_personality_none.pysimilarity index 100%rename from tests/cli/test_personality_none.pyrename to tests/hermes_cli/test_personality_none.pydiff --git a/tests/test_plugin_compat_notice.py b/tests/hermes_cli/test_plugin_compat_notice.pysimilarity index 98%rename from tests/test_plugin_compat_notice.pyrename to tests/hermes_cli/test_plugin_compat_notice.pyindex c8574a86c28..f739e51154c 100644--- a/tests/test_plugin_compat_notice.py+++ b/tests/hermes_cli/test_plugin_compat_notice.py@@ -1,6 +1,6 @@"""hermes_cli.plugin_compat: detect plugins on old import paths, tell the user, disable after the date.-Kept with the compat layer (tests/test_compat_manifest_targets.py); deleted with it.+Kept with the compat layer (tests/hermes_cli/test_compat_manifest_targets.py); deleted with it."""from __future__ import annotations@@ -14,7 +14,7 @@ import pytestfrom hermes_cli import plugin_compat as pc-ROOT = Path(__file__).resolve().parent.parent+ROOT = Path(__file__).resolve().parent.parent.parentpytestmark = pytest.mark.skipif(not (ROOT / "compat_manifest.json").exists(), reason="compat layer removed")MANIFEST = {"tools.web_tools": {"prefers_gateway": "tools.tool_backend_helpers.prefers_gateway"},diff --git a/tests/cli/test_prefill_config.py b/tests/hermes_cli/test_prefill_config.pysimilarity index 100%rename from tests/cli/test_prefill_config.pyrename to tests/hermes_cli/test_prefill_config.pydiff --git a/tests/cli/test_prepend_note_to_message.py b/tests/hermes_cli/test_prepend_note_to_message.pysimilarity index 100%rename from tests/cli/test_prepend_note_to_message.pyrename to tests/hermes_cli/test_prepend_note_to_message.pydiff --git a/tests/cli/test_prompt_stash.py b/tests/hermes_cli/test_prompt_stash.pysimilarity index 100%rename from tests/cli/test_prompt_stash.pyrename to tests/hermes_cli/test_prompt_stash.pydiff --git a/tests/cli/test_prompt_stash_cli.py b/tests/hermes_cli/test_prompt_stash_cli.pysimilarity index 98%rename from tests/cli/test_prompt_stash_cli.pyrename to tests/hermes_cli/test_prompt_stash_cli.pyindex b613fcbd661..55235129e92 100644--- a/tests/cli/test_prompt_stash_cli.py+++ b/tests/hermes_cli/test_prompt_stash_cli.py@@ -1,6 +1,6 @@"""Tests for the Ctrl+S prompt stash wiring inside HermesCLI.-The state machine itself is covered by tests/cli/test_prompt_stash.py. These+The state machine itself is covered by tests/hermes_cli/test_prompt_stash.py. Thesetests verify the cli.py side:- HermesCLI.__init__ creates a PromptStash- the layout hook makes room for the stash browse panel@@ -8,7 +8,7 @@ tests verify the cli.py side:- the status-bar indicator appears / disappears with stash contentsFollows the prompt_toolkit-stub construction pattern from-tests/cli/test_cli_extension_hooks.py.+tests/hermes_cli/test_cli_extension_hooks.py."""from __future__ import annotationsdiff --git a/tests/cli/test_prompt_text_input_thread_safety.py b/tests/hermes_cli/test_prompt_text_input_thread_safety.pysimilarity index 100%rename from tests/cli/test_prompt_text_input_thread_safety.pyrename to tests/hermes_cli/test_prompt_text_input_thread_safety.pydiff --git a/tests/test_pty_keepalive_ws.py b/tests/hermes_cli/test_pty_keepalive_ws.pysimilarity index 100%rename from tests/test_pty_keepalive_ws.pyrename to tests/hermes_cli/test_pty_keepalive_ws.pydiff --git a/tests/test_pty_session.py b/tests/hermes_cli/test_pty_session.pysimilarity index 100%rename from tests/test_pty_session.pyrename to tests/hermes_cli/test_pty_session.pydiff --git a/tests/cli/test_quick_commands.py b/tests/hermes_cli/test_quick_commands.pysimilarity index 100%rename from tests/cli/test_quick_commands.pyrename to tests/hermes_cli/test_quick_commands.pydiff --git a/tests/cli/test_quiet_turn_author.py b/tests/hermes_cli/test_quiet_turn_author.pysimilarity index 100%rename from tests/cli/test_quiet_turn_author.pyrename to tests/hermes_cli/test_quiet_turn_author.pydiff --git a/tests/cli/test_reasoning_command.py b/tests/hermes_cli/test_reasoning_command.pysimilarity index 100%rename from tests/cli/test_reasoning_command.pyrename to tests/hermes_cli/test_reasoning_command.pydiff --git a/tests/hermes_cli/test_regression_16767.py b/tests/hermes_cli/test_regression.pysimilarity index 98%rename from tests/hermes_cli/test_regression_16767.pyrename to tests/hermes_cli/test_regression.pyindex bbbae4df587..5f0d8f4b404 100644--- a/tests/hermes_cli/test_regression_16767.py+++ b/tests/hermes_cli/test_regression.py@@ -1,3 +1,5 @@+"""Regression coverage for issue #16767."""+import sysimport hermes_cli.model_switch as msdiff --git a/tests/test_resource_limits.py b/tests/hermes_cli/test_resource_limits.pysimilarity index 100%rename from tests/test_resource_limits.pyrename to tests/hermes_cli/test_resource_limits.pydiff --git a/tests/cli/test_resume_display.py b/tests/hermes_cli/test_resume_display.pysimilarity index 100%rename from tests/cli/test_resume_display.pyrename to tests/hermes_cli/test_resume_display.pydiff --git a/tests/cli/test_resume_model_restore.py b/tests/hermes_cli/test_resume_model_restore.pysimilarity index 100%rename from tests/cli/test_resume_model_restore.pyrename to tests/hermes_cli/test_resume_model_restore.pydiff --git a/tests/cli/test_resume_quiet_stderr.py b/tests/hermes_cli/test_resume_quiet_stderr.pysimilarity index 100%rename from tests/cli/test_resume_quiet_stderr.pyrename to tests/hermes_cli/test_resume_quiet_stderr.pydiff --git a/tests/cli/test_save_conversation_location.py b/tests/hermes_cli/test_save_conversation_location.pysimilarity index 100%rename from tests/cli/test_save_conversation_location.pyrename to tests/hermes_cli/test_save_conversation_location.pydiff --git a/tests/cli/test_session_boundary_hooks.py b/tests/hermes_cli/test_session_boundary_hooks.pysimilarity index 100%rename from tests/cli/test_session_boundary_hooks.pyrename to tests/hermes_cli/test_session_boundary_hooks.pydiff --git a/tests/test_session_detail_malformed_db.py b/tests/hermes_cli/test_session_detail_malformed_db.pysimilarity index 100%rename from tests/test_session_detail_malformed_db.pyrename to tests/hermes_cli/test_session_detail_malformed_db.pydiff --git a/tests/test_session_export_batch.py b/tests/hermes_cli/test_session_export_batch.pysimilarity index 100%rename from tests/test_session_export_batch.pyrename to tests/hermes_cli/test_session_export_batch.pydiff --git a/tests/test_session_search_context_batch.py b/tests/hermes_cli/test_session_search_context_batch.pysimilarity index 100%rename from tests/test_session_search_context_batch.pyrename to tests/hermes_cli/test_session_search_context_batch.pydiff --git a/tests/test_session_skill_previews.py b/tests/hermes_cli/test_session_skill_previews.pysimilarity index 100%rename from tests/test_session_skill_previews.pyrename to tests/hermes_cli/test_session_skill_previews.pydiff --git a/tests/test_session_system_prompt_dedup.py b/tests/hermes_cli/test_session_system_prompt_dedup.pysimilarity index 100%rename from tests/test_session_system_prompt_dedup.pyrename to tests/hermes_cli/test_session_system_prompt_dedup.pydiff --git a/tests/test_session_vacuum_config.py b/tests/hermes_cli/test_session_vacuum_config.pysimilarity index 98%rename from tests/test_session_vacuum_config.pyrename to tests/hermes_cli/test_session_vacuum_config.pyindex 43adfdacbaa..08f9e175bd3 100644--- a/tests/test_session_vacuum_config.py+++ b/tests/hermes_cli/test_session_vacuum_config.py@@ -74,7 +74,7 @@ def test_shipped_template_does_not_pin_sessions_keys():so code defaults (and future flips) apply."""import yaml- template = Path(__file__).resolve().parents[1] / "cli-config.yaml.example"+ template = Path(__file__).resolve().parents[2] / "cli-config.yaml.example"data = yaml.safe_load(template.read_text(encoding="utf-8")) or {}assert "sessions" not in datadiff --git a/tests/cli/test_show_config_credential.py b/tests/hermes_cli/test_show_config_credential.pysimilarity index 100%rename from tests/cli/test_show_config_credential.pyrename to tests/hermes_cli/test_show_config_credential.pydiff --git a/tests/cli/test_single_query_clarify.py b/tests/hermes_cli/test_single_query_clarify.pysimilarity index 100%rename from tests/cli/test_single_query_clarify.pyrename to tests/hermes_cli/test_single_query_clarify.pydiff --git a/tests/cli/test_single_query_session_finalize.py b/tests/hermes_cli/test_single_query_session_finalize.pysimilarity index 100%rename from tests/cli/test_single_query_session_finalize.pyrename to tests/hermes_cli/test_single_query_session_finalize.pydiff --git a/tests/cli/test_slash_command_interrupt.py b/tests/hermes_cli/test_slash_command_interrupt.pysimilarity index 100%rename from tests/cli/test_slash_command_interrupt.pyrename to tests/hermes_cli/test_slash_command_interrupt.pydiff --git a/tests/cli/test_slash_confirm_windows.py b/tests/hermes_cli/test_slash_confirm_windows.pysimilarity index 100%rename from tests/cli/test_slash_confirm_windows.pyrename to tests/hermes_cli/test_slash_confirm_windows.pydiff --git a/tests/cli/test_slash_dispatch_table.py b/tests/hermes_cli/test_slash_dispatch_table.pysimilarity index 100%rename from tests/cli/test_slash_dispatch_table.pyrename to tests/hermes_cli/test_slash_dispatch_table.pydiff --git a/tests/cli/test_slash_undo_title_robustness.py b/tests/hermes_cli/test_slash_undo_title_robustness.pysimilarity index 100%rename from tests/cli/test_slash_undo_title_robustness.pyrename to tests/hermes_cli/test_slash_undo_title_robustness.pydiff --git a/tests/hermes_cli/test_startup_model_routing_87189.py b/tests/hermes_cli/test_startup_model_routing.pysimilarity index 100%rename from tests/hermes_cli/test_startup_model_routing_87189.pyrename to tests/hermes_cli/test_startup_model_routing.pydiff --git a/tests/cli/test_status_bar_git_branch.py b/tests/hermes_cli/test_status_bar_git_branch.pysimilarity index 100%rename from tests/cli/test_status_bar_git_branch.pyrename to tests/hermes_cli/test_status_bar_git_branch.pydiff --git a/tests/cli/test_status_lines_held_during_stream_box.py b/tests/hermes_cli/test_status_lines_held_during_stream_box.pysimilarity index 100%rename from tests/cli/test_status_lines_held_during_stream_box.pyrename to tests/hermes_cli/test_status_lines_held_during_stream_box.pydiff --git a/tests/cli/test_steer_inline_repaint_34569.py b/tests/hermes_cli/test_steer_inline_repaint.pysimilarity index 100%rename from tests/cli/test_steer_inline_repaint_34569.pyrename to tests/hermes_cli/test_steer_inline_repaint.pydiff --git a/tests/cli/test_stream_delta_think_tag.py b/tests/hermes_cli/test_stream_delta_think_tag.pysimilarity index 100%rename from tests/cli/test_stream_delta_think_tag.pyrename to tests/hermes_cli/test_stream_delta_think_tag.pydiff --git a/tests/cli/test_stream_flush_left.py b/tests/hermes_cli/test_stream_flush_left.pysimilarity index 100%rename from tests/cli/test_stream_flush_left.pyrename to tests/hermes_cli/test_stream_flush_left.pydiff --git a/tests/cli/test_stream_partial_line_flush.py b/tests/hermes_cli/test_stream_partial_line_flush.pysimilarity index 100%rename from tests/cli/test_stream_partial_line_flush.pyrename to tests/hermes_cli/test_stream_partial_line_flush.pydiff --git a/tests/cli/test_subagent_dock_collapse.py b/tests/hermes_cli/test_subagent_dock_collapse.pysimilarity index 100%rename from tests/cli/test_subagent_dock_collapse.pyrename to tests/hermes_cli/test_subagent_dock_collapse.pydiff --git a/tests/cli/test_subagent_dock_surface.py b/tests/hermes_cli/test_subagent_dock_surface.pysimilarity index 100%rename from tests/cli/test_subagent_dock_surface.pyrename to tests/hermes_cli/test_subagent_dock_surface.pydiff --git a/tests/cli/test_subagent_monitor.py b/tests/hermes_cli/test_subagent_monitor.pysimilarity index 100%rename from tests/cli/test_subagent_monitor.pyrename to tests/hermes_cli/test_subagent_monitor.pydiff --git a/tests/cli/test_subagent_monitor_prompts.py b/tests/hermes_cli/test_subagent_monitor_prompts.pysimilarity index 100%rename from tests/cli/test_subagent_monitor_prompts.pyrename to tests/hermes_cli/test_subagent_monitor_prompts.pydiff --git a/tests/cli/test_subagent_monitor_resize.py b/tests/hermes_cli/test_subagent_monitor_resize.pysimilarity index 100%rename from tests/cli/test_subagent_monitor_resize.pyrename to tests/hermes_cli/test_subagent_monitor_resize.pydiff --git a/tests/cli/test_subagent_monitor_ui.py b/tests/hermes_cli/test_subagent_monitor_ui.pysimilarity index 100%rename from tests/cli/test_subagent_monitor_ui.pyrename to tests/hermes_cli/test_subagent_monitor_ui.pydiff --git a/tests/cli/test_subagent_notification_display.py b/tests/hermes_cli/test_subagent_notification_display.pysimilarity index 100%rename from tests/cli/test_subagent_notification_display.pyrename to tests/hermes_cli/test_subagent_notification_display.pydiff --git a/tests/cli/test_subagent_shortcut.py b/tests/hermes_cli/test_subagent_shortcut.pysimilarity index 100%rename from tests/cli/test_subagent_shortcut.pyrename to tests/hermes_cli/test_subagent_shortcut.pydiff --git a/tests/cli/test_terminal_interrupt_recovery.py b/tests/hermes_cli/test_terminal_interrupt_recovery.pysimilarity index 100%rename from tests/cli/test_terminal_interrupt_recovery.pyrename to tests/hermes_cli/test_terminal_interrupt_recovery.pydiff --git a/tests/hermes_cli/test_terminal_io_broken_81521.py b/tests/hermes_cli/test_terminal_io_broken.pysimilarity index 100%rename from tests/hermes_cli/test_terminal_io_broken_81521.pyrename to tests/hermes_cli/test_terminal_io_broken.pydiff --git a/tests/cli/test_termios_drift_heal.py b/tests/hermes_cli/test_termios_drift_heal.pysimilarity index 100%rename from tests/cli/test_termios_drift_heal.pyrename to tests/hermes_cli/test_termios_drift_heal.pydiff --git a/tests/cli/test_tool_gen_start_dedupe.py b/tests/hermes_cli/test_tool_gen_start_dedupe.pysimilarity index 100%rename from tests/cli/test_tool_gen_start_dedupe.pyrename to tests/hermes_cli/test_tool_gen_start_dedupe.pydiff --git a/tests/cli/test_tool_progress_scrollback.py b/tests/hermes_cli/test_tool_progress_scrollback.pysimilarity index 100%rename from tests/cli/test_tool_progress_scrollback.pyrename to tests/hermes_cli/test_tool_progress_scrollback.pydiff --git a/tests/cli/test_transformed_stream_output.py b/tests/hermes_cli/test_transformed_stream_output.pysimilarity index 100%rename from tests/cli/test_transformed_stream_output.pyrename to tests/hermes_cli/test_transformed_stream_output.pydiff --git a/tests/cli/test_tui_rapid_enter_paste.py b/tests/hermes_cli/test_tui_rapid_enter_paste.pysimilarity index 100%rename from tests/cli/test_tui_rapid_enter_paste.pyrename to tests/hermes_cli/test_tui_rapid_enter_paste.pydiff --git a/tests/cli/test_tui_terminal_reset_on_exit.py b/tests/hermes_cli/test_tui_terminal_reset_on_exit.pysimilarity index 100%rename from tests/cli/test_tui_terminal_reset_on_exit.pyrename to tests/hermes_cli/test_tui_terminal_reset_on_exit.pydiff --git a/tests/cli/test_update_command.py b/tests/hermes_cli/test_update_command.pysimilarity index 100%rename from tests/cli/test_update_command.pyrename to tests/hermes_cli/test_update_command.pydiff --git a/tests/cli/test_version_command.py b/tests/hermes_cli/test_version_command.pysimilarity index 100%rename from tests/cli/test_version_command.pyrename to tests/hermes_cli/test_version_command.pydiff --git a/tests/cli/test_vim_mode_command.py b/tests/hermes_cli/test_vim_mode_command.pysimilarity index 100%rename from tests/cli/test_vim_mode_command.pyrename to tests/hermes_cli/test_vim_mode_command.pydiff --git a/tests/test_web_server_sessiondb_eventloop.py b/tests/hermes_cli/test_web_server_sessiondb_eventloop.pysimilarity index 100%rename from tests/test_web_server_sessiondb_eventloop.pyrename to tests/hermes_cli/test_web_server_sessiondb_eventloop.pydiff --git a/tests/test_web_server_status_topology_cache.py b/tests/hermes_cli/test_web_server_status_topology_cache.pysimilarity index 100%rename from tests/test_web_server_status_topology_cache.pyrename to tests/hermes_cli/test_web_server_status_topology_cache.pydiff --git a/tests/test_web_server.py b/tests/hermes_cli/test_web_server_ws_ping.pysimilarity index 100%rename from tests/test_web_server.pyrename to tests/hermes_cli/test_web_server_ws_ping.pydiff --git a/tests/hermes_cli/test_windows_gateway_job_teardown_48820.py b/tests/hermes_cli/test_windows_gateway_job_teardown.pysimilarity index 100%rename from tests/hermes_cli/test_windows_gateway_job_teardown_48820.pyrename to tests/hermes_cli/test_windows_gateway_job_teardown.pydiff --git a/tests/cli/test_worktree.py b/tests/hermes_cli/test_worktree.pysimilarity index 100%rename from tests/cli/test_worktree.pyrename to tests/hermes_cli/test_worktree.pydiff --git a/tests/cli/test_worktree_pushed_tier.py b/tests/hermes_cli/test_worktree_pushed_tier.pysimilarity index 100%rename from tests/cli/test_worktree_pushed_tier.pyrename to tests/hermes_cli/test_worktree_pushed_tier.pydiff --git a/tests/cli/test_worktree_security.py b/tests/hermes_cli/test_worktree_security.pysimilarity index 100%rename from tests/cli/test_worktree_security.pyrename to tests/hermes_cli/test_worktree_security.pydiff --git a/tests/cli/test_worktree_selfheal.py b/tests/hermes_cli/test_worktree_selfheal.pysimilarity index 100%rename from tests/cli/test_worktree_selfheal.pyrename to tests/hermes_cli/test_worktree_selfheal.pydiff --git a/tests/cli/test_worktree_sync_base.py b/tests/hermes_cli/test_worktree_sync_base.pysimilarity index 100%rename from tests/cli/test_worktree_sync_base.pyrename to tests/hermes_cli/test_worktree_sync_base.pydiff --git a/tests/state/test_append_message_after_close_94736.py b/tests/hermes_state/test_append_message_after_close.pysimilarity index 100%rename from tests/state/test_append_message_after_close_94736.pyrename to tests/hermes_state/test_append_message_after_close.pydiff --git a/tests/hermes_state/test_88197_automatic_ended_stamp.py b/tests/hermes_state/test_automatic_ended_stamp.pysimilarity index 100%rename from tests/hermes_state/test_88197_automatic_ended_stamp.pyrename to tests/hermes_state/test_automatic_ended_stamp.pydiff --git a/tests/test_background_review_session_isolation.py b/tests/hermes_state/test_background_review_session_isolation.pysimilarity index 100%rename from tests/test_background_review_session_isolation.pyrename to tests/hermes_state/test_background_review_session_isolation.pydiff --git a/tests/state/test_compression_lease_refresh_before_publish.py b/tests/hermes_state/test_compression_lease_refresh_before_publish.pysimilarity index 100%rename from tests/state/test_compression_lease_refresh_before_publish.pyrename to tests/hermes_state/test_compression_lease_refresh_before_publish.pydiff --git a/tests/state/test_compression_lineage_guard.py b/tests/hermes_state/test_compression_lineage_guard.pysimilarity index 100%rename from tests/state/test_compression_lineage_guard.pyrename to tests/hermes_state/test_compression_lineage_guard.pydiff --git a/tests/test_compression_watermark_commit.py b/tests/hermes_state/test_compression_watermark_commit.pysimilarity index 100%rename from tests/test_compression_watermark_commit.pyrename to tests/hermes_state/test_compression_watermark_commit.pydiff --git a/tests/test_conftest_wal_gate.py b/tests/hermes_state/test_conftest_wal_gate.pysimilarity index 100%rename from tests/test_conftest_wal_gate.pyrename to tests/hermes_state/test_conftest_wal_gate.pydiff --git a/tests/state/test_dedupe_migration_contention.py b/tests/hermes_state/test_dedupe_migration_contention.pysimilarity index 100%rename from tests/state/test_dedupe_migration_contention.pyrename to tests/hermes_state/test_dedupe_migration_contention.pydiff --git a/tests/test_delegate_cascade_49148.py b/tests/hermes_state/test_delegate_cascade.pysimilarity index 100%rename from tests/test_delegate_cascade_49148.pyrename to tests/hermes_state/test_delegate_cascade.pydiff --git a/tests/state/test_disk_full_error.py b/tests/hermes_state/test_disk_full_error.pysimilarity index 100%rename from tests/state/test_disk_full_error.pyrename to tests/hermes_state/test_disk_full_error.pydiff --git a/tests/hermes_state/test_empty_sweep_archived_transcript_95868.py b/tests/hermes_state/test_empty_sweep_archived_transcript.pysimilarity index 100%rename from tests/hermes_state/test_empty_sweep_archived_transcript_95868.pyrename to tests/hermes_state/test_empty_sweep_archived_transcript.pydiff --git a/tests/test_fts_cjk_bigram.py b/tests/hermes_state/test_fts_cjk_bigram.pysimilarity index 99%rename from tests/test_fts_cjk_bigram.pyrename to tests/hermes_state/test_fts_cjk_bigram.pyindex 19c20e64607..8bcfbc85240 100644--- a/tests/test_fts_cjk_bigram.py+++ b/tests/hermes_state/test_fts_cjk_bigram.py@@ -14,7 +14,7 @@ import pytestfrom hermes_state import SessionDBfrom hermes_state_common import FTS_CJK_STALE_KEY-REPO = Path(__file__).resolve().parent.parent+REPO = Path(__file__).resolve().parent.parent.parentSRC = REPO / "native" / "fts5_cjk" / "fts5_cjk.c"VENDOR = REPO / "native" / "fts5_cjk" / "vendor"diff --git a/tests/state/test_fts_fresh_bootstrap_admission.py b/tests/hermes_state/test_fts_fresh_bootstrap_admission.pysimilarity index 100%rename from tests/state/test_fts_fresh_bootstrap_admission.pyrename to tests/hermes_state/test_fts_fresh_bootstrap_admission.pydiff --git a/tests/state/test_fts_holder_instance_scope.py b/tests/hermes_state/test_fts_holder_instance_scope.pysimilarity index 100%rename from tests/state/test_fts_holder_instance_scope.pyrename to tests/hermes_state/test_fts_holder_instance_scope.pydiff --git a/tests/state/test_fts_index_fail_open.py b/tests/hermes_state/test_fts_index_fail_open.pysimilarity index 100%rename from tests/state/test_fts_index_fail_open.pyrename to tests/hermes_state/test_fts_index_fail_open.pydiff --git a/tests/state/test_fts_orphan_shadow_repair.py b/tests/hermes_state/test_fts_orphan_shadow_repair.pysimilarity index 100%rename from tests/state/test_fts_orphan_shadow_repair.pyrename to tests/hermes_state/test_fts_orphan_shadow_repair.pydiff --git a/tests/state/test_fts_rebuild_admission.py b/tests/hermes_state/test_fts_rebuild_admission.pysimilarity index 100%rename from tests/state/test_fts_rebuild_admission.pyrename to tests/hermes_state/test_fts_rebuild_admission.pydiff --git a/tests/state/test_fts_runtime_rebuild.py b/tests/hermes_state/test_fts_runtime_rebuild.pysimilarity index 100%rename from tests/state/test_fts_runtime_rebuild.pyrename to tests/hermes_state/test_fts_runtime_rebuild.pydiff --git a/tests/test_fts_tool_write_bounds.py b/tests/hermes_state/test_fts_tool_write_bounds.pysimilarity index 100%rename from tests/test_fts_tool_write_bounds.pyrename to tests/hermes_state/test_fts_tool_write_bounds.pydiff --git a/tests/state/test_fts_trigram_cron_exclusion.py b/tests/hermes_state/test_fts_trigram_cron_exclusion.pysimilarity index 100%rename from tests/state/test_fts_trigram_cron_exclusion.pyrename to tests/hermes_state/test_fts_trigram_cron_exclusion.pydiff --git a/tests/state/test_fts_trigram_subagent_exclusion.py b/tests/hermes_state/test_fts_trigram_subagent_exclusion.pysimilarity index 100%rename from tests/state/test_fts_trigram_subagent_exclusion.pyrename to tests/hermes_state/test_fts_trigram_subagent_exclusion.pydiff --git a/tests/test_fts_update_of_narrowing.py b/tests/hermes_state/test_fts_update_of_narrowing.pysimilarity index 100%rename from tests/test_fts_update_of_narrowing.pyrename to tests/hermes_state/test_fts_update_of_narrowing.pydiff --git a/tests/test_guest_durability_barriers.py b/tests/hermes_state/test_guest_durability_barriers.pysimilarity index 100%rename from tests/test_guest_durability_barriers.pyrename to tests/hermes_state/test_guest_durability_barriers.pydiff --git a/tests/test_hermes_state.py b/tests/hermes_state/test_hermes_state.pysimilarity index 100%rename from tests/test_hermes_state.pyrename to tests/hermes_state/test_hermes_state.pydiff --git a/tests/test_hermes_state_compression_busy_retry.py b/tests/hermes_state/test_hermes_state_compression_busy_retry.pysimilarity index 100%rename from tests/test_hermes_state_compression_busy_retry.pyrename to tests/hermes_state/test_hermes_state_compression_busy_retry.pydiff --git a/tests/test_hermes_state_compression_locks.py b/tests/hermes_state/test_hermes_state_compression_locks.pysimilarity index 100%rename from tests/test_hermes_state_compression_locks.pyrename to tests/hermes_state/test_hermes_state_compression_locks.pydiff --git a/tests/test_hermes_state_conn_lock_audit.py b/tests/hermes_state/test_hermes_state_conn_lock_audit.pysimilarity index 98%rename from tests/test_hermes_state_conn_lock_audit.pyrename to tests/hermes_state/test_hermes_state_conn_lock_audit.pyindex f8669924fda..1b05f788b76 100644--- a/tests/test_hermes_state_conn_lock_audit.py+++ b/tests/hermes_state/test_hermes_state_conn_lock_audit.py@@ -34,7 +34,7 @@ _ALLOWED_UNLOCKED_FNS = frozenset({def _repo_root() -> Path:- return Path(__file__).resolve().parents[1]+ return Path(__file__).resolve().parents[2]def _nearest_enclosing_fn(tree: ast.AST) -> dict:diff --git a/tests/test_hermes_state_ids.py b/tests/hermes_state/test_hermes_state_ids.pysimilarity index 100%rename from tests/test_hermes_state_ids.pyrename to tests/hermes_state/test_hermes_state_ids.pydiff --git a/tests/test_hermes_state_readonly_preflight.py b/tests/hermes_state/test_hermes_state_readonly_preflight.pysimilarity index 100%rename from tests/test_hermes_state_readonly_preflight.pyrename to tests/hermes_state/test_hermes_state_readonly_preflight.pydiff --git a/tests/test_hermes_state_wal_fallback.py b/tests/hermes_state/test_hermes_state_wal_fallback.pysimilarity index 100%rename from tests/test_hermes_state_wal_fallback.pyrename to tests/hermes_state/test_hermes_state_wal_fallback.pydiff --git a/tests/test_journal_mode_config.py b/tests/hermes_state/test_journal_mode_config.pysimilarity index 100%rename from tests/test_journal_mode_config.pyrename to tests/hermes_state/test_journal_mode_config.pydiff --git a/tests/test_journal_mode_upgrade_warning.py b/tests/hermes_state/test_journal_mode_upgrade_warning.pysimilarity index 100%rename from tests/test_journal_mode_upgrade_warning.pyrename to tests/hermes_state/test_journal_mode_upgrade_warning.pydiff --git a/tests/state/test_no_locked_readers_gate.py b/tests/hermes_state/test_no_locked_readers_gate.pysimilarity index 100%rename from tests/state/test_no_locked_readers_gate.pyrename to tests/hermes_state/test_no_locked_readers_gate.pydiff --git a/tests/state/test_no_more_rows_retry.py b/tests/hermes_state/test_no_more_rows_retry.pysimilarity index 100%rename from tests/state/test_no_more_rows_retry.pyrename to tests/hermes_state/test_no_more_rows_retry.pydiff --git a/tests/hermes_state/test_94895_orphan_sweep_cross_backend.py b/tests/hermes_state/test_orphan_sweep_cross_backend.pysimilarity index 100%rename from tests/hermes_state/test_94895_orphan_sweep_cross_backend.pyrename to tests/hermes_state/test_orphan_sweep_cross_backend.pydiff --git a/tests/test_98924_readonly_fts_decode_error.py b/tests/hermes_state/test_readonly_fts_decode_error.pysimilarity index 100%rename from tests/test_98924_readonly_fts_decode_error.pyrename to tests/hermes_state/test_readonly_fts_decode_error.pydiff --git a/tests/test_schema_read_probe.py b/tests/hermes_state/test_schema_read_probe.pysimilarity index 100%rename from tests/test_schema_read_probe.pyrename to tests/hermes_state/test_schema_read_probe.pydiff --git a/tests/test_search_slow_query_log.py b/tests/hermes_state/test_search_slow_query_log.pysimilarity index 100%rename from tests/test_search_slow_query_log.pyrename to tests/hermes_state/test_search_slow_query_log.pydiff --git a/tests/test_session_db_context_manager.py b/tests/hermes_state/test_session_db_context_manager.pysimilarity index 100%rename from tests/test_session_db_context_manager.pyrename to tests/hermes_state/test_session_db_context_manager.pydiff --git a/tests/test_session_db_profile_stamp.py b/tests/hermes_state/test_session_db_profile_stamp.pysimilarity index 100%rename from tests/test_session_db_profile_stamp.pyrename to tests/hermes_state/test_session_db_profile_stamp.pydiff --git a/tests/test_session_db_read_conn_pool.py b/tests/hermes_state/test_session_db_read_conn_pool.pysimilarity index 100%rename from tests/test_session_db_read_conn_pool.pyrename to tests/hermes_state/test_session_db_read_conn_pool.pydiff --git a/tests/test_session_db_read_path_split.py b/tests/hermes_state/test_session_db_read_path_split.pysimilarity index 100%rename from tests/test_session_db_read_path_split.pyrename to tests/hermes_state/test_session_db_read_path_split.pydiff --git a/tests/test_session_delete_profile_isolation.py b/tests/hermes_state/test_session_delete_profile_isolation.pysimilarity index 100%rename from tests/test_session_delete_profile_isolation.pyrename to tests/hermes_state/test_session_delete_profile_isolation.pydiff --git a/tests/state/test_session_git_metadata_generation.py b/tests/hermes_state/test_session_git_metadata_generation.pysimilarity index 100%rename from tests/state/test_session_git_metadata_generation.pyrename to tests/hermes_state/test_session_git_metadata_generation.pydiff --git a/tests/state/test_session_model_usage_pk_heal.py b/tests/hermes_state/test_session_model_usage_pk_heal.pysimilarity index 100%rename from tests/state/test_session_model_usage_pk_heal.pyrename to tests/hermes_state/test_session_model_usage_pk_heal.pydiff --git a/tests/state/test_session_turn_lease.py b/tests/hermes_state/test_session_turn_lease.pysimilarity index 100%rename from tests/state/test_session_turn_lease.pyrename to tests/hermes_state/test_session_turn_lease.pydiff --git a/tests/test_session_workspace_binding.py b/tests/hermes_state/test_session_workspace_binding.pysimilarity index 100%rename from tests/test_session_workspace_binding.pyrename to tests/hermes_state/test_session_workspace_binding.pydiff --git a/tests/test_sqlite_lock_safe_inspection.py b/tests/hermes_state/test_sqlite_lock_safe_inspection.pysimilarity index 100%rename from tests/test_sqlite_lock_safe_inspection.pyrename to tests/hermes_state/test_sqlite_lock_safe_inspection.pydiff --git a/tests/test_sqlite_wal_reset_gate.py b/tests/hermes_state/test_sqlite_wal_reset_gate.pysimilarity index 100%rename from tests/test_sqlite_wal_reset_gate.pyrename to tests/hermes_state/test_sqlite_wal_reset_gate.pydiff --git a/tests/test_stale_tool_call_marker_session_repair.py b/tests/hermes_state/test_stale_tool_call_marker_session_repair.pysimilarity index 100%rename from tests/test_stale_tool_call_marker_session_repair.pyrename to tests/hermes_state/test_stale_tool_call_marker_session_repair.pydiff --git a/tests/test_state_db_fts_segment_collision_probe.py b/tests/hermes_state/test_state_db_fts_segment_collision_probe.pysimilarity index 100%rename from tests/test_state_db_fts_segment_collision_probe.pyrename to tests/hermes_state/test_state_db_fts_segment_collision_probe.pydiff --git a/tests/state/test_state_db_holders.py b/tests/hermes_state/test_state_db_holders.pysimilarity index 100%rename from tests/state/test_state_db_holders.pyrename to tests/hermes_state/test_state_db_holders.pydiff --git a/tests/state/test_state_db_lock_fail_closed.py b/tests/hermes_state/test_state_db_lock_fail_closed.pysimilarity index 100%rename from tests/state/test_state_db_lock_fail_closed.pyrename to tests/hermes_state/test_state_db_lock_fail_closed.pydiff --git a/tests/test_state_db_malformed_repair.py b/tests/hermes_state/test_state_db_malformed_repair.pysimilarity index 100%rename from tests/test_state_db_malformed_repair.pyrename to tests/hermes_state/test_state_db_malformed_repair.pydiff --git a/tests/test_state_db_notadb_fail_closed.py b/tests/hermes_state/test_state_db_notadb_fail_closed.pysimilarity index 100%rename from tests/test_state_db_notadb_fail_closed.pyrename to tests/hermes_state/test_state_db_notadb_fail_closed.pydiff --git a/tests/test_state_db_repair_live_writer_guard.py b/tests/hermes_state/test_state_db_repair_live_writer_guard.pysimilarity index 100%rename from tests/test_state_db_repair_live_writer_guard.pyrename to tests/hermes_state/test_state_db_repair_live_writer_guard.pydiff --git a/tests/test_state_db_repair_loop_cap.py b/tests/hermes_state/test_state_db_repair_loop_cap.pysimilarity index 100%rename from tests/test_state_db_repair_loop_cap.pyrename to tests/hermes_state/test_state_db_repair_loop_cap.pydiff --git a/tests/test_state_db_repair_loop_mtime.py b/tests/hermes_state/test_state_db_repair_loop_mtime.pysimilarity index 100%rename from tests/test_state_db_repair_loop_mtime.pyrename to tests/hermes_state/test_state_db_repair_loop_mtime.pydiff --git a/tests/test_state_db_repair_non_destructive.py b/tests/hermes_state/test_state_db_repair_non_destructive.pysimilarity index 100%rename from tests/test_state_db_repair_non_destructive.pyrename to tests/hermes_state/test_state_db_repair_non_destructive.pydiff --git a/tests/test_state_db_stats.py b/tests/hermes_state/test_state_db_stats.pysimilarity index 100%rename from tests/test_state_db_stats.pyrename to tests/hermes_state/test_state_db_stats.pydiff --git a/tests/state/test_state_db_wal_unlink_race.py b/tests/hermes_state/test_state_db_wal_unlink_race.pysimilarity index 100%rename from tests/state/test_state_db_wal_unlink_race.pyrename to tests/hermes_state/test_state_db_wal_unlink_race.pydiff --git a/tests/test_state_db_write_durability.py b/tests/hermes_state/test_state_db_write_durability.pysimilarity index 100%rename from tests/test_state_db_write_durability.pyrename to tests/hermes_state/test_state_db_write_durability.pydiff --git a/tests/test_state_synchronous_pragma.py b/tests/hermes_state/test_state_synchronous_pragma.pysimilarity index 98%rename from tests/test_state_synchronous_pragma.pyrename to tests/hermes_state/test_state_synchronous_pragma.pyindex ce34c8d0250..e6ec50ecf66 100644--- a/tests/test_state_synchronous_pragma.py+++ b/tests/hermes_state/test_state_synchronous_pragma.py@@ -222,7 +222,7 @@ def test_example_config_documents_the_key():"""An unpinnable durability level is the bug; docs are half the fix."""from pathlib import Path- text = Path(__file__).resolve().parents[1] / "cli-config.yaml.example"+ text = Path(__file__).resolve().parents[2] / "cli-config.yaml.example"body = text.read_text(encoding="utf-8")assert "synchronous: FULL" in body@@ -239,7 +239,7 @@ def test_example_config_calls_the_darwin_rule_a_floor_not_a_pin():from pathlib import Pathbody = (- Path(__file__).resolve().parents[1] / "cli-config.yaml.example"+ Path(__file__).resolve().parents[2] / "cli-config.yaml.example").read_text(encoding="utf-8")assert "floor, not a pin" in bodyassert "EXTRA is honored" in bodydiff --git a/tests/hermes_state/test_86366_tail_rewind_semantics.py b/tests/hermes_state/test_tail_rewind_semantics.pysimilarity index 100%rename from tests/hermes_state/test_86366_tail_rewind_semantics.pyrename to tests/hermes_state/test_tail_rewind_semantics.pydiff --git a/tests/test_wal_checkpoint_strategy.py b/tests/hermes_state/test_wal_checkpoint_strategy.pysimilarity index 100%rename from tests/test_wal_checkpoint_strategy.pyrename to tests/hermes_state/test_wal_checkpoint_strategy.pydiff --git a/tests/hermes_state/test_86366_watermark_interplay.py b/tests/hermes_state/test_watermark_interplay.pysimilarity index 100%rename from tests/hermes_state/test_86366_watermark_interplay.pyrename to tests/hermes_state/test_watermark_interplay.pydiff --git a/tests/state/test_write_lock_patience.py b/tests/hermes_state/test_write_lock_patience.pysimilarity index 100%rename from tests/state/test_write_lock_patience.pyrename to tests/hermes_state/test_write_lock_patience.pydiff --git a/tests/state/test_writer_conn_thread_safety.py b/tests/hermes_state/test_writer_conn_thread_safety.pysimilarity index 100%rename from tests/state/test_writer_conn_thread_safety.pyrename to tests/hermes_state/test_writer_conn_thread_safety.pydiff --git a/tests/test_zeroed_state_db.py b/tests/hermes_state/test_zeroed_state_db.pysimilarity index 100%rename from tests/test_zeroed_state_db.pyrename to tests/hermes_state/test_zeroed_state_db.pydiff --git a/tests/perf_guards/test_pattern_b_scaling.py b/tests/perf_guards/test_pattern_b_scaling.pyindex 7d3dead17ef..fce2d94c5a1 100644--- a/tests/perf_guards/test_pattern_b_scaling.py+++ b/tests/perf_guards/test_pattern_b_scaling.py@@ -127,7 +127,7 @@ class TestListSessionsRichQueryBound:"""Rows from ``list_sessions_rich`` plus the writer-conn statement count.Uses the house trace-callback idiom (``statements.append`` — see- tests/test_hermes_state.py) so failures can dump the captured SQL.+ tests/hermes_state/test_hermes_state.py) so failures can dump the captured SQL."""statements: list[str] = []db._conn.set_trace_callback(statements.append)diff --git a/tests/plugins/model_providers/test_deepseek_profile.py b/tests/plugins/model_providers/test_deepseek_profile.pyindex 90788b00a06..d56d68cb8db 100644--- a/tests/plugins/model_providers/test_deepseek_profile.py+++ b/tests/plugins/model_providers/test_deepseek_profile.py@@ -141,7 +141,7 @@ class TestDeepSeekModelGating:class TestDeepSeekFullKwargsIntegration:"""End-to-end: the transport's full kwargs match DeepSeek's live wire format.- The live test harness in ``tests/run_agent/test_deepseek_v4_thinking_live.py``+ The live test harness in ``tests/agent/test_deepseek_v4_thinking_live.py``sends ``{"reasoning_effort": "high", "extra_body": {"thinking": {"type":"enabled"}}}``. Confirm the transport produces that exact shape when wiredthrough the registered DeepSeek profile.diff --git a/tests/test_honcho_client_concurrency.py b/tests/plugins/test_honcho_client_concurrency.pysimilarity index 100%rename from tests/test_honcho_client_concurrency.pyrename to tests/plugins/test_honcho_client_concurrency.pydiff --git a/tests/test_honcho_client_config.py b/tests/plugins/test_honcho_client_config.pysimilarity index 100%rename from tests/test_honcho_client_config.pyrename to tests/plugins/test_honcho_client_config.pydiff --git a/tests/test_honcho_session_context.py b/tests/plugins/test_honcho_session_context.pysimilarity index 100%rename from tests/test_honcho_session_context.pyrename to tests/plugins/test_honcho_session_context.pydiff --git a/tests/test_honcho_startup_fail_open.py b/tests/plugins/test_honcho_startup_fail_open.pysimilarity index 100%rename from tests/test_honcho_startup_fail_open.pyrename to tests/plugins/test_honcho_startup_fail_open.pydiff --git a/tests/test_plugin_storage.py b/tests/plugins/test_plugin_storage.pysimilarity index 100%rename from tests/test_plugin_storage.pyrename to tests/plugins/test_plugin_storage.pydiff --git a/tests/test_plugin_utils.py b/tests/plugins/test_plugin_utils.pysimilarity index 100%rename from tests/test_plugin_utils.pyrename to tests/plugins/test_plugin_utils.pydiff --git a/tests/test_plugins_manage_profile_scope.py b/tests/plugins/test_plugins_manage_profile_scope.pysimilarity index 100%rename from tests/test_plugins_manage_profile_scope.pyrename to tests/plugins/test_plugins_manage_profile_scope.pydiff --git a/tests/test_secret_scope_plugin_families.py b/tests/plugins/test_secret_scope_plugin_families.pysimilarity index 100%rename from tests/test_secret_scope_plugin_families.pyrename to tests/plugins/test_secret_scope_plugin_families.pydiff --git a/tests/test_telegram_polling_progress_ptb.py b/tests/plugins/test_telegram_polling_progress_ptb.pysimilarity index 100%rename from tests/test_telegram_polling_progress_ptb.pyrename to tests/plugins/test_telegram_polling_progress_ptb.pydiff --git a/tests/test_transform_api_error_classification_hook.py b/tests/plugins/test_transform_api_error_classification_hook.pysimilarity index 100%rename from tests/test_transform_api_error_classification_hook.pyrename to tests/plugins/test_transform_api_error_classification_hook.pydiff --git a/tests/test_transform_llm_output_hook.py b/tests/plugins/test_transform_llm_output_hook.pysimilarity index 100%rename from tests/test_transform_llm_output_hook.pyrename to tests/plugins/test_transform_llm_output_hook.pydiff --git a/tests/test_transform_tool_result_hook.py b/tests/plugins/test_transform_tool_result_hook.pysimilarity index 100%rename from tests/test_transform_tool_result_hook.pyrename to tests/plugins/test_transform_tool_result_hook.pydiff --git a/tests/run_agent/__init__.py b/tests/run_agent/__init__.pydeleted file mode 100644index e69de29bb2d..00000000000diff --git a/tests/test_desktop_update_linux_gate.py b/tests/scripts/desktop_update/test_desktop_update_linux_gate.pysimilarity index 95%rename from tests/test_desktop_update_linux_gate.pyrename to tests/scripts/desktop_update/test_desktop_update_linux_gate.pyindex f7aa76f9b66..d88b1fab1fb 100644--- a/tests/test_desktop_update_linux_gate.py+++ b/tests/scripts/desktop_update/test_desktop_update_linux_gate.py@@ -16,7 +16,7 @@ from pathlib import Pathimport pytest-POSIX_SH = Path(__file__).resolve().parent.parent / "scripts" / "desktop-update" / "posix.sh"+POSIX_SH = Path(__file__).resolve().parent.parent.parent.parent / "scripts" / "desktop-update" / "posix.sh"pytestmark = pytest.mark.linux_onlydiff --git a/tests/test_desktop_update_shim_profile_cleanup.py b/tests/scripts/desktop_update/test_desktop_update_shim_profile_cleanup.pysimilarity index 97%rename from tests/test_desktop_update_shim_profile_cleanup.pyrename to tests/scripts/desktop_update/test_desktop_update_shim_profile_cleanup.pyindex 980387d721f..bc4d4a04499 100644--- a/tests/test_desktop_update_shim_profile_cleanup.py+++ b/tests/scripts/desktop_update/test_desktop_update_shim_profile_cleanup.py@@ -39,7 +39,7 @@ def test_shim_removes_only_its_owned_profile(tmp_path, outcome):"HERMES_UPDATE_SHIM_GRACE_SECONDS": "1", "HERMES_SELFTEST_FAIL": "1" if outcome == "error" else ""}process = subprocess.Popen(["bash", "-c", 'while [ ! -f "$HOME/start" ]; do sleep .05; done; exec bash "$@"', "probe",- str(Path(__file__).resolve().parents[1] / "scripts/desktop-update/posix.sh"),+ str(Path(__file__).resolve().parents[3] / "scripts/desktop-update/posix.sh"),"--install-root", str(install), "--self-test-ui"],env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True,)diff --git a/tests/test_desktop_update_shim_progress.py b/tests/scripts/desktop_update/test_desktop_update_shim_progress.pysimilarity index 99%rename from tests/test_desktop_update_shim_progress.pyrename to tests/scripts/desktop_update/test_desktop_update_shim_progress.pyindex 5af2ab9e960..53033683eb8 100644--- a/tests/test_desktop_update_shim_progress.py+++ b/tests/scripts/desktop_update/test_desktop_update_shim_progress.py@@ -18,7 +18,7 @@ from urllib.request import urlopenimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentSHIM_DIR = REPO_ROOT / "scripts" / "desktop-update"# posix.sh re-execs itself through these to detach from Electron's processdiff --git a/tests/test_desktop_update_tcc_heal.py b/tests/scripts/desktop_update/test_desktop_update_tcc_heal.pysimilarity index 99%rename from tests/test_desktop_update_tcc_heal.pyrename to tests/scripts/desktop_update/test_desktop_update_tcc_heal.pyindex a8eae77c495..a9610ed4d12 100644--- a/tests/test_desktop_update_tcc_heal.py+++ b/tests/scripts/desktop_update/test_desktop_update_tcc_heal.py@@ -28,7 +28,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentPOSIX_SH = REPO_ROOT / "scripts" / "desktop-update" / "posix.sh"GOOD_STUB = "#!/bin/bash\n# bootable interpreter stub\nexit 0\n"diff --git a/tests/test_desktop_update_windows_cwd.py b/tests/scripts/desktop_update/test_desktop_update_windows_cwd.pysimilarity index 96%rename from tests/test_desktop_update_windows_cwd.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_cwd.pyindex 7847da0497e..c2ddbe85427 100644--- a/tests/test_desktop_update_windows_cwd.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_cwd.py@@ -12,7 +12,7 @@ import pytestpytestmark = pytest.mark.windows_only-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentWINDOWS_UPDATE_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"diff --git a/tests/test_desktop_update_windows_pipe_drain.py b/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.pysimilarity index 99%rename from tests/test_desktop_update_windows_pipe_drain.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.pyindex d3cd1e8ee80..850f40bb464 100644--- a/tests/test_desktop_update_windows_pipe_drain.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_pipe_drain.py@@ -52,7 +52,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentWINDOWS_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"diff --git a/tests/test_desktop_update_windows_progress.py b/tests/scripts/desktop_update/test_desktop_update_windows_progress.pysimilarity index 98%rename from tests/test_desktop_update_windows_progress.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_progress.pyindex 70708d754bc..f9ee92abb53 100644--- a/tests/test_desktop_update_windows_progress.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_progress.py@@ -22,7 +22,7 @@ import pytestpytestmark = pytest.mark.windows_only-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentWINDOWS_UPDATE_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"diff --git a/tests/test_desktop_update_windows_python_handoff.py b/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.pysimilarity index 98%rename from tests/test_desktop_update_windows_python_handoff.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.pyindex e63eb9dd287..679483a0c18 100644--- a/tests/test_desktop_update_windows_python_handoff.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_python_handoff.py@@ -32,7 +32,7 @@ import refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentWINDOWS_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"diff --git a/tests/test_desktop_update_windows_retry_policy.py b/tests/scripts/desktop_update/test_desktop_update_windows_retry_policy.pysimilarity index 96%rename from tests/test_desktop_update_windows_retry_policy.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_retry_policy.pyindex 8fafbca24c5..c97105bea96 100644--- a/tests/test_desktop_update_windows_retry_policy.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_retry_policy.py@@ -9,7 +9,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentRETRY_POLICY = REPO_ROOT / "scripts" / "desktop-update" / "retry-policy.ps1"diff --git a/tests/test_desktop_update_windows_timestamp.py b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.pysimilarity index 95%rename from tests/test_desktop_update_windows_timestamp.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_timestamp.pyindex 5efd0cc04b4..e8bd8306d98 100644--- a/tests/test_desktop_update_windows_timestamp.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_timestamp.py@@ -15,7 +15,7 @@ from __future__ import annotationsfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentWINDOWS_UPDATE_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"diff --git a/tests/test_desktop_update_windows_ui_delivery.py b/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.pysimilarity index 98%rename from tests/test_desktop_update_windows_ui_delivery.pyrename to tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.pyindex dcd7b17c968..3558ee385d8 100644--- a/tests/test_desktop_update_windows_ui_delivery.py+++ b/tests/scripts/desktop_update/test_desktop_update_windows_ui_delivery.py@@ -16,7 +16,7 @@ from urllib.request import Request, urlopenimport pytestpytestmark = pytest.mark.windows_only-SCRIPT = Path(__file__).resolve().parents[1] / "scripts/desktop-update/windows.ps1"+SCRIPT = Path(__file__).resolve().parents[3] / "scripts/desktop-update/windows.ps1"@contextmanagerdiff --git a/tests/test_install_autostash_conflict_recovery.py b/tests/scripts/install/test_install_autostash_conflict_recovery.pysimilarity index 99%rename from tests/test_install_autostash_conflict_recovery.pyrename to tests/scripts/install/test_install_autostash_conflict_recovery.pyindex 94e19aeec59..210a082df43 100644--- a/tests/test_install_autostash_conflict_recovery.py+++ b/tests/scripts/install/test_install_autostash_conflict_recovery.py@@ -15,7 +15,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"POWERSHELL = next(diff --git a/tests/test_install_clone_throttle_fallback.py b/tests/scripts/install/test_install_clone_throttle_fallback.pysimilarity index 98%rename from tests/test_install_clone_throttle_fallback.pyrename to tests/scripts/install/test_install_clone_throttle_fallback.pyindex cb476889328..973649e8ff9 100644--- a/tests/test_install_clone_throttle_fallback.py+++ b/tests/scripts/install/test_install_clone_throttle_fallback.py@@ -31,7 +31,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"pytestmark = pytest.mark.skipif(diff --git a/tests/test_install_commit_pin_rollback.py b/tests/scripts/install/test_install_commit_pin_rollback.pysimilarity index 98%rename from tests/test_install_commit_pin_rollback.pyrename to tests/scripts/install/test_install_commit_pin_rollback.pyindex 4d6de7986cd..390867c6feb 100644--- a/tests/test_install_commit_pin_rollback.py+++ b/tests/scripts/install/test_install_commit_pin_rollback.py@@ -28,7 +28,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"pytestmark = pytest.mark.skipif(diff --git a/tests/test_install_diverged_update.py b/tests/scripts/install/test_install_diverged_update.pysimilarity index 97%rename from tests/test_install_diverged_update.pyrename to tests/scripts/install/test_install_diverged_update.pyindex a042d8c4838..04cb2db0a75 100644--- a/tests/test_install_diverged_update.py+++ b/tests/scripts/install/test_install_diverged_update.py@@ -14,7 +14,7 @@ from __future__ import annotationsimport refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_lockfile_churn.py b/tests/scripts/install/test_install_lockfile_churn.pysimilarity index 98%rename from tests/test_install_lockfile_churn.pyrename to tests/scripts/install/test_install_lockfile_churn.pyindex 15861e4d01a..0c02f636e67 100644--- a/tests/test_install_lockfile_churn.py+++ b/tests/scripts/install/test_install_lockfile_churn.py@@ -19,7 +19,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_macos_launcher.py b/tests/scripts/install/test_install_macos_launcher.pysimilarity index 97%rename from tests/test_install_macos_launcher.pyrename to tests/scripts/install/test_install_macos_launcher.pyindex fd46c347a7a..7729ed3e030 100644--- a/tests/test_install_macos_launcher.py+++ b/tests/scripts/install/test_install_macos_launcher.py@@ -10,7 +10,7 @@ import subprocessfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_no_initial_commit.py b/tests/scripts/install/test_install_no_initial_commit.pysimilarity index 98%rename from tests/test_install_no_initial_commit.pyrename to tests/scripts/install/test_install_no_initial_commit.pyindex 321ddd0b400..7f028f5f82d 100644--- a/tests/test_install_no_initial_commit.py+++ b/tests/scripts/install/test_install_no_initial_commit.py@@ -21,7 +21,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_ascii_only.py b/tests/scripts/install/test_install_ps1_ascii_only.pysimilarity index 97%rename from tests/test_install_ps1_ascii_only.pyrename to tests/scripts/install/test_install_ps1_ascii_only.pyindex 71638620c2a..30bfa9ed48d 100644--- a/tests/test_install_ps1_ascii_only.py+++ b/tests/scripts/install/test_install_ps1_ascii_only.py@@ -30,7 +30,7 @@ from __future__ import annotationsfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_browser_install.py b/tests/scripts/install/test_install_ps1_browser_install.pysimilarity index 93%rename from tests/test_install_ps1_browser_install.pyrename to tests/scripts/install/test_install_ps1_browser_install.pyindex 0a6b9b556a1..372f648a527 100644--- a/tests/test_install_ps1_browser_install.py+++ b/tests/scripts/install/test_install_ps1_browser_install.py@@ -8,14 +8,14 @@ only via `hermes update`'s npx cache warm or an actual browser-tool call'slazy npx resolution.Linux CI cannot execute the PowerShell installer, so verification here is-source-text-level only, matching tests/test_install_sh_browser_install.py-and tests/test_install_ps1_ascii_only.py.+source-text-level only, matching tests/scripts/install/test_install_sh_browser_install.py+and tests/scripts/install/test_install_ps1_ascii_only.py."""import refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_managed_node_swap.py b/tests/scripts/install/test_install_ps1_managed_node_swap.pysimilarity index 98%rename from tests/test_install_ps1_managed_node_swap.pyrename to tests/scripts/install/test_install_ps1_managed_node_swap.pyindex 7ab389a95c7..d17d06f2b9a 100644--- a/tests/test_install_ps1_managed_node_swap.py+++ b/tests/scripts/install/test_install_ps1_managed_node_swap.py@@ -26,7 +26,7 @@ from __future__ import annotationsimport refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_managed_python_provenance.py b/tests/scripts/install/test_install_ps1_managed_python_provenance.pysimilarity index 99%rename from tests/test_install_ps1_managed_python_provenance.pyrename to tests/scripts/install/test_install_ps1_managed_python_provenance.pyindex 7cccce360e7..2678bec980a 100644--- a/tests/test_install_ps1_managed_python_provenance.py+++ b/tests/scripts/install/test_install_ps1_managed_python_provenance.py@@ -15,7 +15,7 @@ from tests.install_ps1_fake_uv import compile_fake_uvpytestmark = pytest.mark.windows_only-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"def test_fresh_install_manifest_orders_repo_before_checkout_scoped_python(diff --git a/tests/test_install_ps1_native_stderr_eap.py b/tests/scripts/install/test_install_ps1_native_stderr_eap.pysimilarity index 97%rename from tests/test_install_ps1_native_stderr_eap.pyrename to tests/scripts/install/test_install_ps1_native_stderr_eap.pyindex 6afcd0cb878..7ec4df9fbeb 100644--- a/tests/test_install_ps1_native_stderr_eap.py+++ b/tests/scripts/install/test_install_ps1_native_stderr_eap.py@@ -11,7 +11,7 @@ from __future__ import annotationsimport refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_node_path_for_npm.py b/tests/scripts/install/test_install_ps1_node_path_for_npm.pysimilarity index 95%rename from tests/test_install_ps1_node_path_for_npm.pyrename to tests/scripts/install/test_install_ps1_node_path_for_npm.pyindex 9f3a6cb432d..47f296f39c3 100644--- a/tests/test_install_ps1_node_path_for_npm.py+++ b/tests/scripts/install/test_install_ps1_node_path_for_npm.py@@ -10,7 +10,7 @@ from __future__ import annotationsimport refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_ps1_python_fallback_venv.py b/tests/scripts/install/test_install_ps1_python_fallback_venv.pysimilarity index 98%rename from tests/test_install_ps1_python_fallback_venv.pyrename to tests/scripts/install/test_install_ps1_python_fallback_venv.pyindex 91c2286942e..58ef44f1a8e 100644--- a/tests/test_install_ps1_python_fallback_venv.py+++ b/tests/scripts/install/test_install_ps1_python_fallback_venv.py@@ -28,7 +28,7 @@ from pathlib import Pathimport pytest-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"@pytest.fixture(scope="module")diff --git a/tests/test_install_ps1_resolver_strictmode.py b/tests/scripts/install/test_install_ps1_resolver_strictmode.pysimilarity index 98%rename from tests/test_install_ps1_resolver_strictmode.pyrename to tests/scripts/install/test_install_ps1_resolver_strictmode.pyindex dbdf921c7f2..c5d9d60b7a5 100644--- a/tests/test_install_ps1_resolver_strictmode.py+++ b/tests/scripts/install/test_install_ps1_resolver_strictmode.py@@ -24,7 +24,7 @@ from __future__ import annotationsimport refrom pathlib import Path-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"def _ps1() -> str:diff --git a/tests/test_install_ps1_uv_install_fallback.py b/tests/scripts/install/test_install_ps1_uv_install_fallback.pysimilarity index 98%rename from tests/test_install_ps1_uv_install_fallback.pyrename to tests/scripts/install/test_install_ps1_uv_install_fallback.pyindex 0871fd94d17..9435c07a9dc 100644--- a/tests/test_install_ps1_uv_install_fallback.py+++ b/tests/scripts/install/test_install_ps1_uv_install_fallback.py@@ -32,7 +32,7 @@ from pathlib import Pathimport pytest-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"_GITHUB_INSTALLER_URL = ("https://github.com/astral-sh/uv/releases/latest/download/uv-installer.ps1"diff --git a/tests/test_install_ps1_uv_powershell_host.py b/tests/scripts/install/test_install_ps1_uv_powershell_host.pysimilarity index 98%rename from tests/test_install_ps1_uv_powershell_host.pyrename to tests/scripts/install/test_install_ps1_uv_powershell_host.pyindex ea442ce484a..89df184ead6 100644--- a/tests/test_install_ps1_uv_powershell_host.py+++ b/tests/scripts/install/test_install_ps1_uv_powershell_host.py@@ -24,7 +24,7 @@ from pathlib import Pathimport pytest-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"@pytest.fixture(scope="module")diff --git a/tests/test_install_ps1_venv_process_tree.py b/tests/scripts/install/test_install_ps1_venv_process_tree.pysimilarity index 98%rename from tests/test_install_ps1_venv_process_tree.pyrename to tests/scripts/install/test_install_ps1_venv_process_tree.pyindex 23e817e2816..05df59c6ee4 100644--- a/tests/test_install_ps1_venv_process_tree.py+++ b/tests/scripts/install/test_install_ps1_venv_process_tree.py@@ -20,7 +20,7 @@ import pytestfrom tests.install_ps1_fake_uv import compile_fake_uv-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"POWERSHELL = next((candidate for candidate in ("powershell", "pwsh") if shutil.which(candidate)),diff --git a/tests/test_install_ps1_venv_recreate_safety.py b/tests/scripts/install/test_install_ps1_venv_recreate_safety.pysimilarity index 97%rename from tests/test_install_ps1_venv_recreate_safety.pyrename to tests/scripts/install/test_install_ps1_venv_recreate_safety.pyindex 934a97fae08..542d3d582d9 100644--- a/tests/test_install_ps1_venv_recreate_safety.py+++ b/tests/scripts/install/test_install_ps1_venv_recreate_safety.py@@ -8,7 +8,7 @@ leaving a half-installed venv that the next health/blocker probe cannot use.from pathlib import Path-INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"def _function_body(source: str, function_name: str) -> str:diff --git a/tests/test_install_ps1_venv_rename_abort.py b/tests/scripts/install/test_install_ps1_venv_rename_abort.pysimilarity index 97%rename from tests/test_install_ps1_venv_rename_abort.pyrename to tests/scripts/install/test_install_ps1_venv_rename_abort.pyindex a7798417095..e59ca8ec93c 100644--- a/tests/test_install_ps1_venv_rename_abort.py+++ b/tests/scripts/install/test_install_ps1_venv_rename_abort.py@@ -13,7 +13,7 @@ from pathlib import Pathimport pytest-_INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+_INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"@pytest.fixture(scope="module")diff --git a/tests/test_install_ps1_venv_transaction_boundary.py b/tests/scripts/install/test_install_ps1_venv_transaction_boundary.pysimilarity index 96%rename from tests/test_install_ps1_venv_transaction_boundary.pyrename to tests/scripts/install/test_install_ps1_venv_transaction_boundary.pyindex 52f4183ec85..b0ddf23911a 100644--- a/tests/test_install_ps1_venv_transaction_boundary.py+++ b/tests/scripts/install/test_install_ps1_venv_transaction_boundary.py@@ -17,12 +17,12 @@ The contract locked here:baseline-import gate passes (``Complete-VenvTransaction``).The script only runs on Windows, so Linux CI locks the contract at the-source level, same approach as tests/test_install_ps1_venv_recreate_safety.py.+source level, same approach as tests/scripts/install/test_install_ps1_venv_recreate_safety.py."""from pathlib import Path-INSTALL_PS1 = Path(__file__).resolve().parents[1] / "scripts" / "install.ps1"+INSTALL_PS1 = Path(__file__).resolve().parents[3] / "scripts" / "install.ps1"def _function_body(source: str, function_name: str) -> str:diff --git a/tests/test_install_ps1_web_server_syntax_probe.py b/tests/scripts/install/test_install_ps1_web_server_syntax_probe.pysimilarity index 96%rename from tests/test_install_ps1_web_server_syntax_probe.pyrename to tests/scripts/install/test_install_ps1_web_server_syntax_probe.pyindex 14f99f725c8..6378d509a00 100644--- a/tests/test_install_ps1_web_server_syntax_probe.py+++ b/tests/scripts/install/test_install_ps1_web_server_syntax_probe.py@@ -17,7 +17,7 @@ import refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_scripts_computer_use.py b/tests/scripts/install/test_install_scripts_computer_use.pysimilarity index 97%rename from tests/test_install_scripts_computer_use.pyrename to tests/scripts/install/test_install_scripts_computer_use.pyindex e213a2653d7..cb6d8975f1b 100644--- a/tests/test_install_scripts_computer_use.py+++ b/tests/scripts/install/test_install_scripts_computer_use.py@@ -8,7 +8,7 @@ binary is still missing (see test_web_routers_tools_install_on_enable.py).from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_install_sh_acp_launcher.py b/tests/scripts/install/test_install_sh_acp_launcher.pysimilarity index 98%rename from tests/test_install_sh_acp_launcher.pyrename to tests/scripts/install/test_install_sh_acp_launcher.pyindex 27cb4c8f1ae..0a5e30a2e10 100644--- a/tests/test_install_sh_acp_launcher.py+++ b/tests/scripts/install/test_install_sh_acp_launcher.py@@ -16,7 +16,7 @@ import subprocessfrom pathlib import Pathfrom unittest.mock import patch-INSTALL_SH = Path(__file__).resolve().parent.parent / "scripts" / "install.sh"+INSTALL_SH = Path(__file__).resolve().parent.parent.parent.parent / "scripts" / "install.sh"ACP_BLOCK = re.compile(r'( rm -f "\$command_link_dir/hermes-acp".*?'diff --git a/tests/test_install_sh_bootstrap_marker.py b/tests/scripts/install/test_install_sh_bootstrap_marker.pysimilarity index 98%rename from tests/test_install_sh_bootstrap_marker.pyrename to tests/scripts/install/test_install_sh_bootstrap_marker.pyindex 6eab5d6599d..ec403006f36 100644--- a/tests/test_install_sh_bootstrap_marker.py+++ b/tests/scripts/install/test_install_sh_bootstrap_marker.py@@ -16,7 +16,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_browser_install.py b/tests/scripts/install/test_install_sh_browser_install.pysimilarity index 99%rename from tests/test_install_sh_browser_install.pyrename to tests/scripts/install/test_install_sh_browser_install.pyindex a080bcdde22..e2f5f0323ce 100644--- a/tests/test_install_sh_browser_install.py+++ b/tests/scripts/install/test_install_sh_browser_install.py@@ -8,7 +8,7 @@ unsupported distribution.from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_install_method_stamp.py b/tests/scripts/install/test_install_sh_install_method_stamp.pysimilarity index 96%rename from tests/test_install_sh_install_method_stamp.pyrename to tests/scripts/install/test_install_sh_install_method_stamp.pyindex b2a1b7da8cf..6ca5f09ed28 100644--- a/tests/test_install_sh_install_method_stamp.py+++ b/tests/scripts/install/test_install_sh_install_method_stamp.py@@ -20,7 +20,7 @@ from __future__ import annotationsimport refrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_node_deps_failure.py b/tests/scripts/install/test_install_sh_node_deps_failure.pysimilarity index 98%rename from tests/test_install_sh_node_deps_failure.pyrename to tests/scripts/install/test_install_sh_node_deps_failure.pyindex c42e0cb32ca..ae60258b1b9 100644--- a/tests/test_install_sh_node_deps_failure.py+++ b/tests/scripts/install/test_install_sh_node_deps_failure.py@@ -8,7 +8,7 @@ import subprocessfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_node_deps_workspaces.py b/tests/scripts/install/test_install_sh_node_deps_workspaces.pysimilarity index 98%rename from tests/test_install_sh_node_deps_workspaces.pyrename to tests/scripts/install/test_install_sh_node_deps_workspaces.pyindex 176e9efad30..a5e9236dd3e 100644--- a/tests/test_install_sh_node_deps_workspaces.py+++ b/tests/scripts/install/test_install_sh_node_deps_workspaces.py@@ -18,7 +18,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"pytestmark = pytest.mark.skipif(shutil.which("bash") is None, reason="needs bash")diff --git a/tests/test_install_sh_node_global_prefix.py b/tests/scripts/install/test_install_sh_node_global_prefix.pysimilarity index 97%rename from tests/test_install_sh_node_global_prefix.pyrename to tests/scripts/install/test_install_sh_node_global_prefix.pyindex d4293a0d59e..f2ac4cb929a 100644--- a/tests/test_install_sh_node_global_prefix.py+++ b/tests/scripts/install/test_install_sh_node_global_prefix.py@@ -14,7 +14,7 @@ node/npm/npx), scoped to the bundled Node via its prefix-local global npmrc.from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"NODE_BOOTSTRAP = REPO_ROOT / "scripts" / "lib" / "node-bootstrap.sh"diff --git a/tests/test_install_sh_node_npm_check.py b/tests/scripts/install/test_install_sh_node_npm_check.pysimilarity index 96%rename from tests/test_install_sh_node_npm_check.pyrename to tests/scripts/install/test_install_sh_node_npm_check.pyindex 6fa33e9bae7..2c1f84319ce 100644--- a/tests/test_install_sh_node_npm_check.py+++ b/tests/scripts/install/test_install_sh_node_npm_check.py@@ -9,7 +9,7 @@ when the install actually failed.from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_node_prerelease.py b/tests/scripts/install/test_install_sh_node_prerelease.pysimilarity index 98%rename from tests/test_install_sh_node_prerelease.pyrename to tests/scripts/install/test_install_sh_node_prerelease.pyindex 2b2a613ed9b..3f07dbb87ea 100644--- a/tests/test_install_sh_node_prerelease.py+++ b/tests/scripts/install/test_install_sh_node_prerelease.py@@ -19,7 +19,7 @@ import reimport subprocessfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"NODE_BOOTSTRAP = REPO_ROOT / "scripts" / "lib" / "node-bootstrap.sh"diff --git a/tests/test_install_sh_node_probe_87460.py b/tests/scripts/install/test_install_sh_node_probe.pysimilarity index 99%rename from tests/test_install_sh_node_probe_87460.pyrename to tests/scripts/install/test_install_sh_node_probe.pyindex 83e50e10a4b..6bdd9282ba6 100644--- a/tests/test_install_sh_node_probe_87460.py+++ b/tests/scripts/install/test_install_sh_node_probe.py@@ -19,7 +19,7 @@ import tarfilefrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_node_tarball_without_xz.py b/tests/scripts/install/test_install_sh_node_tarball_without_xz.pysimilarity index 97%rename from tests/test_install_sh_node_tarball_without_xz.pyrename to tests/scripts/install/test_install_sh_node_tarball_without_xz.pyindex 468306acc97..24c02cce79e 100644--- a/tests/test_install_sh_node_tarball_without_xz.py+++ b/tests/scripts/install/test_install_sh_node_tarball_without_xz.py@@ -16,7 +16,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINDEX = "node-v26.7.0-linux-x64.tar.xz\nnode-v26.7.0-linux-x64.tar.gz\n"diff --git a/tests/test_install_sh_pythonpath_sanitization.py b/tests/scripts/install/test_install_sh_pythonpath_sanitization.pysimilarity index 94%rename from tests/test_install_sh_pythonpath_sanitization.pyrename to tests/scripts/install/test_install_sh_pythonpath_sanitization.pyindex 0fd4c14d92c..533a1da3e1c 100644--- a/tests/test_install_sh_pythonpath_sanitization.py+++ b/tests/scripts/install/test_install_sh_pythonpath_sanitization.py@@ -8,7 +8,7 @@ must sanitize those vars both during installation and at runtime launch.from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_reuse_supported_python.py b/tests/scripts/install/test_install_sh_reuse_supported_python.pysimilarity index 97%rename from tests/test_install_sh_reuse_supported_python.pyrename to tests/scripts/install/test_install_sh_reuse_supported_python.pyindex 82805ec971a..d5f477d1fa7 100644--- a/tests/test_install_sh_reuse_supported_python.py+++ b/tests/scripts/install/test_install_sh_reuse_supported_python.py@@ -10,7 +10,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_root_fhs_uv_python_path.py b/tests/scripts/install/test_install_sh_root_fhs_uv_python_path.pysimilarity index 97%rename from tests/test_install_sh_root_fhs_uv_python_path.pyrename to tests/scripts/install/test_install_sh_root_fhs_uv_python_path.pyindex 0f1c5fa725a..31cb2695d09 100644--- a/tests/test_install_sh_root_fhs_uv_python_path.py+++ b/tests/scripts/install/test_install_sh_root_fhs_uv_python_path.py@@ -10,7 +10,7 @@ and the shared ``/usr/local/bin/hermes`` wrapper fails for non-root users withfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_setup_wizard_tty_probe.py b/tests/scripts/install/test_install_sh_setup_wizard_tty_probe.pysimilarity index 98%rename from tests/test_install_sh_setup_wizard_tty_probe.pyrename to tests/scripts/install/test_install_sh_setup_wizard_tty_probe.pyindex a9f8a26e75b..b36cd322eff 100644--- a/tests/test_install_sh_setup_wizard_tty_probe.py+++ b/tests/scripts/install/test_install_sh_setup_wizard_tty_probe.py@@ -20,7 +20,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"# Every function in scripts/install.sh that previously gated on a barediff --git a/tests/test_install_sh_symlink_stomp.py b/tests/scripts/install/test_install_sh_symlink_stomp.pysimilarity index 98%rename from tests/test_install_sh_symlink_stomp.pyrename to tests/scripts/install/test_install_sh_symlink_stomp.pyindex 0fbe508509f..21deab8f854 100644--- a/tests/test_install_sh_symlink_stomp.py+++ b/tests/scripts/install/test_install_sh_symlink_stomp.py@@ -22,7 +22,7 @@ from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_termux_network_prereqs.py b/tests/scripts/install/test_install_sh_termux_network_prereqs.pysimilarity index 92%rename from tests/test_install_sh_termux_network_prereqs.pyrename to tests/scripts/install/test_install_sh_termux_network_prereqs.pyindex 891cf54d134..ebd1dac4606 100644--- a/tests/test_install_sh_termux_network_prereqs.py+++ b/tests/scripts/install/test_install_sh_termux_network_prereqs.py@@ -3,7 +3,7 @@from pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"diff --git a/tests/test_install_sh_termux_python_bounds.py b/tests/scripts/install/test_install_sh_termux_python_bounds.pysimilarity index 99%rename from tests/test_install_sh_termux_python_bounds.pyrename to tests/scripts/install/test_install_sh_termux_python_bounds.pyindex 443873bf641..f4fac1d3e6a 100644--- a/tests/test_install_sh_termux_python_bounds.py+++ b/tests/scripts/install/test_install_sh_termux_python_bounds.py@@ -10,7 +10,7 @@ import sysfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"SETUP_HERMES_SH = REPO_ROOT / "setup-hermes.sh"diff --git a/tests/test_install_sh_uv_lock_config.py b/tests/scripts/install/test_install_sh_uv_lock_config.pysimilarity index 98%rename from tests/test_install_sh_uv_lock_config.pyrename to tests/scripts/install/test_install_sh_uv_lock_config.pyindex 59d5bba96da..f9f6dca1133 100644--- a/tests/test_install_sh_uv_lock_config.py+++ b/tests/scripts/install/test_install_sh_uv_lock_config.py@@ -10,7 +10,7 @@ import subprocessimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SCRIPTS = (REPO_ROOT / "scripts" / "install.sh",REPO_ROOT / "setup-hermes.sh",diff --git a/tests/test_install_unmerged_index.py b/tests/scripts/install/test_install_unmerged_index.pysimilarity index 99%rename from tests/test_install_unmerged_index.pyrename to tests/scripts/install/test_install_unmerged_index.pyindex ade18486c97..cc15998de71 100644--- a/tests/test_install_unmerged_index.py+++ b/tests/scripts/install/test_install_unmerged_index.py@@ -20,7 +20,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent.parentINSTALL_SH = REPO_ROOT / "scripts" / "install.sh"INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"diff --git a/tests/test_run_tests_parallel.py b/tests/scripts/test_run_tests_parallel.pysimilarity index 97%rename from tests/test_run_tests_parallel.pyrename to tests/scripts/test_run_tests_parallel.pyindex f83e9a55634..aeee6cfa0ea 100644--- a/tests/test_run_tests_parallel.py+++ b/tests/scripts/test_run_tests_parallel.py@@ -65,7 +65,7 @@ def _pid_alive(pid: int) -> bool:def test_progress_output_tolerates_legacy_stdout_encoding(tmp_path: Path) -> None:"""Progress glyphs must not crash the runner on non-UTF-8 consoles."""- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"probe_dir = tmp_path / "probe"@@ -111,7 +111,7 @@ def test_grandchild_leak_is_killed_by_runner(tmp_path: Path) -> None:3. Wait for the grandchild PID to vanish (poll for ~5s).4. Assert the runner exited cleanly AND the grandchild is dead."""- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"assert runner.exists(), f"runner missing at {runner}"@@ -253,7 +253,7 @@ def _make_probe_dir(tmp_path: Path) -> Path:def _run_runner(probe_dir: Path, *extra: str) -> subprocess.CompletedProcess:- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"return subprocess.run([sys.executable, str(runner), "--paths", str(probe_dir),@@ -297,7 +297,7 @@ def test_bare_value_flag_keeps_its_value(tmp_path: Path) -> None:def test_positional_path_not_treated_as_flag(tmp_path: Path) -> None:"""A positional path arg still overrides discovery (not routed to pytest)."""probe_dir = _make_probe_dir(tmp_path)- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"# Pass the probe dir positionally (no --paths), plus a bare -q.proc = subprocess.run(@@ -314,7 +314,7 @@ def test_positional_path_not_treated_as_flag(tmp_path: Path) -> None:def test_file_retry_self_heals_and_prints_both_attempts(tmp_path: Path) -> None:"""A pass-on-retry is green, loud, and retains the failing traceback."""- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"marker = tmp_path / "ran-once"probe = tmp_path / "test_flaky_probe.py"@@ -386,7 +386,7 @@ def test_node_id_selector_runs_the_named_test(tmp_path: Path) -> None:"""``file.py::test_alpha`` runs that test instead of discovering nothing."""probe_dir = _make_probe_dir(tmp_path)target = probe_dir / "test_flagprobe.py"- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentproc = subprocess.run([sys.executable, str(repo_root / "scripts" / "run_tests_parallel.py"),f"{target}::test_alpha", "-j", "1", "--file-timeout", "30"],@@ -404,7 +404,7 @@ def test_explicit_k_wins_over_node_id_inference(tmp_path: Path) -> None:"""A caller's own ``-k`` is not overridden by the node-id translation."""probe_dir = _make_probe_dir(tmp_path)target = probe_dir / "test_flagprobe.py"- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentproc = subprocess.run([sys.executable, str(repo_root / "scripts" / "run_tests_parallel.py"),f"{target}::test_alpha", "-k", "test_beta",@@ -430,7 +430,7 @@ def test_multiple_absolute_paths_split_on_pathsep(tmp_path: Path) -> None:(dir_b / "test_flagprobe_b.py").write_text("def test_gamma():\n assert True\n")- repo_root = Path(__file__).resolve().parent.parent+ repo_root = Path(__file__).resolve().parent.parent.parentrunner = repo_root / "scripts" / "run_tests_parallel.py"proc = subprocess.run([sys.executable, str(runner),diff --git a/tests/test_run_tests_parallel_stdio.py b/tests/scripts/test_run_tests_parallel_stdio.pysimilarity index 97%rename from tests/test_run_tests_parallel_stdio.pyrename to tests/scripts/test_run_tests_parallel_stdio.pyindex 2add57c3e25..f1dbad30841 100644--- a/tests/test_run_tests_parallel_stdio.py+++ b/tests/scripts/test_run_tests_parallel_stdio.py@@ -14,7 +14,7 @@ import ioimport sysfrom pathlib import Path-REPO_ROOT = Path(__file__).resolve().parents[1]+REPO_ROOT = Path(__file__).resolve().parents[2]_RUNNER_PATH = REPO_ROOT / "scripts" / "run_tests_parallel.py"diff --git a/tests/test_evidence_store.py b/tests/skills/test_evidence_store.pysimilarity index 99%rename from tests/test_evidence_store.pyrename to tests/skills/test_evidence_store.pyindex 33bac2dcdb0..7d6cadc32f6 100644--- a/tests/test_evidence_store.py+++ b/tests/skills/test_evidence_store.py@@ -3,7 +3,7 @@ from pathlib import Pathimport importlib.util# Load the hyphenated script name dynamically-repo_root = Path(__file__).parent.parent+repo_root = Path(__file__).parent.parent.parentscript_path = repo_root / "optional-skills" / "security" / "oss-forensics" / "scripts" / "evidence-store.py"spec = importlib.util.spec_from_file_location("evidence_store", str(script_path))diff --git a/tests/test_minisweagent_path.py b/tests/test_minisweagent_path.pydeleted file mode 100644index 965e4cfd59e..00000000000--- a/tests/test_minisweagent_path.py+++ /dev/null@@ -1,2 +0,0 @@-# This file intentionally left empty.-# minisweagent_path.py was removed — see PR #2804.diff --git a/tests/test_model_picker_scroll.py b/tests/test_model_picker_scroll.pydeleted file mode 100644index 4698aef9562..00000000000--- a/tests/test_model_picker_scroll.py+++ /dev/null@@ -1,100 +0,0 @@-"""Tests for the scrolling viewport logic in _curses_prompt_choice (issue #5755).--The "More providers" submenu has 13 entries (11 extended + custom + cancel).-Before the fix, _curses_prompt_choice rendered items starting unconditionally-from index 0 with no scroll offset. On terminals shorter than ~16 rows, items-near the bottom were never drawn. When the cursor wrapped from 0 to the last-item (Cancel) via UP-arrow, the highlight rendered off-screen, leaving the menu-looking like only "Cancel" existed.--The fix adds a scroll_offset that tracks the cursor so the highlighted item-is always within the visible window. These tests exercise that logic in-isolation without requiring a real TTY.-"""-----# ----------------------------------------------------------------------------# Pure scroll-offset logic extracted from _curses_menu for unit testing-# -----------------------------------------------------------------------------def _compute_scroll_offset(cursor: int, scroll_offset: int, visible: int, n_choices: int) -> int:- """Mirror of the scroll adjustment block inside _curses_menu."""- if cursor < scroll_offset:- scroll_offset = cursor- elif cursor >= scroll_offset + visible:- scroll_offset = cursor - visible + 1- scroll_offset = max(0, min(scroll_offset, max(0, n_choices - visible)))- return scroll_offset---def _visible_indices(cursor: int, scroll_offset: int, visible: int, n_choices: int):- """Return the list indices that would be rendered for the given state."""- scroll_offset = _compute_scroll_offset(cursor, scroll_offset, visible, n_choices)- return list(range(scroll_offset, min(scroll_offset + visible, n_choices)))---# ----------------------------------------------------------------------------# Tests: scroll offset calculation-# -----------------------------------------------------------------------------class TestScrollOffsetLogic:- N = 13 # typical extended-providers list length-- def test_cursor_at_zero_no_scroll(self):- """Start position: offset stays 0, first items visible."""- assert _compute_scroll_offset(0, 0, 8, self.N) == 0-- def test_cursor_within_window_unchanged(self):- """Cursor inside the current window: offset unchanged."""- assert _compute_scroll_offset(5, 0, 8, self.N) == 0--- def test_cursor_wraps_to_cancel_via_up(self):- """UP from index 0 wraps to last item; last item must be visible."""- wrapped_cursor = (0 - 1) % self.N # == 12- indices = _visible_indices(wrapped_cursor, 0, 8, self.N)- assert wrapped_cursor in indices--- def test_visible_window_never_exceeds_list(self):- """Offset is clamped so the window never starts past the list end."""- offset = _compute_scroll_offset(12, 0, 20, self.N) # window larger than list- assert offset == 0--- def test_list_fits_in_window_no_scroll_needed(self):- """If all choices fit in the visible window, offset is always 0."""- for cursor in range(self.N):- offset = _compute_scroll_offset(cursor, 0, 20, self.N)- assert offset == 0, f"cursor={cursor} should not scroll when window > list"-- def test_cursor_always_in_visible_range(self):- """Invariant: cursor is always within the rendered window after adjustment."""- visible = 5- for cursor in range(self.N):- indices = _visible_indices(cursor, 0, visible, self.N)- assert cursor in indices, f"cursor={cursor} not in visible={indices}"-- def test_full_navigation_down_cursor_always_visible(self):- """Simulate pressing DOWN through all items; cursor always in view."""- visible = 6- scroll_offset = 0- cursor = 0- for _ in range(self.N + 2): # wrap around twice- scroll_offset = _compute_scroll_offset(cursor, scroll_offset, visible, self.N)- rendered = list(range(scroll_offset, min(scroll_offset + visible, self.N)))- assert cursor in rendered, f"cursor={cursor} not in rendered={rendered}"- cursor = (cursor + 1) % self.N-- def test_full_navigation_up_cursor_always_visible(self):- """Simulate pressing UP through all items; cursor always in view."""- visible = 6- scroll_offset = 0- cursor = 0- for _ in range(self.N + 2):- scroll_offset = _compute_scroll_offset(cursor, scroll_offset, visible, self.N)- rendered = list(range(scroll_offset, min(scroll_offset + visible, self.N)))- assert cursor in rendered, f"cursor={cursor} not in rendered={rendered}"- cursor = (cursor - 1) % self.Ndiff --git a/tests/test_process_loop_event_loop_warning.py b/tests/test_process_loop_event_loop_warning.pydeleted file mode 100644index 7251060ef85..00000000000--- a/tests/test_process_loop_event_loop_warning.py+++ /dev/null@@ -1,130 +0,0 @@-"""Tests for the process_loop RuntimeWarning fix -- issue #19285.--In Python 3.10+, calling asyncio.get_event_loop() from a non-main thread-that has no current event loop emits a DeprecationWarning (3.10/3.11) or-RuntimeWarning (3.12+). The fix replaces get_event_loop() with-get_running_loop(), which raises RuntimeError (no warning) when there is no-running loop.-"""--import asyncio-import threading-import warnings---class TestGetRunningLoopReplacement:-- def test_get_running_loop_raises_runtime_error_not_warning(self):- warnings_caught = []-- def _thread_target():- with warnings.catch_warnings(record=True) as w:- warnings.simplefilter("always")- try:- asyncio.get_running_loop()- except RuntimeError:- pass- warnings_caught.extend(w)-- t = threading.Thread(target=_thread_target, daemon=True)- t.start()- t.join(timeout=5)-- runtime_warnings = [- x for x in warnings_caught- if issubclass(x.category, RuntimeWarning)- ]- assert runtime_warnings == [], (- f"Unexpected RuntimeWarning(s): {[str(w.message) for w in runtime_warnings]}"- )-- def test_get_running_loop_is_silent_get_event_loop_is_not(self):- caught_from_running = []-- def _test_get_running_loop():- with warnings.catch_warnings(record=True) as w:- warnings.simplefilter("always")- try:- asyncio.get_running_loop()- except RuntimeError:- pass- caught_from_running.extend(w)-- t = threading.Thread(target=_test_get_running_loop, daemon=True)- t.start()- t.join(timeout=5)-- assert all(- not issubclass(w.category, RuntimeWarning)- for w in caught_from_running- ), "get_running_loop() must never emit RuntimeWarning"-- def test_get_running_loop_returns_loop_when_running(self):- async def _check():- loop = asyncio.get_running_loop()- assert loop is not None- assert loop.is_running()-- asyncio.run(_check())-- def test_no_warning_from_background_thread_with_fix(self):- warnings_caught = []-- def _thread_target():- with warnings.catch_warnings(record=True) as w:- warnings.simplefilter("always")- try:- current_loop = asyncio.get_running_loop()- except RuntimeError:- current_loop = None- except Exception:- current_loop = None- assert current_loop is None- warnings_caught.extend(w)-- t = threading.Thread(target=_thread_target, daemon=True)- t.start()- t.join(timeout=5)-- runtime_warnings = [- x for x in warnings_caught- if issubclass(x.category, RuntimeWarning)- ]- assert runtime_warnings == [], (- f"RuntimeWarning emitted despite fix: "- f"{[str(w.message) for w in runtime_warnings]}"- )-- def test_fixed_pattern_in_process_loop_context(self):- results = {}- warnings_list = []-- def _process_loop_simulation():- with warnings.catch_warnings(record=True) as w:- warnings.simplefilter("always")- try:- current_loop = asyncio.get_running_loop()- except RuntimeError:- current_loop = None- except Exception:- current_loop = None- results["current_loop"] = current_loop- warnings_list.extend(w)-- t = threading.Thread(- target=_process_loop_simulation,- name="Thread-3 (process_loop)",- daemon=True,- )- t.start()- t.join(timeout=5)-- assert results.get("current_loop") is None- runtime_warnings = [- x for x in warnings_list- if issubclass(x.category, RuntimeWarning)- ]- assert runtime_warnings == [], (- f"process_loop simulation still emits RuntimeWarning: "- f"{[str(w.message) for w in runtime_warnings]}"- )diff --git a/tests/test_tests_tree_layout.py b/tests/test_tests_tree_layout.pynew file mode 100644index 00000000000..1cfd6d504e2--- /dev/null+++ b/tests/test_tests_tree_layout.py@@ -0,0 +1,76 @@+"""The tests/ tree mirrors the source tree.++``scripts/run_tests.sh tests/<dir>/`` is how a change gets its regression+coverage run, so a test filed under a directory that does not correspond to+the code it exercises is a test nobody runs when that code changes. Two+drifts had accumulated: parallel directories for one source package+(``tests/cli`` beside ``tests/hermes_cli``, ``tests/run_agent`` beside+``tests/agent``, ``tests/state`` beside ``tests/hermes_state``) and ~250+loose files at ``tests/`` root that belonged to a package.++Filenames also stopped carrying issue numbers: ``test_89315_x.py`` reads as+noise in a directory listing and the number belongs in the docstring, where+``git log -S`` and a reader can both find it with context.+"""++from __future__ import annotations++import re+from pathlib import Path++REPO_ROOT = Path(__file__).resolve().parent.parent+TESTS_ROOT = REPO_ROOT / "tests"++# tests/<name>/ directories that do not mirror a source directory but are+# legitimate homes: cross-cutting suites, fixtures, and script-family tests.+_NON_MIRROR_DIRS = {+ "ci", "conformance", "dashboard", "desktop", "docker", "e2e", "evals",+ "fakes", "fixtures", "honcho_plugin", "install", "integration", "manual",+ "monitoring", "openviking_plugin", "perf_guards", "scripts", "secret_sources",+ "security", "skills", "verify", "website", "computer_use", "hermes_state",+}++# Root-level modules whose tests sit directly in tests/ (no package to mirror).+_ROOT_MODULE_STEMS = {p.stem for p in REPO_ROOT.glob("*.py")}++_ISSUE_NUMBER = re.compile(r"(^test_\d{4,6}_)|(_\d{4,6}\.py$)")+++def _source_dirs() -> set[str]:+ return {+ p.name+ for p in REPO_ROOT.iterdir()+ if p.is_dir() and (p / "__init__.py").exists()+ }+++def test_every_test_directory_mirrors_a_source_directory_or_is_declared():+ """No sibling directory for a source package that already has one."""+ source_dirs = _source_dirs()+ offenders = sorted(+ d.name+ for d in TESTS_ROOT.iterdir()+ if d.is_dir()+ and d.name not in ("__pycache__",)+ and d.name not in source_dirs+ and d.name not in _NON_MIRROR_DIRS+ )+ assert not offenders, (+ "tests/ directories that mirror no source package: "+ f"{offenders}. Put the tests under tests/<source dir>/ (tests/agent, "+ "tests/hermes_cli, ...) or, for a genuinely cross-cutting suite, add the "+ "name to _NON_MIRROR_DIRS in this file with a reason."+ )+++def test_no_issue_numbers_in_test_filenames():+ """Issue numbers live in docstrings, where the reader gets context."""+ offenders = sorted(+ str(p.relative_to(REPO_ROOT))+ for p in TESTS_ROOT.rglob("test_*.py")+ if _ISSUE_NUMBER.search(p.name)+ )+ assert not offenders, (+ f"Issue numbers in test filenames: {offenders}. Drop the number from the "+ "name and cite the issue in the module docstring instead."+ )diff --git a/tests/test_yaml_indent_consistency_31999.py b/tests/test_yaml_indent_consistency.pysimilarity index 100%rename from tests/test_yaml_indent_consistency_31999.pyrename to tests/test_yaml_indent_consistency.pydiff --git a/tests/test_browser_vault.py b/tests/tools/test_browser_vault.pysimilarity index 99%rename from tests/test_browser_vault.pyrename to tests/tools/test_browser_vault.pyindex 4487162e9d5..30317f934df 100644--- a/tests/test_browser_vault.py+++ b/tests/tools/test_browser_vault.py@@ -23,7 +23,7 @@ from unittest.mock import patchimport pytest-sys.path.insert(0, str(Path(__file__).resolve().parent.parent))+sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent))from agent.vault_login_classifier import ( # noqa: E402ClassifiedLoginControl,diff --git a/tests/test_compaction_tool_refresh.py b/tests/tools/test_compaction_tool_refresh.pysimilarity index 98%rename from tests/test_compaction_tool_refresh.pyrename to tests/tools/test_compaction_tool_refresh.pyindex 408303dfe7f..5a3669dddb0 100644--- a/tests/test_compaction_tool_refresh.py+++ b/tests/tools/test_compaction_tool_refresh.py@@ -13,7 +13,7 @@ import sysimport unittestfrom unittest.mock import patch-sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))class _Agent:diff --git a/tests/tools/test_hub_lock_non_utf8_68053.py b/tests/tools/test_hub_lock_non_utf8.pysimilarity index 100%rename from tests/tools/test_hub_lock_non_utf8_68053.pyrename to tests/tools/test_hub_lock_non_utf8.pydiff --git a/tests/test_model_tools.py b/tests/tools/test_model_tools.pysimilarity index 100%rename from tests/test_model_tools.pyrename to tests/tools/test_model_tools.pydiff --git a/tests/test_plugin_compat_warning.py b/tests/tools/test_plugin_compat_warning.pysimilarity index 91%rename from tests/test_plugin_compat_warning.pyrename to tests/tools/test_plugin_compat_warning.pyindex 45a7d799dab..2dc9d9779dd 100644--- a/tests/test_plugin_compat_warning.py+++ b/tests/tools/test_plugin_compat_warning.py@@ -1,6 +1,6 @@"""The plugin-compat layer tells plugin authors where a name went, once, and internal code never trips it.-Kept alongside the compat layer (tests/test_compat_manifest_targets.py); both are deleted with it.+Kept alongside the compat layer (tests/hermes_cli/test_compat_manifest_targets.py); both are deleted with it."""import importlibimport json@@ -9,7 +9,7 @@ from pathlib import Pathimport pytest-ROOT = Path(__file__).resolve().parent.parent+ROOT = Path(__file__).resolve().parent.parent.parentMANIFEST = ROOT / "compat_manifest.json"pytestmark = pytest.mark.skipif(not MANIFEST.exists(), reason="compat layer removed (scheduled revert)")diff --git a/tests/test_plugin_skills.py b/tests/tools/test_plugin_skills.pysimilarity index 100%rename from tests/test_plugin_skills.pyrename to tests/tools/test_plugin_skills.pydiff --git a/tests/tools/test_pre_transcription_hook.py b/tests/tools/test_pre_transcription_hook.pyindex b9335db290d..c650a32929c 100644--- a/tests/tools/test_pre_transcription_hook.py+++ b/tests/tools/test_pre_transcription_hook.py@@ -19,7 +19,7 @@ Covers:kwargs — no signature change.Mirrors the ``transform_tool_result`` hook test conventions from-``tests/test_transform_tool_result_hook.py``.+``tests/plugins/test_transform_tool_result_hook.py``."""from __future__ import annotationsdiff --git a/tests/test_subprocess_home_isolation.py b/tests/tools/test_subprocess_home_isolation.pysimilarity index 100%rename from tests/test_subprocess_home_isolation.pyrename to tests/tools/test_subprocess_home_isolation.pydiff --git a/tests/tools/test_94248_timeout_transport_drain.py b/tests/tools/test_timeout_transport_drain.pysimilarity index 100%rename from tests/tools/test_94248_timeout_transport_drain.pyrename to tests/tools/test_timeout_transport_drain.pydiff --git a/tests/test_toolset_distributions.py b/tests/tools/test_toolset_distributions.pysimilarity index 100%rename from tests/test_toolset_distributions.pyrename to tests/tools/test_toolset_distributions.pydiff --git a/tests/test_toolsets.py b/tests/tools/test_toolsets.pysimilarity index 100%rename from tests/test_toolsets.pyrename to tests/tools/test_toolsets.pydiff --git a/tests/test_voice_max_recording_seconds.py b/tests/tools/test_voice_max_recording_seconds.pysimilarity index 100%rename from tests/test_voice_max_recording_seconds.pyrename to tests/tools/test_voice_max_recording_seconds.pydiff --git a/tests/tui_gateway/test_94895_backend_heartbeat.py b/tests/tui_gateway/test_backend_heartbeat.pysimilarity index 100%rename from tests/tui_gateway/test_94895_backend_heartbeat.pyrename to tests/tui_gateway/test_backend_heartbeat.pydiff --git a/tests/tui_gateway/test_entry_picker_prewarm.py b/tests/tui_gateway/test_entry_picker_prewarm.pyindex a4bb4d17a2d..530cb9530b2 100644--- a/tests/tui_gateway/test_entry_picker_prewarm.py+++ b/tests/tui_gateway/test_entry_picker_prewarm.py@@ -17,7 +17,7 @@ guard is covered in ``tests/hermes_cli/test_picker_prewarm.py``):- A prewarm import/start failure is swallowed (fire-and-forget contract) andmust not prevent ``main()`` from reaching the read loop.-Harness: same style as tests/test_tui_entry_mcp_owner.py — import+Harness: same style as tests/tui_gateway/test_tui_entry_mcp_owner.py — import``tui_gateway.entry`` and monkeypatch its module attributes, running the real``main()`` with stubbed I/O collaborators (no subprocess, no real gateway)."""diff --git a/tests/test_lazy_session_regressions.py b/tests/tui_gateway/test_lazy_session_regressions.pysimilarity index 100%rename from tests/test_lazy_session_regressions.pyrename to tests/tui_gateway/test_lazy_session_regressions.pydiff --git a/tests/tui_gateway/test_106459_routing_provenance_reopen.py b/tests/tui_gateway/test_routing_provenance_reopen.pysimilarity index 98%rename from tests/tui_gateway/test_106459_routing_provenance_reopen.pyrename to tests/tui_gateway/test_routing_provenance_reopen.pyindex 2570c54ed25..7219d63f83c 100644--- a/tests/tui_gateway/test_106459_routing_provenance_reopen.py+++ b/tests/tui_gateway/test_routing_provenance_reopen.py@@ -76,7 +76,7 @@ def db(tmp_path: Path):@pytest.fixturedef turn_env(monkeypatch, tmp_path, db):- """The immediate-prompt harness of tests/test_tui_gateway_server.py, with a real SessionDB."""+ """The immediate-prompt harness of tests/tui_gateway/test_tui_gateway_server.py, with a real SessionDB."""for name, stub in {"_emit": lambda *_a, **_k: None, "make_stream_renderer": lambda _cols: None,"render_message": lambda _raw, _cols: None, "_wire_callbacks": lambda _sid: None,diff --git a/tests/test_slash_worker_watchdog.py b/tests/tui_gateway/test_slash_worker_watchdog.pysimilarity index 100%rename from tests/test_slash_worker_watchdog.pyrename to tests/tui_gateway/test_slash_worker_watchdog.pydiff --git a/tests/test_tui_entry_mcp_owner.py b/tests/tui_gateway/test_tui_entry_mcp_owner.pysimilarity index 100%rename from tests/test_tui_entry_mcp_owner.pyrename to tests/tui_gateway/test_tui_entry_mcp_owner.pydiff --git a/tests/test_tui_gateway_event_replay.py b/tests/tui_gateway/test_tui_gateway_event_replay.pysimilarity index 100%rename from tests/test_tui_gateway_event_replay.pyrename to tests/tui_gateway/test_tui_gateway_event_replay.pydiff --git a/tests/test_tui_gateway_loop_noise.py b/tests/tui_gateway/test_tui_gateway_loop_noise.pysimilarity index 100%rename from tests/test_tui_gateway_loop_noise.pyrename to tests/tui_gateway/test_tui_gateway_loop_noise.pydiff --git a/tests/test_tui_gateway_queue_on_busy.py b/tests/tui_gateway/test_tui_gateway_queue_on_busy.pysimilarity index 100%rename from tests/test_tui_gateway_queue_on_busy.pyrename to tests/tui_gateway/test_tui_gateway_queue_on_busy.pydiff --git a/tests/test_tui_gateway_server.py b/tests/tui_gateway/test_tui_gateway_server.pysimilarity index 100%rename from tests/test_tui_gateway_server.pyrename to tests/tui_gateway/test_tui_gateway_server.pydiff --git a/tests/test_tui_gateway_server_crash_history.py b/tests/tui_gateway/test_tui_gateway_server_crash_history.pysimilarity index 100%rename from tests/test_tui_gateway_server_crash_history.pyrename to tests/tui_gateway/test_tui_gateway_server_crash_history.pydiff --git a/tests/test_tui_gateway_ws.py b/tests/tui_gateway/test_tui_gateway_ws.pysimilarity index 100%rename from tests/test_tui_gateway_ws.pyrename to tests/tui_gateway/test_tui_gateway_ws.pydiff --git a/tests/test_tui_mcp_late_refresh.py b/tests/tui_gateway/test_tui_mcp_late_refresh.pysimilarity index 100%rename from tests/test_tui_mcp_late_refresh.pyrename to tests/tui_gateway/test_tui_mcp_late_refresh.pydiff --git a/tests/test_ws_keepalive_config.py b/tests/tui_gateway/test_ws_keepalive_config.pysimilarity index 100%rename from tests/test_ws_keepalive_config.pyrename to tests/tui_gateway/test_ws_keepalive_config.pydiff --git a/website/docs/developer-guide/acp-internals.md b/website/docs/developer-guide/acp-internals.mdindex e739d808711..a9cd83b748b 100644--- a/website/docs/developer-guide/acp-internals.md+++ b/website/docs/developer-guide/acp-internals.md@@ -175,7 +175,7 @@ ACP temporarily installs an approval callback on the terminal tool during prompt## Related files-- `tests/acp/` — ACP test suite+- `tests/acp_adapter/` — ACP test suite- `toolsets.py` — `hermes-acp` toolset definition- `hermes_cli/main.py` — `hermes acp` CLI subcommand- `pyproject.toml` — `[acp]` optional dependency + `hermes-acp` scriptdiff --git a/website/docs/developer-guide/adding-providers.md b/website/docs/developer-guide/adding-providers.mdindex 5d11383b698..ba8e276bd5e 100644--- a/website/docs/developer-guide/adding-providers.md+++ b/website/docs/developer-guide/adding-providers.md@@ -327,12 +327,12 @@ At minimum, touch the tests that guard provider wiring.Common places:- `tests/hermes_cli/test_runtime_provider_resolution.py`-- `tests/cli/test_cli_provider_resolution.py`+- `tests/hermes_cli/test_cli_provider_resolution.py`- `tests/hermes_cli/test_model_switch_custom_providers.py` (and adjacent `tests/hermes_cli/test_model_switch_*.py`)- `tests/hermes_cli/test_setup_model_provider.py`-- `tests/run_agent/test_provider_parity.py`-- `tests/run_agent/test_run_agent.py`-- `tests/test_<provider>_adapter.py` for a native provider+- `tests/agent/test_provider_parity.py`+- `tests/agent/test_run_agent.py`+- `tests/agent/test_<provider>_adapter.py` for a native providerFor docs-only examples, the exact file set may differ. The point is to cover:@@ -347,7 +347,7 @@ Run the targeted tests (or use `scripts/run_tests.sh`, which runs each file in i```bashsource venv/bin/activate-python -m pytest tests/hermes_cli/test_runtime_provider_resolution.py tests/cli/test_cli_provider_resolution.py tests/hermes_cli/test_setup_model_provider.py tests/run_agent/test_provider_parity.py -q+python -m pytest tests/hermes_cli/test_runtime_provider_resolution.py tests/hermes_cli/test_cli_provider_resolution.py tests/hermes_cli/test_setup_model_provider.py tests/agent/test_provider_parity.py -q```For deeper changes, run the full suite before pushing:diff --git a/website/docs/developer-guide/egress-internals.md b/website/docs/developer-guide/egress-internals.mdindex 50852a8a36d..4b0e5eaea6e 100644--- a/website/docs/developer-guide/egress-internals.md+++ b/website/docs/developer-guide/egress-internals.md@@ -46,18 +46,18 @@ tools/environments/docker.py_HERMES_EGRESS_NODE_OPTIONS_APPENDsentinel, enforce_on_docker precedence.-tests/test_iron_proxy.py Hermetic tests (~70). Binary install+tests/agent/test_iron_proxy.py Hermetic tests (~70). Binary installpath, config build, mappings I/O,subprocess lifecycle, docker arg builder,deny CIDR defaults, bind policy, CATOCTOU, ensure_audit_log behaviour, etc.-tests/test_iron_proxy_cli.py CLI handler unit tests (~20). Argparse+tests/hermes_cli/test_iron_proxy_cli.py CLI handler unit tests (~20). Argparsewiring, fail-loud paths, BWS refreshwire-up, dest='egress_command'regression guard.-tests/test_iron_proxy_e2e.py Live E2E (gated on HERMES_RUN_E2E=1).+tests/agent/test_iron_proxy_e2e.py Live E2E (gated on HERMES_RUN_E2E=1).Real iron-proxy binary, real curl,end-to-end token swap verified.```@@ -298,10 +298,10 @@ iron-proxy writes line-delimited JSON to `~/.hermes/proxy/iron-proxy.log` on the```bash# Hermetic suite (no network, no real binary)-scripts/run_tests.sh tests/test_iron_proxy.py tests/test_iron_proxy_cli.py+scripts/run_tests.sh tests/agent/test_iron_proxy.py tests/hermes_cli/test_iron_proxy_cli.py# Live E2E (real binary, real curl, real CONNECT tunnel)-HERMES_RUN_E2E=1 scripts/run_tests.sh tests/test_iron_proxy_e2e.py+HERMES_RUN_E2E=1 scripts/run_tests.sh tests/agent/test_iron_proxy_e2e.py# Live PTY smoke against `hermes egress`HERMES_HOME=/tmp/hermes-egress-test python3 -m hermes_cli.main egress --helpdiff --git a/website/docs/developer-guide/memory-provider-plugin.md b/website/docs/developer-guide/memory-provider-plugin.mdindex 00f8fc948e2..86b1f60de53 100644--- a/website/docs/developer-guide/memory-provider-plugin.md+++ b/website/docs/developer-guide/memory-provider-plugin.md@@ -342,7 +342,7 @@ data_dir = Path("~/.hermes/my-provider").expanduser()## Testing-See `tests/agent/test_memory_provider.py` and adjacent memory tests (`tests/agent/test_memory_session_switch.py`, `tests/agent/test_memory_user_id.py`, `tests/run_agent/test_memory_provider_init.py`) for end-to-end patterns.+See `tests/agent/test_memory_provider.py` and adjacent memory tests (`tests/agent/test_memory_session_switch.py`, `tests/agent/test_memory_user_id.py`, `tests/agent/test_memory_provider_init.py`) for end-to-end patterns.```pythonfrom agent.memory_manager import MemoryManagerdiff --git a/website/docs/developer-guide/provider-runtime.md b/website/docs/developer-guide/provider-runtime.mdindex 5cb620a6d1e..203965c8332 100644--- a/website/docs/developer-guide/provider-runtime.md+++ b/website/docs/developer-guide/provider-runtime.md@@ -211,7 +211,7 @@ Cron jobs **do** support fallback: `run_job()` reads `fallback_providers` (or leFallback behavior is exercised across several suites:-- `tests/run_agent/test_fallback_credential_isolation.py` — credential isolation between primary and fallback+- `tests/agent/test_fallback_credential_isolation.py` — credential isolation between primary and fallback- `tests/hermes_cli/test_fallback_cmd.py` — the `/fallback` CLI command- `tests/gateway/test_fallback_eviction.py` — gateway eviction of failed providersdiff --git a/website/docs/user-guide/cli.md b/website/docs/user-guide/cli.mdindex 6c4ed6526a1..2ca8cf6a700 100644--- a/website/docs/user-guide/cli.md+++ b/website/docs/user-guide/cli.md@@ -202,7 +202,7 @@ Start a line with `!` to run it as a shell command instead of sending it to the```> !git status> !ls -la-> !pytest -x tests/cli+> !pytest -x tests/hermes_cli```- **Zero cost.** The model is never invoked — no API call, no tokens, no latency.