From e0f3f00b3a90d4f88397a188c5983ea3b1785906 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 30 Aug 2026 23:15:54 +0200 Subject: [PATCH] Ignore checkout timestamps during source sync --- packages/rag/src/source-document-archive.ts | 1 - scripts/smoke-source-rag-commit-boundary.ts | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/rag/src/source-document-archive.ts b/packages/rag/src/source-document-archive.ts index 1c50804..cc58fd9 100644 --- a/packages/rag/src/source-document-archive.ts +++ b/packages/rag/src/source-document-archive.ts @@ -434,7 +434,6 @@ function comparableFields(document: ArchivedSourceDocumentRecord): Record { try { const archive = new FileSourceDocumentArchiveRepository(archivePath); - const original = document("original body"); - const updated = document("updated body"); + const original = document("original body", "2026-06-03T00:00:00.000Z"); + const updated = document("updated body", "2026-08-30T00:00:00.000Z"); await archive.syncRepoDocuments("Fixture", [original]); + const timestampOnlyPlan = await archive.planRepoDocuments( + "Fixture", + [document("original body", "2026-08-30T00:00:00.000Z")], + ); + assertEqual(timestampOnlyPlan.changedSourceIds.length, 0, "checkout timestamp changed document identity"); + assertEqual(timestampOnlyPlan.unchanged, 1, "checkout timestamp did not remain observational"); + const failingPipeline = new SourceRagPipeline( archive, new SourceDocumentIngester(), @@ -70,12 +77,13 @@ void main().catch((error) => { process.exitCode = 1; }); -function document(content: string): ArchivedSourceDocument { +function document(content: string, lastModifiedAt?: string): ArchivedSourceDocument { return { id: sourceId, repoName: "Fixture", path: "README.md", content, + lastModifiedAt, }; }