hermes-bsd/tests/hermes_cli
Teknium 46f8948bad test+harden(cli): cover parent-chain walk in concurrent-instance detection
Follow-up to @Strontvod's fix.

Tests:
- Five new tests in test_update_concurrent_quarantine.py cover the parent-
  chain exclusion: the .exe launcher is excluded, an unrelated sibling
  hermes.exe is still reported, multi-level ancestry is fully excluded,
  PID cycles in the parent chain don't hang, and a partially-stubbed
  psutil (no Process attribute) degrades gracefully instead of crashing.
- New _fake_psutil_with_parent_chain helper builds a fuller stand-in
  (Process / NoSuchProcess / AccessDenied + process_iter) than the
  process_iter-only SimpleNamespace the older tests use.

Hardening:
- Broaden the except in the parent-walk to bare Exception. The original
  fix listed (NoSuchProcess, AccessDenied, ValueError), but those names
  are evaluated lazily during exception matching — if psutil is a partial
  stub without the attribute, the exception handler itself raises
  AttributeError that escapes. The function is documented as 'never raises'
  (the surrounding update flow depends on it), so the broader catch keeps
  the contract regardless of how the dependency is shaped.

AUTHOR_MAP:
- Map schepers.zander1@gmail.com -> Strontvod so the salvaged commit
  resolves to @Strontvod in the release notes.

All 18 detect_concurrent + quarantine tests pass.
2026-05-24 19:51:46 -07:00
..
__init__.py
conftest.py fix(update): quarantine hermes.exe vs concurrent Windows instance (#26670) (#26677) 2026-05-19 11:10:51 -07:00
test_ai_gateway_models.py
test_anthropic_model_flow_stale_oauth.py
test_anthropic_oauth_flow.py
test_anthropic_provider_persistence.py
test_api_key_providers.py fix(tests): catch up 25 stale tests after recent merges (#28626) 2026-05-19 01:28:32 -07:00
test_apply_model_switch_result_context.py
test_apply_profile_override.py fix(profiles): honour active_profile when HERMES_HOME points to hermes root 2026-05-09 11:10:53 -07:00
test_arcee_provider.py
test_argparse_flag_propagation.py Fix CLI verbose tool progress config fallback 2026-05-23 21:03:51 -07:00
test_at_context_completion_filter.py
test_atomic_json_write.py
test_atomic_yaml_write.py
test_auth_codex_provider.py
test_auth_commands.py Switch to JWT token for inference against Nous, falling back to old opaque token on failure. 2026-05-17 16:56:37 -07:00
test_auth_loopback_ssh_hint.py fix(auth): improve xAI OAuth SSH hint with visual header and auto-detected host 2026-05-18 10:26:55 -07:00
test_auth_manual_paste.py test+docs(oauth): pin manual-paste semantics and document browser-only path (#26923) 2026-05-18 20:10:52 -07:00
test_auth_nous_provider.py fix(auth) fix a few cases where refresh tokens were not rotated. 2026-05-17 16:56:37 -07:00
test_auth_profile_fallback.py fix(auth): fall back to global-root auth.json for providers missing in profile 2026-05-06 13:29:54 -07:00
test_auth_provider_gate.py
test_auth_qwen_provider.py fix(cli): validate runtime token refresh capability in Qwen auth status 2026-05-23 17:47:36 -07:00
test_auth_ssl_macos.py
test_auth_toctou_file_modes.py test: migrate stale os.kill monkeypatches to gateway.status._pid_exists 2026-05-08 14:27:40 -07:00
test_auth_usable_secret.py security: harden API server key placeholder handling (#30738) 2026-05-24 04:25:32 -07:00
test_auth_xai_oauth_provider.py fix(xai-oauth): pin inference base_url to x.ai origin (#28952) 2026-05-19 14:51:21 -07:00
test_aux_config.py fix(aux): remove stale session_search model menu entry 2026-05-18 20:01:34 -07:00
test_azure_detect.py feat(azure-foundry): add Microsoft Entra ID auth 2026-05-18 10:14:38 -07:00
test_azure_foundry_entra.py feat(azure-foundry): add Microsoft Entra ID auth 2026-05-18 10:14:38 -07:00
test_backup.py
test_banner.py
test_banner_git_state.py
test_banner_pip_update.py refactor: DRY cleanup from code review 2026-05-15 14:45:43 -07:00
test_banner_skills.py
test_bedrock_model_picker.py test(ci): stabilize shared optional dependency baselines 2026-05-13 17:32:22 -07:00
test_bundles.py feat(skills): add skill bundles — alias /<name> loads multiple skills (#28373) 2026-05-18 21:38:05 -07:00
test_chat_skills_flag.py
test_claw.py
test_clear_stale_base_url.py
test_cmd_update.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_coalesce_session_args.py
test_codex_cli_model_picker.py test(codex-spark): add live-API regression and make picker test deterministic 2026-05-09 23:17:25 -07:00
test_codex_models.py test(codex-spark): add live-API regression and make picker test deterministic 2026-05-09 23:17:25 -07:00
test_codex_runtime_plugin_migration.py fix(codex-runtime): de-dup [plugins.X] tables and stop leaking HERMES_HOME into config.toml 2026-05-15 02:31:30 -07:00
test_codex_runtime_switch.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_commands.py fix(gateway): prioritize Telegram command menu 2026-05-20 19:14:21 -07:00
test_completion.py test(cli): strengthen zsh completion regression coverage 2026-05-13 09:34:15 -07:00
test_config.py fix(config): warn loudly on YAML parse failure instead of silent default fallback (#23585) 2026-05-10 22:36:19 -07:00
test_config_drift.py
test_config_env_expansion.py
test_config_env_refs.py
test_config_validation.py
test_container_aware_cli.py
test_copilot_auth.py
test_copilot_catalog_oauth_fallback.py
test_copilot_context.py
test_copilot_in_model_list.py
test_copilot_token_exchange.py
test_cron.py feat: add cron job profile support 2026-05-18 17:39:50 +00:00
test_curator_archive_prune.py feat(curator): add archive and prune subcommands (#20200) 2026-05-05 05:15:54 -07:00
test_curator_recent_run_notice.py feat(curator): show rename map in user-visible summary (#22910) 2026-05-09 18:43:40 -07:00
test_curator_run.py fix(curator): make manual runs synchronous 2026-05-07 05:27:47 -07:00
test_curator_status.py fix(curator): make manual runs synchronous 2026-05-07 05:27:47 -07:00
test_curses_color_compat.py fix(cli): clamp curses color 8 for 8-color terminals (Docker) 2026-05-21 23:40:58 -07:00
test_custom_provider_context_length.py
test_custom_provider_model_switch.py fix(model): match custom provider by active base url 2026-05-19 14:50:38 -07:00
test_dashboard_browser_safe_imports.py
test_dashboard_lifecycle_flags.py
test_dashboard_profiles_nav_label.py fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
test_debug.py fix(debug): redact BlueBubbles webhook secrets 2026-05-24 15:43:48 -07:00
test_dep_ensure.py feat(dep_ensure): complete Windows bootstrap — dep_ensure + install.ps1 + detection (#27845) 2026-05-18 16:34:24 +05:30
test_deprecated_cwd_warning.py
test_destructive_slash_confirm_gate.py feat: confirm prompt for destructive slash commands (#4069) (#22687) 2026-05-09 11:04:46 -07:00
test_detect_api_mode_for_url.py
test_determine_api_mode_hostname.py
test_dingtalk_auth.py
test_discord_skill_clamp_warning.py
test_doctor.py fix(doctor): attach codex CLI hint to OpenAI Codex auth warning for #27975 2026-05-19 00:14:39 -07:00
test_doctor_command_install.py
test_doctor_dedicated_provider_skip.py fix(doctor): skip pluggable provider profiles when a dedicated check exists (#22346) 2026-05-09 13:36:33 -07:00
test_env_load_cache.py perf(tools): cache get_nous_auth_status() and load_env() to fix slow hermes tools menus (#25341) 2026-05-13 18:40:14 -07:00
test_env_loader.py fix(env): strip null bytes from .env before python-dotenv loads 2026-05-23 17:17:05 -07:00
test_env_sanitize_on_load.py
test_fallback_cmd.py fix(fallback): merge fallback_providers with legacy fallback_model configurations 2026-05-23 05:24:57 -07:00
test_gateway.py fix(gateway): harden Windows gateway install lifecycle 2026-05-19 11:23:15 -07:00
test_gateway_linger.py
test_gateway_platform_gating.py fix(install): use --extra all not --all-extras; drop lazy-covered extras from [all] (#24515) 2026-05-12 15:06:25 -07:00
test_gateway_proc_fallback.py fix(gateway): detect gateway process via /proc in Docker without procps 2026-05-09 17:54:17 -07:00
test_gateway_runtime_health.py
test_gateway_service.py ci(tests): add pytest-timeout 60s hard cap to break suite-teardown deadlock (#28861) 2026-05-19 17:27:24 -07:00
test_gateway_service_paths.py fix(gateway): build service PATH from existing dirs only, include ~/.hermes/node_modules 2026-05-15 14:45:43 -07:00
test_gateway_windows.py test(gateway-windows): make ctypes.windll monkeypatch tolerant on non-Windows 2026-05-19 11:23:15 -07:00
test_gateway_wsl.py ci(tests): add pytest-timeout 60s hard cap to break suite-teardown deadlock (#28861) 2026-05-19 17:27:24 -07:00
test_gemini_free_tier_setup_block.py
test_gemini_provider.py
test_gmi_provider.py refactor(gmi): move User-Agent to profile.default_headers 2026-05-08 03:22:11 -07:00
test_goals.py feat(goals): /subgoal — user-added criteria appended to active /goal (#25449) 2026-05-13 22:55:09 -07:00
test_hooks_cli.py
test_ignore_user_config_flags.py
test_image_gen_picker.py refactor(image_gen): port FAL backend to plugins/image_gen/fal 2026-05-22 04:10:45 -07:00
test_install_cua_driver.py fix(cli): pre-check CUA release asset for Intel macOS before install 2026-05-21 19:17:45 -07:00
test_inventory.py refactor(inventory): extract shared ConfigContext + build_models_payload 2026-05-13 22:31:11 -07:00
test_kanban_blocked_sticky.py test(kanban): cover sticky blocks for worker-initiated kanban_block (#28712) 2026-05-19 17:26:23 -07:00
test_kanban_boards.py fix(kanban): align board_exists with board discovery rules 2026-05-18 20:17:10 -07:00
test_kanban_cli.py feat(kanban): configure worktree paths and branches 2026-05-18 21:33:08 -07:00
test_kanban_core_functionality.py fix(tests): catch up 25 stale tests after recent merges (#28626) 2026-05-19 01:28:32 -07:00
test_kanban_db.py fix(kanban): scratch tasks must not inherit board.default_workdir (#28818) 2026-05-24 15:48:58 -07:00
test_kanban_db_init.py fix(kanban): serialize DB initialization 2026-05-18 20:17:48 -07:00
test_kanban_decompose.py fix: assign single-task kanban decompositions 2026-05-18 20:26:02 -07:00
test_kanban_decompose_db.py fix(kanban): detect cycles in decompose_triage_task sibling-link pre-validation 2026-05-18 09:40:44 -07:00
test_kanban_diagnostics.py fix(kanban): honor severity thresholds in diagnostics 2026-05-18 20:47:01 -07:00
test_kanban_notify.py fix(tests): allowlist tmp_path for kanban_notify artifact delivery (#30852) 2026-05-23 02:34:34 -07:00
test_kanban_promote.py feat(kanban): --ids bulk promote + AUTHOR_MAP entry for #29464 2026-05-23 23:10:36 -07:00
test_kanban_specify.py feat(kanban): add specify — auxiliary LLM fleshes out triage tasks (#21435) 2026-05-07 13:04:41 -07:00
test_kanban_specify_db.py feat(kanban): add specify — auxiliary LLM fleshes out triage tasks (#21435) 2026-05-07 13:04:41 -07:00
test_kanban_swarm.py feat(cli): add kanban swarm topology helper 2026-05-18 21:10:12 -07:00
test_launcher.py
test_list_picker_providers.py fix(gateway): preserve model picker current context 2026-05-06 03:50:59 -07:00
test_logs.py
test_managed_installs.py fix(tests): catch up 25 stale tests after recent merges (#28626) 2026-05-19 01:28:32 -07:00
test_mcp_add_command_dest.py fix(mcp): give 'mcp add --command' a distinct argparse dest 2026-05-07 05:17:03 -07:00
test_mcp_config.py fix(mcp): give 'mcp add --command' a distinct argparse dest 2026-05-07 05:17:03 -07:00
test_mcp_reload_confirm_gate.py
test_mcp_tools_config.py
test_memory_reset.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_migrate_xai.py fix(xai): align migrate retirement map with docs 2026-05-20 09:18:23 -07:00
test_model_catalog.py fix(nous): surface Portal-flagged free models in picker even when curated list is stale (#24082) 2026-05-11 18:08:16 -07:00
test_model_normalize.py
test_model_picker_viewport.py
test_model_provider_persistence.py feat(custom): prompt and persist explicit api_mode for custom providers 2026-05-13 13:21:33 -07:00
test_model_switch_context_display.py
test_model_switch_copilot_api_mode.py
test_model_switch_custom_providers.py fix(model-switch): mark bare custom provider as current 2026-05-19 10:57:35 -07:00
test_model_switch_opencode_anthropic.py
test_model_switch_variant_tags.py
test_model_validation.py test: remove 50 stale/broken tests to unblock CI (#22098) 2026-05-08 14:55:40 -07:00
test_models.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_models_dev_preferred_merge.py
test_non_ascii_credential.py
test_nous_auth_status_cache.py perf(tools): cache get_nous_auth_status() and load_env() to fix slow hermes tools menus (#25341) 2026-05-13 18:40:14 -07:00
test_nous_hermes_non_agentic.py
test_nous_inference_url_validation.py fix(security): wire Nous URL allowlist into refresh / mint persistence sites 2026-05-22 14:17:40 -07:00
test_nous_subscription.py
test_ollama_cloud_auth.py
test_ollama_cloud_provider.py fix(models): strip :cloud/-cloud suffix from models.dev Ollama Cloud IDs 2026-05-04 12:38:15 -07:00
test_openai_codex_model_validation_fallback.py fix(codex-spark): defensive 128k entry in DEFAULT_CONTEXT_LENGTHS + clarify validation test docstring 2026-05-09 23:17:25 -07:00
test_opencode_go_flat_namespace.py fix(opencode-go): keep users on opencode-go instead of hijacking to native providers (#20802) 2026-05-06 09:08:33 -07:00
test_opencode_go_in_model_list.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_opencode_go_validation_fallback.py
test_overlay_slug_resolution.py
test_path_completion.py
test_pin_kanban_board_env.py test(kanban): isolate HERMES_KANBAN_BOARD writes in pin-env tests 2026-05-05 04:37:47 -07:00
test_pip_install_detection.py feat(config): add install-method stamping + Docker detection (#27843) 2026-05-18 16:34:10 +05:30
test_placeholder_usage.py
test_plugin_auxiliary_tasks.py feat(plugins): add register_auxiliary_task() to PluginContext API 2026-05-23 17:49:47 -07:00
test_plugin_cli_registration.py
test_plugin_scanner_recursion.py
test_plugins.py feat(plugins): tool override flag for replacing built-in tools (closes #11049) (#26759) 2026-05-15 22:12:57 -07:00
test_plugins_cmd.py fix(plugins): widen _sanitize_plugin_name for category-namespaced names 2026-05-22 19:50:32 -07:00
test_plugins_tts_registration.py feat(tts): add register_tts_provider() plugin hook (closes #30398) 2026-05-24 18:04:54 -07:00
test_post_setup_gating.py fix(tools): install cua-driver when Computer Use is enabled via 'hermes tools' (#22765) 2026-05-09 13:02:25 -07:00
test_profile_describer.py feat(kanban): orchestrator-driven auto-decomposition on triage (#27572) 2026-05-17 13:54:12 -07:00
test_profile_distribution.py feat(profile): shareable profile distributions via git (#20831) 2026-05-08 10:04:32 -07:00
test_profile_export_credentials.py
test_profiles.py refactor(profiles): remove dead generate_bash_completion / generate_zsh_completion 2026-05-13 09:34:15 -07:00
test_project_plugin_rce_bypass.py test(plugins): regression coverage for project-plugin RCE chain (#29156) 2026-05-23 01:43:52 -07:00
test_prompt_api_key.py fix(setup): offer Keep/Replace/Clear when API key already exists 2026-05-05 04:08:11 -07:00
test_provider_config_validation.py
test_proxy.py feat(proxy): add xai upstream adapter for Grok via OAuth 2026-05-18 20:09:32 -07:00
test_pty_bridge.py test: use subprocesses for each test file (#29016) 2026-05-21 16:40:04 +05:30
test_reasoning_effort_menu.py
test_redact_config_bridge.py feat(security): enable secret redaction by default (#17691, #20785) (#21193) 2026-05-07 05:10:33 -07:00
test_regression_16767.py
test_relaunch.py fix(windows): prefer npm.cmd over npm.ps1, skip .py argv0 in relaunch 2026-05-08 14:27:40 -07:00
test_resolve_last_session.py
test_runtime_provider_resolution.py fix(custom): pass custom provider extra body 2026-05-21 07:48:53 -07:00
test_security_advisories.py feat(security): supply-chain advisory checker + lazy-install framework + tiered install fallback (#24220) 2026-05-12 01:02:25 -07:00
test_security_audit.py feat(security): on-demand supply-chain audit via OSV.dev (#31460) 2026-05-24 15:15:16 -07:00
test_send_cmd.py fix(review): address Copilot follow-up on sanitizer and file decode errors 2026-05-16 23:00:58 -05:00
test_session_browse.py
test_session_handoff.py feat(session): make /handoff actually transfer the session live 2026-05-10 13:06:25 -07:00
test_session_recap.py feat(status): append session recap to /status output (#27176) 2026-05-16 16:51:42 -07:00
test_sessions_delete.py
test_set_config_value.py chore: remove Atropos RL environments and tinker-atropos integration (#26106) 2026-05-15 10:36:38 +05:30
test_setup.py fix(setup): drop post-setup chat handoff (#25067) 2026-05-13 13:28:25 -07:00
test_setup_agent_settings.py
test_setup_hermes_script.py chore: remove Atropos RL environments and tinker-atropos integration (#26106) 2026-05-15 10:36:38 +05:30
test_setup_irc.py
test_setup_matrix_e2ee.py
test_setup_model_provider.py fix(cli): preserve setup config picker writes 2026-05-19 14:23:19 -07:00
test_setup_noninteractive.py
test_setup_ollama_cloud_force_refresh.py
test_setup_openclaw_migration.py fix(tests): catch up 25 stale tests after recent merges (#28626) 2026-05-19 01:28:32 -07:00
test_setup_prompt_menus.py fix(cli): sanitize bracketed paste markers during setup 2026-05-05 06:12:42 -07:00
test_setup_reconfigure.py fix(setup): drop post-setup chat handoff (#25067) 2026-05-13 13:28:25 -07:00
test_skills_config.py
test_skills_hub.py fix(skills-hub): widen identifier-dedup to GitHubSource + fix test patch path 2026-05-20 15:04:01 -07:00
test_skills_install_flags.py
test_skills_skip_confirm.py
test_skills_subparser.py
test_skin_engine.py fix(tui): improve charizard completion menu contrast 2026-05-18 20:05:23 -07:00
test_slack_cli.py fix(slack): enable writable app home DMs in manifest 2026-05-08 17:01:12 -07:00
test_spotify_auth.py fix(auth): keep Spotify logout from resetting model config 2026-05-07 05:53:14 -07:00
test_startup_plugin_gating.py perf(cli): skip eager plugin discovery on known built-in subcommands (#22120) 2026-05-08 16:07:23 -07:00
test_status.py feat(status): show xAI OAuth login state in hermes status 2026-05-17 11:35:57 -07:00
test_status_model_provider.py
test_subparser_routing_fallback.py
test_subprocess_timeouts.py
test_suppress_eio_on_interrupt.py fix(cli): guard logger.debug in signal handler (#13710 regression) (#20673) 2026-05-06 03:55:47 -07:00
test_teams_pipeline_plugin_cli.py feat(teams-pipeline): add plugin runtime and operator cli 2026-05-08 11:18:14 -07:00
test_tencent_tokenhub_provider.py fix(model-metadata): align hy3-preview static fallback + delete change-detector test (#22805) 2026-05-09 13:37:19 -07:00
test_terminal_menu_fallbacks.py
test_timeouts.py
test_tips.py
test_tool_token_estimation.py
test_tools_config.py fix: run computer use post-setup when enabling tool 2026-05-22 01:24:11 -07:00
test_tools_disable_enable.py
test_tts_picker.py feat(tts): add register_tts_provider() plugin hook (closes #30398) 2026-05-24 18:04:54 -07:00
test_tui_bundled.py feat(tui): find bundled entry.js from wheel before falling back to npm build 2026-05-15 14:45:43 -07:00
test_tui_npm_install.py fix(tui): surface verbose tool details (#30225) 2026-05-22 00:16:52 -05:00
test_tui_resume_flow.py perf(termux): speed up bare cli prompt startup 2026-05-22 14:27:38 -07:00
test_update_autostash.py fix(ci): stabilize shared test state after 21012 2026-05-14 14:28:14 -07:00
test_update_check.py refactor: DRY cleanup from code review 2026-05-15 14:45:43 -07:00
test_update_concurrent_quarantine.py test+harden(cli): cover parent-chain walk in concurrent-instance detection 2026-05-24 19:51:46 -07:00
test_update_config_clears_custom_fields.py
test_update_hangup_protection.py
test_update_post_pull_syntax_guard.py feat(update): syntax-validate critical files post-pull, auto-rollback on failure (#28669) 2026-05-19 03:01:02 -07:00
test_update_stale_dashboard.py chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) 2026-05-17 02:29:41 -07:00
test_update_yes_flag.py test: remove 50 stale/broken tests to unblock CI (#22098) 2026-05-08 14:55:40 -07:00
test_user_providers_model_switch.py
test_video_gen_picker.py fix(tools): video_gen picker reflects active xAI selection and runs xai_grok post_setup 2026-05-15 12:11:32 -07:00
test_voice_wrapper.py fix(tui): restore voice push-to-talk parity (#20897) 2026-05-06 15:49:59 -07:00
test_web_oauth_dispatch.py refactor(auth): collapse Nous inference fallback controls 2026-05-17 16:56:37 -07:00
test_web_server.py test(dashboard): send loopback headers for WebSocket sidecar test 2026-05-24 15:00:44 -07:00
test_web_server_cron_profiles.py feat(kanban): show dashboard cron jobs across profiles 2026-05-18 21:26:45 -07:00
test_web_server_host_header.py fix(dashboard): validate WebSocket Host and Origin 2026-05-24 15:00:44 -07:00
test_web_server_oauth_write.py Protect dashboard OAuth credentials with the same file-safety guarantees as other auth paths 2026-05-24 17:47:24 -07:00
test_web_ui_build.py fix(dashboard): validate dist exists when --skip-build is set 2026-05-11 09:27:05 -07:00
test_webhook_cli.py fix(state): restrict sensitive store file permissions 2026-05-24 04:55:18 -07:00
test_whatsapp_setup_ordering.py fix(gateway): keep running when platforms fail; add per-platform circuit breaker + /platform (#26600) 2026-05-15 14:32:14 -07:00
test_xai_oauth_pkce_token_exchange.py test(xai-oauth): pin PKCE token-exchange wire format 2026-05-17 12:35:01 -07:00
test_xai_provider_labels.py fix(model): include Premium+ in xAI OAuth label 2026-05-24 18:12:16 -07:00
test_xai_retirement.py fix(xai): align migrate retirement map with docs 2026-05-20 09:18:23 -07:00
test_xiaomi_provider.py