Skip to content

fix: retry OpenCode after coverage blockers clear - #1141

Closed
seonghobae wants to merge 5 commits into
mainfrom
agent/retry-coverage-review-dispatch
Closed

fix: retry OpenCode after coverage blockers clear#1141
seonghobae wants to merge 5 commits into
mainfrom
agent/retry-coverage-review-dispatch

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • re-dispatch the current PR head when the latest OpenCode request was only a coverage-evidence failure
  • require successful current-head coverage evidence, Strix evidence, and no failed checks before retrying
  • keep ordinary OpenCode change requests blocked

Verification

  • python3 -m pytest -q tests/test_pr_review_merge_scheduler.py
  • python3 -m pytest -q tests/test_pr_review_fix_scheduler.py
  • python3 -m ruff check scripts/ci/pr_review_merge_scheduler.py tests/test_pr_review_merge_scheduler.py
  • python3 -m compileall -q scripts/ci/pr_review_merge_scheduler.py tests/test_pr_review_merge_scheduler.py

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82a32e61-20e8-46a1-b986-f2829cd5f839


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
seonghobae force-pushed the agent/retry-coverage-review-dispatch branch from 52afb94 to 53b5cef Compare August 19, 2026 09:30
@seonghobae seonghobae moved this from Todo to In Progress in naruon Platform Roadmap Aug 19, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

Scheduler retry verification

  • Rebased onto current main (9e9f59f3ac1e96a960c021b131d768c238f4c21a).
  • Fixed coverage-blocker matching to the exact OpenCode review body emitted by opencode-review-dispatch.yml; the prior marker could never match the production text.
  • Focused: 110 passed.
  • Full suite: 1216 passed, 16 subtests passed.
  • compileall and git diff --check passed.
  • Head: 53b5cef0.

The scheduler remains fail-closed for ordinary current-head change requests and only re-dispatches after successful coverage/Strix evidence with no failed checks.

@seonghobae
seonghobae enabled auto-merge (squash) August 19, 2026 11:59

Copy link
Copy Markdown
Contributor Author

@opencode-agent review
@cwl-noema-review review

Review only exact head 53b5cef0ddadf4a2666b6fa0812240e9ca571103 against protected main@9e9f59f3ac1e96a960c021b131d768c238f4c21a. Validate that the scheduler re-dispatches only when the latest exact-head OpenCode CHANGES_REQUESTED verdict is the known coverage-only form, exact-head coverage-evidence and Strix are successful, no failed check remains, review dispatch is authorized, and no same-head review run is already active. Confirm that ordinary source findings, missing/running/failed evidence, unresolved threads, and non-OpenCode reviews remain fail-closed. Bind the verdict to this unchanged head; do not modify the branch, dismiss reviews, weaken protection, or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head revalidation for 53b5cef: scheduler focused suite passed (110 tests), compileall and diff check passed. The retry predicate remains limited to exact-head coverage-only REQUEST_CHANGES plus completed successful coverage/Strix evidence and no failed checks; protected Checks and current approval remain required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please review exact current head 53b5cef.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head 53b5cef0ddadf4a2666b6fa0812240e9ca571103. Current-head security/SAST/CodeQL/SBOM/OSV checks are green and there are no unresolved review threads. Verify retry occurs only after the coverage blocker has actually cleared and ordinary current-head REQUEST_CHANGES remains blocking, then submit the formal verdict.

@seonghobae

seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head update: pushed c041c34 for PR #1141. The coverage-blocker detector matches the live OpenCode review wording; this update adds complete branch regression coverage for stale and non-change-request reviews, failed coverage evidence, dispatch-queue waits, and same-head active dispatch. Verification on the exact tree: 1216 passed, 16 subtests passed; changed scheduler module branch coverage 100% (1,678 statements / 684 branches); Interrogate 100%; compileall and git diff --check passed. No source fix is justified for the unrelated pre-existing repository-wide 99.9% docstring result.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Re-review exact current head c041c34998db91da2ed21606e6b14ab65339a76a. Verify that only a prior coverage-evidence-only OpenCode change request can be retried after successful current-head coverage + Strix + no failed checks, while ordinary substantive CHANGES_REQUESTED remains blocked. Preserve exact-head binding and no synthetic approval. Submit the formal verdict against this head only.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head c041c34998db91da2ed21606e6b14ab65339a76a only. Verify that coverage-evidence-only CHANGES_REQUESTED can be re-dispatched only after same-head coverage + Strix success and no failed checks, while substantive change requests remain blocked. Do not merge or update branches.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review exact current head df6e1589fab9d985e77be58f9d4de2f640017164 against live main@bbedc1a51ec1a2421f129955c629b3cd0507a4ec. The branch has now been refreshed to current main, so all predecessor-head evidence is stale. Verify that only coverage-evidence-only OpenCode failures can be re-dispatched, successful current-head coverage + Strix + no failed checks are required, substantive change requests remain blocked, and no review/merge bypass is introduced. Submit a fresh exact-head formal verdict only after applicable current checks are terminal.

Copy link
Copy Markdown
Contributor Author

ScopeWeave exact-current-head coverage blocker canary for this retry path:

  • target: ContextualWisdomLab/scopeweave#495@3c9f2441611e1b0c616dc070fd89fe43d77e3271;
  • central OpenCode run/job: 32216932003 / 95971978143;
  • first failing boundary: Validate and submit formal review after the coverage helper returned baseline=null, current=null, invented=null and Current coverage is incomplete; missing server metrics;
  • the same exact ScopeWeave head's repository-native test/security workflows are terminal-success and the OpenCode fallback text reports current browser/server coverage at 100%, but that fallback is intentionally non-authoritative and must not be promoted into merge evidence;
  • the resulting formal OpenCode review is an exact-head CHANGES_REQUESTED, so this is a valid canary for the "coverage blocker clears -> same-head redispatch" contract, not an ordinary semantic product rejection.

Please keep the repair fail-closed. RED acceptance should cover a current-head coverage-only change request where authoritative coverage acquisition is presently incomplete: the scheduler must not redispatch merely because a status string says success, and it must distinguish missing authoritative server metrics from an ordinary source defect. GREEN acceptance should require complete/non-invented protected-base + exact-current coverage evidence, exact-head identity, Strix/current checks passing, then a bounded same-head OpenCode redispatch that produces a substantive formal review on the same head. If the coverage producer/helper cannot obtain canonical server metrics for this repository, that acquisition/attestation boundary remains the causal prerequisite and should be repaired by its existing central owner path rather than requiring ScopeWeave source churn.

@opencode-agent
opencode-agent Bot disabled auto-merge August 19, 2026 23:40
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit at 41a97b1: clean current-main successor #1152 carries the coverage-dispatch retry fix; this old branch also deletes unrelated current-main scheduler contracts. Closing this duplicate to prevent merging a stale-base tree.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #1152.

@seonghobae seonghobae closed this Aug 20, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Aug 20, 2026

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch agent/retry-coverage-review-dispatch cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into agent/retry-coverage-review-dispatch, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 1141 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:agent/retry-coverage-review-dispatch
# rebase path only: git push --force-with-lease origin HEAD:agent/retry-coverage-review-dispatch
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: pr_review_merge_scheduler.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_pr_review_merge_scheduler.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 41a97b14436fc23ca7b56f9a2395a728db0d11e8
  • Workflow run: 32311804363
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: pr_review_merge_scheduler.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_pr_review_merge_scheduler.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 41a97b14436fc23ca7b56f9a2395a728db0d11e8
  • Workflow run: 32311804363
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch agent/retry-coverage-review-dispatch cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into agent/retry-coverage-review-dispatch, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 1141 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:agent/retry-coverage-review-dispatch
# rebase path only: git push --force-with-lease origin HEAD:agent/retry-coverage-review-dispatch
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: pr_review_merge_scheduler.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_pr_review_merge_scheduler.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 41a97b14436fc23ca7b56f9a2395a728db0d11e8
  • Workflow run: 32311804363
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: pr_review_merge_scheduler.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_pr_review_merge_scheduler.py"]
  S2 --> I2["regression suite"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: agent/retry-coverage-review-dispatch
  • Fix direction: merge or rebase origin/main into agent/retry-coverage-review-dispatch, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 1141 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:agent/retry-coverage-review-dispatch
# rebase path only: git push --force-with-lease origin HEAD:agent/retry-coverage-review-dispatch

Copy link
Copy Markdown
Contributor Author

Closing this predecessor as superseded by current-main successor #1152. #1152 is the sole delivery lane for retrying OpenCode after exact-head coverage blockers clear. Historical checks, reviews, comments, and auto-merge state on #1141 do not transfer.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant