Skip to content

fix: flaky git-mutation-check test false-positives on pytest tmp paths#323

Merged
azalio merged 1 commit into
mainfrom
fix-flaky-detached-review-git-mutation-check
Jul 2, 2026
Merged

fix: flaky git-mutation-check test false-positives on pytest tmp paths#323
azalio merged 1 commit into
mainfrom
fix-flaky-detached-review-git-mutation-check

Conversation

@azalio

@azalio azalio commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • test_prepare_detached_review_never_calls_mutating_git_commands checked mutating-command substrings (checkout, stash, reset, restore, commit, rm) against a joined argv string instead of individual tokens.
  • On macOS CI this false-positived when pytest's random tmp_path component happened to contain rm as a substring (e.g. .../cx43xdqhzy2rmp6tqr.../), failing test (macos-latest, 3.11) on main after feat(map-review-codex): port map-review skill to the Codex provider #322 merged and cascading a cancellation of test (macos-latest, 3.12).
  • Fixed by checking individual argv tokens (bad not in call) rather than the joined string, matching the existing bare-git add check just below it in the same test.

Test plan

  • pytest tests/test_map_step_runner.py -k test_prepare_detached_review_never_calls_mutating_git_commands passes
  • make check passes (3236 passed, 3 skipped, render-parity check clean)

test_prepare_detached_review_never_calls_mutating_git_commands checked
mutating-command tokens (checkout, stash, reset, restore, commit, rm)
against a joined-argv string, so the check false-positives whenever an
unrelated argument substring matches — e.g. a random pytest tmp_path
component containing "rm" (observed on macOS CI: ".../cx43xdqhzy2rmp6tqr...").
Check individual argv tokens instead of a joined string.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 462564af-b895-4412-928a-95b8b05961d3

📥 Commits

Reviewing files that changed from the base of the PR and between 6442317 and db3eb05.

📒 Files selected for processing (1)
  • tests/test_map_step_runner.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-flaky-detached-review-git-mutation-check

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.

@azalio azalio merged commit d724112 into main Jul 2, 2026
7 checks passed
@azalio azalio deleted the fix-flaky-detached-review-git-mutation-check branch July 2, 2026 13:46
azalio added a commit that referenced this pull request Jul 3, 2026
Two framework bugs surfaced and were fixed during /map-release Phase 1
(PR #323, #324): a flaky test from a substring-in-joined-argv check,
and an awk two-address range that collapsed to one line because its
start/end patterns could co-match. Both are instances of the same
root cause -- testing discrete-unit membership on a flattened/implicit
proxy instead of the structured representation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant