mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
test(agent-status): make the notification-id test fail on the pre-fix ordering
The stored row inherited the helper's default codex agentType while the event named claude, so agentSnapshotMatchesExplicitTitle dropped it and freshStoredAgentStatus was undefined — the assertion held under either side of the `??`. Name the stored row's agent so the pinned working row survives and the snapshot-first precedence is what the test actually pins.
This commit is contained in:
@@ -192,9 +192,13 @@ describe('dispatchTerminalNotification', () => {
|
||||
|
||||
it('builds the notification id from a completion snapshot, not the pinned working row', () => {
|
||||
const pinnedWorkingStartedAt = Date.now() - 60_000
|
||||
// Why: the stored row must name the event's agent, or it is dropped for identity mismatch
|
||||
// and the assertion would hold whichever side of the `??` wins.
|
||||
mockState.agentStatusByPaneKey[paneKey] = makeAgentStatus(paneKey, {
|
||||
state: 'working',
|
||||
stateStartedAt: pinnedWorkingStartedAt
|
||||
stateStartedAt: pinnedWorkingStartedAt,
|
||||
agentType: 'claude',
|
||||
terminalTitle: 'claude'
|
||||
})
|
||||
const turnCompletedAt = Date.now()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user