Skip to content

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

Open

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

  1. seonghobae commented on Sep 13, 2026

    @seonghobae
    ContributorAuthor

    Owner repair advanced on #2170. RED was strengthened in 67dfa048446c96d99e3db2ebacdc02d16ed6294e so a newer IN_PROGRESS Required OpenCode coverage-evidence attempt suppresses stale failure for both current_head_failed_checks() and needs_rca_repair(). Production repair 7cda25c8b903108051e0d1d78e49d2b692a94a4a now admits only coverage-evidence through the retained OpenCode-workflow exclusion; opencode-review remains excluded, so no recursive control-plane repair is enabled. Mechanical source delta from the strengthened RED is +5/-1 in scripts/ci/pr_review_fix_scheduler.py. #2170 is SOURCE_REPAIRED / ACCEPTANCE_PENDING with fresh hosted workflows generated; do not close this issue until exact-head checks/review are terminal GREEN and the repair lands normally.

  2. seonghobae commented on Sep 13, 2026

    @seonghobae
    ContributorAuthor

    Current owner repair is now #2170 exact d3f1d0264912e74b897fdf2a0a6085100de4e40a. Self-review found the first source allowlist too broad because it keyed on check name alone. RED d01316990c9410165736ef09f0ab9979241078e8 now proves OpenCode Review / coverage-evidence remains excluded; production repair admits only the exact tuple Required OpenCode Review / coverage-evidence while retaining opencode-review recursion exclusion. The strengthened RED→fix compare is one commit ahead / zero behind and only +4/-2 in scripts/ci/pr_review_fix_scheduler.py. Fresh exact-head hosted runs are queued, so keep this issue open until terminal acceptance and normal landing.

  3. seonghobae commented on Sep 24, 2026

    @seonghobae
    ContributorAuthor

    Fresh owner-path audit from OriginWeave #237 exposes a newer #2170 generation that supersedes this issue's last acceptance-pending notes.

    GitHub's live PR metadata now reports #2170 exact 422ba67ce3eba06632266a0f6452754b63c50052 on stored base 64aa08d7fa487deacd41c761c36277ca68cab6c9, while the PR body still names older c346b832... / main@91be644.... Treat the body as stale authority until reconciled.

    On exact 422ba67c..., current hosted evidence is not acceptance-pending GREEN:

    • Security Scan 35272051584: SUCCESS;
    • Agent Review Runtime Quality 35272051574 / job 105373565699: FAILURE at Verify exact-head path policy and syntax after dependency/toolchain setup succeeded;
    • SAST Semgrep 35272051589 / job 105373566106: real SARIF generation/upload succeeded, then FAILURE at Enforce Semgrep gate (fail on Medium+ findings);
    • Python Security 35272051627: detection and pip-audit are SUCCESS, but Bandit job 105443123338 generated/uploaded SARIF and then FAILED at Enforce bandit gate (fail on MEDIUM+ findings);
    • CodeQL 35272051608: CANCELLED.

    Separately, unchanged OriginWeave #237 exact 4d175467... is a current consumer canary for the scheduler problem: central Required OpenCode run 35714835267 has coverage-evidence job 106752951786 failing specifically at Measure test and docstring evidence; model-pool execution is skipped and the published formal review is fail-closed CHANGES_REQUESTED/COVERAGE_BLOCKED. Native OriginWeave Production coverage is GREEN, so that review must not be dismissed or reinterpreted as product acceptance.

    Please preserve #2170's valid scheduler repair, but first read/adopt the intervening exact-head deltas and RCA the three current security/path-policy failures on 422ba67c...; do not blind-rerun, revert to the stale body head, weaken coverage/security thresholds, synthesize a verdict, or require a leaf no-op wake. After owner exact-head GREEN + normal landing, #237 should be reevaluated unchanged through the repaired Required OpenCode path.

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

    bugSomething isn't workingpriority: highHigh-priority or P1 work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions