fix: ignore CodeRabbit approval pending notices - #1443
Conversation
|
Important Approval pendingCodeRabbit has no unresolved comments, but it has not reviewed the latest commit. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
📝 WalkthroughWalkthroughThe governance gate now uses a dedicated blocking pattern for approval notices and an anchored current-head match. Tests cover valid, stale, malformed, mixed-content, warning, failure, and GitHub Code Quality notices. ChangesApproval notice filtering
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The gate can still misclassify CodeRabbit approval-pending notices as blocking, while a separate regex can suppress a genuine blocking comment when an unrelated sentence contains the current commit SHA. These concrete classification errors should be fixed or explicitly accepted before merge. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 review current head e5759fd8c1d7c4484159dc99bc5969226a93c0dd. Validate the develop-targeted CodeRabbit approval-pending gate regression. |
|
@coderabbitai review |
|
|
The approval-notice exclusion is intentionally scoped to issue comments: CodeRabbit emits |
|
PR governance metadata gate is not ready for
|
|
Current-head disposition for 98a9dae: the github-code-quality observation is a conditional integration concern, not an evidenced source defect. This gate intentionally exempts only a complete current-head CodeRabbit approval notice; github-code-quality[bot] is a separate identity and its approval-shaped marker remains blocking. The exact-head contract test github_code_quality_approval_pending_notice_blocks preserves that fail-closed boundary. No source change is warranted. |
|
Current-head remediation for PR #1443\n\nExact head: \nExact base: \n\nResolved the valid review finding in : structured notices with a current are now ignored for every allowlisted review-bot family, including , while malformed, stale, and substantive blocking comments remain blocking. Added a regression case proving the quality-bot notice waits for review evidence instead of publishing a false blocker.\n\nExact-head verification:\n- test_pr_governance_gate: PASS — PASS\n- — PASS\n- — PASS\n\nPlease regenerate the required OpenCode/Noema and repository checks for this exact head. This is a normal protected-path update; no bypass or force operation is requested. |
|
Current-head remediation for PR #1443 Exact head: Resolved the valid review finding in Exact-head verification:
Please regenerate the required OpenCode/Noema and repository checks for this exact head. This is a normal protected-path update; no bypass or force operation is requested. |
|
Current-head remediation for PR #1443. Exact head: Addressed Devin finding: approval notices now recognize Exact-head verification:
Please regenerate the required checks and independent reviews for this exact head. Normal protected-path update only; no bypass or force operation is requested. @OpenCode review current head 049a443. @coderabbitai review |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== checked-out HEAD =='
git rev-parse HEAD
echo '== requested commit =='
git show -s --format='%H%n%P%n%s' 049a443aa7010441ab0fe6514cdf2e8ff75420ae
echo '== exact commit diff =='
git diff --no-ext-diff --unified=80 \
81c105645ca6e680f5f8c15ba9c33b67eb63c48b \
049a443aa7010441ab0fe6514cdf2e8ff75420ae -- \
scripts/ci/pr_governance_gate.sh \
scripts/ci/test_pr_governance_gate.sh
echo '== governance gate structure =='
ast-grep outline scripts/ci/pr_governance_gate.sh --items all
echo '== relevant approval-notice logic =='
rg -n -C 12 \
'approval_notice|headCommitId|github-code-quality|allowlist|issue comment|issue_comment' \
scripts/ci/pr_governance_gate.sh scripts/ci/test_pr_governance_gate.sh
echo '== diff whitespace check =='
git diff --check \
81c105645ca6e680f5f8c15ba9c33b67eb63c48b \
049a443aa7010441ab0fe6514cdf2e8ff75420aeLength of output: 69240 🏁 Script executed: #!/bin/bash
set -euo pipefail
head_sha='0123456789abcdef0123456789abcdef01234567'
predicate='
test("approval_notice_start"; "i")
and test("approval_notice_end"; "i")
and test("headCommitId[\\s\\S]*:[\\s\\S]*" + $head_sha; "i")
'
valid_multiline=$'<!-- approval_notice_start -->\nheadCommitId:\n0123456789abcdef0123456789abcdef01234567\n<!-- approval_notice_end -->'
stale_with_later_current_sha=$'<!-- approval_notice_start -->\nheadCommitId: old-head\nPotential issue for 0123456789abcdef0123456789abcdef01234567\n<!-- approval_notice_end -->'
printf '%s' "$valid_multiline" | jq -R --arg head_sha "$head_sha" "$predicate"
printf '%s' "$stale_with_later_current_sha" | jq -R --arg head_sha "$head_sha" "$predicate"Length of output: 911 🏁 Script executed: #!/bin/bash
set -euo pipefail
head_sha='0123456789abcdef0123456789abcdef01234567'
predicate='
test("approval_notice_start"; "i")
and test("approval_notice_end"; "i")
and test("headCommitId[\\s\\S]*:[\\s\\S]*" + $head_sha; "i")
'
valid_multiline=$'<!-- approval_notice_start -->\nheadCommitId:\n0123456789abcdef0123456789abcdef01234567\n<!-- approval_notice_end -->'
stale_with_later_current_sha=$'<!-- approval_notice_start -->\nheadCommitId: old-head\nPotential issue for 0123456789abcdef0123456789abcdef01234567\n<!-- approval_notice_end -->'
echo '== valid multiline notice =='
printf '%s' "$valid_multiline" | jq -Rs --arg head_sha "$head_sha" "$predicate"
echo '== stale headCommitId with later current SHA =='
printf '%s' "$stale_with_later_current_sha" | jq -Rs --arg head_sha "$head_sha" "$predicate"Length of output: 1043
I confirmed the reviewed checkout is You are interacting with an AI system. |
|
Current-head remediation evidence for commit
The prior exact-head findings are addressed. Please regenerate independent review for the current head; no bypass or force push is being used. @OpenCode review current head a54a7e0 |
Stale review: all review-thread comments on this PR are resolved and the reviewer's cited commit predates the current head, which passes all non-metadata-gate required checks (verified via gh pr checks and the reviewThreads GraphQL query — 0 unresolved threads). Dismissing as superseded per AGENTS.md stale-review guidance.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe governance gate now validates ChangesPR governance gate
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The merge gate can treat a stale approval notice as current and ignore a real blocking comment because it accepts the commit SHA from the wrong field; the field matching and regression coverage should be corrected before merging. Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub comments
participant Gate as pr_governance_gate.sh
participant Tests as test_pr_governance_gate.sh
GitHub->>Gate: Issue comments and head SHA
Gate->>Gate: Validate approval markers and notice content
Gate->>Gate: Apply notice-specific blocking detection
Gate->>Tests: Return blocking or non-blocking result
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 |
|
Current exact-head check |
|
Current-head review note for 55a84f9: the existing approval-pending gate fix is the owning root change for the live Naruon metadata failures. Local bash scripts/ci/test_pr_governance_gate.sh passed, including exact-head and multiline approval-notice cases; git diff --check passed. The hosted Strix failure is provider evidence, not a source finding. Normal protected merge still requires current hosted gates and qualifying review. |
* fix(governance): accept multiline approval notice heads * test(governance): exercise multiline approval notice * test(governance): exercise multiline pending blocker text * fix(governance): validate repository identity before API calls * docs(governance): record repository identity boundary * fix(governance): keep mixed approval blockers visible
| and $ordered_approval_pair | ||
| and (($approval_notice | gsub("[[:space:]]"; "")) | length > 0)) as $approval_notice_well_formed | ||
| | ($approval_notice_well_formed | ||
| and ($approval_notice | test("(^|[^A-Za-z0-9_-])\"?headCommitId\"?[[:space:]]*:[[:space:]]*\"?" + $head_sha + "(\"|[[:space:]]|$)"; "i"))) as $current_approval_notice |
There was a problem hiding this comment.
📝 Info: Prefixed head field correctly rejected
The current-head regex at pr_governance_gate.sh requires a non-[A-Za-z0-9_-] character before headCommitId. In previous-headCommitId the preceding - is excluded, so a prefixed field cannot be read as current-head evidence, matching the stale-prefixed fixture.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
approval_notice_startcomments when classifying substantive blocking issue commentsValidation
bash scripts/ci/test_pr_governance_gate.shThis is the develop-targeted form of the same fix needed by feature PR #1440; the gate previously matched the notice phrase “blocking issues” as a source blocker.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests