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
operations/archive.py:382-410 — Polylogue().search("query") does NOT use FTS5. It scans messages.text with Python str.find() — O(n) per conversation, no FTS5 snippet(), no ranking. The correct FTS5 path (search_runtime.py:search_messages()) is only reachable through the sync search.py module, not the async facade.
--help loads all CLI modules at import time
cli/click_app.py:13-28 imports all 14+ CLI sub-modules at module level, which cascade-import Rich, config, query system. Database is NOT opened for --help, but import overhead adds measurable startup latency.
run_coroutine_sync spawns thread per call
sync_bridge.py:15-38 — every call creates a new threading.Thread() + event loop via asyncio.run(). Called from 17+ locations across CLI, pipeline, products, showcase, site, lib. No centralized lifecycle management.
Affected code
operations/archive.py:382-410 — facade search
cli/click_app.py:13-28 — eager imports
sync_bridge.py:15-38 — thread-per-call
17+ call sites of run_coroutine_sync()
Fix direction
Route facade search() through FTS5 search provider when available
Lazy-import CLI modules (pattern already used in storage/__init__.py)
Consolidate sync bridge into the SyncPolylogue facade instead of 17 scattered call sites
Discovered during adversarial audit 2026-04-26.
Severity note (2026-04-26): While technically a correctness gap, NFD content in JSON export files is extremely rare in practice. Python’s json.loads preserves the original byte representation, and virtually all AI export files use NFC encoding. This should be treated as LOW severity — fix when touching the hashing pipeline, but not urgent.
Activity
fix: aggregate small fixes from adversarial audit (waves 1+2)
Sinity commentedon Apr 26, 2026
Resolved by #489