fix(scheduler): fail closed on unknown mergeStateStatus in change-request gate - #1492
fix(scheduler): fail closed on unknown mergeStateStatus in change-request gate#1492seonghobae wants to merge 5 commits into
Conversation
…uest gate _clean_change_request_body() only fails closed when mergeStateStatus is a known-dirty value, so a missing/empty mergeStateStatus (the REST mergeable_state fallback can return null right after a push) was silently treated as CLEAN and let the autofix path proceed on unverified merge state. Match the fail-closed pattern already used by needs_conflict_resolution() and pr_auto_rebase.py's is_clean/is_dirty/is_behind_base.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
|
Generated by Claude Code |
|
@opencode-agent please review this draft PR. Generated by Claude Code |
|
Contextual-Orchestrator와 관계한 것들을 같이 손보든 어쩌든 해결하세요. Bypass merge 필요하면 가능 (chicken and eggs 상황이라면) + NVIDIA NIM 만 쓰는 건 허용하지 않아요. Contextual-Orchestrator를 쓰세요. Timeout은 적어도 3시간으로 잡으세요. 120초 같은 건 당황스럽군요. Opencode와 Noema 는 Coderabbitai 및 Devin 수준으로 실제로 리뷰를 하게 하시오. Strix도 보안 리뷰를 꼼꼼하게 하도록 하시오. 특히 보안 리뷰는 전체 코드로 수행하는 것입니다. Contextual-Orchestrator는 실시간으로 빠르면서 능력이 좋은 모델에 요청을 보내어 시간을 당기시오. |
…losed-autofix-gate
Main-merge sync + verificationBefore: Merge: merge_state = str(pr.get("mergeStateStatus") or "").upper()
if merge_state not in {"CLEAN", "HAS_HOOKS"}: # no `merge_state and` guard
return None
Verification on the merged head (
Pushed: non-force merge commit After: head now carries main through Review findings: still no review threads. PR comments are CodeRabbit's draft-skip notice, this session's prior #1485 race-condition explanation (still unresolved upstream in Draft state: left as draft. Generated by Claude Code |
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
00fb014bf0af3dcfe2adad3d74e6cf03c281e48a. - 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: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/33708400615/job/100502455657)
- Strix Security Scan/strix: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/33708400615/job/100502455657)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["CI script: pr_review_fix_scheduler.py"]
S1 --> I1["review and security gate shell path"]
I1 --> R1["Review risk: CI script: pr_review_fix_scheduler.py"]
R1 --> V1["bash -n plus Strix self-test"]
Evidence --> S2["Test: test_pr_review_fix_scheduler.py"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test: test_pr_review_fix_scheduler.py"]
R2 --> V2["targeted test run"]
OpenCode Review Overview
|
Current exact authority
ccef01023ed997023a38ac160e2ff37fb9d93a28main@c9052e607e5f3cc76e73207e7786b21500721b7950ee7efe3363daeb9b9b800ca850f2a1457e727fpreserves former head00fb014bf0af3dcfe2adad3d74e6cf03c281e48aas first parent and current protected main as second parentRoot cause and repair
The REST fallback can expose an empty merge state while GitHub recomputes mergeability. The shared change-request gate previously rejected only truthy dirty values, so empty or missing
mergeStateStatuspassed as if the pull request were proven clean.The repair accepts only
CLEANandHAS_HOOKS. Empty, missing,UNKNOWN, and known dirty values cannot produce a clean review body and therefore cannot authorize autofix or RCA classification.RED → GREEN lineage
50ee7efe3363daeb9b9b800ca850f2a1457e727f: non-destructive semantic restack; tree equals current protected main8b8e24a898acff651cd8006ccee0e48d9f200892: permanent RED contract for empty, unknown, and absent merge stateccef01023ed997023a38ac160e2ff37fb9d93a28: one-line owner fix plus CHANGELOG, APA-style doctoring, and Gap baselineVerification boundary
Remote readback confirms the exact one-line guard, removal of the prior truthiness condition, permanent regression, five-file delta, current-main ancestry, mergeability, and zero unresolved threads. Fresh exact-head Python Security, CodeQL PR, Agent Review Runtime Quality CI, Security Scan, and SAST Semgrep runs are queued.
The historical CHANGES_REQUESTED review described a cancelled predecessor-head Strix run and is not transferred as current-head evidence. No hosted GREEN, independent exact-head approval, ordinary merge, auto-merge, synthetic status, bypass, force update, or release is claimed.