hermes-agent/tests/tui_gateway
kshitij 5c078b987e test(tui): pin picker-cache prewarm wiring in entry.main()
teknium's review gap on #72021: the helper's worker/once-guard was
covered, but nothing asserted the stdio TUI entry point actually
invokes prewarm_picker_cache_async() — or that it does so in the right
place. Add a focused entrypoint test that runs the real entry.main()
with stubbed collaborators (same monkeypatch-module-attrs harness as
test_tui_entry_mcp_owner.py), spies on the helper in
hermes_cli.model_switch (the lazy-import source), and asserts:

- prewarm fires exactly once, strictly AFTER the gateway.ready write
- startup stays non-blocking: main() reaches the stdin loop and
  returns on EOF
- a prewarm failure is swallowed (fire-and-forget) without breaking
  startup

Mutation-checked: deleting the prewarm hunk from entry.py fails both
tests.
2026-08-04 12:28:05 +05:30
..
__init__.py
test_auto_continue.py
test_billing_rpc.py
test_change_watcher.py feat(pairing): give pairing its own change signal 2026-07-29 18:50:09 -05:00
test_codex_app_server_live_events.py
test_cold_start_gil_stall.py test: harden cold-start regression tests + debug-log the env-var skip 2026-08-03 21:16:09 +05:30
test_compaction_status.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_compress_lock_skip.py
test_compute_host.py fix(compression): let explicit interrupts cancel safely 2026-08-02 22:15:20 +05:30
test_compute_host_phase1.py fix(tui_gateway): retain live-turn sessions unfinalized when the drain deadline expires 2026-08-03 09:59:58 +05:30
test_custom_provider_session_persistence.py
test_delegation_session_lifecycle.py
test_entry_import_off_main_thread.py
test_entry_picker_prewarm.py test(tui): pin picker-cache prewarm wiring in entry.main() 2026-08-04 12:28:05 +05:30
test_entry_sys_path.py
test_failed_turn_retention.py
test_fast_session_scope.py
test_finalize_session_persist.py
test_gateway_owned_session_reap.py
test_goal_command.py test(tui_gateway): pin goal-command config home against collection-time _hermes_home freeze 2026-07-29 21:30:53 -07:00
test_image_routing_stale_model.py
test_inline_rpc_gil_starvation.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_interim_assistant_callback.py
test_iso_certify_seam.py
test_kanban_notify_poller.py fix(tui): avoid writable Kanban opens on empty polls 2026-08-03 20:40:28 +05:30
test_make_agent_provider.py
test_mcp_late_refresh_thread_owner.py
test_mcp_reload_rev.py
test_moa_reference_emit.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_model_switch_marker_role.py fix(gateway): dedup model-switch markers so they don't accumulate in history 2026-08-01 14:20:38 +05:30
test_pet_generate_rpc.py
test_project_tree.py
test_projects_rpc.py
test_protocol.py test(tui_gateway): accept predicate kwarg in _close_session_by_id stub 2026-08-02 14:02:08 -07:00
test_reasoning_config_per_model.py
test_reasoning_session_scope.py
test_render.py
test_review_summary_callback.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_session_cwd_follow.py fix(gateway): only follow settles into same-repo worktrees; never override an explicit cwd 2026-08-01 10:51:30 -07:00
test_session_id_injection.py
test_session_images_dir.py fix(vision): make desktop image uploads reachable from profile Docker sandboxes (#69575) (#75671) 2026-07-31 17:43:37 -04:00
test_session_platform_resolution.py
test_session_reclaim_notify.py test(gateway): cover the session.reclaimed broadcast contract 2026-07-31 23:04:44 -05:00
test_slash_worker_ansi.py
test_slash_worker_mcp_discovery.py
test_slash_worker_profile_home.py
test_slash_worker_sys_path.py
test_subagent_child_mirror.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_subprocess_encoding.py
test_undo_command.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_wait_for_mcp_discovery.py