Files
orca/src/shared/agent-status-store-parent.test.ts
T
Neil f7b1f9d8be fix(opencode): select tmux status on the execution host
Track the attested tmux selected pane in the canonical status store and fence retired refreshes after asynchronous root resolution.

Fixes #10039.
2026-10-02 20:41:24 -07:00

27 lines
896 B
TypeScript

import { describe, expect, it } from 'vitest'
import { parseAgentStatusParentInput } from './agent-status-store-parent'
import { TMUX_TEST_PANE, TMUX_TEST_ROOT } from './tmux-status.test-fixture'
const subject = { ...TMUX_TEST_ROOT.scope, kind: 'pty', paneKey: TMUX_TEST_PANE } as const
describe('canonical PTY attachment without a status claim', () => {
it('retains the subject when its owner reports no selected status', () => {
expect(parseAgentStatusParentInput({ subject })).toEqual({ subject })
})
it('still refuses a status claiming another pane', () => {
expect(
parseAgentStatusParentInput({
subject,
status: {
paneKey: 'foreign',
connectionId: null,
worktreeId: 'workspace',
state: 'done',
prompt: '',
receivedAt: 1,
stateStartedAt: 1
}
})
).toBeNull()
})
})