fix(chunks): set position on remaining chunk insert paths

document_converters, the github size-fallback chunker, revert_service
restores, and the kb-persistence middleware now write explicit positions
(the middleware read path also orders by position).
This commit is contained in:
CREDO23 2026-06-12 18:53:08 +02:00
parent 7d55aaf2c1
commit 5a71769dba
4 changed files with 43 additions and 12 deletions

View file

@ -525,6 +525,7 @@ async def _simple_chunk_content(content: str, chunk_size: int = 4000) -> list:
Chunk(
content=chunk_text,
embedding=embed_text(chunk_text),
position=len(chunks),
)
)