M20: stabilize production acceptance
MobilityOps acceptance / backend (push) Canceled after 0s
MobilityOps acceptance / frontend (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-10 13:02:03 +02:00
parent 5d7a5e7359
commit f715085f65
4 changed files with 11 additions and 9 deletions
+3 -3
View File
@@ -53,15 +53,15 @@ def _deduplicate_sources(sources: list[SourceCard]) -> list[SourceCard]:
RAGcore document/version UUIDs change across uploads, so they are not useful
deduplication keys. Human-visible citation identity is the normalized title,
section and excerpt.
section. Chunks from the same unsectioned document collapse into one card; distinct
named sections remain independently citable.
"""
seen: set[tuple[str, str, str]] = set()
seen: set[tuple[str, str]] = set()
unique: list[SourceCard] = []
for source in sources:
key = (
source.title.strip().casefold(),
source.section.strip().casefold(),
" ".join(source.excerpt.split()).casefold(),
)
if key in seen:
continue