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
fix(models): make full-scan fallback path consistent with index path (#1171)
The PR removed the 60-second grace window from the index-path filter at
api/models.py:558-567 but left the same filter at the full-scan fallback
(line 589-594) with the grace window intact. The fallback path is only
hit when SESSION_INDEX_FILE doesn't exist or fails to parse — rare in
production but it's also the path used by tests/test_issue789.py
(monkeypatch sets SESSION_INDEX_FILE to a temp path that's never created),
which is why those existing assertions kept passing on the PR even
though they assert the OLD "60s grace" behavior.
Make both filter sites consistent: empty Untitled sessions are hidden
regardless of age in BOTH paths. Update test_issue789.py assertions to
reflect the new contract documented in the PR description ("a session
only exists from the user's perspective once the first message is
sent"). The two visibility-while-young tests are flipped to assert the
new hidden behavior; the old-age tests already assert hidden so they
continue to pass.
Without this commit:
- production: index path is always taken, PR works as documented
- legacy installs (no _index.json): old grace behavior persists
- tests: silently pass against the old fallback path, masking the
inconsistency
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0 commit comments