Skip to content

fix(scheduler): retry OpenCode after coverage blockers clear - #1266

Open
seonghobae wants to merge 18 commits into
mainfrom
codex/pr1152-current-main-replacement-20260824
Open

fix(scheduler): retry OpenCode after coverage blockers clear#1266
seonghobae wants to merge 18 commits into
mainfrom
codex/pr1152-current-main-replacement-20260824

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Protected-main replacement for #1152. It keeps the source-backed coverage-only retry and removes the stale audit-lock and unrelated docstring churn from the conflicted predecessor.

Root cause

A current-head OpenCode review can request changes solely because coverage-evidence was not yet available. Once exact-head coverage and Strix evidence become successful, the scheduler still returned at the existing CHANGES_REQUESTED gate, so the same head never received the review needed to clear that gate.

The original retry also used the environment-sensitive is_opencode_context() classifier to ignore its superseded failing OpenCode CheckRun. Under the central required-workflow deployment that classifier deliberately treats CheckRuns as non-authoritative placeholders, which made the placeholder failure self-block the retry.

Change

  • authenticate the latest exact-head OpenCode change request as coverage-only from the established gate markers;
  • require successful exact-head coverage and Strix evidence and no unrelated failed checks before dispatch;
  • ignore only the superseded OpenCode failure, including the central required-workflow placeholder;
  • keep unresolved review threads, ordinary source findings, unrelated failed checks, disabled dispatch, and active same-head runs fail-closed;
  • document the operational boundary in CHANGELOG.md.

Exact local evidence

  • Base: 885f2cd251999f21cf562cab3e2d9cc3cc3ec737
  • Head: 9f2ab9ae2f97be49fc4ab4dbcd13123057005b97
  • RED: the required-workflow placeholder regression returned block instead of review_dispatch before the fix.
  • Focused scheduler: 115 passed.
  • Full central suite in a fresh uv environment with the independently tracked pip bootstrap supplied through uv run --with pip: 1394 passed, 1 skipped, 16 subtests passed.
  • Coverage: 8385 statements and 3240 branches, 100%.
  • Production docstrings: 100% across scripts/ci.
  • compileall and git diff --check: pass.

No approval, protected check, or unresolved-thread requirement is bypassed. An independent exact-head verdict remains required before merge.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 48 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bf66e18f-23e7-4081-9004-b89e0aaa0da1

📥 Commits

Reviewing files that changed from the base of the PR and between 0c6b9a6 and 0ffad34.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • scripts/ci/pr_review_merge_scheduler.py
  • tests/test_pr_review_merge_scheduler.py

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.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 03:58
@seonghobae

Copy link
Copy Markdown
Contributor Author

Implemented in 9cc3aca.

The same-head coverage retry-floor branch now disables an existing auto-merge request before returning the wait decision. Added a regression test covering an auto-merge-enabled current-head coverage-only review; the scheduler now remains fail-closed until the retry floor elapses without leaving auto-merge active.

Verification: 1408 passed, 1 skipped, 16 subtests; compileall; git diff --check.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Open in Devin Review

Comment thread scripts/ci/pr_review_merge_scheduler.py
Comment thread scripts/ci/pr_review_merge_scheduler.py
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 04:41
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head check RCA: Strix run 32688700442 failed closed after provider-infrastructure output, no report artifact, NVIDIA fallback failure, and direct fallback LLM Provider NOT provided. No source vulnerability evidence is present; revalidate after the provider/failover root is healthy.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head update: 2a30943

Fixed the valid coverage-retry finding. The same-head retry floor now uses the later of the exact-head coverage review submission and the latest completed exact-head OpenCode repository-dispatch start. If dispatch history cannot be read, the scheduler waits fail-closed. This prevents repeated dispatch when a review run completes without publishing a new review.

The central-deployment progress observation is retained as an intentional optimization boundary: CheckRun placeholders are non-authoritative, while dispatch_opencode_review remains the authoritative same-head active-run deduplicator.

Local verification on this exact head: 1415 passed, 1 skipped, 16 subtests; statement and branch coverage 100%; public scheduler docstrings 100%; ruff check, compileall, and git diff check passed.

Please re-review this exact head and publish substantive exact-head verdict evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact head 2a30943. Read the complete changed-file diff, verify the dispatch-history retry floor and central active-run boundary, then publish substantive review evidence tied to this exact head.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread scripts/ci/pr_review_merge_scheduler.py
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head finding disposition

Current exact head before restack: 2a30943

  • Central-deployment progress: the progress value is an optimization signal. Correctness remains guarded by the exact-head dispatch deduplication result from dispatch_opencode_review, so an OpenCode CheckRun that is not visible to the progress probe cannot create a duplicate dispatch.
  • Completed-run lookup: the additional request is limited to the non-dry-run coverage-only retry path and reads the newest bounded page; it supplies the retry anchor when no review publication exists. Removing it would reintroduce repeated hourly dispatch after a run completed without a review.

These are intentional bounded trade-offs rather than source defects. I will restack this branch onto the current main and request a fresh exact-head review after the base changes.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Restack complete: exact-head re-review required

The branch was updated through the normal PR path onto current main. Current exact head: 0ffad34. Current exact base: 0c6b9a6.

All predecessor checks and reviews are stale after the base update. The scheduler retry-anchor fix and its regression tests are present; the two informational findings were dispositioned with their correctness and bounded-cost rationale. Please inspect the complete current diff and publish a substantive review for this exact head. No merge is requested until required checks and independent approval are current.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant