mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user