Repository navigation
Add a File-Naming Audit Check and Check Secret-File Stem Casing - #3253
Conversation
spec/audit.py now reports script file names that break CODESTYLE.md "Script and Utility File Names", and secret-file stems under a repo-scoped .secrets/ directory that are not lowercase snake_case, both at drift. A file the per-extension patterns cannot decide is reported for judgment instead of as a break. The tree read now keeps each blob's mode, so an extensionless executable is found, and only one whose name does not conform has its text read for a shebang. The file-naming dimension and the extended runtimesecrets.naming check are added to spec/project-types.json, AUDIT.md section 4, and the report template. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Errors An extensionless launcher beside a .py of the same stem now keeps that stem, the same as a launcher with an extension. The shebang read no longer turns a failed gh call into a judgment entry, so it surfaces as the run's ERROR like every other read. One helper projects the tree's blobs, and the python-directories finding uses the shared path cap. The runtime-secrets text now names secret files rather than every file, and the file-naming text says Pester's suffix is the one tool-fixed name the mechanical check knows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The check already reports an upper-case extension as a break. AUDIT.md and spec/project-types.json now say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
🟡 Changes recommended
Restrict secret matching to direct .secrets children and surface failed shebang reads instead of reporting judgment findings.
2 open issues
What changed in this PR
Adds automated audit checks for script filename conventions and runtime-secret stem casing, with catalog, documentation, report, and test updates.
Changes:
- Adds file-naming and secret-stem detection.
- Preserves executable modes and tests shebang handling.
- Updates specifications, documentation, templates, and integration coverage.
| File | Summary |
|---|---|
tests/test_audit.py |
Tests audit integration, modes, and shebang handling. |
spec/project-types.json |
Registers the new audit dimensions. |
spec/audit.py |
Implements naming checks and tree-mode handling. |
reports/_template.md |
Adds the file-naming report row. |
AUDIT.md |
Documents the new checks and scope. |
Review effort: Lite
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3253 +/- ##
==========================================
Coverage ? 65.48%
==========================================
Files ? 17
Lines ? 9923
Branches ? 0
==========================================
Hits ? 6498
Misses ? 3425
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:
|
A secret file sits directly in .secrets/, as its **/.secrets/* ignore rule reads it, so a file nested below the directory is no longer read as one. The shebang read no longer accepts a 404, since the tree already listed the path as a blob, so a failed read surfaces as the run's ERROR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An extensionless launcher beside a .py of the same stem may be an installed command, which takes a hyphenated name, and the tree cannot say which it is, so the check now reports it for judgment rather than passing it. A test now covers a failed shebang read raising rather than reading as undecided. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tated The wrapper exemption now reads as covering a launcher with an extension, matching the check, and AUDIT.md names each case it reports for judgment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
✅ Action performedReview finished.
|
…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
Adds the audit check #3141 asks for. It measures the file-naming rule that
CODESTYLE.md"Script and Utility File Names" states.file-naming, new inspec/audit.py.file_naming_findingsreports, at drift, a.pystem that is not lowercase snake_case. It also reports a.sh,.ps1,.cmd, or.batstem, or an extensionless executable's name, that is not lowercase-hyphenated, and an upper-case extension. Pester's.Tests.ps1suffix is set aside. A snake_case launcher beside a.pyof the same stem in its own directory keeps that stem. Two cases are reported for judgment rather than as a break: a launcher whose.pysits only in another directory, and an extensionless executable with no shebang or no readable text. The tree read now keeps each blob's mode. Only a non-conforming extensionless executable has its text read, for its shebang.hub-fetch-run.pyis a break here. The check does not useCARRIED_PYTHON_HELPERSas an exemption, per the comment on Add a File-Naming Audit Check and Secret-Stem Casing #3141.runtime-secretsstem casing.secret_stem_findingsreports a file in a repo-scoped.secrets/directory whose stem, the name before its first dot, is not lowercase snake_case. The directory's ownREADME.md,.gitignore, and.gitkeepare not secret files.spec/project-types.jsongains thefile-namingdimension (filenaming.scripts), andruntimesecrets.naminggains the stem rule.AUDIT.mdsection 4 gains the dimension and names both in the mechanized subset, andreports/_template.mdgains its row.blob_fieldprojects the tree read for every caller.capped_pathsnow also serves the python-directories finding's five-path cap.--selftestcovers each conforming and failing shape over constructed trees, andtests/test_audit.pycovers theaudit_repocall site, the modes reaching the check and the shebang read going to the audited branch.The check reports three of the hub's own files under
host-setup/agent-safety/claude/. That tree is worked only in an attended session, so #3251 tracks renaming them. #3252 tracks a way to record a tool-fixed name other than Pester's, which the check cannot know.Closes on promotion: #3141
Local strict review: three passes recorded. The first raised 8 findings, and 6 were fixed. The fixes are the extensionless wrapper exemption, read errors left to surface as the run's ERROR, the secret-file wording, the tool-fixed exemption wording, the tree projection, and the shared cap. The hub's own names went to #3251. The 100644 shebang case was declined, since a file without the executable bit is not an executable. The second raised 2: the lowercase-extension wording was fixed, and the tool-fixed exemption record was deferred to #3252. The third raised none.
The fix push for Copilot's two findings (9665343) took three more passes. The first raised 3. Two were fixed: a docstring sentence was split, and an extensionless launcher beside its
.pynow goes to judgment, since it may be an installed command (431cb35). The third, a test pinning the failed shebang read as an ERROR, also landed in 431cb35. The second raised 2. The wrapper-exemption wording was fixed in 58e9a23. A.cmd,.bat, or.ps1launcher beside its.pywas declined, since CODESTYLE's wrapper exemption namesfetch_report.ps1as keeping the tool's stem. The third raised 2 after that push's edit budget was spent. Each now has an outcome:introduced, fixed in the next push: thefilenaming.scriptsassert inspec/project-types.jsonlisted the judgment cases without the extensionless executable whose text cannot be read, which the code, its docstring, andAUDIT.mdall name.introduced, declined:repo_tree_entriesas a one-line shim overblob_field(repo_tree_blobs(...), 0), on the premise thatrepo_treehas no production caller.spec/fidelity_honesty.py:177callsaudit.repo_tree, andtests/test_audit.pycovers the modes reaching the check.The pass over that last push raised none.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation