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
An external archive audit found 362 of 11,067 sessions (3.3%) with message_count=0, work_event_count=0, and substantive_count=0. Example titles look like conversations-001-37.
That shape is consistent with bulk-import manifest registration creating conversation IDs before message ingestion completed, leaving manifest-only conversation rows in the archive. This is a Polylogue ingest/reconciliation defect, not a Lynchpin downstream cleanup.
Split from #944 because it is a self-contained ingest data-integrity concern.
Scope
Add a reproducible detector/query for manifest-only conversation rows.
Trace the ingest path that can register a conversation before messages are materialized.
Prevent new manifest-only rows from being created silently.
Add a repair or classification path for existing rows: delete, repair, or explicitly mark as intentional non-conversation artifacts.
Acceptance Criteria
A focused test reproduces bulk-import manifest registration without message ingestion and proves it does not leave an ordinary zero-message conversation row.
Existing archive rows with message_count=0, work_event_count=0, and substantive_count=0 are detectable through a documented check or repair surface.
The repair/classification path is idempotent and does not delete legitimate raw artifacts.
The closing PR records the archive query used to verify the 362-row class.
Verification
Run focused ingest/reconciliation tests plus the relevant local gate:
_write_conversation in ingest_batch/_core.py now skips new conversations with zero messages (the guard only blocks new rows, not updates to existing ones)
The detector (count_empty_conversations_sync) and repair (repair_empty_conversations) already exist in storage/repair.py, wired through polylogue doctor --repair
Two focused tests: new-with-zero-messages skipped, existing-with-zero-messages allowed
Archive query counting the affected class:
SELECTCOUNT(*) FROM conversations c
LEFT JOIN messages m ONm.conversation_id=c.conversation_idWHEREm.conversation_id IS NULL;
This returns the count of conversations with no messages — the manifest-only rows that the guard now prevents.
Activity
Sinity commentedon May 8, 2026
Closing: manifest-only zero-message conversation guard landed.
Changes:
_write_conversationiningest_batch/_core.pynow skips new conversations with zero messages (the guard only blocks new rows, not updates to existing ones)count_empty_conversations_sync) and repair (repair_empty_conversations) already exist instorage/repair.py, wired throughpolylogue doctor --repairArchive query counting the affected class:
This returns the count of conversations with no messages — the manifest-only rows that the guard now prevents.