fix: flaky git-mutation-check test false-positives on pytest tmp paths#323
Conversation
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.
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
test_prepare_detached_review_never_calls_mutating_git_commandschecked mutating-command substrings (checkout,stash,reset,restore,commit,rm) against a joined argv string instead of individual tokens.rmas a substring (e.g..../cx43xdqhzy2rmp6tqr.../), failingtest (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 oftest (macos-latest, 3.12).bad not in call) rather than the joined string, matching the existing bare-git addcheck 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_commandspassesmake checkpasses (3236 passed, 3 skipped, render-parity check clean)