fix: reduce temporal ordering offset from 10s to 10ms per fact (#402)

The 10-second offset per fact caused significant timestamp drift when
ingesting many items — e.g. 600 facts would shift the last fact by
~100 minutes from its actual event time. This broke timeline views
and made occurred_start/mentioned_at unreliable for temporal queries.

Reducing to 10ms preserves fact ordering while keeping timestamps
within ~8 seconds of the original values even for large batches.
This commit is contained in:
Derek Bouius 2026-02-19 04:48:18 -05:00 committed by GitHub
parent dcaa9f14ab
commit c3ef1555bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1274,8 +1274,8 @@ from .types import ExtractedFact as ExtractedFactType
logger = logging.getLogger(__name__)
# Each fact gets 10 seconds offset to preserve ordering within a document
SECONDS_PER_FACT = 10
# Each fact gets 10ms offset to preserve ordering within a document
SECONDS_PER_FACT = 0.01
async def extract_facts_from_contents_batch_api(