hermes-agent/gateway
kshitijk4poor 0a01b2087d fix(gateway): harden fallback-chain refresh from review findings
Follow-ups on the #60987 salvage (review pass):
- _refresh_fallback_model: keep last known-good chain on transient
  config.yaml read/parse failure (user mid-edit, torn write) — only a
  successful read that lacks the key clears the chain. Previously a
  refresh error wiped a cached agent's working fallback for the turn.
- Move the cached-agent refresh+apply OUTSIDE the agent-cache lock:
  config.yaml read is disk I/O and the idle-sweep watcher contends on
  that lock (same reasoning as #52197). Per-session turn serialization
  keeps the post-lock apply safe.
- _apply_fallback_chain_to_agent: clear _unavailable_fallback_keys when
  chain content actually changes, so an entry re-configured mid-uptime
  (e.g. credentials added) is retried instead of staying suppressed for
  the cached agent's lifetime; no-op refreshes keep the memo.
- Tests: cwd-independent source pin (Path(__file__) anchor), pin the
  reuse-path apply call, + regression tests for last-known-good, memo
  clear-on-change, memo keep-on-unchanged (mutation-verified).
2026-07-09 02:22:12 +05:30
..
assets
…
builtin_hooks
…
platforms fix(gateway): run webhook route scripts off the event loop + AUTHOR_MAP entry 2026-07-08 08:10:55 -07:00
relay feat(gateway): generic OIDC client-credentials relay provisioning (NAS-free) (#60730) 2026-07-08 16:55:32 +10:00
__init__.py
…
authz_mixin.py
…
cgroup_cleanup.py
…
channel_directory.py fix(gateway): only session-discover channel targets for connected platforms (#60574) 2026-07-07 17:04:32 -07:00
code_skew.py
…
config.py feat(gateway): GATEWAY_MULTIPLEX_PROFILES env override for multiplex flag (#60589) 2026-07-08 00:34:34 +00:00
cwd_placeholder.py
…
dead_targets.py
…
delivery.py
…
display_config.py
…
drain_control.py
…
hooks.py
…
kanban_watchers.py
…
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py
…
platform_registry.py
…
response_filters.py
…
restart.py
…
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix(gateway): harden fallback-chain refresh from review findings 2026-07-09 02:22:12 +05:30
runtime_footer.py
…
scale_to_zero.py
…
session.py
…
session_context.py fix(delegation): route async results to origin session 2026-07-08 07:06:15 -07:00
shutdown_forensics.py
…
slash_access.py
…
slash_commands.py fix(gateway): never resurrect ended sessions for delegation completions; /new severs in-flight delegations 2026-07-08 08:10:28 -07:00
status.py fix(dashboard): cache gateway PID status probes 2026-07-09 01:19:07 +05:30
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py
…
stream_dispatch.py
…
stream_events.py
…
whatsapp_identity.py
…