Skip to content

The agent that grows with you

test(state): gate the WAL-restore regression on requires_wal

kshitijk4poora8ac51e51e66
diff --git a/tests/state/test_state_db_wal_unlink_race.py b/tests/state/test_state_db_wal_unlink_race.py
index a9b46125f79..fea4af86565 100644
--- a/tests/state/test_state_db_wal_unlink_race.py
+++ b/tests/state/test_state_db_wal_unlink_race.py
@@ -7,8 +7,15 @@ import pytest
import hermes_state
def test_wal_restoration_reuses_exclusive_repair_connection(tmp_path, monkeypatch):
- """WAL must be restored before the repair guard releases the live DB."""
+ """WAL must be restored before the repair guard releases the live DB.
+
+ Gated on ``requires_wal``: where the linked SQLite carries the WAL-reset
+ bug (or the filesystem cannot host WAL) ``apply_wal_with_fallback`` keeps
+ the store in DELETE by design, so the final ``== "wal"`` assertion would
+ fail for a reason unrelated to the connection-reuse contract.
+ """
db_path = tmp_path / "state.db"
conn = sqlite3.connect(db_path, isolation_level=None)
conn.execute("CREATE TABLE marker (value TEXT)")