mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-12 13:52:15 +00:00
fix: re-apply confirmation expiry on the cached-agent live-history path
Review finding: when the FTS write-corruption guard (#50502) prefers the cached agent's live _session_messages over the reloaded transcript, that history bypasses the replay-cleanup pass in _build_gateway_agent_history — a stale dangerous confirmation could slip through unredacted on the same-process salvage path. Re-apply the (idempotent) expiry stripper to the selected live history.
This commit is contained in:
parent
2c5762f575
commit
3c8130a826
1 changed files with 8 additions and 1 deletions
|
|
@ -18135,7 +18135,14 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
|
|||
"conversation context (possible FTS write corruption)",
|
||||
session_key, len(agent_history), len(_selected),
|
||||
)
|
||||
agent_history = _selected
|
||||
# The live in-memory history bypassed the replay-cleanup
|
||||
# pass inside _build_gateway_agent_history — re-apply the
|
||||
# stale-confirmation expiry (#59607) so a dangerous
|
||||
# confirmation can't slip through this path either.
|
||||
# Idempotent; messages without timestamps are untouched.
|
||||
agent_history = _strip_stale_dangerous_confirmations(
|
||||
_selected, now=time.time()
|
||||
)
|
||||
|
||||
# Collect MEDIA paths already in history so we can exclude them
|
||||
# from the current turn's extraction. This is compression-safe:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue