Files
hermes-agent/tests/e2e/core/__init__.py
teknium1 adc35881ed test: multi-process SQLite torture chamber for state.db integrity (C1)
Class C1: state.db corruption, WAL generations unlinked under a live holder,
lost/duplicated rows, repair destroying data, fd leaks. Every role is a real
OS process on one WAL state.db through the production SessionDB: gateway- and
TUI-like writers with intent/ack journals, a dashboard reader living across
episodes, short-lived openers (SessionDB, bare sqlite3, real `hermes sessions
list/stats`), FTS rebuild/optimize and repair_state_db_schema. Nine seeded
episodes inject kill -9 mid-write, SIGTERM graceful close, POSIX lock
cancellation by a stray in-process open/close, chmod flips, concurrent and
killed FTS rebuilds, repair against a live and an offline store, FTS
corruption and a whole-fleet SIGKILL, then assert the same invariants:
integrity_check ok and still WAL, no child holding a (deleted) db/-wal/-shm
(/proc fd monitor), every acked append stored exactly once, counts only grow,
repair never lowers them, FTS == canonical rows and search finds acked rows
once, no role errors, bounded fds for the long-lived reader and churner.

Red-proof: disabling the OFD WAL lock guard (75e155ab09, whose revert no
longer applies cleanly) makes the lock_cancellation episode kill the gateway
writer with SIGBUS / fail sibling openers, 3/3 runs.
2026-09-23 14:54:36 -07:00

0 lines
0 B
Python

The file is empty.