mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
test(runtime): expect the agent's own submit delay in the PTY timing policy case (#21874)
#21665 gave antigravity a per-line settle before Enter, so the delay the test computed from bytes alone is 45 ms short of what the runtime waits. Under fake timers that leaves the submit pending until the real 30 s timeout, which is what every PR's node shard 8/8 has been failing on since it landed. The case now derives the expected delay from the agent's policy, so a future per-agent term moves the expectation with it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
AGENT_PROMPT_BRACKETED_PASTE_END,
|
||||
AGENT_PROMPT_BRACKETED_PASTE_START,
|
||||
buildAgentPromptPasteBytes,
|
||||
getAgentPromptSubmitDelayMs
|
||||
resolveAgentPromptSubmitDelayForAgent
|
||||
} from '../../../shared/agent-prompt-injection'
|
||||
import { TUI_AGENT_CONFIG } from '../../../shared/tui-agent-config'
|
||||
import type { TuiAgent } from '../../../shared/tui-agent'
|
||||
@@ -610,9 +610,13 @@ describe('OrcaRuntimeService', () => {
|
||||
launchAgent: agent
|
||||
})
|
||||
|
||||
const submitDelayMs = getAgentPromptSubmitDelayMs(
|
||||
// The agent's own policy, not the byte-only delay: antigravity adds a per-line settle
|
||||
// (#21665), and advancing fake timers by less than the policy waits leaves the submit
|
||||
// pending until the real 30 s timeout.
|
||||
const submitDelayMs = resolveAgentPromptSubmitDelayForAgent(
|
||||
process.platform,
|
||||
Buffer.byteLength(buildAgentPromptPasteBytes('review this change'), 'utf8')
|
||||
'review this change',
|
||||
agent
|
||||
)
|
||||
const sendPromise = runtime.sendTerminalAgentPrompt(handle, 'review this change')
|
||||
if (agent === 'omp') {
|
||||
|
||||
Reference in New Issue
Block a user