From e01a5392d42d4226ef41aa0e327ae8a83a8ac187 Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:36:22 -0400 Subject: [PATCH] test(ai-vault): pin the appended transcript's mtime so the cold-authority test stops depending on the clock (#31098) The append reset old-0's mtime to wall-clock time. Once real time passed the busy fixtures' date (2026-10-20T10:00Z), old-0 sorted newest and was read by the unfiltered first pass, failing the no-ordinary-read assertion. Co-authored-by: E2E Test --- src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts b/src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts index 49184403b6b..fd6c22d0d72 100644 --- a/src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts +++ b/src/main/ai-vault/session-scanner-scope-cwd-facts.test.ts @@ -64,6 +64,9 @@ it.each([false, true])('keeps cold authority with read failure=%s', async (failR if (index === 0) { const context = jsonLines([{ type: 'turn_context', payload: { cwd: '/repo' } }]) await appendFile(path, `\n${context}\n`) + // Why: the append stamps wall-clock mtime, which overtakes the busy files once real time passes their date. + const day1 = new Date(Date.UTC(2026, 9, 1, 10)) + await utimes(path, day1, day1) } const { mtimeMs, size: sizeBytes, mtime } = await stat(path) const parsed = await parseAgentSessionFileCached(