hermes-agent/tests/agent/transports
Teknium fe83c4001b
fix(codex-app-server): attach redacted stderr tail to generic failures (#25929)
When codex app-server fails outside the OAuth-classified path
(non-auth turn/start errors, plain TimeoutErrors, generic turn-ended
status, subprocess silently exits, hard deadline timeout), the user
got a bare 'Internal error' / 'turn/start failed: ...' with no
context. Diagnosing config/provider/auth-bridge issues forced a
re-run with verbose codex flags.

Add a _format_error_with_stderr helper that appends the last few
stderr lines via agent.redact.redact_sensitive_text(force=True),
and use it at every catch-all error site:

- ensure_started() failures (codex init / thread/start) now return
  a TurnResult.error with should_retire=True instead of bubbling
- non-OAuth turn/start CodexAppServerError / TimeoutError
- subprocess-died branch (previously dumped raw stderr_blob[-300:]
  with no redaction — a leak risk)
- turn ended with non-completed status
- hard turn-timeout deadline

OAuth-classified failures and the post-tool quiet watchdog already
produce clean hints and stay unchanged. The redactor catches sk-*,
gh*_*, Authorization: Bearer, query-string tokens, JWTs, private
keys, etc., so provider error payloads can't leak into chat output
or trajectories.

Inspired by openclaw#80718, adapted for our app-server transport.
2026-05-14 14:55:23 -07:00
..
__init__.py feat: add transport types + migrate Anthropic normalize path 2026-04-20 23:06:00 -07:00
test_bedrock_transport.py fix(bedrock): preserve reasoningContent across converse normalization 2026-05-07 05:17:16 -07:00
test_chat_completions.py feat(nous): unified client=hermes-client-v<version> tag on every Portal request (#24779) 2026-05-12 20:49:20 -07:00
test_codex_app_server_runtime.py feat(codex-runtime): optional codex app-server runtime for OpenAI/Codex models (#24182) 2026-05-13 17:18:15 -07:00
test_codex_app_server_session.py fix(codex-app-server): attach redacted stderr tail to generic failures (#25929) 2026-05-14 14:55:23 -07:00
test_codex_event_projector.py feat(codex-runtime): optional codex app-server runtime for OpenAI/Codex models (#24182) 2026-05-13 17:18:15 -07:00
test_codex_transport.py fix(xai): omit reasoning.effort for grok models that reject it (#23435) 2026-05-10 15:21:30 -07:00
test_hermes_tools_mcp_server.py feat(codex-runtime): optional codex app-server runtime for OpenAI/Codex models (#24182) 2026-05-13 17:18:15 -07:00
test_transport.py fix(agent): preserve Codex message items for replay 2026-04-25 18:22:06 -07:00
test_types.py fix(agent): preserve Codex message items for replay 2026-04-25 18:22:06 -07:00