Skip to content

Commit 183a93f

Browse files
suleimanshclaude
andcommitted
The bridge-store list-status test runs on a fixed clock, not the wall clock (#1332)
`waiting()` counts a list status only within the twelve-hour session window. The test recorded a status stamped 2026-08-25T18:00Z and asked `waiting()` with the default `now`, so from 2026-08-26T06:00Z on it failed on every machine — CI on main and on any PR. The sibling test already passes a `now`; this one does too. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 09b5c57 commit 183a93f

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/framework/src/dashboard/bridge-store.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,24 @@ test('an undelivered pick dies with the question it answered (#1237)', () => {
132132

133133
test("claude.ai's list saying a session awaits input makes it waiting, until the session is cleared (#1332)", () => {
134134
const store = new BridgeQuestions()
135-
assert.equal(store.waiting(SESSION), false)
135+
// A fixed clock: a list status counts only within the session window, so the test's "now" must
136+
// sit inside the window of the timestamps it records — not the wall clock, which walked out of
137+
// it twelve hours after the timestamps were written.
138+
const now = new Date('2026-08-25T18:05:00.000Z')
139+
assert.equal(store.waiting(SESSION, now), false)
136140
// A question asked in prose carries no block: the list is the only thing that says the session
137141
// stopped for its user.
138142
store.recordStatus({ sessionId: SESSION, status: 'awaiting', at: '2026-08-25T18:00:00.000Z' })
139-
assert.equal(store.waiting(SESSION), true)
143+
assert.equal(store.waiting(SESSION, now), true)
140144
assert.equal(store.status(SESSION)?.status, 'awaiting')
141145
// The newest report replaces the older one.
142146
store.recordStatus({ sessionId: SESSION, status: 'idle', at: '2026-08-25T18:01:00.000Z' })
143-
assert.equal(store.waiting(SESSION), false)
147+
assert.equal(store.waiting(SESSION, now), false)
144148
// A parked question makes the session waiting whatever the list said.
145149
store.record(question())
146-
assert.equal(store.waiting(SESSION), true)
150+
assert.equal(store.waiting(SESSION, now), true)
147151
store.clear(SESSION)
148-
assert.equal(store.waiting(SESSION), false)
152+
assert.equal(store.waiting(SESSION, now), false)
149153
assert.equal(store.status(SESSION), undefined)
150154
})
151155

0 commit comments

Comments
 (0)