Skip to content

fix(autofix): route coverage-evidence failures from Required OpenCode Review into bounded RCA #2169

Description

@seonghobae

Problem

PR #2079 exact head 9dccfaa0776950498e557390a2fa8d6c34e0baf4 exposes a deadlock in the central repair scheduler.

Required OpenCode Review run 34757059796 reached coverage-evidence job 103723268900 and failed at Measure test and docstring evidence because touched-callable docstring coverage is 76.47% (13/17; required 80%). The model-pool review is intentionally skipped after this pre-review gate fails, so no current-head OpenCode CHANGES_REQUESTED review can exist.

At current protected .github/main 78393ea901efc0d57b35dd1e383e473425b7c1da, scripts/ci/pr_review_fix_scheduler.py has two individually sensible rules that combine into a repair deadlock:

  1. needs_rca_repair() can dispatch from terminal failed checks without a prior OpenCode review.
  2. current_head_failed_checks() drops any CheckRun whose workflow name is in RCA_IGNORED_WORKFLOW_NAMES, which includes OpenCode Review, Required OpenCode Review, and OpenCode PR Review.

Therefore a source-backed coverage-evidence failure emitted inside Required OpenCode Review is ignored by the failed-check path, while the alternative review-text path cannot exist because coverage failure prevented the model review from running.

Reproduction / RED

Create a PR-shaped fixture whose latest CheckRun is:

  • workflow: Required OpenCode Review
  • check/job name: coverage-evidence
  • conclusion: FAILURE
  • no OpenCode review submission

Current behavior: current_head_failed_checks(pr) == () and needs_rca_repair(pr) == (False, ()).

Required behavior: the scheduler must classify this as bounded RCA evidence and dispatch repair_mode=rca for the exact head.

Also keep the recursive control-plane guard: an opencode-review orchestration/status failure itself must remain ignored, as must metadata-only/queue-controller failures. Do not make all OpenCode workflow failures repairable.

Minimal causal repair

Prefer check-name-aware filtering over globally removing the workflow-name guard. Allow the source-backed pre-review gate(s) such as exact coverage-evidence to survive the workflow-name exclusion while retaining exclusions for orchestration/control-plane checks. Add regression coverage for:

  • Required OpenCode Review + failed coverage-evidence => RCA dispatch without prior review;
  • same workflow + failed opencode-review => no recursive RCA;
  • successful/pending newer coverage-evidence attempt supersedes stale failure;
  • exact-head/dedup/live-head protections remain unchanged.

No threshold lowering, synthetic status, manual/no-op rerun, provider fallback, or self-approval is an acceptable fix.

Concrete blocked owner case

#2079 needs only four behavior-neutral fixture-method docstrings (Response.__enter__, Response.__exit__, Response.read, Opener.open) to clear the observed coverage RED, but the central autonomous repair lane currently cannot reach that source repair from the failed pre-review gate. The PR has an exact-head review comment recording that causal repair.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions