test(state): clean-close residual-poison test requires WAL

CI links SQLite 3.50.4 (WAL-reset bug) so Hermes opens state.db with
journal_mode=DELETE: no -wal sidecar, an empty _db_sidecar_identity, and the
sticky _db_wal_generation_lost flag this test guards can never be set. The
precondition assert on line 22 failed for all five entries. Mark it
requires_wal like the other sidecar-generation tests so it runs where the
regression is observable and skips where the runtime declined WAL.
This commit is contained in:
teknium1
2026-09-19 22:48:12 -07:00
committed by Teknium
parent 74c99b7edc
commit 26955efb53

View File

@@ -13,6 +13,7 @@ import pytest
from hermes_state import SessionDB
@pytest.mark.requires_wal # the sticky flag exists only for a recorded WAL/SHM generation; DELETE mode has none
@pytest.mark.parametrize("entry", ["normal", "optimize", "rebuild", "vacuum", "error_branch"])
def test_clean_close_never_causes_false_sticky_loss(tmp_path, monkeypatch, entry):
path = tmp_path / "synthetic.db"