hermes-agent/agent
Teknium 28524adb0e fix(tests): eliminate flaky/broken tests — shadow sys.path inserts, unmocked network in compressor tests, stale-SDK feishu pin guard, quadratic redact regexes
- Remove tests/-shadowing sys.path.insert(dirname/'..') from 11 test files:
  it prepended the tests/ dir itself to sys.path, so 'import agent' /
  'import hermes_cli' resolved to the test packages and collection died
  with ModuleNotFoundError depending on import order (2 files failed in
  every full-suite run; 9 more were latent).
- Patch call_llm in 5 context-compressor tests that called compress()
  unmocked: each burned ~50s attempting live LLM traffic through the
  relay before falling back (572s file — the slowest in the suite, and
  flaky under the 300s per-file timeout). File now runs in ~5s.
- agent/redact.py: fix two catastrophically-backtracking regexes hit by
  the compressor's redaction pass on large payloads —
  _STRICT_URL_USERINFO_RE anchors on the mandatory '//' (optional-scheme
  prefix backtracked O(n^2): ~55s on a 320KB payload, now sub-ms;
  output-equivalence fuzz-verified on 20k random strings), and the
  _CFG_DOTTED_RE/_CFG_ANCHORED_RE subs gain an exact linear keyword
  pre-gate so secret-free text skips the quadratic pattern entirely.
- tests/gateway/test_feishu.py: version-guard the extra_ua_tags SDK
  signature check; the repo pins lark-oapi==1.6.8 but stale local
  installs (1.5.3) fail the assertion — skip below the pin.
- tests/tools/test_managed_browserbase_and_modal.py: stub
  agent.redact + agent.credential_persistence in the fake agent package
  (empty __path__ blocks all real agent.* imports added since the fake
  was written).
- tests/gateway/test_startup_restart_race.py: raise wait_for timeouts
  2s -> 30s; 2s wall-clock on a loaded 40-worker box flaked in the
  baseline run (passes instantly when the box is quiet).
2026-07-29 15:12:28 -07:00
..
lsp chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
monitoring
…
pet
…
proxy_sources
…
secret_sources refactor: single build_subprocess_env() factory for all child-process spawns (profile + secret-scrub single owner) 2026-07-29 10:14:11 -07:00
transports chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
__init__.py
…
account_usage.py
…
agent_init.py fix(gateway): keep models.dev refreshes off event loop 2026-07-29 17:13:48 +05:30
agent_runtime_helpers.py refactor(agent): single-owner call_id + reasoning_content sanitization policies (wire-parity verified) 2026-07-29 12:29:39 -07:00
anthropic_adapter.py
…
async_utils.py
…
aux_accounting.py
…
auxiliary_client.py fix(gemini): sweep hardcoded Gemini default models to gemini-3.6-flash (#32360) 2026-07-28 18:17:56 -07:00
azure_identity_adapter.py
…
backend_identity.py
…
background_review.py
…
battery.py
…
bedrock_adapter.py
…
billing_links.py
…
billing_usage.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
billing_view.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
bounded_response.py
…
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py perf(config): stop deepcopying config on per-turn read-only paths 2026-07-29 11:33:41 -07:00
codex_responses_adapter.py refactor(agent): single-owner call_id + reasoning_content sanitization policies (wire-parity verified) 2026-07-29 12:29:39 -07:00
codex_runtime.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
coding_context.py
…
context_breakdown.py
…
context_compressor.py fix(compression): coherent context_length setter — no-op guard, re-floor on new window, un-strandable init log 2026-07-28 20:04:58 +05:30
context_engine.py
…
context_references.py
…
conversation_compression.py fix(compression): copy-on-write in image-shrink recovery so degraded images never reach stored history 2026-07-28 20:04:58 +05:30
conversation_loop.py perf(agent): cursor/memo optimizations for per-iteration full-history walks (byte-parity proven) 2026-07-29 11:54:18 -07:00
copilot_acp_client.py
…
credential_persistence.py
…
credential_pool.py
…
credential_sources.py
…
credits_tracker.py fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
curator.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
curator_backup.py
…
delegation_context.py
…
display.py
…
error_classifier.py
…
errors.py
…
file_safety.py
…
gemini_native_adapter.py fix(gemini): sweep hardcoded Gemini default models to gemini-3.6-flash (#32360) 2026-07-28 18:17:56 -07:00
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py
…
insights.py
…
iteration_budget.py
…
jiter_preload.py
…
kanban_stop.py
…
learn_prompt.py
…
learning_graph.py
…
learning_graph_render.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
learning_mutations.py
…
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py
…
memory_provider.py
…
message_content.py
…
message_sanitization.py refactor(agent): single-owner call_id + reasoning_content sanitization policies (wire-parity verified) 2026-07-29 12:29:39 -07:00
moa_loop.py
…
moa_trace.py
…
model_metadata.py perf(agent): cursor/memo optimizations for per-iteration full-history walks (byte-parity proven) 2026-07-29 11:54:18 -07:00
models_dev.py perf(local-endpoints): disk L2 for server-type + ollama ctx probes, faster timeouts 2026-07-29 10:52:13 -07:00
moonshot_schema.py
…
nous_rate_guard.py
…
onboarding.py
…
oneshot.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py
…
prompt_builder.py feat(computer_use): align cua-driver 0.10 permission modes 2026-07-29 12:19:37 -07:00
prompt_caching.py perf(caching): selective copy instead of deepcopy entire history 2026-07-28 20:04:58 +05:30
rate_limit_tracker.py
…
reactions.py
…
reasoning_timeouts.py fix(compression): coherent context_length setter — no-op guard, re-floor on new window, un-strandable init log 2026-07-28 20:04:58 +05:30
redact.py fix(tests): eliminate flaky/broken tests — shadow sys.path inserts, unmocked network in compressor tests, stale-SDK feishu pin guard, quadratic redact regexes 2026-07-29 15:12:28 -07:00
relay_llm.py fix(relay): preserve provider stream errors 2026-07-28 09:58:43 -07:00
relay_runtime.py fix(relay): close logical calls in stack order 2026-07-28 10:19:53 -07:00
relay_tools.py
…
replay_cleanup.py
…
retry_utils.py refactor: single shared Retry-After parser 2026-07-29 10:13:50 -07:00
runtime_cwd.py
…
secret_scope.py
…
shell_hooks.py
…
skill_bundles.py
…
skill_commands.py
…
skill_preprocessing.py
…
skill_utils.py
…
ssl_guard.py
…
ssl_verify.py
…
stream_diag.py
…
stream_single_writer.py
…
subagent_lifecycle.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
subdirectory_hints.py
…
subscription_view.py
…
system_prompt.py
…
think_scrubber.py
…
thinking_timeout_guidance.py
…
thread_scoped_output.py
…
title_generator.py
…
tool_dispatch_helpers.py
…
tool_executor.py chore: remove unused imports and dead locals (ruff F401/F841 sweep) 2026-07-29 11:53:39 -07:00
tool_guardrails.py
…
tool_result_classification.py
…
trace_upload.py
…
trajectory.py
…
transcription_provider.py
…
transcription_registry.py
…
tts_provider.py
…
tts_registry.py
…
turn_context.py Merge upstream main into fix/hermes-relay-anthropic-context 2026-07-28 08:10:58 -07:00
turn_finalizer.py
…
turn_retry_state.py
…
turn_summary.py
…
usage_pricing.py feat(pricing): add gemini-3.6-flash and gemini-3.5-flash-lite official snapshot entries 2026-07-28 11:54:46 -07:00
verification_evidence.py
…
verification_stop.py
…
verify_hooks.py
…
vertex_adapter.py
…
video_gen_provider.py
…
video_gen_registry.py
…
web_search_provider.py
…
web_search_registry.py
…