hermes-agent/tests
Bartok 5e01a5dbf1
fix(cli): detect containerd/CRI cgroup-v2 containers in is_container() (#47131)
Closes #47111

is_container() only recognized Docker (/.dockerenv), Podman
(/run/.containerenv), and docker/podman/lxc markers in /proc/1/cgroup.
Under cgroup v2 (Kubernetes/k3s on containerd or CRI-O) /proc/1/cgroup
collapses to a single "0::/" line with no runtime marker, so
is_container() returned False on every containerd/CRI pod.

That false negative bypassed container-aware behavior across the CLI.
The most damaging case (reported): even after #46290 fixed
detect_service_manager() to gate on _s6_running() alone, other
is_container() call sites (profile home resolution, gateway behaviors,
config, doctor) still misbehave on containerd.

Broaden detection conservatively:
- KUBERNETES_SERVICE_HOST env var (present in every k8s pod).
- kubepods/containerd/crio markers in /proc/1/cgroup (cgroup v1 nested).
- same markers in /proc/self/mountinfo as a cgroup-v2 fallback.

Tests: 3 new (k8s env, kubepods cgroup, cgroup-v2-via-mountinfo) plus the
existing negative case hardened to stub mountinfo + env; 108 constants +
service_manager tests pass.
2026-06-17 12:11:31 +10:00
..
acp feat(gateway): inject stable human-readable message timestamps 2026-06-16 15:49:59 -07:00
acp_adapter
…
agent fix(skills): ignore support docs in skill discovery 2026-06-16 13:08:34 -07:00
cli
…
cron
…
docker
…
e2e
…
fakes
…
fixtures/plugins/example-dashboard/dashboard
…
gateway feat(gateway): gate message timestamps behind opt-in (default off) 2026-06-16 15:49:59 -07:00
hermes_cli fix(desktop): re-download Electron binary via mirror when pack fails (#47266) (#47276) 2026-06-16 15:40:55 -05:00
hermes_state
…
honcho_plugin
…
integration
…
openviking_plugin
…
plugins
…
providers fix(models): pass model.base_url to fetch_models in /model picker 2026-06-16 13:09:40 -07:00
run_agent test(hooks): cover session:compress event; drop dead import 2026-06-16 11:45:36 -07:00
scripts
…
skills
…
stress
…
tools fix(skills): ignore support docs in skill discovery 2026-06-16 13:08:34 -07:00
tui_gateway feat(desktop): stream subagent activity into watch windows (#47060) 2026-06-16 14:30:11 -04:00
website
…
__init__.py
…
conftest.py
…
run_interrupt_test.py
…
test_account_usage.py
…
test_assistant_ui_tap_compat.py
…
test_atomic_replace_symlinks.py
…
test_base_url_hostname.py
…
test_batch_runner_checkpoint.py
…
test_bitwarden_secrets.py
…
test_cli_file_drop.py
…
test_cli_manual_compress.py
…
test_cli_skin_integration.py
…
test_ctx_halving_fix.py
…
test_dashboard_sidecar_close_on_disconnect.py
…
test_desktop_mac_entitlements.py
…
test_dispatch_session_id.py
…
test_docker_home_override_scripts.py
…
test_docker_stage2_browser_discovery.py
…
test_dockerfile_tini_compat_shim.py
…
test_empty_model_fallback.py
…
test_empty_session_hygiene.py
…
test_env_loader_secret_sources.py
…
test_evidence_store.py
…
test_gateway_streaming_nested_config.py
…
test_get_tool_definitions_cache_isolation.py
…
test_hermes_bootstrap.py
…
test_hermes_constants.py fix(cli): detect containerd/CRI cgroup-v2 containers in is_container() (#47131) 2026-06-17 12:11:31 +10:00
test_hermes_home_profile_warning.py
…
test_hermes_logging.py
…
test_hermes_state.py feat(gateway): inject stable human-readable message timestamps 2026-06-16 15:49:59 -07:00
test_hermes_state_compression_locks.py
…
test_hermes_state_wal_fallback.py
…
test_honcho_client_concurrency.py
…
test_honcho_client_config.py
…
test_honcho_session_context.py
…
test_honcho_startup_fail_open.py
…
test_install_no_initial_commit.py
…
test_install_sh_browser_install.py
…
test_install_sh_node_global_prefix.py
…
test_install_sh_pythonpath_sanitization.py
…
test_install_sh_root_fhs_uv_python_path.py
…
test_install_sh_setup_wizard_tty_probe.py
…
test_install_sh_symlink_stomp.py
…
test_install_sh_termux_network_prereqs.py
…
test_install_unmerged_index.py
…
test_ipv4_preference.py
…
test_lazy_session_regressions.py
…
test_lint_config.py
…
test_live_system_guard_self_test.py
…
test_mcp_serve.py
…
test_mini_swe_runner.py
…
test_minimax_model_validation.py
…
test_minimax_oauth.py
…
test_minisweagent_path.py
…
test_model_forces_max_completion_tokens.py
…
test_model_picker_scroll.py
…
test_model_tools.py
…
test_model_tools_async_bridge.py
…
test_ollama_num_ctx.py
…
test_output_cap_parsing.py
…
test_package_json_lazy_deps.py
…
test_packaging_metadata.py
…
test_plugin_skills.py
…
test_plugin_utils.py
…
test_process_loop_event_loop_warning.py
…
test_project_metadata.py
…
test_retry_utils.py
…
test_run_tests_parallel.py
…
test_sanitize_tool_error.py
…
test_slash_worker_watchdog.py
…
test_sql_injection.py
…
test_state_db_malformed_repair.py
…
test_subprocess_home_isolation.py
…
test_termux_all_extra_compat.py
…
test_timezone.py
…
test_toolset_distributions.py
…
test_toolsets.py
…
test_trajectory_compressor.py
…
test_trajectory_compressor_async.py
…
test_transform_llm_output_hook.py
…
test_transform_tool_result_hook.py
…
test_tui_gateway_server.py
…
test_tui_gateway_ws.py
…
test_utils_truthy_values.py
…
test_web_server.py
…
test_wheel_locales_e2e.py
…
test_yuanbao_integration.py
…
test_yuanbao_markdown.py
…
test_yuanbao_pipeline.py
…
test_yuanbao_proto.py
…
test_yuanbao_shutdown.py
…