hermes-bsd/tests
teknium1 a8409a161f fix: guard all print() calls against OSError with _SafeWriter
When hermes-agent runs as a systemd service, Docker container, or
headless daemon, the stdout pipe can become unavailable (idle timeout,
buffer exhaustion, socket reset). Any print() call then raises
OSError: [Errno 5] Input/output error, crashing run_conversation()
and causing cron jobs to fail.

Rather than wrapping individual print() calls (68 in run_conversation
alone), this adds a transparent _SafeWriter wrapper installed once at
the start of run_conversation(). It delegates all writes to the real
stdout and silently catches OSError. Zero overhead on the happy path,
comprehensive coverage of all print calls including future ones.

Fixes #845

Co-authored-by: J0hnLawMississippi <J0hnLawMississippi@users.noreply.github.com>
2026-03-11 09:19:10 -07:00
..
agent
cron test(cron): cover topic thread delivery metadata 2026-03-11 09:22:32 +01:00
fakes
gateway feat: add email gateway platform (IMAP/SMTP) 2026-03-11 06:32:01 -07:00
hermes_cli feat(cli): add /reasoning command for effort level and display toggle 2026-03-11 06:02:18 -07:00
honcho_integration
integration
skills
tools fix: skip tests when atroposlib/minisweagent unavailable in CI 2026-03-11 06:52:55 -07:00
__init__.py
conftest.py
test_413_compression.py fix: proactive compression after large tool results + Anthropic error detection 2026-03-11 08:04:52 -07:00
test_860_dedup.py fix: eliminate 3x SQLite message duplication in gateway sessions (#860) 2026-03-10 15:22:44 -07:00
test_agent_loop.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_agent_loop_tool_calling.py fix: skip tests when atroposlib/minisweagent unavailable in CI 2026-03-11 06:52:55 -07:00
test_agent_loop_vllm.py test: skip atropos-dependent tests when atroposlib not installed 2026-03-11 06:52:55 -07:00
test_api_key_providers.py
test_atomic_json_write.py
test_auth_codex_provider.py
test_auth_nous_provider.py
test_auxiliary_config_bridge.py
test_batch_runner_checkpoint.py
test_cli_init.py fix: normalize max turns config path 2026-03-10 06:05:02 -07:00
test_cli_loading_indicator.py fix(cli): add loading indicators for slow slash commands 2026-03-10 17:31:00 -07:00
test_cli_model_command.py
test_cli_provider_resolution.py
test_codex_execution_paths.py
test_codex_models.py
test_display.py
test_external_credential_detection.py
test_fallback_model.py
test_file_permissions.py
test_flush_memories_codex.py
test_hermes_state.py
test_honcho_client_config.py
test_insights.py
test_managed_server_tool_support.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_model_provider_persistence.py fix: provider selection not persisting when switching via hermes model 2026-03-10 17:12:34 -07:00
test_model_tools.py
test_personality_none.py
test_provider_parity.py
test_quick_commands.py
test_reasoning_command.py feat(cli): add /reasoning command for effort level and display toggle 2026-03-11 06:02:18 -07:00
test_resume_display.py
test_run_agent.py fix: guard all print() calls against OSError with _SafeWriter 2026-03-11 09:19:10 -07:00
test_run_agent_codex_responses.py fix: add missing Responses API parameters for Codex provider 2026-03-11 04:28:31 -07:00
test_runtime_provider_resolution.py fix: provider selection not persisting when switching via hermes model 2026-03-10 17:12:34 -07:00
test_timezone.py
test_tool_call_parsers.py fix: guard all atroposlib imports for CI without atropos installed 2026-03-11 06:52:55 -07:00
test_toolset_distributions.py
test_toolsets.py
test_trajectory_compressor.py
test_worktree.py