test(session): compare the forked cold row's recency with the list formula

The cold row's updatedAt is the later of the header's creation time and the cached last prompt; the fork's creation time is wall-clock and can trail the inherited prompt by a millisecond, so the restart test asserts the same maximum instead of the prompt time alone.
This commit is contained in:
imccyu committed 2026-09-20 10:54:20 +08:00
1 parent de055efa9a
commit 4b02d03ed5
1 file changed
+4 -1
@@ -691,7 +691,10 @@ describe('session.list projections column', () => {
const response = await gateway.list(request({}))
if (!response.ok) throw new Error('unreachable')
const row = response.value.items.find(item => item.sessionId === id)
expect(row).toMatchObject({ blank: false, updatedAt: promptTime })
// Cold recency is the later of the header's creation time and the cached
// last prompt; the fork's creation time is wall-clock and may trail the
// inherited prompt by a tick.
expect(row).toMatchObject({ blank: false, updatedAt: Math.max(header.createdAt, promptTime) })
expect(row?.projections).toMatchObject({
kind: 'cached',
asOfSeq: lastSeq,