hermes-agent/gateway
Teknium eebc2286fc fix(gateway): retry-next-message semantics for compression_deferred + regression suite
Gateway half of the #49874 salvage: pass compression_deferred through
both _run_agent_inner result dicts and guard the compression-exhausted
auto-reset block with it — a lock-contended defer keeps the session
intact (the concurrent compressor is actively shrinking it) instead of
wiping it via reset_session.

Regression tests:
- tests/run_agent/test_compression_lock_defer.py — provider-mock 413 and
  400-overflow turns whose compression pass lost the lock end as
  compression_deferred (failed=False, no compression_exhausted); flag
  unset keeps the terminal exhaustion path byte-identical; type-pin
  tests vs MagicMock agents and junk flag values; cap=1 e2e proving the
  refunded pre-API defer leaves the budget for the provider-proven
  413 retry.
- tests/agent/test_preflight_lock_defer.py — a lock-skipped preflight
  pass stops the loop WITHOUT arming preflight_compression_blocked;
  plain no-op still arms it; MagicMock junk does not defer.
- tests/gateway/test_compression_deferred_soft_result.py — AST pin that
  the deferred branch guards the auto-reset chain and performs no
  session mutation (mirrors test_35809_auto_reset_clean_context.py).
2026-07-23 16:23:57 -07:00
..
assets
…
builtin_hooks
…
platforms fix(gateway): guard chained .get() against None intermediate values 2026-07-23 12:01:24 -07:00
relay
…
__init__.py
…
authz_mixin.py
…
cgroup_cleanup.py
…
channel_directory.py fix(slack): resolve channel IDs to human-readable names 2026-07-23 12:01:24 -07:00
code_skew.py
…
config.py fix(gateway): parse gateway.api_server YAML config section (#66630) 2026-07-23 11:54:32 -07:00
cwd_placeholder.py
…
dead_targets.py
…
delivery.py
…
delivery_ledger.py fix(state): refuse WAL on SQLite builds with the WAL-reset bug 2026-07-23 17:32:38 +05:30
display_config.py fix(slack): quiet Slack display defaults — no heartbeat/busy-ack breadcrumbs in channels 2026-07-23 11:34:11 -07:00
drain_control.py
…
hooks.py
…
kanban_watchers.py fix(kanban): advance notify cursor only after a successful wake self-post 2026-07-23 11:55:17 -07:00
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py
…
platform_registry.py
…
profile_routing.py
…
readiness.py
…
response_filters.py
…
restart.py
…
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix(gateway): retry-next-message semantics for compression_deferred + regression suite 2026-07-23 16:23:57 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix(gateway): unify legacy-Slack-key recovery on the claim-once path 2026-07-23 12:00:34 -07:00
session_context.py fix(kanban): keep delegated results in worker turn 2026-07-23 08:33:55 -07:00
shutdown_forensics.py
…
shutdown_watchdog.py
…
slash_access.py
…
slash_commands.py fix(compress): type-pin the lock-skip signal check at every consumer 2026-07-23 08:19:14 -07:00
status.py
…
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py fix(gateway): balance code fences on every remaining chunk-split path 2026-07-23 11:50:28 -07:00
stream_dispatch.py
…
stream_events.py
…
systemd_notify.py
…
turn_lease.py
…
wake.py fix(gateway): deliver kanban/delegate wake-ups to api_server sessions 2026-07-23 11:55:17 -07:00
whatsapp_identity.py
…