Skip to content

feat(gha): add CodeRabbit retry-on-rate-limit workflow with Python script - #5877

Open
rnetser wants to merge 1 commit into
RedHatQE:mainfrom
rnetser:feat/coderabbit-rate-limit-gha
Open

feat(gha): add CodeRabbit retry-on-rate-limit workflow with Python script#5877
rnetser wants to merge 1 commit into
RedHatQE:mainfrom
rnetser:feat/coderabbit-rate-limit-gha

Conversation

@rnetser

@rnetser rnetser commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator
What this PR does / why we need it:

Adds a scheduled GitHub Actions workflow that automatically retries CodeRabbit reviews that hit rate limits, implemented as a standalone Python script using PyGithub.

How it works:

  • Runs every 20 minutes (also supports manual trigger)
  • Scans up to 200 open non-draft/non-WIP/non-Stale PRs updated in the last 2 days
  • Uses myk-pi-tools coderabbit check to detect rate-limited PRs
  • Uses PyGithub for all GitHub API interactions (PR search, comment listing, review triggers)
  • Processes eligible PRs concurrently (5 worker threads via ThreadPoolExecutor)
  • GHA job timeout (15 minutes) is the termination bound
  • Skips if @coderabbitai review or resume was already posted after the rate-limit comment
  • Fail-safe: API failures skip the PR rather than aborting the scan
  • Rate-limit payload validation (rejects bool, non-finite, negative wait_seconds)

Files:

  • scripts/coderabbit_retry/coderabbit_retry.py — standalone Python script
  • scripts/coderabbit_retry/tests/ — 49 unit tests
  • .github/workflows/coderabbit-retry-on-rate-limit.yml — GHA workflow
  • pyproject.toml / uv.lock — PyGithub dev dependency added
Which issue(s) this PR fixes:
Special notes for reviewer:
  • Unit tests: uv run pytest scripts/coderabbit_retry/tests/
  • myk-pi-tools pinned to exact version 4.2.0
  • PyGithub added as dev dependency group
  • gh CLI no longer required (PyGithub handles all GitHub API calls)
jira-ticket:

Summary by CodeRabbit

  • New Features

    • Added automated handling for rate-limited CodeRabbit reviews.
    • Eligible pull requests are rescanned every 20 minutes or on demand, with expired limits triggering a new review request.
    • Work-in-progress pull requests and previous retries are skipped.
    • Processing continues across eligible pull requests when individual checks fail.
  • Bug Fixes

    • Added safeguards for malformed responses, API errors, timeouts, and execution failures.
  • Tests

    • Added comprehensive coverage for eligibility checks, retry decisions, error handling, and review triggering.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 23 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3e5ded12-8104-4c9f-baaf-2cbe3f01527e

📥 Commits

Reviewing files that changed from the base of the PR and between 744c13f and c394633.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/coderabbit-retry-on-rate-limit.yml
  • .pre-commit-config.yaml
  • pyproject.toml
  • scripts/coderabbit_retry/__init__.py
  • scripts/coderabbit_retry/coderabbit_retry.py
  • scripts/coderabbit_retry/tests/__init__.py
  • scripts/coderabbit_retry/tests/pytest.ini
  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/tests/utils.py
📝 Walkthrough

Walkthrough

Added a standalone CodeRabbit retry script, unit tests, a PyGithub dependency, and a GitHub Actions workflow. The script scans eligible pull requests, validates rate-limit data, avoids duplicate retries, triggers ready reviews, and reports results.

Changes

CodeRabbit retry automation

Layer / File(s) Summary
Pull request scan and eligibility
scripts/coderabbit_retry/coderabbit_retry.py, pyproject.toml, scripts/coderabbit_retry/tests/test_coderabbit_retry.py
The script defines retry limits, lists eligible pull requests, filters WIP titles, and adds the PyGithub development dependency. Tests cover search limits and WIP matching.
Retry validation and orchestration
scripts/coderabbit_retry/coderabbit_retry.py, scripts/coderabbit_retry/__init__.py
The script validates myk-pi-tools output, checks comment history, validates elapsed wait time, triggers review requests, handles failures, and reports scan counters.
Retry behavior validation and workflow execution
scripts/coderabbit_retry/tests/*, .pre-commit-config.yaml, .github/workflows/coderabbit-retry-on-rate-limit.yml
Unit tests cover payload validation, subprocess failures, comment detection, review triggering, PR processing, environment validation, retry caps, test utilities, isolated pytest configuration, and linting configuration. The workflow runs every 20 minutes or manually, installs myk-pi-tools 4.2.1, and applies execution limits.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: new-tests

Suggested reviewers: dshchedr, ronikishner, vsibirsk


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Stp Link Required ❌ Error The added scripts/coderabbit_retry/tests/test_coderabbit_retry.py has module and class docstrings but contains no STP:, RFE:, or Jira: URL line. MEDIUM: Add an STP: or RFE: URL line to the module, class, or test-function docstring in the new test file.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is 73 characters and clearly describes the added CodeRabbit retry workflow and supporting Python script.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Pr Template Sections ✅ Passed The live PR description contains all four required headings, and the first section includes meaningful implementation details.
Stp Scenario Coverage ✅ Passed PASS: The added test_*.py file has no STP:, Jira:, or RFE: URL in its module, class, or test docstrings, so this check is not applicable.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (PR author or approvers)
  • /hold cancel - Unblock PR merging (PR author or approvers)
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • RoniKishner
  • dshchedr
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

📌 Additional Information

Custom Commands:

  • /test-plan — Triggers CodeRabbit to analyze the PR's changed files and post a test execution plan
  • /rerun-smoke — Adds retest-smoke label on the PR to trigger smoke tests execution

For more information, please refer to the project documentation or contact the maintainers.

@rnetser
rnetser force-pushed the feat/coderabbit-rate-limit-gha branch from 0396e2e to d8512aa Compare August 4, 2026 07:52
@rnetser
rnetser force-pushed the feat/coderabbit-rate-limit-gha branch from d8512aa to 63da942 Compare August 4, 2026 09:19
@rnetser
rnetser force-pushed the feat/coderabbit-rate-limit-gha branch from 63da942 to d504c63 Compare August 4, 2026 09:20

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

Actionable comments posted: 4

🤖 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/coderabbit-retry-on-rate-limit.yml:
- Around line 19-21: Update the workflow’s concurrency configuration to set
cancel-in-progress to false, allowing an active scan to finish when a scheduled
or manually dispatched run overlaps. Preserve the existing concurrency group so
runs remain serialized and queued rather than cancelling earlier scans.
- Around line 107-118: Update the retry loop around the review trigger to
declare a per-run cap of 5 alongside the existing counters, stop processing once
that cap is reached, and add a short delay between successful triggers. Preserve
the existing failure handling and increment RETRIED only for successfully posted
triggers, preventing a burst of review comments in one run.
- Line 27: Update the workflow’s retry loop to enforce the documented runtime
budget: add an 8-minute wall-clock deadline, exit cleanly before the job
timeout, and report BUDGET_EXCEEDED in the job summary when the scan is
truncated. Raise timeout-minutes from 5 to the 10-minute job budget, and
preserve the existing iteration and trigger guards while ensuring the loop
cannot repeatedly starve the ordered tail.
- Around line 77-79: Add a one-time validity guard immediately before the
IS_RATE_LIMITED, WAIT_SECONDS, and COMMENT_ID assignments: run jq with -e to
verify CHECK_OUTPUT is a JSON object, suppress its output and errors, and
continue to the next scan iteration when validation fails. Keep the existing
assignments unchanged for valid payloads.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ac22fa63-2a52-40b5-839f-a1b7d8edd21f

📥 Commits

Reviewing files that changed from the base of the PR and between 9902e64 and 63da942.

📒 Files selected for processing (1)
  • .github/workflows/coderabbit-retry-on-rate-limit.yml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)
📜 Review details
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2026-05-19T10:17:37.060Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:13-13
Timestamp: 2026-05-19T10:17:37.060Z
Learning: In RedHatQE/openshift-virtualization-tests, when the PR template validation rule is triggered, avoid posting the PR template violation comment if the PR description already contains the required sections with meaningful content:
- `##### What this PR does / why we need it:`
- `##### Which issue(s) this PR fixes:`
- `##### Special notes for reviewer:`
- `##### jira-ticket:`
Because the current implementation can use a broad `**` path glob and re-run the check per diff context/file, reviewers/automation should verify the actual PR description content before flagging it as a violation or duplicating the comment.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
📚 Learning: 2026-05-20T11:18:31.677Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4867
File: tests/network/libs/stuntime.py:1-1
Timestamp: 2026-05-20T11:18:31.677Z
Learning: In RedHatQE/openshift-virtualization-tests, make the PR template validation (HIGH-severity) heuristic more conservative: if the author explicitly rebuts the “missing template section” finding and confirms the required sections are present with meaningful content, treat the original finding as a false positive and do not re-raise it. Only raise the HIGH-severity flag when a required PR section header (e.g., "##### What this PR does / why we need it:") is clearly absent or its content can be verified as empty/placeholder-only.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
📚 Learning: 2026-06-03T15:08:46.871Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:39-39
Timestamp: 2026-06-03T15:08:46.871Z
Learning: In RedHatQE/openshift-virtualization-tests, GitHub Actions workflow reviewers should follow the repo convention of allowing `uses:` references that are pinned to mutable version tags (e.g., `owner/actionv4`, `owner/actionv5`) and should NOT flag these as security issues. Full commit-SHA pinning for third-party actions is explicitly out of scope for this repository, so do not treat non-SHA `uses:` references as violations.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
🪛 zizmor (1.28.0)
.github/workflows/coderabbit-retry-on-rate-limit.yml

[error] 17-17: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)


[warning] 17-17: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)

🔇 Additional comments (3)
.github/workflows/coderabbit-retry-on-rate-limit.yml (3)

1-7: LGTM!

Also applies to: 52-55


16-17: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Security Misconfiguration (CWE-732): Incorrect Permission Assignment for Critical Resource

Reachability: Internal

MEDIUM: pull-requests: write is granted but never used.

Every gh call in this workflow authenticates with GH_TOKEN: ${{ secrets.BOT3_TOKEN }}. The GITHUB_TOKEN permission block is therefore unused, and it grants write access to a token that no step needs. Drop the grant to {} and document the reason. This also resolves both zizmor findings.

♻️ Proposed change
-permissions:
-  pull-requests: write
+# No GITHUB_TOKEN permissions are required: all API calls use BOT3_TOKEN,
+# because comments posted by GITHUB_TOKEN do not trigger CodeRabbit.
+permissions: {}

If a later change must fall back to GITHUB_TOKEN, move the grant to the job level instead of the workflow level.


30-31: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Other (CWE-1357)

Reachability: Internal

MEDIUM: an unpinned third-party CLI runs with the bot PAT in its environment.

pipx install "myk-pi-tools>=4.2.0" resolves to the newest published release on every run. The next step exports GH_TOKEN: ${{ secrets.BOT3_TOKEN }} into the same environment that executes that CLI. Any compromised or unexpected release therefore reads a PAT that can write to the repository. The open upper bound also means a breaking coderabbit check output change lands silently and breaks the scan.

Pin an exact version and bump it deliberately.

🔒 Proposed change
-        run: pipx install "myk-pi-tools>=4.2.0"
+        run: pipx install "myk-pi-tools==4.2.0"

Confirm that BOT3_TOKEN is scoped to the minimum required permissions, because this step is the widest exposure surface for it.

Comment thread .github/workflows/coderabbit-retry-on-rate-limit.yml Outdated
Comment thread .github/workflows/coderabbit-retry-on-rate-limit.yml Outdated
Comment thread .github/workflows/coderabbit-retry-on-rate-limit.yml Outdated
Comment thread .github/workflows/coderabbit-retry-on-rate-limit.yml Outdated

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

Actionable comments posted: 1

🤖 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 `@scripts/coderabbit_retry/coderabbit_retry.py`:
- Around line 333-336: Update the scheduler loop around pr_iter and the retried
+ len(active) capacity check so next(pr_iter, None) is called only when retry
capacity remains; if the budget is full, leave the iterator untouched for later
scheduling after active tasks complete. Preserve submission only while capacity
is available, and add a scheduler test covering mixed active-task results where
a False result frees capacity and the previously unconsumed PR is then
processed.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: db191c3b-a6d4-4271-9552-72c27abd6794

📥 Commits

Reviewing files that changed from the base of the PR and between 52d3e61 and 44032a4.

📒 Files selected for processing (2)
  • scripts/coderabbit_retry/coderabbit_retry.py
  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: verify-bugs-are-open
  • GitHub Check: build-container
  • GitHub Check: tox
  • GitHub Check: security-committer-identity
  • GitHub Check: security-suspicious-paths
⚠️ CI failures not shown inline (13)

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: verified
Missing approved from approvers: dshchedr, rnetser, myakove, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: dshchedr, vsibirsk, myakove, RoniKishner.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: verified
Missing approved from approvers: rnetser, dshchedr, vsibirsk, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, dshchedr, vsibirsk, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: verified
Missing approved from approvers: dshchedr, myakove, rnetser, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: dshchedr, myakove, RoniKishner, vsibirsk.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: verified
Missing approved from approvers: rnetser, dshchedr, vsibirsk, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, dshchedr, vsibirsk, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: verified
Missing approved from approvers: dshchedr, myakove, vsibirsk, rnetser
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: myakove, vsibirsk, dshchedr, RoniKishner.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: build-container, tox, verified
Missing approved from approvers: vsibirsk, dshchedr, rnetser, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, dshchedr, vsibirsk, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress tox
Some check runs failed: security-suspicious-paths
Some check runs not started: tox, verified
Missing approved from approvers: rnetser, dshchedr, vsibirsk, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, dshchedr, vsibirsk, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: build-container, tox, verified
Missing approved from approvers: dshchedr, myakove, rnetser, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: dshchedr, RoniKishner, myakove, vsibirsk.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: build-container, tox, verified
Missing approved from approvers: dshchedr, rnetser, myakove, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: vsibirsk, RoniKishner, dshchedr, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress verify-bugs-are-open, build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, verify-bugs-are-open, build-container, tox, verified
Missing approved from approvers: rnetser, vsibirsk, dshchedr, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, vsibirsk, dshchedr, myakove.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress verify-bugs-are-open, build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, verify-bugs-are-open, build-container, tox, verified
Missing approved from approvers: myakove, vsibirsk, rnetser, dshchedr
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: myakove, RoniKishner, vsibirsk, dshchedr.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress verify-bugs-are-open, build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, verify-bugs-are-open, build-container, tox, verified
Missing approved from approvers: vsibirsk, myakove, rnetser, dshchedr
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: vsibirsk, myakove, dshchedr, RoniKishner.

GitHub Check: security-suspicious-paths: ❌ Security: Suspicious Paths Detected

Conclusion: failure

View job details

1 file(s) modify security-sensitive paths
## Suspicious Path Detection
This PR modifies files in security-sensitive locations:
- `.github/workflows/coderabbit-retry-on-rate-limit.yml`
**Configured suspicious path prefixes:**
- `.claude/`
- `.vscode/`
- `.cursor/`
- `.devcontainer/`
- `.pi/`
- `.github/workflows/`
- `.github/actions/`
These paths control development tooling, CI/CD workflows, or IDE configurations and require careful review to prevent supply-chain attacks.
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Never add # noqa, # type: ignore, # pylint: disable, or otherwise disable linter/mypy rules; fix the underlying code or obtain explicit user approval.
In test and utility code, use pyhelper_utils.shell.run_command instead of calling subprocess.run directly.
Use ocp-resources classes for OpenShift resources instead of constructing raw YAML dictionaries.
Put type-only imports inside if TYPE_CHECKING: blocks.
Use Google-format docstrings for public functions with non-obvious return values or side effects.
Use absolute imports, prefer specific imports, and do not use bare import module without a from clause.
Use named arguments for function calls with more than one argument.
Do not use single-letter variable names; use descriptive names.
Do not include dead functions, variables, or fixtures; remove unused code. # skip-unused-code is reserved for code excluded by the custom dead-code analysis.
Keep imports at the top of the module and do not import inside functions.
Avoid defensive programming and fake defaults; fail fast, except for destructors/cleanup, explicitly optional Type | None parameters, intentional lazy initialization, platform constants, and unversioned external libraries.
Do not check guaranteed attributes or architecture-guaranteed state, use isinstance rather than hasattr for type discrimination, and do not version-check pinned dependencies.
Log phase transitions, resource operations, configuration changes, API responses, and intermediate state at INFO; unusual or skipped operations at WARNING; and contextual exceptions at ERROR. Never use DEBUG or log secrets, tokens, passwords, or PII. Use f-string formatting.
Re-raise exceptions with context using raise ... from ..., catch specific exception types, never swallow exceptions silently, and provide specific error messages.
Avoid hidden side effects; control behavior through explicit arguments, and never use async/await.
Use context managers for files, connections, ...

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
scripts/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep each standalone script tool in its own subdirectory with an entry point, utilities, and tests; scripts are not part of the pytest test suite.

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
**

⚙️ CodeRabbit configuration file

**: ## Approval Policy
You may approve the PR when ALL of the following are true:

  • All your review comments have been addressed with either:
    • a code/doc change that fixes the issue, or
    • a substantive author response that justifies no code change.
      Thread "resolved" state alone is not sufficient.
      OR you had no review comments.
  • If you posted a test execution plan comment requesting tests, and the PR author replied
    with a comment explaining why the requested tests are not needed or were already covered,
    treat that as an acceptable response — do not block approval on the test plan alone.
  • The author's explanation must be reasonable and specific (not just "N/A" or "not needed").
    Accept explanations like: "these tests were already run in CI", "this change is docs-only",
    "the affected tests are quarantined", or "verified manually on cluster X".

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🧠 Learnings (40)
📚 Learning: 2025-12-22T16:27:40.244Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3196
File: tests/network/upgrade/test_upgrade_network.py:4-4
Timestamp: 2025-12-22T16:27:40.244Z
Learning: For PRs that remove tests, rely on pytest --collect-only to verify the test discovery results (which tests are selected/deselected) and ensure the removal is clean and the test module remains functional. Full test execution is not required for test deletion PRs. This guideline applies to test files anywhere under the tests/ directory (e.g., tests/network/upgrade/test_upgrade_network.py) and should be used for similar test-deletion scenarios across the repository.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-07T09:52:12.342Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:12.342Z
Learning: When a PR only removes or modifies pytest markers in tests (e.g., removing pytest.mark.post_upgrade) and the test logic remains unchanged, prefer verifying with pytest --collect-only instead of running the full test suite. This validates that marker usage and test selection behavior are preserved. If the test logic changes, or markers affect behavior beyond collection, run the full test suite to confirm.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T13:18:48.808Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3273
File: tests/network/connectivity/test_ovs_linux_bridge.py:5-9
Timestamp: 2026-01-18T13:18:48.808Z
Learning: In tests/network/connectivity/test_ovs_linux_bridge.py and similar test files, prefer importing ipaddress as a module and using qualified calls like ipaddress.ip_interface(...) rather than from ipaddress import ip_interface. This preserves module context for readability, especially when chaining properties (e.g., ipaddress.ip_interface(...).ip). This is an intentional exception to the general rule favoring specific imports, and should apply to test files under the tests directory where module context aids understanding.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T14:51:50.846Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3495
File: tests/network/third_part_ip_request/test_third_party_ip_request.py:4-12
Timestamp: 2026-01-18T14:51:50.846Z
Learning: In the openshift-virtualization-tests repository, tests consistently import pytest as a module (import pytest) and avoid from pytest import ...; this is the established pattern across 398+ test files. Do not flag or refactor imports to use specific pytest names in tests under tests/**. If a file already follows this pattern, leave it as is; this guideline applies broadly to Python test files under the tests directory.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-29T05:30:13.982Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3649
File: tests/network/user_defined_network/ip_specification/libipspec.py:1-4
Timestamp: 2026-01-29T05:30:13.982Z
Learning: In the openshift-virtualization-tests repository, Python imports should use module import style for the standard library 'json' (import json) rather than 'from json import ...'. This improves readability by making calls like json.loads and json.dumps explicit, and aligns with patterns used for modules like logging, ipaddress, cloudinit, and pytest. Apply this to all Python test files under tests/ (and similar test directories).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-02T17:41:12.759Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3690
File: tests/after_cluster_deploy_sanity/test_after_cluster_deploy_sanity.py:65-65
Timestamp: 2026-02-02T17:41:12.759Z
Learning: In test files, keep test_* functions with simple one-line docstrings. For helper functions, utilities, and library code with non-obvious return values or side effects, use Google-style docstrings with Args, Returns, and Side effects sections. Do not require Google-style docstrings for pytest test functions themselves.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-03T07:34:34.184Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 3697
File: tests/infrastructure/instance_types/test_common_vm_instancetype.py:53-98
Timestamp: 2026-02-03T07:34:34.184Z
Learning: In test files (Python, pytest), prefer using tier3 markers for categorization since tier2, tier1, and tier4 are not used in this repository. Do not rely on non-official markers; formalize and document the allowed markers in pytest.ini (or equivalent) to ensure consistent usage. When reviewing new tests, ensure markers align with this convention (only tier3, unless a project-wide decision defines additional tiers) and remove any unnecessary or undocumented markers.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-10T15:04:14.799Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3577
File: tests/virt/conftest.py:251-267
Timestamp: 2026-02-10T15:04:14.799Z
Learning: In Python tests, remove all bare time.sleep() calls. Replace with a waiting mechanism such as TimeoutSampler from the timeout_sampler package or a function decorated with retry (with appropriate timeout/conditions) to ensure determinism and avoid flakiness. This applies to all Python tests under the tests directory (not just this file) to maintain consistent waiting behavior across the suite.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-25T11:00:02.013Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3873
File: tests/network/localnet/test_non_udn_localnet.py:19-27
Timestamp: 2026-02-25T11:00:02.013Z
Learning: In the test codebase, do not import from conftest.py files. This avoids import ambiguity in pytest. Do not import constants or helpers defined in conftest.py into tests. If a value is needed in both conftest.py and test files, duplicate it in both places or place it in a separate utility module that is importable by tests.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-03-29T13:51:25.599Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 4267
File: tests/storage/cross_cluster_live_migration/test_cclm.py:96-106
Timestamp: 2026-03-29T13:51:25.599Z
Learning: In this repository, follow the existing pytest convention for `pytest.mark.parametrize` argument names: use a single comma-separated string for `argnames` (e.g., `"dv_wait_timeout, vms_for_cclm"`), not a tuple (e.g., `("dv_wait_timeout", "vms_for_cclm")`). Do not flag or suggest changing `argnames` to a tuple. Also note that PT006 is not enforced by Ruff in this repo, so reviewers should not treat PT006 as a reason to alter the `argnames` format.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-12T11:24:13.825Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:50-52
Timestamp: 2026-01-12T11:24:13.825Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when catching exceptions in Python, use LOGGER.error before re-raising and do not replace it with LOGGER.exception in except blocks. This follows the established pattern across the codebase.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-12T14:25:05.723Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3366
File: tests/storage/cdi_clone/test_clone.py:5-9
Timestamp: 2026-01-12T14:25:05.723Z
Learning: In Python tests and utility code across the repository, bitmath.parse_string_unsafe correctly parses Kubernetes quantities (e.g., '4Gi', '512Mi', PVC storage requests) without supplying system=bitmath.NIST. There are 30+ usages indicating this is the standard behavior. Reviewers should verify that code that builds or compares quantity strings does not pass the NIST parameter, and if a new test relies on quantity parsing, assume no NIST parameter is required unless explicitly documented.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-20T01:03:13.139Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:1-8
Timestamp: 2026-01-20T01:03:13.139Z
Learning: In the openshift-virtualization-tests repository, Python imports should consistently use module-level imports for the logging module (i.e., import logging) rather than from logging import ... The established pattern spans 270+ files and should not be flagged for refactoring. Apply this guideline to Python files across the repo (e.g., tests/network/provider_migration/libprovider.py).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-21T21:26:41.805Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3559
File: utilities/infra.py:251-254
Timestamp: 2026-01-21T21:26:41.805Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing Python code, recognize that with Python 3.14 the syntax 'except ValueError, TypeError:' is valid if there is no 'as' clause, and should not be flagged as Python 2 syntax. If you use an 'as' binding (e.g., 'except (ValueError, TypeError) as e:'), parentheses are required. Ensure this pattern is version-consistent and not flagged as Python 2 syntax when 'as' is absent.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-25T13:18:21.675Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:21.675Z
Learning: In reviews of the openshift-virtualization-tests repo (and similar Python code), avoid suggesting minor stylistic changes that require extra verification (e.g., removing dict.keys() checks for membership) unless the change has clear correctness or maintainability impact. Focus on fixes with observable behavior, security, performance, or maintainability benefits; defer low-impact style tweaks that are costly to verify.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-18T06:35:39.536Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3847
File: utilities/virt.py:2449-2453
Timestamp: 2026-02-18T06:35:39.536Z
Learning: In Python code, a function named clearly and self-descriptively can be deemed not to require a docstring. However, treat this as a context-specific guideline and not a universal rule. For public APIs or functions with side effects, prefer concise docstrings explaining behavior, inputs, outputs, and side effects. This guidance is based on the example in utilities/virt.py from RedHatQE/openshift-virtualization-tests where validate_libvirt_persistent_domain(vm, admin_client) was considered self-documenting.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-23T16:33:22.070Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3883
File: utilities/pytest_utils.py:441-463
Timestamp: 2026-02-23T16:33:22.070Z
Learning: In Python code reviews, the guideline to always use named arguments for multi-argument calls does not apply to built-ins or methods that have positional-only parameters (those defined with a / in their signature). Do not flag or require named arguments for calls like dict.get(key, default=None, /), list.pop(), str.split(sep, maxsplit) and similar built-ins that cannot accept keyword arguments. Apply the named-argument rule only to functions/methods that explicitly accept keyword arguments.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In RedHatQE/openshift-virtualization-tests, when reviewing Python files, post targeted inline comments on the Files changed tab at the exact location (file and line) of the issue rather than opening a single discussion thread for multiple issues. This should be done for each applicable location to improve traceability and clarity. If multiple issues exist in the same file, address them with separate inline comments pointing to the specific lines.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CodeRabbit should post targeted inline comments at each applicable location in the Files Changed tab, rather than aggregating multiple issues into a single PR discussion thread reply. This guideline applies to all Python files (any file ending in .py) changed in a PR; for non-Python files, follow the same inline-comment-at-location principle if relevant.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:29.122Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: utilities/console.py:54-59
Timestamp: 2026-05-04T13:45:29.122Z
Learning: During review of RedHatQE/openshift-virtualization-tests “lint-cleanup” PRs (e.g., changes targeting lint issues like stale noqa/utf-8 headers), do not flag existing `# type: ignore` directives that were already present before the PR and were not introduced or modified by the PR. Only raise findings for `# type: ignore` suppressions that the PR itself adds, changes, or otherwise makes newly effective (i.e., they appear in the diff as additions/edits).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:33.892Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: tests/virt/cluster/common_templates/centos/test_centos_os_support.py:78-83
Timestamp: 2026-05-04T13:45:33.892Z
Learning: When reviewing lint-cleanup or formatting-only pull requests in this repo (e.g., changes like removing/updating `# noqa` comments or UTF-8 headers), do not raise findings for code patterns that already existed before the PR. Specifically, if a problematic construct such as `.is_connective(tcp_timeout=120)` was present in the base branch, suppress that finding and only raise issues when the PR itself introduces or modifies that construct (i.e., the diff adds/changes the call or its arguments). Apply this rule across all Python files (`**/*.py`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-05T17:01:15.294Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4739
File: tests/virt/node/descheduler/conftest.py:2-2
Timestamp: 2026-05-05T17:01:15.294Z
Learning: In this repo’s Python code, it’s acceptable (and preferred by convention) to build `run_command` inputs using `shlex.split(f"<command> {arg}")` rather than converting to direct list literals like `['oc', 'adm', 'uncordon', name]`. During code review, generally don’t flag `shlex.split(...)` usage for `run_command` calls and don’t suggest replacing it with list literals; the string-form pattern is used to keep commands readable and consistent with how they’re typed in a terminal.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-08T12:49:20.694Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4788
File: utilities/os_utils.py:257-262
Timestamp: 2026-05-08T12:49:20.694Z
Learning: In RedHatQE/openshift-virtualization-tests, the Ruff flake8-boolean-trap rules FBT001/FBT002 are intentionally not enabled (pyproject.toml does not select the FBT rules; confirmed via `ruff check --show-settings`). Therefore, do not flag boolean positional parameters as FBT001/FBT002 violations in this repository. If Ruff configuration changes and starts selecting FBT rules, this exception should be reconsidered.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-12T05:10:24.601Z
Learnt from: acinko-rh
Repo: RedHatQE/openshift-virtualization-tests PR: 4780
File: tests/storage/utils.py:568-572
Timestamp: 2026-05-12T05:10:24.601Z
Learning: In this repository, Ruff rule UP043 ("unnecessary default type arguments") is enforced. When annotating `collections.abc.Generator` return types, prefer the single-parameter form `Generator[YieldType]` rather than `Generator[YieldType, None, None]`. Explicit `None, None` for the SendType and ReturnType are unnecessary defaults (per PEP 696) and will trigger UP043. Apply this consistently across all Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-13T19:23:09.603Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:25-25
Timestamp: 2026-05-13T19:23:09.603Z
Learning: In this repository, do not recommend adding `from __future__ import annotations` to fix forward-reference type annotation issues (e.g., Ruff UP037). Follow the established convention: use quoted string type annotations for forward references when the referenced class/type is defined later in the same file (e.g., `"ContinuousPing"`), and prefer `typing.Self` for self-referential return types.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:30:56.781Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_bitwarden.py:207-207
Timestamp: 2026-05-18T06:30:56.781Z
Learning: During Ruff/lint rule-enablement PRs in this repository (e.g., when introducing a new rule like PLC0415), it’s acceptable to keep CI green by adding per-line, targeted suppressions for pre-existing violations: add only `# noqa: <single-ruff-rule-id>` at the end of the specific violating line. In this PR context, reviewers should NOT flag these targeted `# noqa: PLC0415` comments as policy violations, assuming the suppression is for a pre-existing issue and is documented in the PR description as a candidate for follow-up cleanup. Do not allow blanket `# noqa` (without a specific rule) or `per-file-ignores`; those remain disallowed.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:12.015Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:12.015Z
Learning: In RedHatQE/openshift-virtualization-tests, if a PR is a Ruff rule-enforcement PR and its “Special notes for reviewer” documents that pre-existing Ruff violations are being temporarily handled via per-line suppressions (e.g., `# noqa: PLC0415`) to keep CI green, reviewers should treat those specific `# noqa: <rule>` comments as an agreed, temporary mechanism. Do not flag them as code-quality issues and do not recommend removing, consolidating, or refactoring those suppressions within the same PR; cleanup/remediation is expected to happen in dedicated follow-up PRs instead.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:15.083Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_data_collector.py:304-304
Timestamp: 2026-05-18T06:31:15.083Z
Learning: When reviewing Python code in this repository for Ruff/linter rule rollouts, do not treat temporary suppression comments as violations in the specific migration scenario where a PR enables a new Ruff rule (e.g., PLC0415) and the PR description explicitly documents that all *pre-existing* violations are being annotated with `# noqa: <RULE>` as a short-lived measure. In that case, only flag `# noqa: <RULE>` suppressions that are newly introduced on code that did not previously violate the rule—i.e., verify via the PR diff against the prior state (and/or prior Ruff findings) that the suppressed line was already violating before the rule was enabled. Ignore suppressions that are covering violations that existed before the new rule rollout and were intentionally bulk-added for cleanup in follow-up PRs.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:20.848Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_hco.py:501-501
Timestamp: 2026-05-18T06:31:20.848Z
Learning: When reviewing Python code in RedHatQE/openshift-virtualization-tests, avoid flagging Ruff `# noqa: <RULE>` suppressions as issues if they were intentionally added as a temporary measure to keep CI green after a PR enables a new Ruff/lint rule (e.g., PLC0415) and the PR description documents this under "Special notes for reviewer". Treat these suppressions as deferred technical debt. Only flag `# noqa: PLC0415` (and similar rule-specific suppressions) when they are newly introduced without an accompanying documented intent in the PR (and thus appear to be masking a new violation rather than a pre-existing one).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T09:09:09.479Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4878
File: utilities/unittests/test_pytest_utils.py:2194-2197
Timestamp: 2026-05-18T09:09:09.479Z
Learning: In this repository (RedHatQE/openshift-virtualization-tests), do not flag missing return type annotations or missing argument type annotations as Ruff “ANN” rule violations (e.g., ANN001/ANN002/ANN201/ANN202). The repo’s Ruff configuration does not enable ANN rules and only uses `extend-select = ["PLC0415"]`, so missing type annotations should not be treated as ANN lint failures during code review.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When using Kubernetes API models like `NodeSelectorRequirement` or `LabelSelectorRequirement` with operators `Exists` or `DoesNotExist`, the `values` field must not be non-empty. It is valid for `values` to be omitted / left as `None` (Python) / passed as `null`—Kubernetes rejects non-empty `values` for these operators, but does not require the field to be present or explicitly set to an empty list. In code reviews, do not treat missing `values=[]` for `Exists`/`DoesNotExist` as a validation issue; only flag cases where `values` is provided with actual elements.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When constructing Kubernetes `NodeSelectorRequirement` (or `LabelSelectorRequirement`) objects in code, do not treat `values` being omitted, `None`, or an empty list as an API-validation problem when the requirement’s operator is `Exists` or `DoesNotExist`. Per the Kubernetes API spec, these operators only require that the `values` array is not non-empty (i.e., it must be empty); they do not require the field to be explicitly present as `[]`. Therefore, reviewers should not flag `values=None`/missing `values` for `Exists`/`DoesNotExist`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-26T15:52:31.613Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 4983
File: utilities/hco.py:376-378
Timestamp: 2026-05-26T15:52:31.613Z
Learning: For Python files in this repo, don’t raise review findings for missing type hints or missing/Google-style docstrings on an existing function when the PR’s only functional change is adding one or more new parameters to that function and the PR does not otherwise refactor or substantially rewrite its body/signature. Treat type-annotation/docstring improvements as out of scope for focused parameter-add PRs and defer them to a follow-up. Only raise missing type-hint or docstring issues when the PR introduces an entirely new function or substantially rewrites an existing one.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-21T20:28:07.727Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 5283
File: tests/network/libs/service.py:14-16
Timestamp: 2026-06-21T20:28:07.727Z
Learning: When reviewing Python code in this repository targeting Python 3.14 with PEP 649 (deferred annotation evaluation using descriptors) enabled by default, do not flag annotations that reference types imported only under `if TYPE_CHECKING:` (e.g., `client: DynamicClient | None = None`) as potential runtime `NameError` problems. With PEP 649 enabled, annotations are not evaluated at function definition time, so these patterns are valid without `from __future__ import annotations`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-09T12:58:50.301Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 5578
File: tests/network/l2_bridge/libl2bridge.py:9-9
Timestamp: 2026-07-09T12:58:50.301Z
Learning: In this repo, follow the established convention for type-only imports: do not require moving `ResourceField` imports from `kubernetes.dynamic.client` behind an `if TYPE_CHECKING:` guard when the imported symbol is used only for type annotations (e.g., in function/class annotations) and not referenced at runtime. Only raise/flag this if `ResourceField` is actually used in executable code (runtime values/calls), since then the import may need to be handled differently.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-28T10:18:34.186Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4944
File: tests/network/bgp/evpn/libevpn.py:29-30
Timestamp: 2026-07-28T10:18:34.186Z
Learning: When reviewing Python call sites of `random_ipv4_address()` and `random_ipv6_address()` (from `libs/net/ip.py`), note that both default to `cidr_required=True`, meaning omitted arguments will return CIDR-formatted IPs (`/24` for IPv4 and `/64` for IPv6). If the caller needs a bare address (no CIDR suffix), require an explicit `cidr_required=False` argument.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-08-03T07:12:46.139Z
Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 5719
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/utils.py:2-2
Timestamp: 2026-08-03T07:12:46.139Z
Learning: In Python modules without `from __future__ import annotations`, do not require annotation-only imports such as `typing.Any` to be moved behind `if TYPE_CHECKING:`. Unquoted annotations are evaluated at runtime, so these imports must remain available unless the annotations are also changed to quoted or otherwise deferred forms.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T10:38:33.820Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4884
File: .coderabbit.yaml:79-80
Timestamp: 2026-05-18T10:38:33.820Z
Learning: In this repo, pytest tests are expected to live only in files named `test_*.py`. When applying CodeRabbit STP case B (newly added `def test_*` inside an existing test file), scope the check to existing files that match `test_*.py` and do not broaden it to newly added `def test_*` found in other non-`test_*.py` Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:28.366Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/scanner.py:42-54
Timestamp: 2026-06-04T13:37:28.366Z
Learning: In this repository, the AGENTS.md guideline requiring use of `pyhelper_utils.shell.run_command` (instead of `subprocess.run`) is intended for test and supporting code under `tests/`, `utilities/`, and `libs/`. For Python files under `scripts/` (e.g., `scripts/polarion_sync/`, `scripts/tests_analyzer/`), do not treat `subprocess.run(...)` usage as a violation of that AGENTS.md guideline; it may be used directly.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:29.897Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/push_gate.py:32-349
Timestamp: 2026-06-04T13:37:29.897Z
Learning: When reviewing Python code under this repo’s `scripts/` directory (e.g., `scripts/**.py`), do not flag `subprocess.run` usage as a violation of the `AGENTS.md` guideline. The `pyhelper_utils.shell.run_command` vs `subprocess.run` rule should only be applied to `tests/` and `utilities/`; treat `scripts/` as explicitly exempt and follow the existing `subprocess.run` usage pattern within `scripts/` packages (e.g., `scripts/tests_analyzer/`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🪛 Ruff (0.16.1)
scripts/coderabbit_retry/coderabbit_retry.py

[warning] 327-327: Logging statement uses f-string

(G004)


[warning] 330-330: Logging statement uses f-string

(G004)

🔇 Additional comments (4)
scripts/coderabbit_retry/tests/test_coderabbit_retry.py (2)

289-291: MEDIUM: Rename the unused injected mock.

mock_process is required by @patch, but this test does not read it. Rename it to _mock_process to mark it as intentionally unused.

Source: Coding guidelines


363-379: LGTM!

scripts/coderabbit_retry/coderabbit_retry.py (2)

214-262: LGTM!


88-88: 🎯 Functional Correctness

No change needed for strftime().

This script targets Python >=3.14, where datetime.strftime(format=...) is supported, so this wording should not block the PR.

			> Likely an incorrect or invalid review comment.

Comment thread scripts/coderabbit_retry/coderabbit_retry.py Outdated
@rnetser

rnetser commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@EdDev please check this one

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.89%. Comparing base (f18201a) to head (572a240).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5877   +/-   ##
=======================================
  Coverage   98.89%   98.89%           
=======================================
  Files          42       42           
  Lines        2631     2631           
=======================================
  Hits         2602     2602           
  Misses         29       29           
Flag Coverage Δ
utilities 98.89% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
scripts/coderabbit_retry/coderabbit_retry.py (2)

305-317: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

HIGH: Add a run-level deadline before scheduling more PRs.

With 200 PRs, five workers, and a 30-second subprocess timeout, rate-limit checks alone can take 20 minutes when they time out. The workflow timeout is 15 minutes. GitHub Actions can terminate the scan before it completes.

Use a monotonic deadline below the workflow timeout. Stop scheduling new PRs when the deadline is reached. Include deadline_reached in the summary. Add a deadline test.

🤖 Prompt for 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.

In `@scripts/coderabbit_retry/coderabbit_retry.py` around lines 305 - 317, Add a
monotonic run-level deadline in the PR processing flow around process_pr and
ThreadPoolExecutor, set below the workflow timeout, and stop submitting
additional PRs once it is reached. Track whether the deadline was reached and
include deadline_reached in the final summary, while preserving completion
handling for already submitted futures. Add a test covering deadline-triggered
scheduling termination.

315-317: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

HIGH: Isolate worker exceptions during result collection.

future.result() re-raises worker failures. One failed PR stops the complete scan. TestMain.test_propagates_unexpected_pr_errors currently locks in this behavior.

Catch and log task failures with the associated PR number. Continue with the remaining futures. Replace the propagation test with a test that verifies later PRs still run.

🤖 Prompt for 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.

In `@scripts/coderabbit_retry/coderabbit_retry.py` around lines 315 - 317, Update
the future-collection loop in the main scan flow around future_to_pr so
exceptions from future.result() are caught and logged with the associated PR
number, then continue processing remaining futures. Preserve retried counting
only for successful truthy results, and replace
TestMain.test_propagates_unexpected_pr_errors with coverage proving later PR
futures still execute after one failure.
🤖 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 `@scripts/coderabbit_retry/coderabbit_retry.py`:
- Around line 87-93: Restrict the candidate search in the query construction and
scheduling flow around search_issues and trigger_review to PRs owned by the
required CodeRabbit bot, excluding all other authors before scheduling. Add an
explicit bounded cap on successful trigger_review calls if the ownership filter
does not guarantee a safe burst size, and add tests covering excluded PRs and
the maximum number of triggers.

---

Duplicate comments:
In `@scripts/coderabbit_retry/coderabbit_retry.py`:
- Around line 305-317: Add a monotonic run-level deadline in the PR processing
flow around process_pr and ThreadPoolExecutor, set below the workflow timeout,
and stop submitting additional PRs once it is reached. Track whether the
deadline was reached and include deadline_reached in the final summary, while
preserving completion handling for already submitted futures. Add a test
covering deadline-triggered scheduling termination.
- Around line 315-317: Update the future-collection loop in the main scan flow
around future_to_pr so exceptions from future.result() are caught and logged
with the associated PR number, then continue processing remaining futures.
Preserve retried counting only for successful truthy results, and replace
TestMain.test_propagates_unexpected_pr_errors with coverage proving later PR
futures still execute after one failure.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 394f5fee-4fff-4845-9893-e6af494baf87

📥 Commits

Reviewing files that changed from the base of the PR and between f574151 and 8af48dc.

📒 Files selected for processing (4)
  • .github/workflows/coderabbit-retry-on-rate-limit.yml
  • .pre-commit-config.yaml
  • scripts/coderabbit_retry/coderabbit_retry.py
  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
⚠️ CI failures not shown inline (2)

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, pre-commit.ci - pr, verified, verify-bugs-are-open, security-suspicious-paths, tox, build-container, security-committer-identity
Missing approved from approvers: myakove, EdDev, jpeimer, dshchedr, vsibirsk, rnetser
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: akalenyu, Ahmad-Hafe, rlobillo, yossisegev, EdDev, frenzyfriday, azhivovk, hmeir, ema-aka-young, OhadRevah, myakove, servolkov, josemacassan, acinko-rh, SamAlber, mijankow, kshvaika, Acedus, Anatw, awels, RoniKishner, dalia-frank, kgoldbla, nirdothan, orelmisan, jpeimer, dshchedr, Dsanatar, akri3i, vsibirsk, geetikakay, albarker-rh.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: verified, cnv-smoke/validation, verify-bugs-are-open, pre-commit.ci - pr, security-suspicious-paths, tox, build-container, security-committer-identity
Missing approved from approvers: myakove, rnetser, jpeimer, dshchedr, vsibirsk, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: akalenyu, Anatw, albarker-rh, kgoldbla, servolkov, rlobillo, vsibirsk, azhivovk, awels, akri3i, nirdothan, ema-aka-young, myakove, RoniKishner, geetikakay, josemacassan, SamAlber, frenzyfriday, Dsanatar, EdDev, acinko-rh, hmeir, kshvaika, Ahmad-Hafe, OhadRevah, Acedus, mijankow, jpeimer, dshchedr, orelmisan, yossisegev, dalia-frank.
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Never add # noqa, # type: ignore, # pylint: disable, or otherwise disable linter/mypy rules; fix the underlying code or obtain explicit user approval.
In test and utility code, use pyhelper_utils.shell.run_command instead of calling subprocess.run directly.
Use ocp-resources classes for OpenShift resources instead of constructing raw YAML dictionaries.
Put type-only imports inside if TYPE_CHECKING: blocks.
Use Google-format docstrings for public functions with non-obvious return values or side effects.
Use absolute imports, prefer specific imports, and do not use bare import module without a from clause.
Use named arguments for function calls with more than one argument.
Do not use single-letter variable names; use descriptive names.
Do not include dead functions, variables, or fixtures; remove unused code. # skip-unused-code is reserved for code excluded by the custom dead-code analysis.
Keep imports at the top of the module and do not import inside functions.
Avoid defensive programming and fake defaults; fail fast, except for destructors/cleanup, explicitly optional Type | None parameters, intentional lazy initialization, platform constants, and unversioned external libraries.
Do not check guaranteed attributes or architecture-guaranteed state, use isinstance rather than hasattr for type discrimination, and do not version-check pinned dependencies.
Log phase transitions, resource operations, configuration changes, API responses, and intermediate state at INFO; unusual or skipped operations at WARNING; and contextual exceptions at ERROR. Never use DEBUG or log secrets, tokens, passwords, or PII. Use f-string formatting.
Re-raise exceptions with context using raise ... from ..., catch specific exception types, never swallow exceptions silently, and provide specific error messages.
Avoid hidden side effects; control behavior through explicit arguments, and never use async/await.
Use context managers for files, connections, ...

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
scripts/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep each standalone script tool in its own subdirectory with an entry point, utilities, and tests; scripts are not part of the pytest test suite.

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
**

⚙️ CodeRabbit configuration file

**: ## Approval Policy
You may approve the PR when ALL of the following are true:

  • All your review comments have been addressed with either:
    • a code/doc change that fixes the issue, or
    • a substantive author response that justifies no code change.
      Thread "resolved" state alone is not sufficient.
      OR you had no review comments.
  • If you posted a test execution plan comment requesting tests, and the PR author replied
    with a comment explaining why the requested tests are not needed or were already covered,
    treat that as an acceptable response — do not block approval on the test plan alone.
  • The author's explanation must be reasonable and specific (not just "N/A" or "not needed").
    Accept explanations like: "these tests were already run in CI", "this change is docs-only",
    "the affected tests are quarantined", or "verified manually on cluster X".

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🧠 Learnings (48)
📚 Learning: 2026-05-19T10:17:37.060Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:13-13
Timestamp: 2026-05-19T10:17:37.060Z
Learning: In RedHatQE/openshift-virtualization-tests, when the PR template validation rule is triggered, avoid posting the PR template violation comment if the PR description already contains the required sections with meaningful content:
- `##### What this PR does / why we need it:`
- `##### Which issue(s) this PR fixes:`
- `##### Special notes for reviewer:`
- `##### jira-ticket:`
Because the current implementation can use a broad `**` path glob and re-run the check per diff context/file, reviewers/automation should verify the actual PR description content before flagging it as a violation or duplicating the comment.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
📚 Learning: 2026-05-20T11:18:31.677Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4867
File: tests/network/libs/stuntime.py:1-1
Timestamp: 2026-05-20T11:18:31.677Z
Learning: In RedHatQE/openshift-virtualization-tests, make the PR template validation (HIGH-severity) heuristic more conservative: if the author explicitly rebuts the “missing template section” finding and confirms the required sections are present with meaningful content, treat the original finding as a false positive and do not re-raise it. Only raise the HIGH-severity flag when a required PR section header (e.g., "##### What this PR does / why we need it:") is clearly absent or its content can be verified as empty/placeholder-only.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
📚 Learning: 2026-06-03T15:08:46.871Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:39-39
Timestamp: 2026-06-03T15:08:46.871Z
Learning: In RedHatQE/openshift-virtualization-tests, GitHub Actions workflow reviewers should follow the repo convention of allowing `uses:` references that are pinned to mutable version tags (e.g., `owner/actionv4`, `owner/actionv5`) and should NOT flag these as security issues. Full commit-SHA pinning for third-party actions is explicitly out of scope for this repository, so do not treat non-SHA `uses:` references as violations.

Applied to files:

  • .github/workflows/coderabbit-retry-on-rate-limit.yml
📚 Learning: 2026-04-24T18:35:11.039Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 4542
File: tests/network/libs/bgp.py:148-177
Timestamp: 2026-04-24T18:35:11.039Z
Learning: In tests/network/libs/bgp.py, do not flag or recommend changing the `create_evpn_frr_configuration` default `label=None`. This is intentional: EVPN RouteAdvertisements use a narrow `frr_configuration_selector` that targets only EVPN-labeled FRRConfigurations, while BGP RouteAdvertisements use an empty (match-all) selector. Because BGP and EVPN FRRConfigurations apply to different routers with disjoint prefix sets, there is no conflict, so `label` does not need to be required.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-04-27T15:30:20.252Z
Learnt from: SamAlber
Repo: RedHatQE/openshift-virtualization-tests PR: 3748
File: tests/storage/cdi_import/test_import_http.py:506-508
Timestamp: 2026-04-27T15:30:20.252Z
Learning: In tests/storage/cdi_import/test_import_http.py, when using pytest parametrize dicts for image paths, prefer referencing explicit image constants (e.g., Images.Windows.WIN2022_IMG) directly rather than deriving the value via lookups like LATEST_WINDOWS_OS_DICT.get("image_path"). This keeps the test inputs immediately visible for readability and failure triage. Do not request changes that replace these explicit constant references with dynamic lookups from LATEST_WINDOWS_OS_DICT.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-05-07T11:11:59.120Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 4162
File: tests/install_upgrade_operators/crypto_policy/constants.py:4-4
Timestamp: 2026-05-07T11:11:59.120Z
Learning: In tests/install_upgrade_operators/crypto_policy/constants.py, treat `MANAGED_CRS_LIST` and `MANAGED_CRS_LIST_WITH_AAQ` as intentionally different scopes. `MANAGED_CRS_LIST` is meant for existing crypto-policy tests and intentionally excludes `AAQ` (it includes only KubeVirt, CDI, NetworkAddonsConfig, SSP). The separate `MANAGED_CRS_LIST_WITH_AAQ` explicitly extends it with `AAQ` (e.g., `[*MANAGED_CRS_LIST, AAQ]`) for AAQ-inclusive tests such as fixtures in conftest.py (e.g., `modern_tls_profile_applied`). Do not raise a review issue claiming `AAQ` is missing from `MANAGED_CRS_LIST`; verify tests use the correct list for their intended scope instead.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-05-18T11:17:18.196Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 4898
File: tests/infrastructure/instance_types/conftest.py:158-162
Timestamp: 2026-05-18T11:17:18.196Z
Learning: In tests/infrastructure/instance_types/conftest.py, do not treat the windows_test_images_namespace_role_binding fixture as an overly permissive RoleBinding. It is intentionally designed to grant the view verb to system:authenticated on the windows-test-images namespace so shared Windows test images are universally readable across all namespaces/tests in the cluster (matching the OpenShift golden-image namespace pattern).

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2026-05-20T09:43:31.397Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4932
File: tests/network/l2_bridge/nad_ref_change/lib_helpers.py:78-91
Timestamp: 2026-05-20T09:43:31.397Z
Learning: In tests/network/l2_bridge/nad_ref_change/lib_helpers.py, inside the bridge_vm() helper, do not raise guidance to use zip(..., strict=True) or to add explicit length-mismatch validation around zip(actual_iface_names, nad_names). The nad_names, ip_addresses, and iface_names inputs are intentionally controlled by each callsite and guaranteed to be aligned by design for this internal test fixture builder.

Applied to files:

  • .pre-commit-config.yaml
📚 Learning: 2025-12-22T16:27:40.244Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3196
File: tests/network/upgrade/test_upgrade_network.py:4-4
Timestamp: 2025-12-22T16:27:40.244Z
Learning: For PRs that remove tests, rely on pytest --collect-only to verify the test discovery results (which tests are selected/deselected) and ensure the removal is clean and the test module remains functional. Full test execution is not required for test deletion PRs. This guideline applies to test files anywhere under the tests/ directory (e.g., tests/network/upgrade/test_upgrade_network.py) and should be used for similar test-deletion scenarios across the repository.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-07T09:52:12.342Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:12.342Z
Learning: When a PR only removes or modifies pytest markers in tests (e.g., removing pytest.mark.post_upgrade) and the test logic remains unchanged, prefer verifying with pytest --collect-only instead of running the full test suite. This validates that marker usage and test selection behavior are preserved. If the test logic changes, or markers affect behavior beyond collection, run the full test suite to confirm.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T13:18:48.808Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3273
File: tests/network/connectivity/test_ovs_linux_bridge.py:5-9
Timestamp: 2026-01-18T13:18:48.808Z
Learning: In tests/network/connectivity/test_ovs_linux_bridge.py and similar test files, prefer importing ipaddress as a module and using qualified calls like ipaddress.ip_interface(...) rather than from ipaddress import ip_interface. This preserves module context for readability, especially when chaining properties (e.g., ipaddress.ip_interface(...).ip). This is an intentional exception to the general rule favoring specific imports, and should apply to test files under the tests directory where module context aids understanding.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T14:51:50.846Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3495
File: tests/network/third_part_ip_request/test_third_party_ip_request.py:4-12
Timestamp: 2026-01-18T14:51:50.846Z
Learning: In the openshift-virtualization-tests repository, tests consistently import pytest as a module (import pytest) and avoid from pytest import ...; this is the established pattern across 398+ test files. Do not flag or refactor imports to use specific pytest names in tests under tests/**. If a file already follows this pattern, leave it as is; this guideline applies broadly to Python test files under the tests directory.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-29T05:30:13.982Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3649
File: tests/network/user_defined_network/ip_specification/libipspec.py:1-4
Timestamp: 2026-01-29T05:30:13.982Z
Learning: In the openshift-virtualization-tests repository, Python imports should use module import style for the standard library 'json' (import json) rather than 'from json import ...'. This improves readability by making calls like json.loads and json.dumps explicit, and aligns with patterns used for modules like logging, ipaddress, cloudinit, and pytest. Apply this to all Python test files under tests/ (and similar test directories).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-02T17:41:12.759Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3690
File: tests/after_cluster_deploy_sanity/test_after_cluster_deploy_sanity.py:65-65
Timestamp: 2026-02-02T17:41:12.759Z
Learning: In test files, keep test_* functions with simple one-line docstrings. For helper functions, utilities, and library code with non-obvious return values or side effects, use Google-style docstrings with Args, Returns, and Side effects sections. Do not require Google-style docstrings for pytest test functions themselves.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-03T07:34:34.184Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 3697
File: tests/infrastructure/instance_types/test_common_vm_instancetype.py:53-98
Timestamp: 2026-02-03T07:34:34.184Z
Learning: In test files (Python, pytest), prefer using tier3 markers for categorization since tier2, tier1, and tier4 are not used in this repository. Do not rely on non-official markers; formalize and document the allowed markers in pytest.ini (or equivalent) to ensure consistent usage. When reviewing new tests, ensure markers align with this convention (only tier3, unless a project-wide decision defines additional tiers) and remove any unnecessary or undocumented markers.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-10T15:04:14.799Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3577
File: tests/virt/conftest.py:251-267
Timestamp: 2026-02-10T15:04:14.799Z
Learning: In Python tests, remove all bare time.sleep() calls. Replace with a waiting mechanism such as TimeoutSampler from the timeout_sampler package or a function decorated with retry (with appropriate timeout/conditions) to ensure determinism and avoid flakiness. This applies to all Python tests under the tests directory (not just this file) to maintain consistent waiting behavior across the suite.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-25T11:00:02.013Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3873
File: tests/network/localnet/test_non_udn_localnet.py:19-27
Timestamp: 2026-02-25T11:00:02.013Z
Learning: In the test codebase, do not import from conftest.py files. This avoids import ambiguity in pytest. Do not import constants or helpers defined in conftest.py into tests. If a value is needed in both conftest.py and test files, duplicate it in both places or place it in a separate utility module that is importable by tests.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-03-29T13:51:25.599Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 4267
File: tests/storage/cross_cluster_live_migration/test_cclm.py:96-106
Timestamp: 2026-03-29T13:51:25.599Z
Learning: In this repository, follow the existing pytest convention for `pytest.mark.parametrize` argument names: use a single comma-separated string for `argnames` (e.g., `"dv_wait_timeout, vms_for_cclm"`), not a tuple (e.g., `("dv_wait_timeout", "vms_for_cclm")`). Do not flag or suggest changing `argnames` to a tuple. Also note that PT006 is not enforced by Ruff in this repo, so reviewers should not treat PT006 as a reason to alter the `argnames` format.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-12T11:24:13.825Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:50-52
Timestamp: 2026-01-12T11:24:13.825Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when catching exceptions in Python, use LOGGER.error before re-raising and do not replace it with LOGGER.exception in except blocks. This follows the established pattern across the codebase.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-12T14:25:05.723Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3366
File: tests/storage/cdi_clone/test_clone.py:5-9
Timestamp: 2026-01-12T14:25:05.723Z
Learning: In Python tests and utility code across the repository, bitmath.parse_string_unsafe correctly parses Kubernetes quantities (e.g., '4Gi', '512Mi', PVC storage requests) without supplying system=bitmath.NIST. There are 30+ usages indicating this is the standard behavior. Reviewers should verify that code that builds or compares quantity strings does not pass the NIST parameter, and if a new test relies on quantity parsing, assume no NIST parameter is required unless explicitly documented.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-20T01:03:13.139Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:1-8
Timestamp: 2026-01-20T01:03:13.139Z
Learning: In the openshift-virtualization-tests repository, Python imports should consistently use module-level imports for the logging module (i.e., import logging) rather than from logging import ... The established pattern spans 270+ files and should not be flagged for refactoring. Apply this guideline to Python files across the repo (e.g., tests/network/provider_migration/libprovider.py).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-21T21:26:41.805Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3559
File: utilities/infra.py:251-254
Timestamp: 2026-01-21T21:26:41.805Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing Python code, recognize that with Python 3.14 the syntax 'except ValueError, TypeError:' is valid if there is no 'as' clause, and should not be flagged as Python 2 syntax. If you use an 'as' binding (e.g., 'except (ValueError, TypeError) as e:'), parentheses are required. Ensure this pattern is version-consistent and not flagged as Python 2 syntax when 'as' is absent.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-25T13:18:21.675Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:21.675Z
Learning: In reviews of the openshift-virtualization-tests repo (and similar Python code), avoid suggesting minor stylistic changes that require extra verification (e.g., removing dict.keys() checks for membership) unless the change has clear correctness or maintainability impact. Focus on fixes with observable behavior, security, performance, or maintainability benefits; defer low-impact style tweaks that are costly to verify.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-18T06:35:39.536Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3847
File: utilities/virt.py:2449-2453
Timestamp: 2026-02-18T06:35:39.536Z
Learning: In Python code, a function named clearly and self-descriptively can be deemed not to require a docstring. However, treat this as a context-specific guideline and not a universal rule. For public APIs or functions with side effects, prefer concise docstrings explaining behavior, inputs, outputs, and side effects. This guidance is based on the example in utilities/virt.py from RedHatQE/openshift-virtualization-tests where validate_libvirt_persistent_domain(vm, admin_client) was considered self-documenting.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-23T16:33:22.070Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3883
File: utilities/pytest_utils.py:441-463
Timestamp: 2026-02-23T16:33:22.070Z
Learning: In Python code reviews, the guideline to always use named arguments for multi-argument calls does not apply to built-ins or methods that have positional-only parameters (those defined with a / in their signature). Do not flag or require named arguments for calls like dict.get(key, default=None, /), list.pop(), str.split(sep, maxsplit) and similar built-ins that cannot accept keyword arguments. Apply the named-argument rule only to functions/methods that explicitly accept keyword arguments.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In RedHatQE/openshift-virtualization-tests, when reviewing Python files, post targeted inline comments on the Files changed tab at the exact location (file and line) of the issue rather than opening a single discussion thread for multiple issues. This should be done for each applicable location to improve traceability and clarity. If multiple issues exist in the same file, address them with separate inline comments pointing to the specific lines.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CodeRabbit should post targeted inline comments at each applicable location in the Files Changed tab, rather than aggregating multiple issues into a single PR discussion thread reply. This guideline applies to all Python files (any file ending in .py) changed in a PR; for non-Python files, follow the same inline-comment-at-location principle if relevant.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:29.122Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: utilities/console.py:54-59
Timestamp: 2026-05-04T13:45:29.122Z
Learning: During review of RedHatQE/openshift-virtualization-tests “lint-cleanup” PRs (e.g., changes targeting lint issues like stale noqa/utf-8 headers), do not flag existing `# type: ignore` directives that were already present before the PR and were not introduced or modified by the PR. Only raise findings for `# type: ignore` suppressions that the PR itself adds, changes, or otherwise makes newly effective (i.e., they appear in the diff as additions/edits).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:33.892Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: tests/virt/cluster/common_templates/centos/test_centos_os_support.py:78-83
Timestamp: 2026-05-04T13:45:33.892Z
Learning: When reviewing lint-cleanup or formatting-only pull requests in this repo (e.g., changes like removing/updating `# noqa` comments or UTF-8 headers), do not raise findings for code patterns that already existed before the PR. Specifically, if a problematic construct such as `.is_connective(tcp_timeout=120)` was present in the base branch, suppress that finding and only raise issues when the PR itself introduces or modifies that construct (i.e., the diff adds/changes the call or its arguments). Apply this rule across all Python files (`**/*.py`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-05T17:01:15.294Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4739
File: tests/virt/node/descheduler/conftest.py:2-2
Timestamp: 2026-05-05T17:01:15.294Z
Learning: In this repo’s Python code, it’s acceptable (and preferred by convention) to build `run_command` inputs using `shlex.split(f"<command> {arg}")` rather than converting to direct list literals like `['oc', 'adm', 'uncordon', name]`. During code review, generally don’t flag `shlex.split(...)` usage for `run_command` calls and don’t suggest replacing it with list literals; the string-form pattern is used to keep commands readable and consistent with how they’re typed in a terminal.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-08T12:49:20.694Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4788
File: utilities/os_utils.py:257-262
Timestamp: 2026-05-08T12:49:20.694Z
Learning: In RedHatQE/openshift-virtualization-tests, the Ruff flake8-boolean-trap rules FBT001/FBT002 are intentionally not enabled (pyproject.toml does not select the FBT rules; confirmed via `ruff check --show-settings`). Therefore, do not flag boolean positional parameters as FBT001/FBT002 violations in this repository. If Ruff configuration changes and starts selecting FBT rules, this exception should be reconsidered.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-12T05:10:24.601Z
Learnt from: acinko-rh
Repo: RedHatQE/openshift-virtualization-tests PR: 4780
File: tests/storage/utils.py:568-572
Timestamp: 2026-05-12T05:10:24.601Z
Learning: In this repository, Ruff rule UP043 ("unnecessary default type arguments") is enforced. When annotating `collections.abc.Generator` return types, prefer the single-parameter form `Generator[YieldType]` rather than `Generator[YieldType, None, None]`. Explicit `None, None` for the SendType and ReturnType are unnecessary defaults (per PEP 696) and will trigger UP043. Apply this consistently across all Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-13T19:23:09.603Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:25-25
Timestamp: 2026-05-13T19:23:09.603Z
Learning: In this repository, do not recommend adding `from __future__ import annotations` to fix forward-reference type annotation issues (e.g., Ruff UP037). Follow the established convention: use quoted string type annotations for forward references when the referenced class/type is defined later in the same file (e.g., `"ContinuousPing"`), and prefer `typing.Self` for self-referential return types.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:30:56.781Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_bitwarden.py:207-207
Timestamp: 2026-05-18T06:30:56.781Z
Learning: During Ruff/lint rule-enablement PRs in this repository (e.g., when introducing a new rule like PLC0415), it’s acceptable to keep CI green by adding per-line, targeted suppressions for pre-existing violations: add only `# noqa: <single-ruff-rule-id>` at the end of the specific violating line. In this PR context, reviewers should NOT flag these targeted `# noqa: PLC0415` comments as policy violations, assuming the suppression is for a pre-existing issue and is documented in the PR description as a candidate for follow-up cleanup. Do not allow blanket `# noqa` (without a specific rule) or `per-file-ignores`; those remain disallowed.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:12.015Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:12.015Z
Learning: In RedHatQE/openshift-virtualization-tests, if a PR is a Ruff rule-enforcement PR and its “Special notes for reviewer” documents that pre-existing Ruff violations are being temporarily handled via per-line suppressions (e.g., `# noqa: PLC0415`) to keep CI green, reviewers should treat those specific `# noqa: <rule>` comments as an agreed, temporary mechanism. Do not flag them as code-quality issues and do not recommend removing, consolidating, or refactoring those suppressions within the same PR; cleanup/remediation is expected to happen in dedicated follow-up PRs instead.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:15.083Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_data_collector.py:304-304
Timestamp: 2026-05-18T06:31:15.083Z
Learning: When reviewing Python code in this repository for Ruff/linter rule rollouts, do not treat temporary suppression comments as violations in the specific migration scenario where a PR enables a new Ruff rule (e.g., PLC0415) and the PR description explicitly documents that all *pre-existing* violations are being annotated with `# noqa: <RULE>` as a short-lived measure. In that case, only flag `# noqa: <RULE>` suppressions that are newly introduced on code that did not previously violate the rule—i.e., verify via the PR diff against the prior state (and/or prior Ruff findings) that the suppressed line was already violating before the rule was enabled. Ignore suppressions that are covering violations that existed before the new rule rollout and were intentionally bulk-added for cleanup in follow-up PRs.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:20.848Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_hco.py:501-501
Timestamp: 2026-05-18T06:31:20.848Z
Learning: When reviewing Python code in RedHatQE/openshift-virtualization-tests, avoid flagging Ruff `# noqa: <RULE>` suppressions as issues if they were intentionally added as a temporary measure to keep CI green after a PR enables a new Ruff/lint rule (e.g., PLC0415) and the PR description documents this under "Special notes for reviewer". Treat these suppressions as deferred technical debt. Only flag `# noqa: PLC0415` (and similar rule-specific suppressions) when they are newly introduced without an accompanying documented intent in the PR (and thus appear to be masking a new violation rather than a pre-existing one).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T09:09:09.479Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4878
File: utilities/unittests/test_pytest_utils.py:2194-2197
Timestamp: 2026-05-18T09:09:09.479Z
Learning: In this repository (RedHatQE/openshift-virtualization-tests), do not flag missing return type annotations or missing argument type annotations as Ruff “ANN” rule violations (e.g., ANN001/ANN002/ANN201/ANN202). The repo’s Ruff configuration does not enable ANN rules and only uses `extend-select = ["PLC0415"]`, so missing type annotations should not be treated as ANN lint failures during code review.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When using Kubernetes API models like `NodeSelectorRequirement` or `LabelSelectorRequirement` with operators `Exists` or `DoesNotExist`, the `values` field must not be non-empty. It is valid for `values` to be omitted / left as `None` (Python) / passed as `null`—Kubernetes rejects non-empty `values` for these operators, but does not require the field to be present or explicitly set to an empty list. In code reviews, do not treat missing `values=[]` for `Exists`/`DoesNotExist` as a validation issue; only flag cases where `values` is provided with actual elements.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When constructing Kubernetes `NodeSelectorRequirement` (or `LabelSelectorRequirement`) objects in code, do not treat `values` being omitted, `None`, or an empty list as an API-validation problem when the requirement’s operator is `Exists` or `DoesNotExist`. Per the Kubernetes API spec, these operators only require that the `values` array is not non-empty (i.e., it must be empty); they do not require the field to be explicitly present as `[]`. Therefore, reviewers should not flag `values=None`/missing `values` for `Exists`/`DoesNotExist`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-26T15:52:31.613Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 4983
File: utilities/hco.py:376-378
Timestamp: 2026-05-26T15:52:31.613Z
Learning: For Python files in this repo, don’t raise review findings for missing type hints or missing/Google-style docstrings on an existing function when the PR’s only functional change is adding one or more new parameters to that function and the PR does not otherwise refactor or substantially rewrite its body/signature. Treat type-annotation/docstring improvements as out of scope for focused parameter-add PRs and defer them to a follow-up. Only raise missing type-hint or docstring issues when the PR introduces an entirely new function or substantially rewrites an existing one.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-21T20:28:07.727Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 5283
File: tests/network/libs/service.py:14-16
Timestamp: 2026-06-21T20:28:07.727Z
Learning: When reviewing Python code in this repository targeting Python 3.14 with PEP 649 (deferred annotation evaluation using descriptors) enabled by default, do not flag annotations that reference types imported only under `if TYPE_CHECKING:` (e.g., `client: DynamicClient | None = None`) as potential runtime `NameError` problems. With PEP 649 enabled, annotations are not evaluated at function definition time, so these patterns are valid without `from __future__ import annotations`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-09T12:58:50.301Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 5578
File: tests/network/l2_bridge/libl2bridge.py:9-9
Timestamp: 2026-07-09T12:58:50.301Z
Learning: In this repo, follow the established convention for type-only imports: do not require moving `ResourceField` imports from `kubernetes.dynamic.client` behind an `if TYPE_CHECKING:` guard when the imported symbol is used only for type annotations (e.g., in function/class annotations) and not referenced at runtime. Only raise/flag this if `ResourceField` is actually used in executable code (runtime values/calls), since then the import may need to be handled differently.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-28T10:18:34.186Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4944
File: tests/network/bgp/evpn/libevpn.py:29-30
Timestamp: 2026-07-28T10:18:34.186Z
Learning: When reviewing Python call sites of `random_ipv4_address()` and `random_ipv6_address()` (from `libs/net/ip.py`), note that both default to `cidr_required=True`, meaning omitted arguments will return CIDR-formatted IPs (`/24` for IPv4 and `/64` for IPv6). If the caller needs a bare address (no CIDR suffix), require an explicit `cidr_required=False` argument.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-08-03T07:12:46.139Z
Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 5719
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/utils.py:2-2
Timestamp: 2026-08-03T07:12:46.139Z
Learning: In Python modules without `from __future__ import annotations`, do not require annotation-only imports such as `typing.Any` to be moved behind `if TYPE_CHECKING:`. Unquoted annotations are evaluated at runtime, so these imports must remain available unless the annotations are also changed to quoted or otherwise deferred forms.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T10:38:33.820Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4884
File: .coderabbit.yaml:79-80
Timestamp: 2026-05-18T10:38:33.820Z
Learning: In this repo, pytest tests are expected to live only in files named `test_*.py`. When applying CodeRabbit STP case B (newly added `def test_*` inside an existing test file), scope the check to existing files that match `test_*.py` and do not broaden it to newly added `def test_*` found in other non-`test_*.py` Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:28.366Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/scanner.py:42-54
Timestamp: 2026-06-04T13:37:28.366Z
Learning: In this repository, the AGENTS.md guideline requiring use of `pyhelper_utils.shell.run_command` (instead of `subprocess.run`) is intended for test and supporting code under `tests/`, `utilities/`, and `libs/`. For Python files under `scripts/` (e.g., `scripts/polarion_sync/`, `scripts/tests_analyzer/`), do not treat `subprocess.run(...)` usage as a violation of that AGENTS.md guideline; it may be used directly.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:29.897Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/push_gate.py:32-349
Timestamp: 2026-06-04T13:37:29.897Z
Learning: When reviewing Python code under this repo’s `scripts/` directory (e.g., `scripts/**.py`), do not flag `subprocess.run` usage as a violation of the `AGENTS.md` guideline. The `pyhelper_utils.shell.run_command` vs `subprocess.run` rule should only be applied to `tests/` and `utilities/`; treat `scripts/` as explicitly exempt and follow the existing `subprocess.run` usage pattern within `scripts/` packages (e.g., `scripts/tests_analyzer/`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🪛 ast-grep (0.45.0)
scripts/coderabbit_retry/tests/test_coderabbit_retry.py

[info] 102-102: use jsonify instead of json.dumps for JSON output
Context: json.dumps(payload)
Note: [CWE-116] Improper Encoding or Escaping of Output.

(use-jsonify)

🪛 Ruff (0.16.1)
scripts/coderabbit_retry/tests/test_coderabbit_retry.py

[warning] 234-234: Fixture _mock_review without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 234-234: Fixture _mock_trigger without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 293-293: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 293-293: Unused method argument: mock_process

(ARG002)


[warning] 302-302: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 313-313: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 334-334: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 349-349: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)

scripts/coderabbit_retry/coderabbit_retry.py

[warning] 92-92: Logging statement uses f-string

(G004)


[warning] 111-111: Logging statement uses f-string

(G004)


[warning] 119-119: Logging statement uses f-string

(G004)


[warning] 122-122: Logging statement uses f-string

(G004)


[warning] 149-149: Logging statement uses f-string

(G004)


[warning] 153-153: Logging statement uses f-string

(G004)


[warning] 159-159: Logging statement uses f-string

(G004)


[warning] 163-163: Logging statement uses f-string

(G004)


[warning] 185-186: Use a single if statement instead of nested if statements

(SIM102)


[warning] 189-189: Logging statement uses f-string

(G004)


[warning] 206-206: Consider moving this statement to an else block

(TRY300)


[warning] 208-208: Logging statement uses f-string

(G004)


[warning] 212-212: Too many return statements (8 > 6)

(PLR0911)


[warning] 223-223: Logging statement uses f-string

(G004)


[warning] 227-227: Logging statement uses f-string

(G004)


[warning] 233-233: Logging statement uses f-string

(G004)


[warning] 239-239: Logging statement uses f-string

(G004)


[warning] 244-244: Logging statement uses f-string

(G004)


[warning] 249-249: Logging statement uses f-string

(G004)


[warning] 252-252: Logging statement uses f-string

(G004)


[warning] 255-255: Logging statement uses f-string

(G004)


[warning] 259-259: Logging statement uses f-string

(G004)


[warning] 284-284: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


[warning] 284-284: Logging statement uses f-string

(G004)


[warning] 290-290: Use logging.exception instead of logging.error

Replace with exception

(TRY400)


[warning] 290-290: Logging statement uses f-string

(G004)


[warning] 293-293: Logging statement uses f-string

(G004)


[warning] 298-298: Logging statement uses f-string

(G004)


[warning] 319-319: Logging statement uses f-string

(G004)

🪛 zizmor (1.29.0)
.github/workflows/coderabbit-retry-on-rate-limit.yml

[error] 38-38: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 48-48: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

Comment thread scripts/coderabbit_retry/coderabbit_retry.py
@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai[bot]

The following review comments were reviewed and a decision was made:

scripts/coderabbit_retry/coderabbit_retry.py:305 (duplicate) — HIGH: Add a run-level deadline before scheduling more PRs.

Skipped: By design: GHA timeout-minutes: 15 is the deadline. The script is idempotent — the next scheduled run (every 20 min) picks up remaining PRs. No state is lost.

scripts/coderabbit_retry/coderabbit_retry.py:315 (duplicate) — HIGH: Isolate worker exceptions during result collection.

Addressed: Added per-PR GithubException catch in the futures loop. Failed PRs are logged with PR number and skipped. Remaining futures continue processing. Updated test to verify isolation.


Assisted-by: PI (claude-opus-4-6-1m)

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

ast-grep outline scripts/coderabbit_retry/coderabbit_retry.py --items all --type function --view expanded
printf '\n--- main, scheduling, and future handling ---\n'
rg -n -C 12 'def main|ThreadPoolExecutor|as_completed|future\.result|GithubException|RUN_DEADLINE|deadline|submit\(' \
  scripts/coderabbit_retry/coderabbit_retry.py
printf '\n--- workflow execution boundary ---\n'
cat -n .github/workflows/coderabbit-retry-on-rate-limit.yml
printf '\n--- related test coverage ---\n'
rg -n -C 8 'GithubException|as_completed|future|deadline|timeout-minutes|remaining futures|contin' \
  scripts/coderabbit_retry/tests

Length of output: 18134


@rnetser HIGH: I verified both changes. I cannot mark either finding as addressed.

  1. Run-level deadline remains unresolved.
    .github/workflows/coderabbit-retry-on-rate-limit.yml sets timeout-minutes: 15, but main() submits all entries in to_process at scripts/coderabbit_retry/coderabbit_retry.py:305-314 before it waits for results. Fast API and CLI responses can therefore schedule every eligible PR well before the job timeout. The workflow timeout terminates the job. It does not bound review scheduling.

  2. Worker-exception isolation is incomplete.
    The handler at scripts/coderabbit_retry/coderabbit_retry.py:317-321 correctly catches GithubException. The added test verifies that case. However, another exception from process_pr() still escapes future.result() and stops result collection. To meet the stated per-PR failure isolation, catch and log unexpected Exception values there as well.

try:
    if future.result():
        retried += 1
except GithubException as error:
    LOGGER.warning(f"PR #{pr_number}: processing failed: {error}")
except Exception:
    LOGGER.exception(f"PR #{pr_number}: unexpected processing failure")

The existing test should add a non-GithubException worker failure and verify that the remaining PR still completes.


✏️ Learnings added
Learnt from: rnetser
URL: https://github.com/RedHatQE/openshift-virtualization-tests/pull/5877

Timestamp: 2026-08-09T15:15:52.858Z
Learning: For `scripts/coderabbit_retry/coderabbit_retry.py`, the retry workflow intentionally uses the GitHub Actions `timeout-minutes: 15` job limit and runs every 20 minutes. The script is intended to be idempotent, so a later scheduled run can retry work that an earlier job did not complete.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Actionable comments posted: 1

🤖 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 `@scripts/coderabbit_retry/tests/test_coderabbit_retry.py`:
- Around line 339-342: Update the process_side_effect callback to remove the
unused repo_name and repo parameters while preserving pr_number explicitly;
accept the remaining keyword arguments through a named unused-parameters mapping
so the callback signature remains compatible and Ruff no longer reports ARG001.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: caedeb88-f26e-4df9-b8ac-2533898633ac

📥 Commits

Reviewing files that changed from the base of the PR and between 8af48dc and 602a907.

📒 Files selected for processing (2)
  • scripts/coderabbit_retry/coderabbit_retry.py
  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (22)
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: build-container
  • GitHub Check: verify-bugs-are-open
  • GitHub Check: tox
  • GitHub Check: security-suspicious-paths
  • GitHub Check: security-committer-identity
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
  • GitHub Check: can-be-merged
⚠️ CI failures not shown inline (18)

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, verified
Missing approved from approvers: jpeimer, myakove, EdDev, vsibirsk, dshchedr, rnetser
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: mijankow, yossisegev, OhadRevah, josemacassan, geetikakay, servolkov, vsibirsk, kshvaika, RoniKishner, ema-aka-young, Anatw, nirdothan, azhivovk, myakove, Ahmad-Hafe, orelmisan, hmeir, SamAlber, albarker-rh, rlobillo, Dsanatar, akri3i, EdDev, acinko-rh, Acedus, jpeimer, akalenyu, dalia-frank, frenzyfriday, dshchedr, kgoldbla, awels.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, verified
Missing approved from approvers: EdDev, jpeimer, dshchedr, myakove, rnetser, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: servolkov, OhadRevah, RoniKishner, jpeimer, kgoldbla, kshvaika, geetikakay, Dsanatar, akri3i, rlobillo, hmeir, dalia-frank, dshchedr, myakove, vsibirsk, akalenyu, yossisegev, frenzyfriday, EdDev, Anatw, Ahmad-Hafe, ema-aka-young, nirdothan, mijankow, SamAlber, albarker-rh, acinko-rh, josemacassan, Acedus, awels, azhivovk, orelmisan.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, build-container, tox, verified
Missing approved from approvers: EdDev, jpeimer, dshchedr, myakove, rnetser, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: servolkov, OhadRevah, RoniKishner, jpeimer, kgoldbla, kshvaika, geetikakay, Dsanatar, akri3i, rlobillo, hmeir, dalia-frank, dshchedr, myakove, vsibirsk, akalenyu, yossisegev, frenzyfriday, EdDev, Anatw, Ahmad-Hafe, ema-aka-young, nirdothan, mijankow, SamAlber, albarker-rh, acinko-rh, josemacassan, Acedus, awels, azhivovk, orelmisan.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, verify-bugs-are-open, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, build-container, verify-bugs-are-open, tox, verified
Missing approved from approvers: jpeimer, myakove, vsibirsk, rnetser, dshchedr, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: acinko-rh, SamAlber, jpeimer, orelmisan, Ahmad-Hafe, dalia-frank, kgoldbla, azhivovk, akalenyu, servolkov, mijankow, Acedus, kshvaika, rlobillo, RoniKishner, OhadRevah, Anatw, frenzyfriday, dshchedr, hmeir, albarker-rh, akri3i, nirdothan, vsibirsk, awels, yossisegev, EdDev, myakove, geetikakay, Dsanatar, ema-aka-young, josemacassan.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, verify-bugs-are-open, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, build-container, verify-bugs-are-open, tox, verified
Missing approved from approvers: EdDev, jpeimer, dshchedr, myakove, rnetser, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: servolkov, OhadRevah, RoniKishner, jpeimer, kgoldbla, kshvaika, geetikakay, Dsanatar, akri3i, rlobillo, hmeir, dalia-frank, dshchedr, myakove, vsibirsk, akalenyu, yossisegev, frenzyfriday, EdDev, Anatw, Ahmad-Hafe, ema-aka-young, nirdothan, mijankow, SamAlber, albarker-rh, acinko-rh, josemacassan, Acedus, awels, azhivovk, orelmisan.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some required check runs in progress build-container, verify-bugs-are-open, tox
Some check runs failed: security-suspicious-paths
Some check runs not started: cnv-smoke/validation, build-container, verify-bugs-are-open, tox, verified
Missing approved from approvers: myakove, rnetser, jpeimer, dshchedr, vsibirsk, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: akalenyu, Anatw, albarker-rh, kgoldbla, servolkov, rlobillo, vsibirsk, azhivovk, awels, akri3i, nirdothan, ema-aka-young, myakove, RoniKishner, geetikakay, josemacassan, SamAlber, frenzyfriday, Dsanatar, EdDev, acinko-rh, hmeir, kshvaika, Ahmad-Hafe, OhadRevah, Acedus, mijankow, jpeimer, dshchedr, orelmisan, yossisegev, dalia-frank.

GitHub Check: security-suspicious-paths: ❌ Security: Suspicious Paths Detected

Conclusion: failure

View job details

10 file(s) modify security-sensitive paths
## Suspicious Path Detection
This PR modifies files in security-sensitive locations:
- `.github/workflows/close-stale-prs.yml`
- `.github/workflows/coderabbit-retry-on-rate-limit.yml`
- `.github/workflows/component-builder-publish.yml`
- `.github/workflows/component-builder.yml`
- `.github/workflows/deploy-docs.yml`
- `.github/workflows/labeler.yml`
- `.github/workflows/net-utils-builder-staging.yml`
- `.github/workflows/net-utils-promote.yml`
- `.github/workflows/utilities-unit-tests.yml`
- `.github/workflows/validate-coderabbit-schema.yml`
**Configured suspicious path prefixes:**
- `.claude/`
- `.vscode/`
- `.cursor/`
- `.devcontainer/`
- `.pi/`
- `.github/workflows/`
- `.github/actions/`
These paths control development tooling, CI/CD workflows, or IDE configurations and require careful review to prevent supply-chain attacks.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: EdDev, dshchedr, myakove, vsibirsk, rnetser, jpeimer
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: azhivovk, RoniKishner, yossisegev, Dsanatar, dalia-frank, acinko-rh, Anatw, frenzyfriday, kshvaika, geetikakay, OhadRevah, EdDev, akalenyu, myakove, nirdothan, albarker-rh, mijankow, vsibirsk, akri3i, dshchedr, orelmisan, awels, Ahmad-Hafe, SamAlber, Acedus, rlobillo, jpeimer, hmeir, kgoldbla, josemacassan, servolkov, ema-aka-young.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: myakove, rnetser, vsibirsk, dshchedr, jpeimer, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, SamAlber, ema-aka-young, OhadRevah, Ahmad-Hafe, jpeimer, Acedus, Dsanatar, acinko-rh, akri3i, mijankow, servolkov, josemacassan, kgoldbla, albarker-rh, yossisegev, azhivovk, awels, hmeir, geetikakay, dalia-frank, akalenyu, frenzyfriday, Anatw, myakove, vsibirsk, dshchedr, rlobillo, nirdothan, kshvaika, orelmisan, EdDev.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing required labels: tox:verify-tc-requirement-polarion:passed
Missing approved from approvers: dshchedr, rnetser, EdDev, jpeimer, vsibirsk, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: albarker-rh, mijankow, awels, akalenyu, frenzyfriday, acinko-rh, kgoldbla, RoniKishner, Dsanatar, Acedus, akri3i, ema-aka-young, Ahmad-Hafe, dalia-frank, myakove, SamAlber, Anatw, geetikakay, azhivovk, josemacassan, jpeimer, nirdothan, yossisegev, kshvaika, dshchedr, EdDev, vsibirsk, servolkov, hmeir, OhadRevah, orelmisan, rlobillo.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing required labels: tox:verify-tc-requirement-polarion:passed
Missing approved from approvers: myakove, jpeimer, rnetser, dshchedr, vsibirsk, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, SamAlber, jpeimer, OhadRevah, geetikakay, kshvaika, frenzyfriday, nirdothan, acinko-rh, EdDev, Dsanatar, myakove, dalia-frank, Ahmad-Hafe, akalenyu, Acedus, azhivovk, albarker-rh, vsibirsk, kgoldbla, akri3i, servolkov, yossisegev, ema-aka-young, josemacassan, rlobillo, hmeir, awels, Anatw, orelmisan, mijankow, dshchedr.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing required labels: tox:verify-tc-requirement-polarion:passed
Missing approved from approvers: jpeimer, EdDev, myakove, rnetser, vsibirsk, dshchedr
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: azhivovk, awels, servolkov, Anatw, albarker-rh, hmeir, OhadRevah, dshchedr, kgoldbla, kshvaika, Dsanatar, frenzyfriday, geetikakay, akri3i, mijankow, Ahmad-Hafe, josemacassan, ema-aka-young, jpeimer, orelmisan, EdDev, acinko-rh, rlobillo, Acedus, yossisegev, SamAlber, myakove, nirdothan, dalia-frank, akalenyu, vsibirsk, RoniKishner.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing required labels: tox:verify-tc-requirement-polarion:passed
Missing approved from approvers: myakove, jpeimer, rnetser, dshchedr, vsibirsk, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: RoniKishner, SamAlber, jpeimer, OhadRevah, geetikakay, kshvaika, frenzyfriday, nirdothan, acinko-rh, EdDev, Dsanatar, myakove, dalia-frank, Ahmad-Hafe, akalenyu, Acedus, azhivovk, albarker-rh, vsibirsk, kgoldbla, akri3i, servolkov, yossisegev, ema-aka-young, josemacassan, rlobillo, hmeir, awels, Anatw, orelmisan, mijankow, dshchedr.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: dshchedr, jpeimer, rnetser, vsibirsk, EdDev, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: SamAlber, Dsanatar, mijankow, frenzyfriday, akalenyu, jpeimer, myakove, orelmisan, Anatw, acinko-rh, dalia-frank, vsibirsk, akri3i, Acedus, yossisegev, awels, geetikakay, nirdothan, dshchedr, rlobillo, kshvaika, RoniKishner, hmeir, Ahmad-Hafe, servolkov, albarker-rh, azhivovk, kgoldbla, ema-aka-young, EdDev, OhadRevah, josemacassan.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: dshchedr, vsibirsk, rnetser, jpeimer, EdDev, myakove
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: geetikakay, nirdothan, dshchedr, josemacassan, akri3i, hmeir, kshvaika, Anatw, mijankow, myakove, rlobillo, orelmisan, SamAlber, frenzyfriday, kgoldbla, servolkov, ema-aka-young, vsibirsk, dalia-frank, azhivovk, RoniKishner, EdDev, awels, albarker-rh, akalenyu, Ahmad-Hafe, OhadRevah, Dsanatar, Acedus, jpeimer, yossisegev, acinko-rh.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: myakove, rnetser, jpeimer, dshchedr, vsibirsk, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: akalenyu, Anatw, albarker-rh, kgoldbla, servolkov, rlobillo, vsibirsk, azhivovk, awels, akri3i, nirdothan, ema-aka-young, myakove, RoniKishner, geetikakay, josemacassan, SamAlber, frenzyfriday, Dsanatar, EdDev, acinko-rh, hmeir, kshvaika, Ahmad-Hafe, OhadRevah, Acedus, mijankow, jpeimer, dshchedr, orelmisan, yossisegev, dalia-frank.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: rnetser, dshchedr, myakove, EdDev, jpeimer, vsibirsk
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: dshchedr, azhivovk, EdDev, ema-aka-young, jpeimer, rlobillo, myakove, RoniKishner, OhadRevah, akri3i, awels, hmeir, dalia-frank, kshvaika, yossisegev, Ahmad-Hafe, frenzyfriday, orelmisan, geetikakay, acinko-rh, nirdothan, albarker-rh, Acedus, SamAlber, josemacassan, servolkov, kgoldbla, mijankow, vsibirsk, Dsanatar, Anatw, akalenyu.

GitHub Check: can-be-merged: Check if can be merged

Conclusion: failure

View job details

Some check runs not started: cnv-smoke/validation, verified, verify-bugs-are-open, security-suspicious-paths, security-committer-identity, build-container, tox
Missing approved from approvers: jpeimer, myakove, vsibirsk, rnetser, dshchedr, EdDev
Missing lgtm from reviewers. Minimum 2 required, (0 given). Reviewers: acinko-rh, SamAlber, jpeimer, orelmisan, Ahmad-Hafe, dalia-frank, kgoldbla, azhivovk, akalenyu, servolkov, mijankow, Acedus, kshvaika, rlobillo, RoniKishner, OhadRevah, Anatw, frenzyfriday, dshchedr, hmeir, albarker-rh, akri3i, nirdothan, vsibirsk, awels, yossisegev, EdDev, myakove, geetikakay, Dsanatar, ema-aka-young, josemacassan.
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Never add # noqa, # type: ignore, # pylint: disable, or otherwise disable linter/mypy rules; fix the underlying code or obtain explicit user approval.
In test and utility code, use pyhelper_utils.shell.run_command instead of calling subprocess.run directly.
Use ocp-resources classes for OpenShift resources instead of constructing raw YAML dictionaries.
Put type-only imports inside if TYPE_CHECKING: blocks.
Use Google-format docstrings for public functions with non-obvious return values or side effects.
Use absolute imports, prefer specific imports, and do not use bare import module without a from clause.
Use named arguments for function calls with more than one argument.
Do not use single-letter variable names; use descriptive names.
Do not include dead functions, variables, or fixtures; remove unused code. # skip-unused-code is reserved for code excluded by the custom dead-code analysis.
Keep imports at the top of the module and do not import inside functions.
Avoid defensive programming and fake defaults; fail fast, except for destructors/cleanup, explicitly optional Type | None parameters, intentional lazy initialization, platform constants, and unversioned external libraries.
Do not check guaranteed attributes or architecture-guaranteed state, use isinstance rather than hasattr for type discrimination, and do not version-check pinned dependencies.
Log phase transitions, resource operations, configuration changes, API responses, and intermediate state at INFO; unusual or skipped operations at WARNING; and contextual exceptions at ERROR. Never use DEBUG or log secrets, tokens, passwords, or PII. Use f-string formatting.
Re-raise exceptions with context using raise ... from ..., catch specific exception types, never swallow exceptions silently, and provide specific error messages.
Avoid hidden side effects; control behavior through explicit arguments, and never use async/await.
Use context managers for files, connections, ...

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
scripts/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep each standalone script tool in its own subdirectory with an entry point, utilities, and tests; scripts are not part of the pytest test suite.

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
**

⚙️ CodeRabbit configuration file

**: ## Approval Policy
You may approve the PR when ALL of the following are true:

  • All your review comments have been addressed with either:
    • a code/doc change that fixes the issue, or
    • a substantive author response that justifies no code change.
      Thread "resolved" state alone is not sufficient.
      OR you had no review comments.
  • If you posted a test execution plan comment requesting tests, and the PR author replied
    with a comment explaining why the requested tests are not needed or were already covered,
    treat that as an acceptable response — do not block approval on the test plan alone.
  • The author's explanation must be reasonable and specific (not just "N/A" or "not needed").
    Accept explanations like: "these tests were already run in CI", "this change is docs-only",
    "the affected tests are quarantined", or "verified manually on cluster X".

Files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🧠 Learnings (40)
📚 Learning: 2025-12-22T16:27:40.244Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3196
File: tests/network/upgrade/test_upgrade_network.py:4-4
Timestamp: 2025-12-22T16:27:40.244Z
Learning: For PRs that remove tests, rely on pytest --collect-only to verify the test discovery results (which tests are selected/deselected) and ensure the removal is clean and the test module remains functional. Full test execution is not required for test deletion PRs. This guideline applies to test files anywhere under the tests/ directory (e.g., tests/network/upgrade/test_upgrade_network.py) and should be used for similar test-deletion scenarios across the repository.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-07T09:52:12.342Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:12.342Z
Learning: When a PR only removes or modifies pytest markers in tests (e.g., removing pytest.mark.post_upgrade) and the test logic remains unchanged, prefer verifying with pytest --collect-only instead of running the full test suite. This validates that marker usage and test selection behavior are preserved. If the test logic changes, or markers affect behavior beyond collection, run the full test suite to confirm.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T13:18:48.808Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3273
File: tests/network/connectivity/test_ovs_linux_bridge.py:5-9
Timestamp: 2026-01-18T13:18:48.808Z
Learning: In tests/network/connectivity/test_ovs_linux_bridge.py and similar test files, prefer importing ipaddress as a module and using qualified calls like ipaddress.ip_interface(...) rather than from ipaddress import ip_interface. This preserves module context for readability, especially when chaining properties (e.g., ipaddress.ip_interface(...).ip). This is an intentional exception to the general rule favoring specific imports, and should apply to test files under the tests directory where module context aids understanding.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-18T14:51:50.846Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3495
File: tests/network/third_part_ip_request/test_third_party_ip_request.py:4-12
Timestamp: 2026-01-18T14:51:50.846Z
Learning: In the openshift-virtualization-tests repository, tests consistently import pytest as a module (import pytest) and avoid from pytest import ...; this is the established pattern across 398+ test files. Do not flag or refactor imports to use specific pytest names in tests under tests/**. If a file already follows this pattern, leave it as is; this guideline applies broadly to Python test files under the tests directory.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-29T05:30:13.982Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3649
File: tests/network/user_defined_network/ip_specification/libipspec.py:1-4
Timestamp: 2026-01-29T05:30:13.982Z
Learning: In the openshift-virtualization-tests repository, Python imports should use module import style for the standard library 'json' (import json) rather than 'from json import ...'. This improves readability by making calls like json.loads and json.dumps explicit, and aligns with patterns used for modules like logging, ipaddress, cloudinit, and pytest. Apply this to all Python test files under tests/ (and similar test directories).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-02T17:41:12.759Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3690
File: tests/after_cluster_deploy_sanity/test_after_cluster_deploy_sanity.py:65-65
Timestamp: 2026-02-02T17:41:12.759Z
Learning: In test files, keep test_* functions with simple one-line docstrings. For helper functions, utilities, and library code with non-obvious return values or side effects, use Google-style docstrings with Args, Returns, and Side effects sections. Do not require Google-style docstrings for pytest test functions themselves.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-03T07:34:34.184Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 3697
File: tests/infrastructure/instance_types/test_common_vm_instancetype.py:53-98
Timestamp: 2026-02-03T07:34:34.184Z
Learning: In test files (Python, pytest), prefer using tier3 markers for categorization since tier2, tier1, and tier4 are not used in this repository. Do not rely on non-official markers; formalize and document the allowed markers in pytest.ini (or equivalent) to ensure consistent usage. When reviewing new tests, ensure markers align with this convention (only tier3, unless a project-wide decision defines additional tiers) and remove any unnecessary or undocumented markers.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-10T15:04:14.799Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3577
File: tests/virt/conftest.py:251-267
Timestamp: 2026-02-10T15:04:14.799Z
Learning: In Python tests, remove all bare time.sleep() calls. Replace with a waiting mechanism such as TimeoutSampler from the timeout_sampler package or a function decorated with retry (with appropriate timeout/conditions) to ensure determinism and avoid flakiness. This applies to all Python tests under the tests directory (not just this file) to maintain consistent waiting behavior across the suite.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-02-25T11:00:02.013Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3873
File: tests/network/localnet/test_non_udn_localnet.py:19-27
Timestamp: 2026-02-25T11:00:02.013Z
Learning: In the test codebase, do not import from conftest.py files. This avoids import ambiguity in pytest. Do not import constants or helpers defined in conftest.py into tests. If a value is needed in both conftest.py and test files, duplicate it in both places or place it in a separate utility module that is importable by tests.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-03-29T13:51:25.599Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 4267
File: tests/storage/cross_cluster_live_migration/test_cclm.py:96-106
Timestamp: 2026-03-29T13:51:25.599Z
Learning: In this repository, follow the existing pytest convention for `pytest.mark.parametrize` argument names: use a single comma-separated string for `argnames` (e.g., `"dv_wait_timeout, vms_for_cclm"`), not a tuple (e.g., `("dv_wait_timeout", "vms_for_cclm")`). Do not flag or suggest changing `argnames` to a tuple. Also note that PT006 is not enforced by Ruff in this repo, so reviewers should not treat PT006 as a reason to alter the `argnames` format.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-01-12T11:24:13.825Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:50-52
Timestamp: 2026-01-12T11:24:13.825Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when catching exceptions in Python, use LOGGER.error before re-raising and do not replace it with LOGGER.exception in except blocks. This follows the established pattern across the codebase.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-12T14:25:05.723Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3366
File: tests/storage/cdi_clone/test_clone.py:5-9
Timestamp: 2026-01-12T14:25:05.723Z
Learning: In Python tests and utility code across the repository, bitmath.parse_string_unsafe correctly parses Kubernetes quantities (e.g., '4Gi', '512Mi', PVC storage requests) without supplying system=bitmath.NIST. There are 30+ usages indicating this is the standard behavior. Reviewers should verify that code that builds or compares quantity strings does not pass the NIST parameter, and if a new test relies on quantity parsing, assume no NIST parameter is required unless explicitly documented.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-20T01:03:13.139Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:1-8
Timestamp: 2026-01-20T01:03:13.139Z
Learning: In the openshift-virtualization-tests repository, Python imports should consistently use module-level imports for the logging module (i.e., import logging) rather than from logging import ... The established pattern spans 270+ files and should not be flagged for refactoring. Apply this guideline to Python files across the repo (e.g., tests/network/provider_migration/libprovider.py).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-21T21:26:41.805Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3559
File: utilities/infra.py:251-254
Timestamp: 2026-01-21T21:26:41.805Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing Python code, recognize that with Python 3.14 the syntax 'except ValueError, TypeError:' is valid if there is no 'as' clause, and should not be flagged as Python 2 syntax. If you use an 'as' binding (e.g., 'except (ValueError, TypeError) as e:'), parentheses are required. Ensure this pattern is version-consistent and not flagged as Python 2 syntax when 'as' is absent.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-01-25T13:18:21.675Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:21.675Z
Learning: In reviews of the openshift-virtualization-tests repo (and similar Python code), avoid suggesting minor stylistic changes that require extra verification (e.g., removing dict.keys() checks for membership) unless the change has clear correctness or maintainability impact. Focus on fixes with observable behavior, security, performance, or maintainability benefits; defer low-impact style tweaks that are costly to verify.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-18T06:35:39.536Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3847
File: utilities/virt.py:2449-2453
Timestamp: 2026-02-18T06:35:39.536Z
Learning: In Python code, a function named clearly and self-descriptively can be deemed not to require a docstring. However, treat this as a context-specific guideline and not a universal rule. For public APIs or functions with side effects, prefer concise docstrings explaining behavior, inputs, outputs, and side effects. This guidance is based on the example in utilities/virt.py from RedHatQE/openshift-virtualization-tests where validate_libvirt_persistent_domain(vm, admin_client) was considered self-documenting.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-02-23T16:33:22.070Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3883
File: utilities/pytest_utils.py:441-463
Timestamp: 2026-02-23T16:33:22.070Z
Learning: In Python code reviews, the guideline to always use named arguments for multi-argument calls does not apply to built-ins or methods that have positional-only parameters (those defined with a / in their signature). Do not flag or require named arguments for calls like dict.get(key, default=None, /), list.pop(), str.split(sep, maxsplit) and similar built-ins that cannot accept keyword arguments. Apply the named-argument rule only to functions/methods that explicitly accept keyword arguments.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In RedHatQE/openshift-virtualization-tests, when reviewing Python files, post targeted inline comments on the Files changed tab at the exact location (file and line) of the issue rather than opening a single discussion thread for multiple issues. This should be done for each applicable location to improve traceability and clarity. If multiple issues exist in the same file, address them with separate inline comments pointing to the specific lines.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CodeRabbit should post targeted inline comments at each applicable location in the Files Changed tab, rather than aggregating multiple issues into a single PR discussion thread reply. This guideline applies to all Python files (any file ending in .py) changed in a PR; for non-Python files, follow the same inline-comment-at-location principle if relevant.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:29.122Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: utilities/console.py:54-59
Timestamp: 2026-05-04T13:45:29.122Z
Learning: During review of RedHatQE/openshift-virtualization-tests “lint-cleanup” PRs (e.g., changes targeting lint issues like stale noqa/utf-8 headers), do not flag existing `# type: ignore` directives that were already present before the PR and were not introduced or modified by the PR. Only raise findings for `# type: ignore` suppressions that the PR itself adds, changes, or otherwise makes newly effective (i.e., they appear in the diff as additions/edits).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-04T13:45:33.892Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: tests/virt/cluster/common_templates/centos/test_centos_os_support.py:78-83
Timestamp: 2026-05-04T13:45:33.892Z
Learning: When reviewing lint-cleanup or formatting-only pull requests in this repo (e.g., changes like removing/updating `# noqa` comments or UTF-8 headers), do not raise findings for code patterns that already existed before the PR. Specifically, if a problematic construct such as `.is_connective(tcp_timeout=120)` was present in the base branch, suppress that finding and only raise issues when the PR itself introduces or modifies that construct (i.e., the diff adds/changes the call or its arguments). Apply this rule across all Python files (`**/*.py`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-05T17:01:15.294Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4739
File: tests/virt/node/descheduler/conftest.py:2-2
Timestamp: 2026-05-05T17:01:15.294Z
Learning: In this repo’s Python code, it’s acceptable (and preferred by convention) to build `run_command` inputs using `shlex.split(f"<command> {arg}")` rather than converting to direct list literals like `['oc', 'adm', 'uncordon', name]`. During code review, generally don’t flag `shlex.split(...)` usage for `run_command` calls and don’t suggest replacing it with list literals; the string-form pattern is used to keep commands readable and consistent with how they’re typed in a terminal.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-08T12:49:20.694Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4788
File: utilities/os_utils.py:257-262
Timestamp: 2026-05-08T12:49:20.694Z
Learning: In RedHatQE/openshift-virtualization-tests, the Ruff flake8-boolean-trap rules FBT001/FBT002 are intentionally not enabled (pyproject.toml does not select the FBT rules; confirmed via `ruff check --show-settings`). Therefore, do not flag boolean positional parameters as FBT001/FBT002 violations in this repository. If Ruff configuration changes and starts selecting FBT rules, this exception should be reconsidered.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-12T05:10:24.601Z
Learnt from: acinko-rh
Repo: RedHatQE/openshift-virtualization-tests PR: 4780
File: tests/storage/utils.py:568-572
Timestamp: 2026-05-12T05:10:24.601Z
Learning: In this repository, Ruff rule UP043 ("unnecessary default type arguments") is enforced. When annotating `collections.abc.Generator` return types, prefer the single-parameter form `Generator[YieldType]` rather than `Generator[YieldType, None, None]`. Explicit `None, None` for the SendType and ReturnType are unnecessary defaults (per PEP 696) and will trigger UP043. Apply this consistently across all Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-13T19:23:09.603Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:25-25
Timestamp: 2026-05-13T19:23:09.603Z
Learning: In this repository, do not recommend adding `from __future__ import annotations` to fix forward-reference type annotation issues (e.g., Ruff UP037). Follow the established convention: use quoted string type annotations for forward references when the referenced class/type is defined later in the same file (e.g., `"ContinuousPing"`), and prefer `typing.Self` for self-referential return types.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:30:56.781Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_bitwarden.py:207-207
Timestamp: 2026-05-18T06:30:56.781Z
Learning: During Ruff/lint rule-enablement PRs in this repository (e.g., when introducing a new rule like PLC0415), it’s acceptable to keep CI green by adding per-line, targeted suppressions for pre-existing violations: add only `# noqa: <single-ruff-rule-id>` at the end of the specific violating line. In this PR context, reviewers should NOT flag these targeted `# noqa: PLC0415` comments as policy violations, assuming the suppression is for a pre-existing issue and is documented in the PR description as a candidate for follow-up cleanup. Do not allow blanket `# noqa` (without a specific rule) or `per-file-ignores`; those remain disallowed.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:12.015Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:12.015Z
Learning: In RedHatQE/openshift-virtualization-tests, if a PR is a Ruff rule-enforcement PR and its “Special notes for reviewer” documents that pre-existing Ruff violations are being temporarily handled via per-line suppressions (e.g., `# noqa: PLC0415`) to keep CI green, reviewers should treat those specific `# noqa: <rule>` comments as an agreed, temporary mechanism. Do not flag them as code-quality issues and do not recommend removing, consolidating, or refactoring those suppressions within the same PR; cleanup/remediation is expected to happen in dedicated follow-up PRs instead.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:15.083Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_data_collector.py:304-304
Timestamp: 2026-05-18T06:31:15.083Z
Learning: When reviewing Python code in this repository for Ruff/linter rule rollouts, do not treat temporary suppression comments as violations in the specific migration scenario where a PR enables a new Ruff rule (e.g., PLC0415) and the PR description explicitly documents that all *pre-existing* violations are being annotated with `# noqa: <RULE>` as a short-lived measure. In that case, only flag `# noqa: <RULE>` suppressions that are newly introduced on code that did not previously violate the rule—i.e., verify via the PR diff against the prior state (and/or prior Ruff findings) that the suppressed line was already violating before the rule was enabled. Ignore suppressions that are covering violations that existed before the new rule rollout and were intentionally bulk-added for cleanup in follow-up PRs.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T06:31:20.848Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_hco.py:501-501
Timestamp: 2026-05-18T06:31:20.848Z
Learning: When reviewing Python code in RedHatQE/openshift-virtualization-tests, avoid flagging Ruff `# noqa: <RULE>` suppressions as issues if they were intentionally added as a temporary measure to keep CI green after a PR enables a new Ruff/lint rule (e.g., PLC0415) and the PR description documents this under "Special notes for reviewer". Treat these suppressions as deferred technical debt. Only flag `# noqa: PLC0415` (and similar rule-specific suppressions) when they are newly introduced without an accompanying documented intent in the PR (and thus appear to be masking a new violation rather than a pre-existing one).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T09:09:09.479Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4878
File: utilities/unittests/test_pytest_utils.py:2194-2197
Timestamp: 2026-05-18T09:09:09.479Z
Learning: In this repository (RedHatQE/openshift-virtualization-tests), do not flag missing return type annotations or missing argument type annotations as Ruff “ANN” rule violations (e.g., ANN001/ANN002/ANN201/ANN202). The repo’s Ruff configuration does not enable ANN rules and only uses `extend-select = ["PLC0415"]`, so missing type annotations should not be treated as ANN lint failures during code review.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When using Kubernetes API models like `NodeSelectorRequirement` or `LabelSelectorRequirement` with operators `Exists` or `DoesNotExist`, the `values` field must not be non-empty. It is valid for `values` to be omitted / left as `None` (Python) / passed as `null`—Kubernetes rejects non-empty `values` for these operators, but does not require the field to be present or explicitly set to an empty list. In code reviews, do not treat missing `values=[]` for `Exists`/`DoesNotExist` as a validation issue; only flag cases where `values` is provided with actual elements.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When constructing Kubernetes `NodeSelectorRequirement` (or `LabelSelectorRequirement`) objects in code, do not treat `values` being omitted, `None`, or an empty list as an API-validation problem when the requirement’s operator is `Exists` or `DoesNotExist`. Per the Kubernetes API spec, these operators only require that the `values` array is not non-empty (i.e., it must be empty); they do not require the field to be explicitly present as `[]`. Therefore, reviewers should not flag `values=None`/missing `values` for `Exists`/`DoesNotExist`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-26T15:52:31.613Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 4983
File: utilities/hco.py:376-378
Timestamp: 2026-05-26T15:52:31.613Z
Learning: For Python files in this repo, don’t raise review findings for missing type hints or missing/Google-style docstrings on an existing function when the PR’s only functional change is adding one or more new parameters to that function and the PR does not otherwise refactor or substantially rewrite its body/signature. Treat type-annotation/docstring improvements as out of scope for focused parameter-add PRs and defer them to a follow-up. Only raise missing type-hint or docstring issues when the PR introduces an entirely new function or substantially rewrites an existing one.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-21T20:28:07.727Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 5283
File: tests/network/libs/service.py:14-16
Timestamp: 2026-06-21T20:28:07.727Z
Learning: When reviewing Python code in this repository targeting Python 3.14 with PEP 649 (deferred annotation evaluation using descriptors) enabled by default, do not flag annotations that reference types imported only under `if TYPE_CHECKING:` (e.g., `client: DynamicClient | None = None`) as potential runtime `NameError` problems. With PEP 649 enabled, annotations are not evaluated at function definition time, so these patterns are valid without `from __future__ import annotations`.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-09T12:58:50.301Z
Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 5578
File: tests/network/l2_bridge/libl2bridge.py:9-9
Timestamp: 2026-07-09T12:58:50.301Z
Learning: In this repo, follow the established convention for type-only imports: do not require moving `ResourceField` imports from `kubernetes.dynamic.client` behind an `if TYPE_CHECKING:` guard when the imported symbol is used only for type annotations (e.g., in function/class annotations) and not referenced at runtime. Only raise/flag this if `ResourceField` is actually used in executable code (runtime values/calls), since then the import may need to be handled differently.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-07-28T10:18:34.186Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4944
File: tests/network/bgp/evpn/libevpn.py:29-30
Timestamp: 2026-07-28T10:18:34.186Z
Learning: When reviewing Python call sites of `random_ipv4_address()` and `random_ipv6_address()` (from `libs/net/ip.py`), note that both default to `cidr_required=True`, meaning omitted arguments will return CIDR-formatted IPs (`/24` for IPv4 and `/64` for IPv6). If the caller needs a bare address (no CIDR suffix), require an explicit `cidr_required=False` argument.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-08-03T07:12:46.139Z
Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 5719
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/utils.py:2-2
Timestamp: 2026-08-03T07:12:46.139Z
Learning: In Python modules without `from __future__ import annotations`, do not require annotation-only imports such as `typing.Any` to be moved behind `if TYPE_CHECKING:`. Unquoted annotations are evaluated at runtime, so these imports must remain available unless the annotations are also changed to quoted or otherwise deferred forms.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-05-18T10:38:33.820Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4884
File: .coderabbit.yaml:79-80
Timestamp: 2026-05-18T10:38:33.820Z
Learning: In this repo, pytest tests are expected to live only in files named `test_*.py`. When applying CodeRabbit STP case B (newly added `def test_*` inside an existing test file), scope the check to existing files that match `test_*.py` and do not broaden it to newly added `def test_*` found in other non-`test_*.py` Python files.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:28.366Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/scanner.py:42-54
Timestamp: 2026-06-04T13:37:28.366Z
Learning: In this repository, the AGENTS.md guideline requiring use of `pyhelper_utils.shell.run_command` (instead of `subprocess.run`) is intended for test and supporting code under `tests/`, `utilities/`, and `libs/`. For Python files under `scripts/` (e.g., `scripts/polarion_sync/`, `scripts/tests_analyzer/`), do not treat `subprocess.run(...)` usage as a violation of that AGENTS.md guideline; it may be used directly.

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
📚 Learning: 2026-06-04T13:37:29.897Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 5128
File: scripts/polarion_sync/push_gate.py:32-349
Timestamp: 2026-06-04T13:37:29.897Z
Learning: When reviewing Python code under this repo’s `scripts/` directory (e.g., `scripts/**.py`), do not flag `subprocess.run` usage as a violation of the `AGENTS.md` guideline. The `pyhelper_utils.shell.run_command` vs `subprocess.run` rule should only be applied to `tests/` and `utilities/`; treat `scripts/` as explicitly exempt and follow the existing `subprocess.run` usage pattern within `scripts/` packages (e.g., `scripts/tests_analyzer/`).

Applied to files:

  • scripts/coderabbit_retry/tests/test_coderabbit_retry.py
  • scripts/coderabbit_retry/coderabbit_retry.py
🪛 Ruff (0.16.1)
scripts/coderabbit_retry/tests/test_coderabbit_retry.py

[warning] 334-334: Fixture _mock_github_cls without value is injected as parameter, use @pytest.mark.usefixtures instead

(PT019)


[warning] 339-339: Unused function argument: repo_name

(ARG001)


[warning] 339-339: Unused function argument: repo

(ARG001)

scripts/coderabbit_retry/coderabbit_retry.py

[warning] 321-321: Logging statement uses f-string

(G004)

🔇 Additional comments (1)
scripts/coderabbit_retry/coderabbit_retry.py (1)

317-321: HIGH: Keep one failed PR from aborting the scan.

This handler catches only GithubException. If process_pr raises another Exception, future.result() re-raises it and main() stops before it processes the remaining futures or logs the summary.

Catch Exception at this per-PR boundary, but not BaseException. Log the PR number at ERROR and continue. Add a test where process_pr raises RuntimeError and verify that another PR is still counted.

Proposed fix
-            except GithubException as error:
-                LOGGER.warning(f"PR #{pr_number}: processing failed: {error}")
+            except Exception as error:
+                LOGGER.error(f"PR #{pr_number}: processing failed: {error}")

This is the same unresolved worker-failure boundary identified in the earlier review. Based on the PR objective, the scan must continue safely after individual failures. As per coding guidelines, contextual exceptions must use ERROR logging.

Source: Coding guidelines

Comment thread scripts/coderabbit_retry/tests/test_coderabbit_retry.py Outdated
@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…ript

Add a scheduled GitHub Actions workflow that automatically retries CodeRabbit
reviews that hit rate limits, implemented as a standalone Python script using
PyGithub.

How it works:
- Runs every 20 minutes (also supports manual trigger)
- Scans up to 200 open non-draft/non-WIP/non-Stale PRs updated in last 2 days
- Uses myk-pi-tools coderabbit check to detect rate-limited PRs
- Uses PyGithub for all GitHub API interactions (Auth.Token)
- Processes eligible PRs concurrently (MAX_WORKERS threads via ThreadPoolExecutor)
- Sorts by most recently updated (sort=updated, order=desc)
- GHA job timeout (15 minutes) is the termination bound
- Skips if @coderabbitai review or resume was already posted
- Fail-safe: per-PR GithubException isolation, API failures skip the PR
- Rate-limit payload validation (rejects bool, non-finite, negative wait_seconds)

Files:
- scripts/coderabbit_retry/coderabbit_retry.py - standalone Python script
- scripts/coderabbit_retry/tests/ - 49 unit tests
- .github/workflows/coderabbit-retry-on-rate-limit.yml - GHA workflow
- .pre-commit-config.yaml - flake8 exclude for PolarionIds plugin crash
- pyproject.toml / uv.lock - PyGithub dev dependency added

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: rnetser <rnetser@redhat.com>
@rnetser

rnetser commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

/security-override

@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

Security checks overridden by @rnetser. Security check runs set to pass.

@rnetser

rnetser commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 23 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants