Review fixes: restore _build_sessions, fix flags, search filter, tests
- Restored _load_messages_map and _build_sessions helpers that were
  accidentally dropped in Phase 5 (list_all/list_page/search_list
  called them but they were missing, causing NameError at runtime)
- _build_sessions now filters messages by is_display so list methods
  return consistent display-only history like get()
- count_all/search_list EXISTS subquery now filters to is_display=true
  so search only matches visible chat messages
- Updated pg_session_store docstring to remove stale dual-write claim
- compressor summary_msg now defaults to is_display=False
- Added unit tests for message flags (agent, compressor, planning)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6829d6f commit 8c2533d88948a4b3ec855fa1514ec8c9d83527e7
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 25 May
Showing 5 changed files
View
navi/core/compressor.py
View
navi/core/pg_session_store.py
View
tests/unit/core/test_agent.py
View
tests/unit/core/test_compressor.py
View
tests/unit/core/test_planning.py