HIGH SEVERITYCONFIRMED

Duplicate close() method silently discards WAL checkpoint

Package
hermes-agent
Version
latest
Verified
2026-03-28

Description

hermes-agent defines `close()` twice in the same class. The first definition at line 238 includes a WAL checkpoint; the second at line 352 does not. Python silently uses the second definition, discarding the WAL checkpoint. This can cause data loss on graceful shutdown.

Reproduction

# AST analysis confirmed:
# close() at line 238 — includes WAL PRAGMA wal_checkpoint
# close() at line 352 — no checkpoint
# Python uses the second definition; WAL checkpoint never called
← All bugsScan your code →