Skip commits with a Drift: ignore trailer - #4
Conversation
- analyze() now excludes non-merge commits carrying a Drift: ignore trailer, the same way merges are traversed but never classified - token and value are matched ASCII case-insensitively since gix only trims whitespace on trailers, it doesn't fold case - add ignored_commits_skipped to the report, counted separately from commits_scanned and merge_commits_skipped - document the new field and trailer semantics in README's Defined behavior section - add cli tests covering log mode exclusion, tree mode leaving an unattributed path, and case-insensitive matching Co-authored-by: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe scanner now detects case-insensitive ChangesIgnored commit handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change adds an explicit trailer-based way to exclude intentional drift from reports and records those exclusions separately; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant CLI
participant scan
participant Commit
participant Report
CLI->>scan: start scan
scan->>Commit: load non-merge commit
scan->>Commit: read trailers
Commit-->>scan: return Drift: ignore match
scan->>Report: count skipped commit
scan-->>CLI: return report without classified ignored commit
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
|
🤖 This comment was posted by Claude on behalf of @dave-shawley Status check for this cycle:
@gmr — could you approve the pending workflow runs for this PR (Actions tab, or "Approve and run") so CI can execute? Nothing else is blocking merge once CI runs green. |
Summary
analyze()now excludes commits from the drift report when their message carries aDrift: ignoretrailer, letting an author explicitly vouch for a change instead of it showing up as unexplained drift.Problem
Some commits (e.g. a reformat, a deliberate one-off tweak) touch paths that
driftwould otherwise report, even though the author already knows about them and doesn't want them flagged. There was no way to mark a commit as intentionally exempt.Solution
Drift: ignoretrailer is traversed but never classified, the same treatment merges already get.ignored_commits_skippedto the JSON report, counted separately fromcommits_scannedandmerge_commits_skipped.Testing
cargo test,cargo clippy --all-targets -- -D warnings, andcargo fmt --checkall pass.Summary by CodeRabbit
Drift: ignoretrailer are now excluded from drift analysis.