You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
release: v2.0.4 — pack tests stop polluting the developer's ledger
Pack tests already monkeypatched LEDGER_PATH onto a per-test tmp dir,
but if anything bypassed pytest's normal flow (REPL, IDE runner,
`python -c` reproduction) the install ledger at ~/.memee/packs.json
collected drift. Got noticed when 4 stray test packs (rt-pack,
tamper-installer, dedup-pack, merge-pack) showed up in a real user's
ledger with pytest tmp paths in the `file:` column.
Two-layer fix in conftest:
1. Autouse fixture redirects `memee.engine.packs.LEDGER_PATH` to a
per-test tmp file BEFORE every test runs. Existing per-test
`monkeypatch.setattr` calls keep working (last-patch-wins,
monkeypatch unwinds in LIFO order); they're now redundant but
harmless.
2. Session-end guard snapshots size+mtime of the real ledger and
raises if it moved. Loud regression detection — if a future
change reintroduces a leak, the suite goes red.
Verified: full test suite (362 tests trimmed of long simulations)
passes and ~/.memee/packs.json is byte-identical before and after.
No behaviour change for end users.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments