Repository navigation
Let a driftNote Exempt a Tool-Fixed Script Name From the File-Naming Check - #3258
Conversation
…Check The file-naming check knew one tool-fixed name, Pester's suffix, so any other name a tool or platform fixes was reported at drift on every run with no way to clear it. A registry driftNote naming (filenaming.scripts) now exempts each path it names as a code span, and no other path. A named path the check no longer reports, or a note naming no path, is reported as a stale exemption, and the note-freshness check skips the id the way it skips the Python discovery suppression.
The local review found the file-naming exemption repeating two expressions python_type_findings and driftnote_findings already held, so both now go through notes_naming and quote_note. The audit-repo test asserting the old break message is updated to the new one, and the longer sentences the change wrote are split.
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
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 |
There was a problem hiding this comment.
🔵 Needs a closer look
No-path exemptions are silently skipped when the repository tree is unreadable.
No open issues 🎉
What changed in this PR
Adds per-path filenaming.scripts driftNote exemptions for tool-fixed script names, including stale-exemption detection and updated documentation/tests.
Changes:
- Supports named path exemptions and stale-note reporting.
- Updates suppression handling and shared note formatting.
- Revises specifications, documentation, and audit tests.
| File | Summary |
|---|---|
tests/test_audit.py |
Updates expected naming output. |
spec/project-types.json |
Documents the exemption contract. |
spec/audit.py |
Implements exemptions and validation. |
AUDIT.md |
Updates audit guidance. |
Review effort: Lite
|
Answering the headline of the Copilot round on 07823d20. It counted no finding and collapsed none, so the count is (0) and the headline is the one item.
No change needed. The skip is not silent. An unreadable tree already makes the same run report |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3258 +/- ##
==========================================
Coverage ? 65.41%
==========================================
Files ? 17
Lines ? 9987
Branches ? 0
==========================================
Hits ? 6533
Misses ? 3454
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
…and File-Naming Check to Main (#3266) ## Summary Promotes eight pull requests from develop. Three are `pr_review.py` reader fixes from this round, one answers this promotion's first review, and four are from other sessions. - #3261: each heading, thematic-break, and fence shape in `pr_review.py` has one primitive that every reader composes from. A no-break space after a heading's hashes no longer opens a heading, and a tab-spaced thematic break or setext underline closes its block. - #3262: when `wait` returns `50` at once on an uncounted-verdict head while a check has not concluded, it names a bounded `gh pr checks --watch` to watch the checks with. - #3264: `CODE_SPAN` reads code spans, raw inline HTML, and autolinks left to right, as GitHub binds them, so a backtick inside an earlier HTML comment, tag, or autolink opens no span. A line of only blockquote markers now ends a paragraph. - #3256: `pr_review.py wait` reads a superseded run's failed aggregator as superseded rather than as a verdict on the head. - #3258: a `driftNote` can exempt a tool-fixed script name from the file-naming check. - #3253: an audit check for file naming, including secret-file stem casing. - #3249: the Linux quick start names the no-sudo Debian case. - #3267: splits the over-long and two-instruction sentences that this promotion's first Copilot round found in #3249's paragraph. Closes #3241 Closes #3246 Closes #3235 Closes #3252 Closes #3254 Closes #3141 Closes #2551 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
The
file-namingaudit check knew one tool-fixed name, Pester's.Tests.ps1suffix. Any other name a tool or platform fixes was reported at drift on every run, with no way to clear it. A driftNote naming(filenaming.scripts)did not help, since the note-freshness check asked the auditor to delete it once the check passed, and it never passed.(filenaming.scripts)now exempts each path it names as a code span, such as`tools/Install.ps1`. Only those paths are exempt, so a break on any other path still reports.driftnote_findingsskips the id throughDETECTION_SUPPRESSION_IDS, the way it already skipspython.directories.declared. ANonevalue there means the suppression holds on every repository, andis_suppression_idreads it.notes_namingandquote_notereplace the lookup and the note-quoting expression the suppression checks each repeated.filenaming.scriptsassert inspec/project-types.jsonand the file-naming and driftNote wording inAUDIT.mdnow describe the exemption.Selftest cases built on constructed names cover a named path exempt with an unnamed break still reported, an undecided path exempted, a stale path (conforming and missing), a note naming no path, an id outside its parenthesized form, and the note skipped by
driftnote_findings. Mutating out each of the exemption filter, the stale report, the no-path report, and the freshness skip fails the selftest.tests/test_audit.pyasserts the new break message.Local review findings
The first local pass raised a stale expected message in
tests/test_audit.py, two duplicated expressions, guards the validated registry made redundant, a misplaced constant, and new sentences over the length limit. All are fixed in the second commit, and the second pass found nothing. The three long sentences still atAUDIT.mdline 206 predate this change.Closes on promotion: #3252
🤖 Generated with Claude Code