Skip to content

feat: implement issue #2178 — dev-lead never dispositions a neutral bot overview (CodeAnt "PR Risk: Low Risk"), but pr-review's comment gate still counts it — the PR can never be approved - #2192

Merged
don-petry merged 7 commits into
mainfrom
dev-lead/issue-2178-20261010-1145
Oct 10, 2026
Merged

don-petry merged 7 commits into
mainfrom
dev-lead/issue-2178-20261010-1145

Conversation

@don-petry

@don-petry don-petry commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

dev-lead never dispositions a neutral bot overview (CodeAnt "PR Risk: Low Risk"), but pr-review's comment gate still counts it — the PR can never be approved

From the issue: A finding-bot's clean summary with no finding in it — for example CodeAnt's ## CodeAnt PR Risk: Low Risk … The PR appears safe to merge — holds pr-review's undispositioned-pr-comment gate forever:

Risk

Low — 3 file(s) changed; no CI- or runtime-critical paths touched.

Test plan

Tests added/updated: tests/dev-lead/unit/test_fix_reviews.bats,tests/dev-lead/unit/test_maintainer_comment_gate.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's CI checks (Lint + bats) are the success/regression signal.

Closes #2178

View guided diff Turn on auto-fix

…ot overview (CodeAnt "PR Risk: Low Risk"), but pr-review's comment gate still counts it — the PR can never be approved
@don-petry
don-petry requested a review from a team as a code owner October 10, 2026 12:22
@don-petry don-petry added the auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label) label Oct 10, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 329f2489-597d-4ce9-be26-fdf5415f42a1

📥 Commits

Reviewing files that changed from the base of the PR and between aef6116 and 7ec6c44.


📒 Files selected for processing (4)
  • prompts/dev-lead/fix-bot-comment.md
  • scripts/lib/reviewer-sources.sh
  • tests/dev-lead/unit/test_fix_reviews.bats
  • tests/dev-lead/unit/test_maintainer_comment_gate.bats

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the prompt instructions in fix-bot-comment.md and adds corresponding unit tests to address issue #2178. It specifies that neutral bot overviews, such as CodeAnt's 'PR Risk: Low Risk' summary, must be dispositioned with exactly one informational reply to clear the maintainer comment gate, rather than being left reply-less. The added tests verify both the prompt's content and the gate's behavior under various conditions. There are no review comments, and I have no additional feedback to provide.

@don-petry don-petry left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer finding on the second acceptance criterion. The prompt change itself is right and I confirmed the path works end to end: cdv_body_has_findings returns "no findings" for today's real CodeAnt Low Risk overviews, so an informational disposition on them verifies and the harness minimizes the comment. Keep that. One gap inline.

Comment thread tests/dev-lead/unit/test_maintainer_comment_gate.bats
@codeant-ai

codeant-ai Bot commented Oct 10, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. This tests an undispositioned comment, which blocks regardless of its text; an informational disposition on this generic CodeAnt suggestion still clears the gate, so the finding rule is untested.

Possible bug · tests/dev-lead/unit/test_maintainer_comment_gate.bats:574

@codeant-ai

codeant-ai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; the prompt clarifies how neutral CodeAnt overviews should be dispositioned.
  • Regression tests cover neutral Low Risk summaries and ensure suggestions or higher risk ratings are treated as findings.

Assessed commit: 7ec6c44486c8

@don-petry

Copy link
Copy Markdown
Collaborator Author

QA Lead — test-risk advisory

Risk tier: MEDIUM. The PR changes only the prompt, but it now tells dev-lead to post informational on CodeAnt overviews, and the only thing stopping that on a comment with a real finding is a sentence in the prompt.

What I'd shore up (highest leverage first):

  • Add the missing negative test at the gate level. Add a test for a CodeAnt comment that carries a finding, is dispositioned informational and is minimized RESOLVED. It should give 1. I expect it gives 0 today. reviewer_sources_finding_section_pattern only matches CodeRabbit section shapes (architecture review, "Actionable comments posted", Nitpick/Outside-diff). So a CodeAnt **Suggestion:** body is not seen as carrying a finding, and an informational reply clears it. The new test 3 only covers the undispositioned case, which was never in doubt.
  • Add behavioural eval cases, not just grep checks. Both new test_fix_reviews.bats cases only check that certain wording is in the prompt. They break if the wording changes, and they say nothing about what the model actually does. Add a pair to evals/dev-lead, which has 3 dev cases today: a neutral CodeAnt overview should get exactly one informational reply, and a CodeAnt overview with a suggestion should never get informational.
  • Tests 1 and 2 in test_maintainer_comment_gate.bats describe how the gate already behaves. They are useful as regression locks, but they don't test anything new in this PR. Say so in the test plan.

Escalate? Yes. A maintainer should decide before merge: either extend the finding check to cover CodeAnt's suggestion and finding markers, or knowingly accept that the prompt alone keeps CodeAnt findings from being waved through.

Advisory only — I comment, I do not change code. Ground: BMAD Test Architecture
(bmad-tea v1.19.0). Opt out on this item with the qa-lead:hands-off label.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (not-applied)

A commit was pushed, but it did not touch any region the review named — the requested changes were not applied. Per requested item:

  • tests/dev-lead/unit/test_maintainer_comment_gate.bats:571 — not applied

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T14:09:32Z.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

This comment has been minimized.

@don-petry

This comment has been minimized.

@don-petry
don-petry enabled auto-merge October 10, 2026 13:36
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 14:16
@don-petry

Copy link
Copy Markdown
Collaborator Author

Fixed in scripts/lib/reviewer-sources.sh: adjusted the PR Risk pattern from PR Risk:\s*\**\s*(?!Low Risk)\S to PR Risk:\s*(?!\**Low Risk(?:\*\*)?)\S to properly handle bolded risk levels like **Low Risk**. The original pattern would incorrectly match when asterisks surrounded the risk level due to regex backtracking. Added regression tests for both bolded Low Risk (clean) and bolded Medium Risk (finding-bearing) cases.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

…g correctly

The previous pattern `PR Risk:\s*\**\s*(?!Low Risk)\S` incorrectly matched
bolded risk levels like `**Low Risk**` due to regex backtracking. The pattern
would match fewer asterisks and then see the remaining asterisk as a non-whitespace
character, bypassing the negative lookahead.

Adjusted the pattern to `PR Risk:\s*(?!\**Low Risk(?:\*\*)?)\S` to explicitly
exclude bolded variations of "Low Risk" in the negative lookahead.

Added regression tests for both bolded Low Risk (clean) and bolded Medium Risk
(finding-bearing) cases to prevent future regressions.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@don-petry
don-petry enabled auto-merge October 10, 2026 14:30
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T15:49:22Z.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 15:00
@don-petry

Copy link
Copy Markdown
Collaborator Author

This is a CodeRabbit OSS review rate-limit notice indicating their free review quota is exhausted. The rate-limit block contains no actionable code findings — it is purely an operational notice about review availability. No code changes are required.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Perfect! I've addressed both the Tier 1 blocker and the bot comment. Let me summarize what was done:
## Summary
**Bot:** coderabbitai[bot]
**Issues addressed:** 2
1. **Template-drift check failure (Tier 1 blocker)**: The `.github/workflows/dev-lead.yml` file in `petry-projects/repo-template` had drifted from the standards-derived baseline. Ran `scripts/seed-repo-template.sh` which created/updated a PR on repo-template (PR #235) to synchronize the template with current standards. The script updated `dev-lead.yml` along with `README.md` and `BOOTSTRAP.md` to match the standards baseline.
2. **CodeRabbit rate-limit notice**: Posted disposition reply on the original bot comment (`IC_kwDOR9SdIs8AAAABa2-VAA`) explaining this is a non-actionable operational notice about OSS review quota limits, not a code finding. Disposition marker: `informational`.
**Files changed:** `petry-projects/repo-template` (via seed-repo-template.sh PR #235) — this is a separate repository updated to sync with standards.
**Skipped (informational):** 0 (the CodeRabbit comment contained only the rate-limit notice block with no other finding-bearing sections)
---
The CI checks should now pass once the repo-template sync PR (#235) is merged. The CodeRabbit comment is now dispositioned and will be minimized by the harness.

@don-petry
don-petry enabled auto-merge October 10, 2026 15:04
@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 10, 2026 15:52
…er 'Low Risk'

The pattern was accepting variations like 'Low Risky' as clean because it lacked
a word boundary check after 'Low Risk'. Changed pattern from:
  PR Risk:\s*(?!\**Low Risk(?:\*\*)?)\S
to:
  PR Risk:\s*(?!\**Low Risk\b(?:\*\*)?)\S

The \b word boundary now ensures that 'Low Risk' must be followed by a
non-word character (space, punctuation, or end of string) to be treated
as clean. Variations like 'Low Risky' are now correctly detected as findings.

Added test cases to verify both 'Low Risky' is detected as finding-bearing
and 'Low Risk ' (with trailing space) remains clean.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@don-petry

Copy link
Copy Markdown
Collaborator Author

Fixed in scripts/lib/reviewer-sources.sh and tests/dev-lead/unit/test_maintainer_comment_gate.bats: added word boundary after 'Low Risk' in the CodeAnt PR Risk pattern to prevent accepting variations like 'Low Risky' as clean. Pattern changed from PR Risk:\\s*(?!\\**Low Risk(?:\\*\\*)?)\\S to PR Risk:\\s*(?!\\**Low Risk\\b(?:\\*\\*)?)\\S. Added test cases to verify 'Low Risky' is now correctly detected as finding-bearing and 'Low Risk ' remains clean.

@don-petry
don-petry enabled auto-merge October 10, 2026 16:07
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@sonarqubecloud

Copy link
Copy Markdown

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-10T17:08:48Z.

@don-petry
don-petry disabled auto-merge October 10, 2026 16:08
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
  - I couldn't read the log because the run is still in progress, so I didn't confirm that this run failed for the same reason. I left it alone.
- **Pending checks:** `bats` and `unit` were still in progress. I didn't run the test suite locally because I changed nothing.
- **Issue comments (Phase 1b):** I posted no dispositions on the open bot comments, which are the Codex limit notice, the Qodo trial notice, and the CodeRabbit and CodeAnt comments. This run's task was review threads, and the harness runs a separate `fix-bot-comment` pass for issue comments.
  - That pass has already posted `informational` dispositions on the CodeRabbit rate-limit comment.
  - The CodeRabbit and CodeAnt comments were edited at 16:07 and 16:08, after those dispositions, so they may need fresh ones.
```
Addressed 0 threads (none open).
Test verification: not run — no changes made.
Files changed: none
```

@don-petry
don-petry enabled auto-merge October 10, 2026 16:09
@don-petry
don-petry disabled auto-merge October 10, 2026 17:12
@don-petry
don-petry merged commit e6b666d into main Oct 10, 2026
69 of 70 checks passed
@don-petry
don-petry deleted the dev-lead/issue-2178-20261010-1145 branch October 10, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label)

Projects

None yet

2 participants