fix: drift detector must skip commented-out uses: lines - #647
Conversation
The detector matched 'uses: owner/repo@ref' anywhere in a workflow, including inside comments. metadatastician/_pathroot's e2e.yml carries ten commented-out '# - uses: actions/checkout@34e11487...' lines from a disabled job block; the LIVE line already uses @v7.0.1 correctly. So the tool reported drift on dead code. That is the false-positive class that gets a detector ignored, which would be worse than not shipping it. Strips comment lines before matching. Verified both ways: * _pathroot: 1 false positive -> clean * hypatia pre-fix fixture: still finds the real drift (regression held) Found while using the detector in anger on metadatastician-governance#24 — it correctly identified the four dead workflows in _pathroot (ts-blocker, guix-nix-policy, npm-bun-blocker, jekyll-gh-pages) before this false positive surfaced alongside them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe lockfile drift check now removes full-line comments before it scans workflow files for ChangesLockfile drift detection
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: Poem
✨ Finishing Touches📝 Generate docstrings
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 |
|



The detector matched
uses: owner/repo@refanywhere in a workflow, including inside comments.metadatastician/_pathroot'se2e.ymlcarries ten commented-out# - uses: actions/checkout@34e11487…lines from a disabled job block. The live line already uses@v7.0.1correctly — so the tool reported drift on dead code.That is precisely the false-positive class that gets a detector ignored, which would be worse than not shipping it at all.
Verified both ways
_pathrootFound in anger
This surfaced while using the detector on metadatastician/metadatastician-governance#24. It correctly identified the four dead workflows in
_pathroot—ts-blocker,guix-nix-policy,npm-bun-blocker,jekyll-gh-pages— with the false positive sitting alongside them. The signal was right; the noise needed removing.🤖 Generated with Claude Code