hermes-agent/tests/cli
Teknium 2558d28a9b
fix: resolve CI test failures — add missing functions, fix stale tests (#9483)
Production fixes:
- Add clear_session_context() to hermes_logging.py (fixes 48 teardown errors)
- Add clear_session() to tools/approval.py (fixes 9 setup errors)
- Add SyncError M_UNKNOWN_TOKEN check to Matrix _sync_loop (bug fix)
- Fall back to inline api_key in named custom providers when key_env
  is absent (runtime_provider.py)

Test fixes:
- test_memory_user_id: use builtin+external provider pair, fix honcho
  peer_name override test to match production behavior
- test_display_config: remove TestHelpers for non-existent functions
- test_auxiliary_client: fix OAuth tokens to match _is_oauth_token
  patterns, replace get_vision_auxiliary_client with resolve_vision_provider_client
- test_cli_interrupt_subagent: add missing _execution_thread_id attr
- test_compress_focus: add model/provider/api_key/base_url/api_mode
  to mock compressor
- test_auth_provider_gate: add autouse fixture to clean Anthropic env
  vars that leak from CI secrets
- test_opencode_go_in_model_list: accept both 'built-in' and 'hermes'
  source (models.dev API unavailable in CI)
- test_email: verify email Platform enum membership instead of source
  inspection (build_channel_directory now uses dynamic enum loop)
- test_feishu: add bot_added/bot_deleted handler mocks to _Builder
- test_ws_auth_retry: add AsyncMock for sync_store.get_next_batch,
  add _pending_megolm and _joined_rooms to Matrix adapter mocks
- test_restart_drain: monkeypatch-delete INVOCATION_ID (systemd sets
  this in CI, changing the restart call signature)
- test_session_hygiene: add user_id to SessionSource
- test_session_env: use relative baseline for contextvar clear check
  (pytest-xdist workers share context)
2026-04-14 01:43:45 -07:00
..
__init__.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_branch_command.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_approval_ui.py fix: handle empty sudo password and false prompts 2026-04-09 02:50:07 -07:00
test_cli_background_tui_refresh.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_browser_connect.py fix: /browser connect auto-launch uses dedicated profile dir (#6821) 2026-04-09 14:55:45 -07:00
test_cli_context_warning.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_extension_hooks.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_file_drop.py fix(termux): add local image chat route 2026-04-09 16:24:53 -07:00
test_cli_image_command.py fix(termux): harden execute_code and mobile browser/audio UX 2026-04-09 16:24:53 -07:00
test_cli_init.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_interrupt_subagent.py fix: resolve CI test failures — add missing functions, fix stale tests (#9483) 2026-04-14 01:43:45 -07:00
test_cli_loading_indicator.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_mcp_config_watch.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_new_session.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_plan_command.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_prefix_matching.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_preloaded_skills.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_provider_resolution.py feat: prompt for display name when adding custom providers (#9420) 2026-04-13 22:41:00 -07:00
test_cli_retry.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_save_config_value.py fix: remove legacy compression.summary_* config and env var fallbacks (#8992) 2026-04-13 04:59:26 -07:00
test_cli_secret_capture.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_cli_skin_integration.py fix(termux): deepen browser, voice, and tui support 2026-04-09 16:24:53 -07:00
test_cli_status_bar.py fix(termux): tighten voice setup and mobile chat UX 2026-04-09 16:24:53 -07:00
test_cli_status_command.py fix(cli): make /status show gateway-style session status 2026-04-10 05:19:26 -07:00
test_cli_tools_command.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_compress_focus.py feat: /compress <focus> — guided compression with focus topic (#8017) 2026-04-11 19:23:29 -07:00
test_fast_command.py fix(anthropic): send fast mode speed via extra_body 2026-04-13 22:32:39 -07:00
test_manual_compress.py fix(gateway): make manual compression feedback truthful 2026-04-10 21:16:53 -07:00
test_personality_none.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_quick_commands.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_reasoning_command.py fix: clean up stale test references to removed attributes 2026-04-10 03:44:43 -07:00
test_resume_display.py fix: show full last assistant response when resuming a session (#8724) 2026-04-12 19:07:14 -07:00
test_session_boundary_hooks.py fix: add gateway coverage for session boundary hooks, move test to tests/cli/ 2026-04-08 04:27:34 -07:00
test_stream_delta_think_tag.py fix(streaming): prevent <think> in prose from suppressing response output 2026-04-09 22:16:36 -07:00
test_surrogate_sanitization.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_tool_progress_scrollback.py fix(cli): restore stacked tool progress scrollback in TUI (#8201) 2026-04-11 23:22:34 -07:00
test_worktree.py fix: aggressive worktree and branch cleanup to prevent accumulation (#6134) 2026-04-08 04:44:49 -07:00
test_worktree_security.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00