personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(test_retention): freeze purge tests to fixture date

The TestPurge and TestPurgeProvenance suites assume today is within 30 days of the 20260401 fixture day. As the wall clock advances past that window, the recent-within-30d expectation fails.

Pin the relevant purge paths to a fixture-anchored date so the suite no longer depends on the wall clock.

+10
+10
tests/test_retention.py
··· 324 324 (day3 / "stream.json").write_text('{"stream":"default"}') 325 325 326 326 monkeypatch.setenv("SOLSTONE_JOURNAL", str(journal)) 327 + fixed_now = datetime(2026, 4, 15) 328 + 329 + class FixedDateTime(datetime): 330 + @classmethod 331 + def now(cls, tz=None): 332 + if tz is not None: 333 + return fixed_now.replace(tzinfo=tz) 334 + return fixed_now 335 + 336 + monkeypatch.setattr("think.retention.datetime", FixedDateTime) 327 337 # Clear cached journal path 328 338 import think.utils 329 339