feat: implement issue #739 — [Fleet Monitor] petry-projects/.github — .github/workflows/pr-review-mention-tests.yml#740
Conversation
… .github/workflows/pr-review-mention-tests.yml
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow’s yq and checksum downloads now enforce HTTPS and bounded retries. A new Bats test verifies the workflow exists and that all curl downloads include the required retry options. ChangesDownload resilience
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #740 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Bats test file test/workflows/pr-review-mention/install-resilience.bats to act as a regression guard, ensuring that all curl commands in the .github/workflows/pr-review-mention-tests.yml workflow use resilient flags (--retry, --retry-connrefused, and --retry-all-errors). The reviewer pointed out that the current grep approach is fragile because it does not handle line continuations or subshells/variable assignments, and suggested a more robust pure Bash line-by-line parser instead.
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #739 by reducing flakiness in the pr-review-mention-tests.yml workflow (notably the yq download step) and adding a regression test to prevent reintroducing non-resilient curl usage.
Changes:
- Add bounded
curlretry flags to the yq GitHub Releases downloads in.github/workflows/pr-review-mention-tests.yml. - Introduce a new bats regression test (
install-resilience.bats) that assertscurlinvocations in the workflow include retry options.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test/workflows/pr-review-mention/install-resilience.bats |
Adds a regression test to enforce resilient curl usage in the workflow. |
.github/workflows/pr-review-mention-tests.yml |
Adds curl retry flags to reduce intermittent download failures when fetching yq artifacts. |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 758d20c7cabfded20f479c8ba13ed3b503186ab8
Review mode: triage-approved (single reviewer)
Summary
Adds bounded curl retry flags (--retry 5 --retry-delay 2 --retry-connrefused --retry-all-errors) to the three yq GitHub-Releases downloads in pr-review-mention-tests.yml to fix the ~14% flake rate from issue #739, plus a new bats regression guard (install-resilience.bats) asserting every curl invocation in the workflow keeps those flags. HTTPS enforcement and checksum verification are retained. All CI green, all review threads resolved. Triage assessment confirmed.
Linked issue analysis
Closes #739 (Fleet Monitor warning: 14.3% failure rate on pr-review-mention-tests.yml). The failure mode was transient network/5xx errors on the yq download redirect to objects.githubusercontent.com. Adding bounded curl retries directly and substantively addresses the flakiness, and the regression test prevents silent reintroduction of a bare download. Substantively addressed.
Findings
Blocking: none.
Non-blocking (minor):
test/workflows/pr-review-mention/install-resilience.bats— the line-continuation join condition[[ "$line" == *'\\' ]]matches lines ending in two literal backslashes (single quotes make the two characters literal), so the joining logic never fires; it should be the unquoted form[[ "$line" == *\\ ]], which matches a single trailing backslash. Verified empirically. Impact is benign: the test passes today because all retry flags sit on the same physical line ascurl, and a future miss produces a conservative false failure (never a false pass). Worth a follow-up fix so the parser matches its own comment.
Security: workflow change only adds curl retry flags; --proto '=https' --proto-redir '=https' enforcement and SHA-256 checksum verification are unchanged. No new dependencies, no secrets, no injection surface. gitleaks and Agent Security Scan passed; the run_secret_scanning MCP tool was unavailable in this environment (noted, non-fatal).
Prior bot feedback: all three review threads (gemini line-continuation robustness, Copilot count-brittleness, Copilot "backoff" wording) were addressed in commit 758d20c and are resolved/outdated.
CI status
All checks green at reviewed commit: CI (Lint, ShellCheck, Agent Security Scan, gitleaks), CodeQL (actions), SonarCloud Quality Gate passed (0 new issues, 0 hotspots), PR Review Mention Tests (Lint and bats), Dependency Hardening Tests (bats), AgentShield, Dependency audit (npm audit passed; other ecosystems skipped), CodeRabbit status SUCCESS. Skipped checks are conditional jobs, not failures.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 758d20c7cabfded20f479c8ba13ed3b503186ab8
Review mode: triage-approved (single reviewer)
Summary
Adds bounded curl retries (--retry 5 --retry-delay 2 --retry-connrefused --retry-all-errors) to the three yq-related downloads in .github/workflows/pr-review-mention-tests.yml to fix the ~14% transient-failure rate reported in issue #739, plus a new regression bats test asserting every curl download in that workflow keeps bounded retry flags. HTTPS enforcement and checksum verification are unchanged. CI fully green, all review threads resolved, triage low-risk assessment confirmed.
Linked issue analysis
Closes #739 ([Fleet Monitor] flaky pr-review-mention-tests.yml, 14.3% failure rate). The failure mode — bare curl aborting on transient network/5xx blips from the GitHub Releases redirect target — is directly addressed with a bounded retry budget (5 retries, 2s delay, connection-refused and 5xx covered), so a genuinely-down mirror still fails fast. The new bats test pins the fix against regression. Issue is substantively addressed.
Findings
Blocking: none.
Non-blocking observation: in test/workflows/pr-review-mention/install-resilience.bats, the continuation check [[ "$line" == *'\\' ]] uses a single-quoted two-backslash pattern, which matches lines ending in two backslashes — so the line-joining branch never triggers for real \-continued lines (should be unquoted *\\). This is currently inert and fail-safe: the retry flags live on the same physical line as curl, so the guard passes correctly today, and a future multi-line split would produce a false failure (surfacing the issue) rather than a false pass. Worth a one-character fix in a follow-up, but not blocking.
Secret scan: run_secret_scanning MCP tool not available in this environment; gitleaks CI check is green and the diff contains no credential-like content.
CI status
All required checks green: bats, Lint, ShellCheck, CodeQL (actions), SonarCloud, gitleaks secret scan, Agent Security Scan, agent-shield, npm audit. Language-specific audits skipped (not applicable).
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Closes #739
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit