fix(scheduler): retry OpenCode after coverage blockers clear - #1266
Conversation
|
Warning Review limit reachedNext included review available in 48 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
|
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. |
|
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. |
|
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. |
|
@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. |
Exact-head finding dispositionCurrent exact head before restack: 2a30943
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. |
Restack complete: exact-head re-review requiredThe 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. |
ccc1220
into
codex/scheduler-independent-exact-head-approval-20260824
Exact-head stack verification receipt
Predecessor main-base evidence is discarded after retarget. No force push, protected-branch write, approval, fake status, or bypass was used. |
| review = latest_current_head_coverage_change_request(pr) | ||
| if review is None: | ||
| return None | ||
| submitted_at = parse_github_datetime(review.get("submittedAt")) | ||
| if submitted_at is None: | ||
| return "current-head OpenCode coverage review has no valid submission timestamp; defer same-head re-review" | ||
| retry_anchor = submitted_at | ||
| if repo and workflow: | ||
| try: | ||
| dispatch_started_at = latest_opencode_dispatch_started_at(repo, workflow, pr) | ||
| except RuntimeError: | ||
| return "same-head OpenCode dispatch history is unavailable; defer same-head re-review" | ||
| if dispatch_started_at and dispatch_started_at > retry_anchor: | ||
| retry_anchor = dispatch_started_at | ||
| current_time = now or datetime.now(timezone.utc) | ||
| if current_time < retry_anchor + timedelta(minutes=max(0, floor_minutes)): | ||
| return "same-head OpenCode coverage retry floor has not elapsed" | ||
| return None |
There was a problem hiding this comment.
📝 Info: Coverage-clear redispatch can wait up to the retry floor
coverage_retry_wait_reason (pr_review_merge_scheduler.py) anchors on the coverage-only review submission time. When coverage reruns and succeeds soon after the review, redispatch still waits up to floor_minutes (default 60) past the review timestamp. This is the intended same-head retry floor and is asserted by tests; noting the operational latency for reviewers.
Was this helpful? React with 👍 or 👎 to provide feedback.
Superseded PR audit#1266's exact coverage-retry change is already included in #1270's current head
No force push, direct protected-branch write, approval, fake status, or bypass was used. |
Concurrent merge audit correctionLive state re-check confirms this PR was merged normally, not closed:
The earlier audit comment's “close as superseded” wording is superseded by this live GitHub merge record. No force-push, protected-branch direct push, approval fabrication, or bypass was used. |
* fix: retry reviews after coverage blockers clear * fix(scheduler): match coverage blocker review body * test(scheduler): cover coverage evidence gate branches * test(scheduler): reproduce coverage retry self-block * fix(scheduler): unblock coverage-only review retry * fix(scheduler): preserve central coverage retry * test(scheduler): cover status-only coverage retry * fix(scheduler): prefer newest coverage rerun * fix(scheduler): keep coverage retries fail closed * fix(scheduler): ignore superseded coverage failures * fix(scheduler): bind coverage retries to one check snapshot * fix(scheduler): avoid duplicate coverage review dispatch * fix(scheduler): rate-limit same-head coverage retries * fix(scheduler): wait for active coverage re-review * fix(scheduler): disable auto-merge during coverage retry floor * fix(scheduler): bound coverage retry dispatches
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-evidencewas not yet available. Once exact-head coverage and Strix evidence become successful, the scheduler still returned at the existingCHANGES_REQUESTEDgate, 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
CHANGELOG.md.Exact local evidence
885f2cd251999f21cf562cab3e2d9cc3cc3ec7379f2ab9ae2f97be49fc4ab4dbcd13123057005b97blockinstead ofreview_dispatchbefore the fix.115 passed.uv run --with pip:1394 passed, 1 skipped, 16 subtests passed.8385statements and3240branches,100%.100%acrossscripts/ci.compileallandgit diff --check: pass.No approval, protected check, or unresolved-thread requirement is bypassed. An independent exact-head verdict remains required before merge.