feat: implement issue #935 — [Fleet Monitor] petry-projects/.github — .github/workflows/ci.yml - #936
Conversation
… .github/workflows/ci.yml
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🤖 CodeAnt AI — Review Status
|
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe CI workflow adds bounded retries and timeouts for yamllint, AgentShield, and gitleaks downloads. Bats tests extract workflow steps and verify the new resilience settings. ChangesCI installation resilience
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
PR Summary by QodoCI: add bounded install retries and resilience regression tests
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #936 |
|
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 helper function step_block_with to extract specific step blocks from a CI workflow file, along with three new tests verifying the retry resilience of pip, npx, and gh release download steps. The review feedback highlights robustness issues in the helper function, such as variable leakage of line and potential preamble matching, and suggests using a more specific marker than 'npx ' to prevent fragile matching.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 120-123: Configure a CI-appropriate npm_config_fetch_timeout
alongside the existing npm retry settings at .github/workflows/ci.yml:120-123,
and wrap the gh release download command with timeout inside its retry loop at
.github/workflows/ci.yml:150-151. If this workflow is generated from a shared
upstream template, make the same changes there instead of only editing the
generated copy.
In `@test/workflows/ci/install-resilience.bats`:
- Line 82: Strengthen the assertions in the install-resilience tests around the
existing retry and resilience markers: validate the configured pip and
AgentShield retry counts, assert the expected timeout values, verify the
gitleaks loop uses exactly three attempts, and require its terminal failure path
to execute exit 1. Replace presence-only regex checks near the current block
assertions with checks for the exact configured values and control-flow
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 90eb59d3-7522-4fb2-9d89-a490fa9e0524
📒 Files selected for processing (2)
.github/workflows/ci.ymltest/workflows/ci/install-resilience.bats
Code Review by Qodo
Context used✅ Compliance rules (platform):
87 rules 1. Gitleaks retry logs lack fields
|
Superseded by automated re-review at
|
|
@coderabbitai resolve |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
✅ Action performedComments resolved and changes approved. |
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
Superseded by automated re-review at
|
Superseded by automated re-review at
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: fe9a61086010084679b60f3ad321eae745a123a7
Review mode: triage-approved (single reviewer)
Summary
Incremental confirmation at cycle 3/3. The single commit since the prior review (9a86bca...fe9a610) is exactly the requested fix: npm_config_fetch_timeout corrected from '60' (60 ms) to '60000' (60 s), restoring the intended per-fetch timeout for the AgentShield npx download. All prior blocking findings are now resolved, the corresponding Graphite review thread is resolved (zero unresolved threads remain), no new issues were introduced, all security controls (--require-hashes, --only-binary, sha256sum verification, --ignore-scripts, pinned tool versions) are preserved, and CI is fully green at the head SHA. The PR substantively fixes issue #935 by adding bounded retries with timeouts to the three network-dependent install/download steps plus bats regression tests. Approved.
Linked issue analysis
Closes #935 ([Fleet Monitor] ci.yml failure rate 14.8%, WARNING). The PR directly targets the transient-network failure mode behind the elevated failure rate: bounded pip retries (--retries 3 --timeout 30) for the yamllint install, npm native fetch-retry config for the AgentShield npx download (env vars, not a shell loop, so genuine high-severity findings still fail on first run), and a 3-attempt retry loop with backoff and per-attempt timeout for the gitleaks release download with a clear failure after exhaustion. Bats regression tests lock each protection in place. Scope matches the issue; no unrelated changes.
Findings
- Resolved (was major/blocking): npm_config_fetch_timeout is now '60000' (60 s) — the sole change since the prior reviewed SHA, verified via compare. The Graphite thread at ci.yml line 124 is resolved; no unresolved review threads remain on the PR.
- info (cosmetic, non-blocking): the comment typo 'reding the job' remains in three places in ci.yml. Optional cleanup for a future PR; not worth another review cycle.
- No new issues introduced by the fix commit. Security posture unchanged: hash-pinned pip install, sha256-verified gitleaks binary, --ignore-scripts on npx, pinned versions throughout.
- Secret scan: the run_secret_scanning MCP tool was not available in this run; the gitleaks CI check passed and no secret-like content appears in the diff.
CI status
All checks green at fe9a610: Lint, bats (x2), ShellCheck, CodeQL (actions), AgentShield, Agent Security Scan, Secret scan (gitleaks), npm audit, dependency-audit detect, SonarCloud, CodeRabbit, pr-auto-review. Ecosystem-specific audits skipped (not applicable). The two CANCELLED entries (dev-lead / dispatch, dev-lead / ci-relay) are agent-orchestration relays superseded by newer runs, not test checks. mergeStateStatus BLOCKED / reviewDecision REVIEW_REQUIRED pending this review.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



User description
Closes #935
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
Bug Fixes
Tests
CodeAnt-AI Description
Prevent transient network errors from breaking CI lint and security scans
What Changed
Impact
✅ Fewer CI failures from transient network errors✅ More reliable lint, agent-security, and secret scans✅ Clear failure after download retries are exhausted💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.