Files
hermes-agent/agent
Teknium e7d4b2123e refactor(agent/turn): unify compression-attempt helpers, collapse verdict boilerplate, dedupe persist-lock wrappers
- turn_context_compaction: shared home for _clear_overflow_warn,
  _reset_retry_state_after_compaction, _blocked_compress_reason,
  _apply_grown_window, _refund_api_call (used by turn_preflight and the
  turn-start preflight passes).
- turn_context: _with_persist_lock + _clear_staged_cli_input_if_persisted +
  two try/except/finally wrappers -> one _persist_under_lock; MoA sanitize
  model extracted to _sanitize_model_for; predicates flattened.
- turn_preflight: PreflightVerdict merged into PreflightGateVerdict (the
  gate's carrier) and mutated in place; duplicate guard chain + refund blocks
  collapsed onto the shared helpers.
- turn_preflight_gate: builds the carrier once, no re-unpack of the inner
  verdict.
- turn_iteration_prep: step-callback tool-round scan and steer injection lifted
  into helpers; dead _verdict closures on always-fallthrough paths removed.
2026-09-02 18:28:29 -07:00
..