fix(scheduler): require independent exact-head approval - #1270
fix(scheduler): require independent exact-head approval#1270seonghobae wants to merge 7 commits into
Conversation
📝 WalkthroughWalkthroughPR Review Merge Scheduler가 현재 HEAD의 독립 승인과 GitHub aggregate 승인을 병합 조건으로 적용합니다. Coverage 전용 차단 해소 후 최신 증거와 실행 이력을 확인하고 OpenCode 리뷰를 재디스패치합니다. Changes병합 승인 정책
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🟡 Moderate · up to The scheduler can continue blocking an otherwise eligible pull request because an older failed coverage check is not ignored after a newer replacement succeeds. This concrete merge-gating defect should be fixed before merge. Sequence Diagram(s)sequenceDiagram
participant Scheduler
participant GitHubAPI
participant CoverageEvidence
participant OpenCodeWorkflow
Scheduler->>GitHubAPI: 현재 HEAD 승인 및 최신 CheckRun 조회
GitHubAPI-->>Scheduler: reviewDecision, reviews, check runs
Scheduler->>CoverageEvidence: 최신 coverage-evidence 및 Strix 상태 확인
CoverageEvidence-->>Scheduler: 완료 상태와 실패 검사
Scheduler->>OpenCodeWorkflow: 조건 충족 시 현재 HEAD 리뷰 재디스패치
OpenCodeWorkflow-->>GitHubAPI: OpenCode CheckRun 생성
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@opencode-agent Please review the exact current head |
|
@opencode-agent Please review exact head |
|
@opencode-agent review Review exact current head 6cb7144 against protected main@0c6b9a6459c9dbdf5e23fb01df7a32a8a14964b3. Walk through the scheduler approval, exact-head binding, stale-review handling, and failure evidence; publish a substantive Reviews API verdict on this SHA. |
|
Exact-head local verification for 6cb7144: full pytest passed (1410 passed, 1 skipped, 16 subtests); coverage.py statement and branch coverage both 100% across scripts/ci; interrogate public docstring gate passed for scripts/ci/pr_review_merge_scheduler.py; compileall and git diff --check passed. No source change was needed after review. Hosted Checks and an independent exact-head approval remain required. |
|
@opencode-agent review Exact head: 6cb7144. Review the complete changed diff and report substantive findings with file/line evidence. |
|
Current exact-head Strix RCA: the required Strix run reached the scan gate, emitted zero vulnerabilities, but produced no authoritative report artifact. The log records NVIDIA NIM provider exhaustion/rate limiting followed by the configured openai-direct fallback returning HTTP 404. This is typed provider/backend infrastructure failure and fail-closed behavior, not a source finding. Next action: rerun the same-head Strix evidence after provider availability is restored; do not merge until the exact-head security evidence is complete. |
Exact-head review follow-up\n\nCurrent exact head: 6cb7144\n\nThe Strix provider rerun is now executing for this head after the earlier provider/backend failure. Please review the full scheduler diff and publish a substantive exact-head verdict only after the current required Checks complete. No predecessor success or review evidence is being reused. |
Exact-head verification receipt
No source, workflow, ruleset, protected-branch, or bypass mutation was used. |
|
Exact-head changed by the remote stack maintainer; predecessor evidence is discarded. Current exact head: #1266 was merged into this branch through the normal PR path, so the combined scheduler tree requires a fresh full review and hosted verification. @opencode-agent please inspect the complete current diff, exact-head dispatch-history retry floor, central active-run boundary, and the merged coverage-retry behavior, then publish a substantive Reviews API verdict tied only to this SHA. Do not reuse predecessor reviews or checks. |
|
Exact current-head remediation on c55eb40: fixed failed_status_checks so a newer successful coverage-evidence run supersedes an older failed run in both normal merge and coverage-only retry paths. Reused one UTC-aware datetime.min fallback in latest_check_runs. Focused scheduler suite: 146 passed; git diff --check passed. The branch remains protected with no current formal approval. Please issue a fresh independent substantive review and required checks for this exact head; predecessor evidence is not reused. No bypass or gate weakening was used. |
|
Correction: exact current-head remediation on c55eb40. Fixed failed_status_checks so a newer successful coverage-evidence run supersedes an older failed run in both normal merge and coverage-only retry paths. Reused one UTC-aware datetime.min fallback in latest_check_runs. Focused scheduler suite: 146 passed; git diff --check passed. The branch remains protected with no current formal approval. Please issue a fresh independent substantive review and required checks for this exact head; predecessor evidence is not reused. No bypass or gate weakening was used. |
|
Exact-head local verification completed for c55eb40: full pytest 1429 passed, 1 skipped, 16 subtests; coverage branch and statement 100 percent across scripts/ci (8499 statements, 3300 branches); interrogate docstring coverage 100 percent; Ruff lint passed; compileall and git diff --check passed. Ruff format check still reports pre-existing formatting drift in the two full files, so no unrelated reformat was introduced. Hosted required checks and independent approval remain pending; normal merge only. |
|
Exact-head follow-up on 8423ff1: fixed the valid central coverage authority gap. When SCHEDULER_REQUIRED_WORKFLOW_REPOSITORY is set, metadata-only Required OpenCode Review coverage-evidence no longer supersedes a failed OpenCode Review Dispatch run; retry and failed-check decisions use authoritative dispatch evidence while ordinary same-workflow reruns still supersede older failures. Added regression coverage and changelog entry. Verification: full pytest 1430 passed, 1 skipped, 16 subtests; statement and branch coverage 100 percent across scripts/ci (8504 statements, 3302 branches); interrogate docstring coverage 100 percent; Ruff lint, compileall, and git diff --check passed. The branch remains protected with no independent current-head approval. Please issue a fresh substantive review and required hosted checks for this exact head; no bypass or gate weakening was used. |
|
Disposition for the two exact-head review threads on 8423ff1: the cross-workflow coverage finding was valid and is fixed by excluding the central Required OpenCode Review metadata placeholder from authoritative coverage superseding; the new regression proves a newer placeholder success cannot mask failed OpenCode Review Dispatch evidence. The independent-approval observation is intentionally fail-closed: GitHub App and bot identities are not independent human approval under this scheduler policy. Both findings are now dispositioned; no source uncertainty remains from these threads. |
|
Please perform a substantive review of the exact current head |
* 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
2e8e503 to
ad01b4e
Compare
|
Exact-head rebase complete.
Please run a new independent substantive review against this exact head before merge. |
|
Exact-head local verification for ad01b4e (base 613a33e):
This evidence is bound only to the exact current head; predecessor reviews/checks were not reused. Required hosted Checks are still QUEUED and no current independent approval is present, so this PR remains blocked on the normal protected merge path. |
|
@opencode-agent review Please publish an independent substantive formal Reviews API verdict for exact current head |
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
ad01b4e69eae8a149560bc39e60bb693ab9028eb. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- Strix Security Scan/strix: FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/32713904601/job/97391004284)
- Strix Security Scan/strix: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/32713904601/job/97391004284)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: CHANGELOG.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: scheduler-independent-current-head-approval.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: scheduler-independent-current-head-approval.md"]
R2 --> V2["docs review"]
Evidence --> S3["CI script: pr_review_merge_scheduler.py"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script: pr_review_merge_scheduler.py"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed. Findings1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
Failed checks:
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: CHANGELOG.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: scheduler-independent-current-head-approval.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: scheduler-independent-current-head-approval.md"]
R2 --> V2["docs review"]
Evidence --> S3["CI script: pr_review_merge_scheduler.py"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script: pr_review_merge_scheduler.py"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
ad01b4e69eae8a149560bc39e60bb693ab9028eb. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- Strix Security Scan/strix: FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/32713904601/job/97391004284)
- Strix Security Scan/strix: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/32713904601/job/97391004284)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: CHANGELOG.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: scheduler-independent-current-head-approval.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: scheduler-independent-current-head-approval.md"]
R2 --> V2["docs review"]
Evidence --> S3["CI script: pr_review_merge_scheduler.py"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script: pr_review_merge_scheduler.py"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_pr_review_merge_scheduler.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_pr_review_merge_scheduler.py"]
R4 --> V4["targeted test run"]
Customer outcome
The organization merge scheduler refuses direct merge and auto-merge until
GitHub reports
reviewDecision: APPROVEDand a non-author, non-OpenCode formalapproval is bound to the exact live head. If stale authorization left
auto-merge armed, the scheduler disables it.
Root cause and minimal repair
PR #828 identified a real separation-of-duties gap but its old-base
implementation replayed stale files and split the mature scheduler into a
second core. This clean protected-main replacement reuses the existing
scheduler and adds only the shared authorization boundary, exact PR author
evidence, regressions, changelog, and APA 7 doctoring.
The independent-review helper considers only each eligible reviewer's latest
exact-head approval-affecting state. A later same-head change request or
dismissal therefore revokes that reviewer's earlier approval. Generic
github-actions[bot], missing identities, self-review, comment-only review,and predecessor-head approval remain fail closed. GitHub remains authoritative
for last-pusher, CODEOWNERS, required-review, and ruleset policy.
Exact current-head evidence
ad01b4e69eae8a149560bc39e60bb693ab9028ebmain@613a33e0cb1c6db9790fae99f6253445712ac37a97391010023, checked out the exact head, passed 1,440 tests with 1 skip and 16 subtests, and recordedtest_strix_quick_gate: PASS.32713907748and Exact Artifact SBOM Attestation run32713907676also checked out the exact head and passed.Merge boundary
Do not transfer review or check evidence from #828 or the predecessor head.
This exact head requires fresh hosted checks, zero unresolved current-head
threads, and independent exact-head approval before protected merge. Project #1
remains
In Progressuntil that lifecycle completes.Summary by CodeRabbit
병합 안정성 개선
검사 및 커버리지 처리 개선