Skip to content

Let a driftNote Exempt a Tool-Fixed Script Name From the File-Naming Check - #3258

Merged
ptr727 merged 2 commits into
developfrom
feature/auto-3252
Oct 20, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/auto-3252

Conversation

@ptr727

@ptr727 ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

The file-naming audit check knew one tool-fixed name, Pester's .Tests.ps1 suffix. 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.

  • A registry driftNote naming (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.
  • A named path the check no longer reports is a stale exemption, whether it was renamed, deleted, made conforming, or was never a script. A note naming no path is reported as exempting nothing.
  • driftnote_findings skips the id through DETECTION_SUPPRESSION_IDS, the way it already skips python.directories.declared. A None value there means the suppression holds on every repository, and is_suppression_id reads it.
  • notes_naming and quote_note replace the lookup and the note-quoting expression the suppression checks each repeated.
  • The filenaming.scripts assert in spec/project-types.json and the file-naming and driftNote wording in AUDIT.md now 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.py asserts 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 at AUDIT.md line 206 predate this change.

Closes on promotion: #3252

🤖 Generated with Claude Code

…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.
Copilot AI lite review requested due to automatic review settings October 20, 2026 05:05
@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 07823d20bac4b1576025696b2d8b0a03a0f2ee30, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ceca693-062f-4d5a-8d71-a12898e65c96
📥 Commits

Reviewing files that changed from the base of the PR and between 040152e and 07823d2.

📒 Files selected for processing: 4
  • AUDIT.md
  • spec/audit.py
  • spec/project-types.json
  • tests/test_audit.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

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-path exemptions are silently skipped when the repository tree is unreadable.

spec/audit.py:503, the if blobs is None: return [] at the top of file_naming_findings.

No change needed. The skip is not silent. An unreadable tree already makes the same run report tree: could not read the file tree for <slug>@<ref> in full, so verbatim trees, script file names, and secret-file stems are undecided (spec/audit.py:3573), and the function's docstring routes that case to that one finding. Every exemption judgment, a note naming no path included, belongs to the same undecided set, which is also what python_type_findings does with its suppression note when tree is None. The no-path note is reported on the next run that reads the tree.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.09091% with 39 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@040152e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
spec/audit.py 29.09% 39 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3258   +/-   ##
==========================================
  Coverage           ?   65.41%           
==========================================
  Files              ?       17           
  Lines              ?     9987           
  Branches           ?        0           
==========================================
  Hits               ?     6533           
  Misses             ?     3454           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 65.41% <29.09%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 8228473 into develop Oct 20, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-3252 branch October 20, 2026 05:20
ptr727 added a commit that referenced this pull request Oct 20, 2026
…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)
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.

2 participants