hermes-agent/gateway
kshitijk4poor a9cc17fd80 fix: harden transcript append retry — lock, matcher, encapsulation, cap
Follow-up fixes for salvaged PR #65637:

1. Clear _dirty_transcripts in rewrite_transcript + rewind_session —
   stale pending messages were re-inserted after /retry, /undo, /compress.

2. Narrow _is_fts_corruption_error to specific SQLite error strings —
   bare 'fts' substring matched 'shifts', 'gifts', etc.

3. Move DB write outside _transcript_retry_lock — holding the lock
   during writes serialized all sessions' transcript appends and blocked
   during FTS rebuild. Now the lock guards only the pending queue.

4. Push rebuild_fts() into SessionDB — SessionStore was reaching into
   _conn/_lock private attrs. SessionDB.rebuild_fts() follows the same
   pattern as optimize_fts().

5. Cap pending per session at 200 — prevents unbounded memory growth
   when DB is persistently broken. Oldest messages dropped with warning.

Added 4 new tests: dirty-clear on rewrite/rewind, FTS matcher false
positives, pending cap enforcement.
2026-07-17 18:58:29 +05:30
..
assets
…
builtin_hooks
…
platforms fix(gateway): unify reset boundaries vs recovery — promote accidental ends, honor mode=none, adapter-aware resume guidance 2026-07-17 04:51:39 -07:00
relay fix(relay): normalize a 0/negative max_message_length at the descriptor boundary 2026-07-16 07:21:23 -07:00
__init__.py
…
authz_mixin.py fix(gateway): multiplex secret_scope for authz, Slack, webhooks 2026-07-16 05:39:58 -07:00
cgroup_cleanup.py
…
channel_directory.py
…
code_skew.py
…
config.py fix(gateway): allow Feishu websocket mode in multiplex profiles 2026-07-16 07:17:55 -07: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
…
profile_routing.py fix(gateway): profile routing — conjunctive matching + universal gateway_runner 2026-07-15 09:50:05 -07:00
readiness.py
…
response_filters.py
…
restart.py fix(gateway): preserve external supervisor ownership 2026-07-16 05:08:56 -07:00
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix: widen UTF-8 BOM tolerance to all sibling frontmatter parsers 2026-07-17 04:52:02 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix: harden transcript append retry — lock, matcher, encapsulation, cap 2026-07-17 18:58:29 +05:30
session_context.py
…
shutdown_forensics.py
…
slash_access.py
…
slash_commands.py feat(gateway): inline choice pickers for /reasoning and /fast (Telegram, Discord, Matrix) (#65799) 2026-07-16 10:38:31 -07:00
status.py
…
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py
…
stream_dispatch.py
…
stream_events.py
…
whatsapp_identity.py
…