test(opencode): relax prompt cancel race timeout - #1276
Conversation
|
Warning Review limit reached
More reviews will be available in 7 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Suggested priority: P3 (only low-risk paths changed (packages/opencode/test/session/prompt-effect.test.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
There was a problem hiding this comment.
Code Review
This pull request increases the timeout for cancel race checkpoints in the prompt-effect.test.ts test file from 1 second to 5 seconds by introducing a new constant cancelRaceCheckpointTimeout. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Implement process-owned automation scheduling and scope-aware automation moves.\n\nGoal:\n- Decouple recurring automation scheduling from the currently opened project.\n- Let due automations in closed projects continue to be discovered, scheduled, and reconciled by a single process owner.\n- Preserve native fresh-automation moves across projects without losing IDs, history, or cache correctness.\n\nChanges:\n- Add explicit automation scopes and scope-aware definition/run publishing.\n- Move scheduler ownership to the process level while preserving single-owner semantics.\n- Keep running automation runs pinned during instance disposal so maintenance-mode cleanup does not kill in-flight work.\n- Support fresh automation moves across projects, including source tombstones, target-scope writes, move validation, and frontend cache safeguards.\n- Reuse the existing automation project picker experience for project switching and open-project actions.\n- Normalize automation detail hover behavior and picker row interaction styling.\n\nReview follow-ups:\n- Refreshed moved automation outcomes from the current scope when old-scope run updates arrive.\n- Awaited scheduler initial settle during server startup and cleaned up listener state if settle fails.\n- Removed misleading scheduler stop wrappers and kept run stopping private to process shutdown.\n- Updated preserved timers to refresh their stored scope when a recurring automation moves without changing schedule.\n- Confirmed move target responses before tombstoning frontend source cache entries.\n- Replaced a test-only helper with a real footer-click component test.\n\nVerification:\n- bun test --timeout 30000 test/server/automation-scheduler.test.ts\n- bun test --timeout 30000 test/server/automation-routes.test.ts\n- bun test --timeout 30000 test/server/server-listen.test.ts\n- bun run typecheck in packages/opencode\n- app targeted tests covering automation moves and open-project picker behavior\n- git diff --check\n- Electron manual test of the Automation project picker, hover states, project switching, and open-project flow\n- PR CI passed, including windows-advisory / unit-windows-opencode-session after merging dev with #1276.\n\nCloses #1271.
Summary
Relax the timeout guard used by the prompt cancel race regression tests.
There is no related issue; this is a small Windows advisory flake fix discovered while checking PR #1274.
Why
Windows advisory has intermittently failed in
unit-windows-opencode-sessionbecausecancel after processor handle creation finalizes before process startsonly waited one second for the prompt loop to reachexperimental.chat.messages.transform. Recent Windows runs show the same test can validly take around 1.6-2.0 seconds, anddevhas already seen the same failure outside PR #1274.The test contract is that cancellation finalizes the assistant once the race checkpoint is reached, not that Windows must reach that checkpoint within one second.
Related Issue
No issue. Follow-up from Windows advisory diagnosis on PR #1274.
Human Review Status
Pending
Review Focus
Please check that this stays test-only and preserves the race checkpoint: the tests still wait for the real
startedsignal before canceling; only the guard timeout changed.Risk Notes
Low. This only touches test code. It does not change session runtime behavior.
Skipped conditional checklist items:
How To Verify
Screenshots or Recordings
Not applicable; no visible UI changes.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.