Skip to content

test(opencode): relax prompt cancel race timeout - #1276

Merged
Astro-Han merged 1 commit into
devfrom
codex/windows-advisory-prompt-timeout
Jun 12, 2026
Merged

test(opencode): relax prompt cancel race timeout#1276
Astro-Han merged 1 commit into
devfrom
codex/windows-advisory-prompt-timeout

Conversation

@Astro-Han

Copy link
Copy Markdown
Owner

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-session because cancel after processor handle creation finalizes before process starts only waited one second for the prompt loop to reach experimental.chat.messages.transform. Recent Windows runs show the same test can validly take around 1.6-2.0 seconds, and dev has 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 started signal 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:

  • Visible UI/manual check: not applicable; no UI or copy changes.
  • Platform/packaging check: this touches Windows advisory test reliability only, not runtime platform behavior.
  • Docs/release/dependency/etc.: not applicable.

How To Verify

Focused prompt cancel regressions: bun test --timeout 30000 test/session/prompt-effect.test.ts -t "cancel after assistant scaffold save finalizes before processor handle|cancel after processor handle creation finalizes before process starts" -> 2 passed
Prompt effect suite: bun test --timeout 30000 test/session/prompt-effect.test.ts -> 67 passed
Opencode typecheck: bun run typecheck -> passed
Whitespace: git diff --check -> passed

Screenshots or Recordings

Not applicable; no visible UI changes.

Checklist

  • Type label — this PR carries exactly one of 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.
  • Routing labels — this PR carries at least one of 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.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

@Astro-Han Astro-Han added bug Something isn't working P3 Low priority harness Model harness, prompts, tool descriptions, and session mechanics labels Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d67a51e-1f92-4f30-aef2-e2723e4b8360

📥 Commits

Reviewing files that changed from the base of the PR and between 521b01e and 0595431.

📒 Files selected for processing (1)
  • packages/opencode/test/session/prompt-effect.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/windows-advisory-prompt-timeout

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Astro-Han
Astro-Han merged commit 0221f7a into dev Jun 12, 2026
35 of 36 checks passed
@Astro-Han
Astro-Han deleted the codex/windows-advisory-prompt-timeout branch June 12, 2026 12:44
Astro-Han added a commit that referenced this pull request Jun 12, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working harness Model harness, prompts, tool descriptions, and session mechanics P3 Low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant