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
{{ message }}
Repository navigation
backend-sync logs repeated Firestore No document to update tracebacks during KG extraction #9137
backend-sync is repeatedly logging full tracebacks when KG extraction tries to mark a memory doc as extracted but the Firestore document no longer exists.
This appears to be a stale/deleted document race rather than a broad outage, but the volume is noisy and can hide real failures.
Evidence
Observed during read-only prod health checks on 2026-07-06 UTC:
Earlier check: 33 backend-sync tracebacks in the previous 2h.
Later check: 72 backend-sync tracebacks in the previous 2h.
Representative failure shape:
google.api_core.exceptions.NotFound: 404 No document to update:
projects/based-hardware/databases/(default)/documents/users/<redacted>/memories/<redacted>
File "/app/utils/conversations/process_conversation.py", line 564, in _extract_memories_inner
set_memory_kg_extracted(uid, memory_db_obj.id)
File "/app/database/memories.py", line 228, in set_memory_kg_extracted
memory_ref.update({'kg_extracted': True})
User IDs and memory IDs redacted here.
Expected behavior
If the memory was deleted or superseded while KG extraction was in flight, this should be handled as an expected stale-work race, not emitted as a full ERROR traceback.
If it indicates real data loss or ordering bugs, the logs should include compact structured context and a metric rather than repeated unbucketed tracebacks.
Acceptance criteria
Classify No document to update during set_memory_kg_extracted as expected stale/deleted-memory race where appropriate.
Avoid full traceback spam for expected stale work; use structured warning/info with redacted IDs or counters.
Preserve true unexpected Firestore failures as errors.
Add a regression test for KG extraction completing after a memory doc has been deleted/superseded.
Verify the prod backend-sync traceback bucket drops after deploy.
Priority
P2/P3: not currently outage-shaped, but high-volume prod error noise in the memory pipeline.
Activity
fix(backend): guard canonical KG extracted updates on missing docs
fix(backend): fail-soft reliability for LLM routes, search, and KG st…