hermes-agent/tests/hermes_cli
Teknium 3c070f9f9d
fix(curator): only mark agent-created for background-review sediment (#19621)
Tighten the provenance semantics added in #19618: skills a user asks a
foreground agent to write via skill_manage(create) now stay invisible to
the curator. Only skills the background self-improvement review fork
sediments through skill_manage get the created_by=agent marker.

- tools/skill_provenance.py — new ContextVar module mirroring the
  _approval_session_key pattern: set_current_write_origin / reset /
  get / is_background_review. Default origin is 'foreground'; the
  review fork sets 'background_review'.
- run_agent.py — run_conversation() binds the ContextVar from
  self._memory_write_origin at the top of each call. The review fork
  runs on its own thread (fresh context), so foreground and review
  contexts never cross-contaminate.
- tools/skill_manager_tool.py — skill_manage(action='create') now
  only calls mark_agent_created() when is_background_review(). All
  other cases (foreground create, patch, edit, write_file, delete)
  continue as before.
- tests: test_skill_provenance.py (6 tests covering the ContextVar
  surface), split test_full_create_via_dispatcher into foreground
  vs. review-fork variants, curator status tests now mark-first.

Why: the agent routinely edits existing user skills on the user's
behalf; those writes must never flip provenance. And when a user
explicitly asks the foreground agent to create a skill, that skill
belongs to the user. The curator should only be cleaning up after
its own autonomous sediment from the review nudge loop.
2026-05-04 02:42:16 -07:00
..
__init__.py
…
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
…
test_apply_model_switch_result_context.py
…
test_arcee_provider.py
…
test_argparse_flag_propagation.py
…
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 fix(auth): make provider config writes atomic 2026-04-30 20:39:41 -07:00
test_auth_nous_provider.py auth: coerce tls insecure flag safely instead of using Python truthiness 2026-04-30 19:55:48 -07:00
test_auth_provider_gate.py
…
test_auth_qwen_provider.py
…
test_auth_ssl_macos.py
…
test_aux_config.py
…
test_azure_detect.py
…
test_backup.py
…
test_banner.py
…
test_banner_git_state.py
…
test_banner_skills.py
…
test_bedrock_model_picker.py fix(model): avoid bedrock credential probe in provider picker 2026-05-03 00:32:55 -07:00
test_chat_skills_flag.py
…
test_claw.py
…
test_clear_stale_base_url.py
…
test_cmd_update.py
…
test_coalesce_session_args.py
…
test_codex_cli_model_picker.py
…
test_codex_models.py
…
test_commands.py fix(gateway): hide required-arg commands from Telegram menu 2026-05-03 15:29:06 -07:00
test_completion.py
…
test_config.py
…
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
…
test_curator_status.py fix(curator): only mark agent-created for background-review sediment (#19621) 2026-05-04 02:42:16 -07:00
test_custom_provider_context_length.py
…
test_custom_provider_model_switch.py
…
test_dashboard_browser_safe_imports.py
…
test_dashboard_lifecycle_flags.py
…
test_dashboard_profiles_nav_label.py
…
test_debug.py fix(debug): redact log content at upload time in hermes debug share 2026-05-03 11:42:20 -07:00
test_deprecated_cwd_warning.py
…
test_detect_api_mode_for_url.py
…
test_determine_api_mode_hostname.py
…
test_dingtalk_auth.py
…
test_discord_skill_clamp_warning.py test: add tests for cmd_key preservation through name clamping 2026-05-03 03:25:45 -07:00
test_doctor.py fix(cli): decode .env as UTF-8 to avoid GBK crash on Windows 2026-05-02 01:40:31 -07:00
test_doctor_command_install.py
…
test_env_loader.py
…
test_env_sanitize_on_load.py
…
test_fallback_cmd.py
…
test_gateway.py fix(tests): tolerate ps ancestor-walk in find_gateway_pids fallback test (#19590) 2026-05-04 01:40:39 -07:00
test_gateway_linger.py
…
test_gateway_runtime_health.py
…
test_gateway_service.py
…
test_gateway_wsl.py
…
test_gemini_free_tier_setup_block.py
…
test_gemini_provider.py
…
test_gmi_provider.py
…
test_goals.py feat: /goal — persistent cross-turn goals (Ralph loop) (#18262) 2026-04-30 23:10:20 -07:00
test_hooks_cli.py
…
test_ignore_user_config_flags.py
…
test_image_gen_picker.py
…
test_kanban_cli.py
…
test_kanban_core_functionality.py test(kanban): add failing test for list_profiles_on_disk with custom HERMES_HOME 2026-05-04 01:21:14 -07:00
test_kanban_db.py fix(kanban): add per-path env overrides + dispatcher env injection 2026-05-03 15:13:39 -07:00
test_launcher.py
…
test_logs.py
…
test_managed_installs.py
…
test_mcp_config.py
…
test_mcp_reload_confirm_gate.py
…
test_mcp_tools_config.py
…
test_memory_reset.py
…
test_model_catalog.py
…
test_model_normalize.py
…
test_model_picker_viewport.py
…
test_model_provider_persistence.py fix(auth): make provider config writes atomic 2026-04-30 20:39:41 -07:00
test_model_switch_context_display.py
…
test_model_switch_copilot_api_mode.py
…
test_model_switch_custom_providers.py
…
test_model_switch_opencode_anthropic.py
…
test_model_switch_variant_tags.py
…
test_model_validation.py
…
test_models.py
…
test_models_dev_preferred_merge.py
…
test_non_ascii_credential.py
…
test_nous_hermes_non_agentic.py
…
test_nous_subscription.py
…
test_ollama_cloud_auth.py
…
test_ollama_cloud_provider.py
…
test_opencode_go_in_model_list.py
…
test_opencode_go_validation_fallback.py
…
test_overlay_slug_resolution.py
…
test_path_completion.py
…
test_placeholder_usage.py
…
test_plugin_cli_registration.py
…
test_plugin_scanner_recursion.py
…
test_plugins.py fix(plugins): bound async plugin command await with 30s timeout 2026-04-30 19:56:18 -07:00
test_plugins_cmd.py fix: treat ctrl-c as curses cancel 2026-05-04 01:36:44 -07:00
test_profile_export_credentials.py
…
test_profiles.py
…
test_provider_config_validation.py
…
test_pty_bridge.py
…
test_reasoning_effort_menu.py
…
test_redact_config_bridge.py
…
test_regression_16767.py
…
test_relaunch.py
…
test_resolve_last_session.py
…
test_runtime_provider_resolution.py fix(fallback): let custom_providers shadow built-in aliases 2026-04-30 20:18:44 -07:00
test_session_browse.py
…
test_sessions_delete.py
…
test_set_config_value.py
…
test_setup.py fix(setup): add missing SLACK_HOME_CHANNEL prompt to _setup_slack() 2026-05-04 01:37:18 -07:00
test_setup_agent_settings.py fix(gateway): shutdown + restart hygiene (drain timeout, false-fatal, success log) (#18761) 2026-05-02 02:08:06 -07:00
test_setup_hermes_script.py
…
test_setup_irc.py
…
test_setup_matrix_e2ee.py
…
test_setup_model_provider.py
…
test_setup_noninteractive.py
…
test_setup_ollama_cloud_force_refresh.py
…
test_setup_openclaw_migration.py
…
test_setup_prompt_menus.py
…
test_setup_reconfigure.py
…
test_skills_config.py
…
test_skills_hub.py
…
test_skills_install_flags.py
…
test_skills_skip_confirm.py
…
test_skills_subparser.py
…
test_skin_engine.py
…
test_spotify_auth.py
…
test_status.py
…
test_status_model_provider.py
…
test_subparser_routing_fallback.py
…
test_subprocess_timeouts.py
…
test_suppress_eio_on_interrupt.py
…
test_tencent_tokenhub_provider.py
…
test_terminal_menu_fallbacks.py
…
test_timeouts.py
…
test_tips.py
…
test_tool_token_estimation.py
…
test_tools_config.py fix(cli): sync use_gateway in _reconfigure_provider for tts, browser, and web 2026-05-04 02:33:55 -07:00
test_tools_disable_enable.py
…
test_tui_npm_install.py fix(tui): tolerate npm's peer-flag drop in lockfile comparison 2026-05-04 14:13:38 +10:00
test_tui_resume_flow.py
…
test_update_autostash.py
…
test_update_check.py
…
test_update_config_clears_custom_fields.py
…
test_update_gateway_restart.py fix(gateway): drain manual profile gateways via SIGUSR1 before respawn 2026-04-30 20:00:31 -07:00
test_update_hangup_protection.py
…
test_update_stale_dashboard.py
…
test_update_yes_flag.py feat(update): add --yes/-y flag to skip interactive prompts (#18261) 2026-04-30 23:06:32 -07:00
test_user_providers_model_switch.py test(model_switch): cover private user_providers override 2026-04-30 19:44:26 -07:00
test_voice_wrapper.py
…
test_web_server.py
…
test_web_server_host_header.py
…
test_web_ui_build.py
…
test_webhook_cli.py
…
test_xiaomi_provider.py
…