test(governance): exercise multiline CodeRabbit pending notice - #1448
Conversation
|
Important Approval pendingCodeRabbit has no unresolved comments, but it skipped the latest review. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
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 @cwl-noema-review @github-code-quality Exact current HEAD 874c098 contains the mixed approval-notice blocker fix and regression test. Focused governance self-test, Bash syntax, ShellCheck, and diff checks pass. Publish fresh exact-head review and security evidence; do not reuse predecessor results. |
|
Dependency note: this follow-up currently contains the pre-remediation #1443 stack through |
|
PR governance metadata gate update for PR governance metadata gate is ready; all current-head requirements passed. |
|
@coderabbitai review\n\nPlease review only exact current head 874c098; do not reuse predecessor-head evidence. The current metadata gate is stale until this exact head receives a fresh review. |
|
|
Exact-head verification record
Decision: WAIT_AND_REMEDIATE. Keep the protected normal path and obtain the required independent review before merge; no bypass, force push, direct protected-branch write, or fabricated status was used. |
|
@opencode-agent @cwl-noema-review review only exact current head 874c098 of PR #1448 against base develop@81c105645ca6e680f5f8c15ba9c33b. Review the full governance test and fixture diff, current review metadata semantics, exact-head checks, and regression evidence. Publish structured exact-head verdicts; do not merge, update branch, dismiss reviews, bypass protection, or reuse predecessor evidence. |
62a0d64
into
fix/coderabbit-approval-pending-gate-develop
| coderabbit_multiline_approval_pending_comment) | ||
| printf '[{"id":777,"user":{"login":"coderabbitai[bot]"},"created_at":"2026-05-19T00:01:00Z","body":"<!-- approval_notice_start -->\\n## Approval pending\\nCodeRabbit has no unresolved comments, but it has not reviewed the latest commit.\\nCodeRabbit will approve the changes if it finds no blocking issues.\\n- [ ] {\\"headCommitId\\":\\n \\"0123456789abcdef0123456789abcdef01234567\\"}\\n<!-- approval_notice_end -->"}]' | ||
| ;; | ||
| coderabbit_mixed_approval_pending_blocking_comment) | ||
| printf '[{"id":777,"user":{"login":"coderabbitai[bot]"},"created_at":"2026-05-19T00:01:00Z","body":"<!-- approval_notice_start -->\\n## Approval pending\\nCodeRabbit has no unresolved comments, but it has not reviewed the latest commit.\\nBlocking issue: the current parser can cross tenant boundaries.\\n- [ ] {\\"headCommitId\\":\\"0123456789abcdef0123456789abcdef01234567\\"}\\n<!-- approval_notice_end -->"}]' | ||
| ;; |
There was a problem hiding this comment.
🟡 Added multiline notice fixtures never run
The added stub branches coderabbit_multiline_approval_pending_comment and coderabbit_mixed_approval_pending_blocking_comment are referenced by no run_gate call; the multiline and mixed tests instead run the _json and _current_head variants (test_pr_governance_gate.sh, test_pr_governance_gate.sh). The genuinely multiline JSON headCommitId fixture the PR aims to cover is never exercised.
Prompt for agents
The two fake-gh scenarios added at scripts/ci/test_pr_governance_gate.sh:264 (coderabbit_multiline_approval_pending_comment) and :267 (coderabbit_mixed_approval_pending_blocking_comment) are dead: no run_gate call uses them. The tests assert_multiline_coderabbit_approval_pending_notice_does_not_block (line 804) and assert_mixed_coderabbit_approval_pending_notice_blocks (line 826) instead run the renamed coderabbit_multiline_json_approval_pending_comment and coderabbit_current_head_mixed_approval_pending_blocking_comment scenarios. Decide the intended coverage: either point these tests at the newly added genuinely-multiline fixtures (and add coderabbit_mixed_approval_pending_blocking_comment to the check-runs empty case at line 143 so the issue-comment path is reached), or add dedicated test functions that run the new scenarios and register them in the runner list at the bottom of the file. Remove whichever fixtures remain unreferenced so the fake gh has no dead branches.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if ! [[ "${GITHUB_REPOSITORY:-}" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]]; then | ||
| printf 'Repository identity is invalid; refusing to evaluate.\n' | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
📝 Info: Repository identity guard is sound
The added guard ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ requires exactly one slash and rejects shell metacharacters, running before OWNER/REPO extraction so malformed values fail closed before any gh call. Behaves as intended.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Exact-head validation after normal stack restack: 068aefd on base fix/coderabbit-approval-pending-gate-develop@55a84f904f11203f49c356d95d7d88ba9f903030. The merge commit preserves the parent governance gate fix and child regression fixtures. Local checks passed: bash -n scripts/ci/pr_governance_gate.sh scripts/ci/test_pr_governance_gate.sh; bash scripts/ci/test_pr_governance_gate.sh; python -m pytest backend/tests/test_local_http.py backend/tests/test_url_validation.py -q (44 passed); git diff --check. Devin Review passed for this head. Central scheduler/OpenCode dispatch is queued; hosted required Checks and qualifying approval remain gates. No predecessor evidence is being reused. |
Summary
Verification
bash scripts/ci/test_pr_governance_gate.shgit diff --checkFollow-up to #1443.