Skip to content

fix(opencode): retry OpenCode after coverage blockers clear - #1152

Open
seonghobae wants to merge 13 commits into
mainfrom
codex/pr1141-current-main-successor
Open

fix(opencode): retry OpenCode after coverage blockers clear#1152
seonghobae wants to merge 13 commits into
mainfrom
codex/pr1141-current-main-successor

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Current-main successor for #1141. The scheduler re-dispatches OpenCode only when an exact-current-head coverage-only change request is authenticated, coverage and Strix are complete, and every unrelated check is clean.

Exact identity:

  • Head: 11491068712859e936e7ce4ed7f204f5c1157f0c
  • Base: main@55a8b576725451dfe0a21a57d36a2f1a41619b24

TDD evidence:

  • RED fb98a07618003aba35f969b71166a2564cf0c5c9: realistic failed opencode-review rollup returned block; focused suite 1 failed, 109 passed.
  • GREEN exact head: focused scheduler suite 110 passed; full central suite 1283 passed, 16 subtests passed.
  • Negative control: a distinct failing Security Scan still blocks re-dispatch.
  • Ruff, compileall, and git diff --check passed.
  • Hosted exact-head policy run 32437024874, job 96640203336: checked out the exact head and passed 34 tests.

The exception is scoped to the prior OpenCode context inside the authenticated coverage-only retry path; ordinary source findings, failed coverage/Strix, and unrelated failures remain non-passing. Protected checks and an independent exact-head formal verdict remain required.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

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.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 54fc59ac-24c7-4823-a12e-8dbd9b4eaa6c

📥 Commits

Reviewing files that changed from the base of the PR and between fce028b and e19066d.

📒 Files selected for processing (4)
  • requirements-pip-audit-ci-hashes.txt
  • scripts/ci/organization_commercial_readiness_loop.py
  • 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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-main successor for #1141: head 45d34237e088f355c80625294a9f13817586e542 is based on main bbedc1a51ec1a2421f129955c629b3cd0507a4ec. Fresh local evidence: scheduler tests 110 passed; interrogate 100%; compileall and diff-check pass. Protected current-head checks and review-thread resolution remain required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review request for PR #1152:

  • Exact head: 45d34237e088f355c80625294a9f13817586e542.
  • The scheduler now recognizes the current-head OpenCode coverage-only change request, waits for same-head coverage-evidence and Strix success with no failed checks, then re-dispatches OpenCode review.
  • The regression tests cover coverage-request matching, complete/running/missing coverage states, ordinary change requests, and the dispatch decision.
  • Local evidence: python -m pytest -q tests/test_pr_review_merge_scheduler.py (110 passed), python -m compileall -q scripts/ci tests, and git diff --check passed.

Please provide a fresh independent review for this exact head. Protected current-head checks and qualifying approval remain required before merge.

@seonghobae
seonghobae force-pushed the codex/pr1141-current-main-successor branch from 625c5f0 to 199e61e Compare August 20, 2026 00:08
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head correction published at 199e61ee, rebased onto main@c47bee59: coverage-blocked OpenCode reviews now redispatch only after same-head coverage/Strix completion and no failed checks, while stale requested-changes branches still update first. Scheduler regression suite passed (110 passed); compile and diff checks passed. Hosted checks/review must be evaluated at this exact head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head 199e61ee against main@c47bee59. Inspect coverage-blocker retry ordering, stale-branch update behavior, failed-check guards, and scheduler tests. Do not reuse predecessor evidence.

@seonghobae
seonghobae force-pushed the codex/pr1141-current-main-successor branch from 199e61e to adfe46d Compare August 20, 2026 04:08
@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head adfe46d against main@2cce96f8. Rebased the coverage-blocker retry logic onto current main; it redispatches only after same-head coverage-evidence and Strix completion with no failed checks, while ordinary changes requests remain distinct. Verified: 110 scheduler tests, compileall, interrogate, ruff, and git diff --check passed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head ecosystem review requested. Verify the current source and checks only; preserve protected gates and read-only credential boundaries.

@opencode-agent review

@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 05:34

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review the current exact head as the sole current-main successor to #1141. Verify that retry eligibility is limited to prior coverage-derived review blockers whose current exact-head coverage evidence has become successful, that unchanged-head idempotency and bounded retry spacing remain intact, and that real source findings, cancelled/incomplete evidence, or non-coverage review blocks cannot be reclassified as retryable success. Reacquire all current-head protected checks and submit the formal review without altering the branch.

@opencode-agent
opencode-agent Bot disabled auto-merge August 20, 2026 06:43
@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 06:54
@seonghobae

Copy link
Copy Markdown
Contributor Author

Integrated current main normally at a37fecb. The OpenCode coverage-blocker retry change remains scoped to the scheduler and its tests; 110 focused tests, actionlint, ruff, and diff checks passed. Re-review this exact HEAD.

@OpenCode review this exact HEAD and report only current-head findings.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review this exact current HEAD. Use the current commit SHA, current Checks, and current diff; do not reuse prior approvals or prior-head evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review request for #1152.

HEAD: a37fecb

This PR fixes the central scheduler's root cause for naruon and other governed repositories: when an exact-head OpenCode review requested changes only because coverage evidence was missing, the scheduler now waits for coverage and Strix to complete successfully, then re-dispatches the same-head OpenCode review. The marker matching is tested against the actual review body, and unrelated change requests remain blocking. Review this exact HEAD with current Checks and active ruleset; do not reuse stale review state.

@opencode-agent
opencode-agent Bot disabled auto-merge August 20, 2026 09:19
@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 09:24

Copy link
Copy Markdown
Contributor Author

Please perform an independent review against exact current head a37fecb only. Current read-only inventory: all eight current-head workflow runs completed successfully; no review submission is present. Do not self-approve or transfer predecessor-head evidence; protected merge still requires exact-head approval and terminal Checks.

Copy link
Copy Markdown
Contributor Author

Remote agents advanced this PR; exact current HEAD is 77165e64aea6e448632100c366680f98a9e46152 (the earlier review request named predecessor a37fecbe… and is stale). Current checks are all successful. Local focused verification on this exact HEAD: tests/test_pr_review_merge_scheduler.py — 110 passed. Please provide independent exact-head approval; no self-approval or predecessor evidence transfer.

Copy link
Copy Markdown
Contributor Author

Correction: the exact current HEAD 77165e64aea6e448632100c366680f98a9e46152 has a newly generated required-check set, currently queued. The earlier successful run IDs referenced the predecessor a37fecbe… and must not transfer. Local focused test evidence remains 110 passed on the current HEAD.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact current-head review request for 77165e64aea6e448632100c366680f98a9e46152. The diff remains limited to pr_review_merge_scheduler.py and its existing regression tests. Local proof on this exact tree: 110 focused tests passed, source interrogate 100%, Ruff, compileall, and diff check passed. Please review the coverage-only retry guard against current source; protected Checks and an independent approval remain required.

Copy link
Copy Markdown
Contributor Author

@opencode-agent please review exact current head 77165e6. The earlier predecessor evidence is stale; independently revalidate this SHA for the coverage-review gate and report only current findings.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head 11491068712859e936e7ce4ed7f204f5c1157f0c against main@55a8b576725451dfe0a21a57d36a2f1a41619b24. Verify that only the prior OpenCode failure is ignored inside the authenticated coverage-only retry path, while failed coverage, failed Strix, ordinary source findings, and unrelated failing checks remain non-passing. Use the current Reviews API verdict and current-head checks; do not reuse predecessor evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit for SHA 1149106: the coverage-only re-review guard is already corrected in the current tree. coverage_ready calls failed_status_checks with ignore_opencode=True after complete coverage and Strix evidence, so the expected failing prior OpenCode review does not suppress the re-dispatch. No additional change was made. No approval or merge action.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head audit for Devin review comment 3826637826: the reported coverage retry self-block is already fixed at 1149106. The coverage_ready guard calls failed_status_checks(pr, ignore_opencode=True), while unrelated failures remain blocking; the helper docstring and tests cover both the OpenCode-only failure and an unrelated Security Scan failure. Focused scheduler verification passed 3 tests. No code change, approval, or merge is claimed.

Copy link
Copy Markdown
Contributor Author

Current-head review (2026-08-21):

  • Verified live HEAD 11491068712859e936e7ce4ed7f204f5c1157f0c; CodeGraph/source review traced the coverage-only request classification through exact-head review matching, coverage/Strix completion checks, failed-check filtering, and same-head re-dispatch.
  • The retry path is narrow: it accepts only the automated current-head coverage blocker, requires both coverage-evidence and Strix completion, ignores only the expected OpenCode failure, preserves all other failures, and waits for an already-running same-head review.
  • Focused proof: 110 scheduler tests passed; compileall and git diff --check passed. Organization Commercial Readiness Quality CI is terminal success; remaining hosted security/SBOM/secret/SAST/OSV/Scorecard/CodeQL/Python Checks are queued with no failure reported.
  • Review threads are empty and only COMMENTED automated review is present. No independent APPROVED review exists, so this PR remains unmerged under protected governance.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 21, 2026 09:00
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head audit for :\n\n- The reported coverage-retry self-block is already fixed in this exact tree: the authenticated coverage-only retry calls , so only the expected prior OpenCode failure is excluded; unrelated failures remain blocking.\n- The exact-head regression covers OpenCode-only failure and unrelated failure.\n- Local verification: ........................................................................ [ 63%]
.......................................... [100%]
114 passed in 1.10s (114 passed), Ruff, interrogate (100%), compileall, and passed.\n- No source change was needed. Current hosted checks are newly queued/pending for this exact head; prior-head evidence is not reused. Auto-merge remains enabled; protected approval is still required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Correction to the preceding audit comment: inline code formatting was lost by the shell, but the evidence is unchanged.

Exact head: 05e95bb. The coverage-only retry calls failed_status_checks(pr, ignore_opencode=True), so only the expected prior OpenCode failure is excluded; unrelated failures remain blocking. The exact-head regression covers OpenCode-only failure and unrelated Security Scan failure. Local verification: 114 scheduler tests passed; Ruff, interrogate 100%, compileall, and git diff --check passed. No source change was needed. Hosted checks are pending for this exact head, and auto-merge remains enabled; protected approval is still required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review disposition

This bounded scheduler repair only re-dispatches OpenCode after an exact current-head coverage change request, successful coverage-evidence and Strix evidence, and no unrelated failed checks. It preserves current-head review binding, ignores no unrelated source/security failure, and does not modify protected history or rulesets.

Exact-head local evidence:

  • pytest tests/test_pr_review_merge_scheduler.py -q: 114 passed.
  • python -m compileall -q tests scripts/ci organization_commercial_readiness_fixtures.py: pass.
  • git diff --check: pass; worktree clean.

Hosted exact-head state at observation: 16 checks remain nonterminal and no formal APPROVED review exists for 05e95bb6872dd1363f9e21765f088cc7e50e0cf4. One completed non-success is the older duplicate scan-pr-queue run with cancelled; the newer scan-pr-queue run is queued. This is not evidence of D1-D5 deadlock and does not justify bypass. Continue normal exact-head review and wait for terminal required Checks.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit

  • Exact head SHA: 05e95bb
  • Exact base SHA: 731af58
  • Local merge-result tree: b1a608a743eb41eb44ee9b64fb5eaab39df81891
  • Review threads: 0 unresolved.
  • Current pull_request_target scan-pr-queue run 32465785625 is successful on this exact head. The older pull_request_review run 32463468168 is cancelled infrastructure evidence and is not a current source failure.
  • Local focused tests, lint, compileall, and diff-check are being retained with the normal squash auto-merge.
  • Decision: NORMAL_MERGE when the remaining exact-head required checks and approval rule are satisfied; no emergency bypass.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit update\n\nObserved hosted CI failure on the prior head: pip-audit lock refresh for PYSEC-2026-3721.\nRoot-cause fix: updated the hash-locked pip dependency to pip 26.2.1 with both package hashes.\n\nExact head: e19066d\nExact base: fce028b\nLocal verification: pip-audit clean and diff checks passed; the lock-only change has no additional local product test delta.\nGitHub mergeability: blocked. Required checks and exact-head approval remain pending; decision remains WAIT_AND_REMEDIATE.

@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 on lines 1552 to +1556
for node in status_contexts:
state = (node.get("state") or "").upper()
if state in {"FAILURE", "ERROR"}:
if ignore_opencode and is_opencode_context(node):
continue

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.

🔍 ignore_opencode depends on status-context signal under required-workflow env

When SCHEDULER_REQUIRED_WORKFLOW_REPOSITORY is set, is_opencode_context returns False for every CheckRun, so failed_status_checks(pr, ignore_opencode=True) only skips OpenCode via the opencode-review status context. If a non-authoritative required-workflow OpenCode CheckRun ever concludes with a failing status in that deployment, it would suppress the coverage retry. The tests never set this env var.

(Refers to this code)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +2542 to +2543
and review_dispatch_allowed
and current_head_coverage_change_request(pr)

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.

📝 Info: Coverage retry unreachable when the gate posts active threads

The unresolved-thread gate returns before the coverage retry is reached. If the coverage-only change request carries active unresolved review threads, the PR blocks there and the retry never fires. The feature assumes the coverage gate is a summary-only review.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head verification update

  • Exact head: e19066db8797a334f8bb2d9bd2d202564ff1bc20
  • Exact base: fce028b4c3bf8e2e5e4819c1c5622e90cfa6ab39
  • The branch is already on current main; predecessor evidence is discarded.
  • Review threads: 0 unresolved; no qualifying approval is currently recorded.
  • Local exact-head verification: 148 scheduler/coordinator tests passed; compileall, interrogate 100%, and diff check passed.
  • Hosted required Checks are queued; no current source failure is evidenced.
  • Decision: WAIT_AND_REMEDIATE; normal squash auto-merge remains enabled; no force merge.

@opencode-agent
opencode-agent Bot disabled auto-merge August 21, 2026 18:53
@opencode-agent opencode-agent Bot added area: ci-cd CI, GitHub Actions, checks, release, or supply chain merge: urgent-review Central or critical pull request requiring immediate review attention priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior priority: critical Immediate blocker, P0, urgent deadlock, or critical incident and removed priority: medium Normal-priority or P2 work labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

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

Labels

area: ci-cd CI, GitHub Actions, checks, release, or supply chain merge: urgent-review Central or critical pull request requiring immediate review attention priority: critical Immediate blocker, P0, urgent deadlock, or critical incident status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant