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 <e2e@test.local>
This commit is contained in:
Jinwoo Hong
2026-10-20 06:36:22 -04:00
committed by GitHub
co-authored by E2E Test
parent 63246eba3a
commit e01a5392d4
@@ -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(