Add read-only orca linear CLI with trusted launch-prompt pointer (V1) (#5126)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { remoteCliRequestTimeoutMs } from './remote-cli-timeout'
|
||||
|
||||
describe('remoteCliRequestTimeoutMs', () => {
|
||||
it('extends SSH remote CLI timeout for Linear issue context reads', () => {
|
||||
expect(
|
||||
remoteCliRequestTimeoutMs({
|
||||
argv: ['linear', 'issue', 'ENG-123', '--json']
|
||||
})
|
||||
).toBe(120_000)
|
||||
})
|
||||
|
||||
it('extends the timeout when global flags appear before the Linear command', () => {
|
||||
expect(
|
||||
remoteCliRequestTimeoutMs({
|
||||
argv: ['--json', 'linear', 'issue', 'ENG-123', '--workspace', 'workspace-1', '--full']
|
||||
})
|
||||
).toBe(120_000)
|
||||
})
|
||||
|
||||
it('extends SSH remote CLI timeout for Linear search', () => {
|
||||
expect(
|
||||
remoteCliRequestTimeoutMs({
|
||||
argv: ['linear', 'search', 'auth', '--limit', '1']
|
||||
})
|
||||
).toBe(120_000)
|
||||
})
|
||||
|
||||
it('extends the timeout when boolean flags appear between Linear and search', () => {
|
||||
expect(
|
||||
remoteCliRequestTimeoutMs({
|
||||
argv: ['linear', '--json', 'search', 'auth', '--limit', '1']
|
||||
})
|
||||
).toBe(120_000)
|
||||
})
|
||||
|
||||
it('extends the timeout when boolean flags appear between Linear and issue', () => {
|
||||
expect(
|
||||
remoteCliRequestTimeoutMs({
|
||||
argv: ['linear', '--json', 'issue', 'ENG-123', '--full']
|
||||
})
|
||||
).toBe(120_000)
|
||||
})
|
||||
|
||||
it('keeps ordinary remote CLI requests on the relay default timeout', () => {
|
||||
expect(remoteCliRequestTimeoutMs({ argv: ['status'] })).toBeUndefined()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user