Summary
The GitHub Composio memory sync pipeline fails on every periodic tick with a SQLite UNIQUE constraint violation on memory_docs.document_id. The pipeline retries next tick but encounters the same error, so GitHub memory never syncs after the first successful ingest.
Log evidence
08:53:50:WRN [sync:orchestrator] sync failed toolkit="github" connection_id="ca_HLk7bTXBixH6" error=upsert memory_docs: UNIQUE constraint failed: memory_docs.document_id
08:53:50:WRN [memory_sync:dispatcher] pipeline tick failed pipeline_id="composio:github" error=upsert memory_docs: UNIQUE constraint failed: memory_docs.document_id
08:53:50:WRN [composio:periodic] sync failed (will retry next tick) toolkit=github connection_id=ca_HLk7bTXBixH6 error=upsert memory_docs: UNIQUE constraint failed: memory_docs.document_id
09:32:05:WRN (same pattern, connection_id="ca_BRvLIFLFLj4l")
Recurs every sync interval. Two different connection IDs both hit the same failure.
Root cause
The upsert path for memory_docs is not using INSERT OR REPLACE / ON CONFLICT DO UPDATE. When a document with the same document_id already exists (e.g. a GitHub issue that was previously ingested), the insert fails instead of updating.
Impact
- GitHub memory sync is permanently broken after first ingest — new PRs, issues, and commits are never added to memory.
- The error is non-fatal and silent to the user; no UI notification is shown.
- Affects at minimum two separate GitHub connections.
Expected behaviour
Re-syncing an already-ingested document should update it in place (upsert), not fail with a constraint error.
Fix direction
Change the SQL in the memory_docs upsert to:
INSERT INTO memory_docs (...) VALUES (...)
ON CONFLICT(document_id) DO UPDATE SET ...
Environment
- OpenHuman 0.63.17 (aarch64-apple-darwin)
- Log date: 2026-09-09
- Composio GitHub integration active
Summary
The GitHub Composio memory sync pipeline fails on every periodic tick with a SQLite UNIQUE constraint violation on
memory_docs.document_id. The pipeline retries next tick but encounters the same error, so GitHub memory never syncs after the first successful ingest.Log evidence
Recurs every sync interval. Two different connection IDs both hit the same failure.
Root cause
The upsert path for
memory_docsis not usingINSERT OR REPLACE/ON CONFLICT DO UPDATE. When a document with the samedocument_idalready exists (e.g. a GitHub issue that was previously ingested), the insert fails instead of updating.Impact
Expected behaviour
Re-syncing an already-ingested document should update it in place (upsert), not fail with a constraint error.
Fix direction
Change the SQL in the memory_docs upsert to:
Environment