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 chore: limit generic status phrases to long-running notifications 2026-07-05 06:29:26 -07:00
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 fix(gateway): offload channel directory session scans 2026-07-09 06:27:04 -07:00
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 fix: normalize display boolean strings 2026-07-05 06:29:26 -07:00
drain_control.py
hooks.py
kanban_watchers.py
memory_monitor.py
message_timestamps.py
mirror.py refactor: consolidate gateway session metadata into state.db (#58899) 2026-07-05 14:01:03 -07:00
pairing.py fix: merge split gateway pairing stores 2026-07-07 02:18:17 -07:00
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 fix(gateway): ground readiness in live runtime state 2026-07-11 08:42:21 -07:00
response_filters.py fix(gateway): tolerate punctuation on silence markers 2026-07-05 02:12:26 -07:00
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 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 feat(gateway): inline choice pickers for /reasoning and /fast (Telegram, Discord, Matrix) (#65799) 2026-07-16 10:38:31 -07:00
status.py fix(dashboard): cache gateway PID status probes 2026-07-09 01:19:07 +05:30
status_phrases.py chore: limit generic status phrases to long-running notifications 2026-07-05 06:29:26 -07:00
sticker_cache.py
stream_consumer.py fix(telegram): harden flood fallback recovery 2026-07-11 11:13:50 +05:30
stream_dispatch.py
stream_events.py
whatsapp_identity.py