Repository navigation
test(runtime): expect the agent's own submit delay in the PTY timing policy case - #21874
Conversation
…policy case #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
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe terminal timing test now uses Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the problem, change, and verification, but it does not follow the required template. It omits the ELI5, What Changed, Why, Linked Issue with a Fixes reference, Visual Proof or an explicit N/A explanation, Testing checkboxes, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolution Complete the required template sections. Add the missing headings and content, include a valid
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a test-only fix for a CI-red timeout in the agent PTY timing policy case.
- Expected delay now comes from the agent's own policy — the
it.eachcase advances fake timers byresolveAgentPromptSubmitDelayForAgent(process.platform, 'review this change', agent)instead of the byte-onlygetAgentPromptSubmitDelayMs, so antigravity'ssubmitLineSettleMsPerLineis accounted for and the submit no longer stays pending into the real 30 s timeout.
The computed delay matches what the runtime actually uses on the local pty this test drives: orca-runtime-write-terminal-agent-prompt.ts:87 takes resolveAgentPromptSubmitDelayForAgent(writeHostPlatform, options.promptForSchedule, agent), sendTerminalAgentPrompt always sets promptForSchedule, getPtyWriteHostPlatform returns process.platform for a local pty, and getPtyAgent returns the launchAgent. Verified with CI=1 pnpm exec vitest run src/main/runtime/orca-runtime.test.ts -t "PTY timing policy" → 35 passed / 1255 skipped. A regression back to the byte-only delay would still fail this test (the shorter real delay lands the \r before submitDelayMs - 1), so the change keeps real coverage.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Summary
Since
ea5152f1c2(#21665, line-settle delay for antigravity multiline paste)src/main/runtime/orca-runtime.test.ts› "submits through the agent-specific PTY timing policy for antigravity" times out at 30 s: the runtime now waitsresolveAgentPromptSubmitDelayForAgent(bytes + 45 ms per line for antigravity) while the test advanced fake timers by the byte-onlygetAgentPromptSubmitDelayMs, so the submit stayed pending for fake time the test never advanced. Reproduced on pristinemaine476193bf5; the node shard 8/8 andverifychecks are red on every PR whose merge ref includes #21665 (#21859, #21862, #21864, #21871 today).One-line fix in the test: the expected delay comes from the agent's own policy, so a future per-agent term moves the expectation with it. No product code changes.
Verification
vitest run src/main/runtime/orca-runtime.test.ts -t "PTY timing policy": 35 passed (every agent in theit.each), where the antigravity case timed out before. Changed-code quality gate 0 findings; oxlint 0; oxfmt applied.