Skip to content

feat: implement issue #935 — [Fleet Monitor] petry-projects/.github — .github/workflows/ci.yml - #936

Merged
don-petry merged 8 commits into
mainfrom
dev-lead/issue-935-20260803-1023
Aug 7, 2026
Merged

feat: implement issue #935 — [Fleet Monitor] petry-projects/.github — .github/workflows/ci.yml#936
don-petry merged 8 commits into
mainfrom
dev-lead/issue-935-20260803-1023

Conversation

@don-petry

@don-petry don-petry commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

User description

Closes #935

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability of CI dependency downloads with bounded retries and timeouts.
    • Added progressive retry handling for security tool installation and downloads.
    • CI now exits clearly when required downloads fail after all retry attempts.
  • Tests

    • Added automated coverage to verify retry limits, timeouts, and backoff behavior for CI downloads.

CodeAnt-AI Description

Prevent transient network errors from breaking CI lint and security scans

What Changed

  • YAML dependency installation retries temporary package-index failures with a bounded retry count and timeout.
  • AgentShield retries temporary npm registry failures without rerunning scans that fail because of high-severity findings.
  • Gitleaks retries release downloads with timeouts and backoff, then reports a clear failure after three unsuccessful attempts.
  • Added regression checks to ensure these retry protections remain in the CI workflow.

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

@don-petry
don-petry requested a review from a team as a code owner August 3, 2026 10:31
@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.

@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 007fed8 Aug 06, 2026 · 23:43 23:43
✅ Reviewed your PR 4d3ef89 Aug 03, 2026 · 10:31 10:33

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 89fc84b5-719f-4730-9a4c-792c8dbc0e11

📥 Commits

Reviewing files that changed from the base of the PR and between 4d3ef89 and fe9a610.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • test/workflows/ci/install-resilience.bats
📝 Walkthrough

Walkthrough

The CI workflow adds bounded retries and timeouts for yamllint, AgentShield, and gitleaks downloads. Bats tests extract workflow steps and verify the new resilience settings.

Changes

CI installation resilience

Layer / File(s) Summary
Harden CI dependency downloads
.github/workflows/ci.yml
The workflow adds pip retries and timeouts for yamllint, npm fetch limits for AgentShield, and a three-attempt backoff loop with explicit failure handling for gitleaks.
Validate retry configuration
test/workflows/ci/install-resilience.bats
The tests add step-block extraction and verify retry, timeout, and backoff settings for the three downloads.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: needs-human-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The workflow adds retry and timeout controls that directly address the reported CI failure warning in issue #935.
Out of Scope Changes check ✅ Passed The changes are limited to CI download resilience and focused tests for the affected workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies issue #935 and the affected CI workflow, which are directly related to the pull request changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-935-20260803-1023

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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 3, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

CI: add bounded install retries and resilience regression tests

⚙️ Configuration changes 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Add bounded retries/timeouts for pip, npm/npx, and gitleaks downloads to reduce CI flake.
• Ensure transient registry/network blips retry instead of failing jobs (issue #935).
• Add Bats regression tests to prevent future removal of install resilience guards.
Diagram

graph TD
  A["CI workflow (ci.yml)"] --> B["Lint YAML: pip install"] --> E{{"External registries"}}
  A --> C["AgentShield: npx"] --> E
  A --> D["Gitleaks: gh download"] --> E
  F["Install resilience tests (bats)"] --> A
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Central retry helper script
  • ➕ Avoids duplicating retry/backoff logic across workflow steps
  • ➕ Makes future resilience changes consistent and easier to test
  • ➖ Adds a script API surface and requires shellcheck/docs upkeep
  • ➖ Slightly less readable than inline logic in the workflow
2. Use a generic GitHub Action for retries
  • ➕ Standardized retry semantics with less custom shell
  • ➕ Can wrap arbitrary steps consistently
  • ➖ Adds a third-party action dependency and supply-chain surface
  • ➖ Harder to audit vs. explicit flags/env vars in ci.yml
3. Prefer direct curl downloads with curl retries (instead of gh)
  • ➕ curl has first-class retry flags already used elsewhere in the workflow
  • ➕ Can unify download behavior and flags
  • ➖ May reintroduce more manual URL construction and auth/header handling
  • ➖ Less ergonomic than gh for release asset selection

Recommendation: The PR’s approach is solid: use native retry mechanisms where available (pip, npm) and a bounded loop where not (gh). If retry logic grows further across workflows, consider extracting a small retry helper script to reduce duplication; otherwise, keeping the logic inline in ci.yml remains the most auditable option.

Files changed (2) +90 / -2

Tests (1) +55 / -0
install-resilience.batsAdd regression tests for install/download resilience in ci.yml +55/-0

Add regression tests for install/download resilience in ci.yml

• Introduces a helper to extract a single workflow step block by marker text, then adds targeted tests asserting retries are present for pip, npx/npm, and gh release download. This prevents future workflow edits from accidentally dropping resilience safeguards.

test/workflows/ci/install-resilience.bats

Other (1) +35 / -2
ci.ymlHarden CI installs with bounded retries and timeouts +35/-2

Harden CI installs with bounded retries and timeouts

• Adds pip install retry/timeout flags for yamllint dependencies, configures npm fetch retry behavior for the AgentShield npx download, and wraps gitleaks release downloads in a bounded retry loop with backoff. These changes reduce CI flakiness from transient network/registry failures (issue #935).

.github/workflows/ci.yml

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #936
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-08-03T11:03:08Z

@don-petry

Copy link
Copy Markdown
Contributor Author

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.
Next attempt after: 2026-08-03T11:03:08Z

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 10:33
Comment thread test/workflows/ci/install-resilience.bats Outdated
Comment thread test/workflows/ci/install-resilience.bats Outdated

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

Copy link
Copy Markdown
Contributor

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 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.

Comment thread test/workflows/ci/install-resilience.bats
Comment thread test/workflows/ci/install-resilience.bats Outdated
@don-petry
don-petry disabled auto-merge August 3, 2026 10:34

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between de298ab and 4d3ef89.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • test/workflows/ci/install-resilience.bats

Comment thread .github/workflows/ci.yml
Comment thread test/workflows/ci/install-resilience.bats Outdated
@qodo-code-review

qodo-code-review Bot commented Aug 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 87 rules

Grey Divider


Informational

1. Gitleaks retry logs lack fields 📘 Rule violation ◔ Observability
Description
The new gitleaks download retry loop logs failures without including both attempt_number and
max_retries as explicit fields at a WARN-equivalent level. This reduces observability during
transient-failure investigations and violates the required retry-attempt logging format.
Code

.github/workflows/ci.yml[R155-156]

+            echo "gitleaks download attempt ${attempt} failed" >&2
+            [ "${attempt}" -lt 3 ] && sleep $((attempt * 5))
Relevance

● Weak

Team accepts retry loops with plain echo logs; PR #890/#895 use same pattern without attempt/max
fields.

PR-#890
PR-#895

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2238990 requires each retry attempt to be logged at WARN level with both
attempt_number and max_retries fields. The retry loop added in .github/workflows/ci.yml logs
only free-form text (gitleaks download attempt ... failed) and omits max_retries as an explicit
field.

Rule 2238990: Log retry attempts with attempt_number and max_retries at WARN level
.github/workflows/ci.yml[150-156]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new retry loop was introduced for `gh release download`, but the retry-path logging does not include both `attempt_number` and `max_retries` as explicit fields, nor a clear WARN-equivalent level.

## Issue Context
Compliance requires every retry path to emit a WARN (or equivalent) log containing structured fields/arguments for `attempt_number` and `max_retries`. In GitHub Actions, a practical equivalent is emitting `::warning::` with key=value fields.

## Fix Focus Areas
- .github/workflows/ci.yml[149-160]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@donpetry-bot

donpetry-bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 9a86bca5a72b6ab5d5f8090a01bcecaf0b24b6a7 — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 4d3ef899176efc08b9416838c282f52bf6a7cf79
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

CI-resilience PR adds bounded retries to pip, AgentShield npx, and the gitleaks gh-release download; the production ci.yml change is correct and preserves all security controls (hash pinning, --only-binary, sha256sum verification, --ignore-scripts, pinned versions, --clobber for retry idempotency), so no security regression. Not HIGH risk. However reviewDecision is CHANGES_REQUESTED (CodeRabbit) with unresolved, valid low-severity advisory-bot findings on the test helper — hence escalate rather than approve. No Tier 3 security audit needed; findings are maintainability nits confined to test code. Downstream impact: (none). Secret-scanning MCP tool was not available; no secrets present in the diff regardless.

Findings

  • minor: step_block_with does not declare line as local, leaking it into the shell's global scope (gemini finding). Add local line alongside local marker / local block out. (test/workflows/ci/install-resilience.bats line 24)
  • minor: step_block_with accumulates from the file preamble and returns the LAST matching block, so a top-level comment containing the marker, or multiple matching steps, could yield the wrong block (gemini finding). Fine for the current single-match cases but fragile to future edits. (test/workflows/ci/install-resilience.bats line 20)
  • minor: The AgentShield test matches on the generic marker 'npx '; a more specific marker like 'npx ecc-agentshield' (or 'ecc-agentshield') is safer if another npx step is added later (gemini finding). (test/workflows/ci/install-resilience.bats line 92)
  • minor: CodeRabbit: the gitleaks retry loop wraps gh release download in backoff retries but sets no per-attempt timeout, and no npm_config_fetch_timeout is configured alongside the npm fetch-retries env vars. Optional hardening, not blocking. (.github/workflows/ci.yml line 150)
  • minor: CodeRabbit: assertions are presence-only (e.g. checks for --retries[1-9], npm_config_fetch_retries, for attempt in, sleep). Consider asserting the exact configured retry counts/timeouts and the terminal exit 1 control flow to lock behavior. (test/workflows/ci/install-resilience.bats line 82)
  • info: Comments in ci.yml read 'reding the job' (typo for 'redding'/'turning the job red') in three places. Cosmetic. (.github/workflows/ci.yml line 39)

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@don-petry

Copy link
Copy Markdown
Contributor Author

@coderabbitai resolve

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 10:41
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@don-petry
don-petry disabled auto-merge August 3, 2026 10:42
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 10:44
@don-petry
don-petry disabled auto-merge August 3, 2026 10:45
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 10:47
Comment thread .github/workflows/ci.yml Outdated
@donpetry-bot

donpetry-bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 9a86bca5a72b6ab5d5f8090a01bcecaf0b24b6a7 — click to expand prior review.

Review — fix requested (cycle 2/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 9a86bca5a72b6ab5d5f8090a01bcecaf0b24b6a7
Review mode: triage-approved (single reviewer)

Summary

Confirmation review after triage clearance (cycle 1/3). The PR adds bounded retries to the yamllint pip install, the AgentShield npx fetch, and the gitleaks release download, plus bats regression tests — a substantive fix for the fleet-monitor failure-rate warning in issue #935. All findings from the prior review cycle (sha 4d3ef89) were addressed and their threads resolved, security controls (hash pinning, --only-binary, sha256sum verification, --ignore-scripts, pinned versions) are preserved, and CI is fully green. However, the fix commits introduced a new, valid, still-unresolved finding: npm_config_fetch_timeout is set to '60', but npm timeout values are milliseconds, so this configures a 60 ms per-fetch timeout instead of the intended 60 s — undermining the very retry resilience this PR adds. An unresolved review thread with a real correctness concern fails the approval gates, so this escalates for one more fix pass.

Linked issue analysis

Closes #935 ([Fleet Monitor] ci.yml failure rate 14.8%, WARNING). The PR substantively addresses it: the three network-dependent install/download steps in ci.yml gain bounded retries with timeouts, and regression tests lock the resilience in place. Scope matches the issue.

Findings

  • major (blocking, unresolved thread): npm_config_fetch_timeout: '60' sets a 60-millisecond fetch timeout — npm timeout configs are in ms (cf. the correct sibling values fetch_retry_mintimeout: '2000' and fetch_retry_maxtimeout: '30000'). Change to '60000' for the intended 60-second per-fetch timeout, and resolve the Graphite thread at .github/workflows/ci.yml line 124. The existing bats assertion (npm_config_fetch_timeout: matching [1-9]) will still pass with the corrected value. (Note: the check passed this run — likely a warm cache or fast registry response — but the value defeats the retry protection under exactly the transient-blip conditions this PR targets.)
  • info (carried forward, cosmetic): the comment typo 'reding the job' appears in three places in ci.yml. Optional cleanup while fixing the above.
  • Prior-cycle findings (local line declaration, last-match/marker fragility in step_block_with, marker specificity, presence-only assertions, missing timeouts): all resolved by commits 2d0fe31 and 9a86bca; threads resolved.
  • Secret scan: the run_secret_scanning MCP tool was not available in this run; gitleaks CI check passed and no secret-like content appears in the diff.

CI status

All required checks green at 9a86bca: Lint, bats (x2), ShellCheck, CodeQL (actions), AgentShield, Agent Security Scan, Secret scan (gitleaks), npm audit, SonarCloud, CodeRabbit, Graphite AI Reviews. Ecosystem-specific audits skipped (not applicable). reviewDecision is REVIEW_REQUIRED; mergeStateStatus BLOCKED pending review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@donpetry-bot

donpetry-bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at fe9a61086010084679b60f3ad321eae745a123a7 — click to expand prior review.

Review — fix requested (cycle 3/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 9a86bca5a72b6ab5d5f8090a01bcecaf0b24b6a7
Review mode: triage-approved (single reviewer)

Summary

Re-review at the same head SHA (9a86bca) as the prior cycle-2 review. The PR adds bounded retries to the yamllint pip install, the AgentShield npx fetch, and the gitleaks release download, plus bats regression tests — a substantive fix for issue #935, with all security controls (hash pinning, --only-binary, sha256sum verification, --ignore-scripts, pinned versions) preserved and CI fully green. However, no new commits have been pushed since the prior review, so its blocking finding stands: npm_config_fetch_timeout is '60', but npm timeout configs are milliseconds, so this sets a 60 ms per-fetch timeout instead of the intended 60 s, undermining the retry resilience this PR adds. The corresponding Graphite review thread at .github/workflows/ci.yml line 124 remains unresolved. An unresolved thread with a valid correctness defect fails the approval gates, so this escalates again (cycle 2/3).

Linked issue analysis

Closes #935 ([Fleet Monitor] ci.yml failure rate WARNING). The PR substantively addresses it: the three network-dependent install/download steps in ci.yml gain bounded retries with timeouts, and bats regression tests lock the resilience in place. Scope matches the issue; no unrelated changes.

Findings

  • major (blocking, carried forward, unresolved thread): npm_config_fetch_timeout: '60' sets a 60-millisecond fetch timeout — npm timeout configs are in ms (cf. the correct sibling values fetch_retry_mintimeout: '2000' and fetch_retry_maxtimeout: '30000'). Change to '60000' for the intended 60-second per-fetch timeout and resolve the Graphite thread at .github/workflows/ci.yml line 124. Independently verified this cycle: the thread is still open (not outdated) and the value is unchanged at the reviewed SHA. The existing bats assertion (npm_config_fetch_timeout: matching [1-9]) will still pass with the corrected value. The AgentShield check passing this run is not evidence the value is right — a warm npx cache or fast response masks it, but the misconfiguration defeats the retry protection under exactly the transient-blip conditions this PR targets.
  • info (carried forward, cosmetic): the comment typo "reding the job" appears in three places in ci.yml. Optional cleanup while fixing the above.
  • No new commits since the prior review (prior reviewed SHA == current head SHA), so no new findings and no resolved findings.
  • 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 9a86bca: Lint, bats (x2), ShellCheck, CodeQL (actions), AgentShield, Agent Security Scan, Secret scan (gitleaks), npm audit, SonarCloud, CodeRabbit, Graphite AI Reviews. Ecosystem-specific audits skipped (not applicable). reviewDecision REVIEW_REQUIRED; mergeStateStatus BLOCKED pending review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@codeant-ai

codeant-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:L This PR changes 100-499 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Aug 6, 2026
@don-petry
don-petry disabled auto-merge August 6, 2026 23:45
@don-petry
don-petry enabled auto-merge (squash) August 6, 2026 23:50
@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 7, 2026 00:00
@don-petry
don-petry disabled auto-merge August 7, 2026 00:01
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@don-petry
don-petry enabled auto-merge (squash) August 7, 2026 00:02
@don-petry
don-petry disabled auto-merge August 7, 2026 00:03
@don-petry

Copy link
Copy Markdown
Contributor Author

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

Agent reasoning
The two "cancelled" dev-lead checks (`dev-lead / ci-relay` and `dev-lead / dispatch`) appear to be intentional cancellations as part of the dev-lead automation workflow — they're not failures, and there are no related code issues to fix. These are automation infrastructure checks, not code quality blockers.
**Other Reviews:**
- CodeRabbit: APPROVED (recommendations for resilience improvements are already implemented in the PR)
- All other bots: Comments/approvals only, no blockers
---
**Bot:** SonarCloud  
**Issues addressed:** 0  
**Files changed:** None (no fixes needed)  
**Skipped:** N/A (Quality Gate passed — no issues to address)
The pull request is ready for merge.

@don-petry
don-petry enabled auto-merge (squash) August 7, 2026 00:04

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@don-petry
don-petry merged commit 955ceb0 into main Aug 7, 2026
21 of 23 checks passed
@don-petry
don-petry deleted the dev-lead/issue-935-20260803-1023 branch August 7, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet Monitor] petry-projects/.github — .github/workflows/ci.yml

2 participants