Conversation
Active feature folder, minor-audit plan cleared by preflight (3 rounds), and the promoted potential record for the tracked .bak removal and hygiene-guard rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on pass Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ne rule Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nore *.bak Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…criteria Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ene rule Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… CR-3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…p redundant gitignore lines (#961) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggested title
fix(hygiene): flag tracked .bak files, remove the remaining three, ignore *.bak
Summary
.bak(case-insensitive) is reported asHYGIENE backup-file <path>and fails the guard. The pure predicate is the new functionTest-BackupFilePathinscripts/hygiene/Test-RepositoryHygiene.Rules.ps1; the wiring is oneifinInvoke-RepositoryHygieneMain.TaskMaster.sln.bak,TaskTree/TaskTree.vbproj.bakandTaskVisualization/TaskVisualization.vbproj.bak.*.bakline to.gitignoredirectly after*.csproj.bak._hygiene.ymlrow of.github/workflows/README.mdto name the new rule.Why
The earlier backup cleanup scoped its ignore rule to
*.csproj.bak, which left three other tracked backups that carry stale project and solution text. Nothing enforced the absence of tracked backups, so they could reappear. A hygiene guard rule makes the absence a CI-checked property.Search of the tracked tree (outside
docs/and.claude/) found no project, solution, script or workflow file that reads the three backups; the only references to.bakare the.gitignoreand one unrelated C# test file.What Changed
Test-BackupFilePathreturns the result of[System.IO.Path]::GetExtension($RelativePath) -ieq '.bak'. The newifsits after the.claude/governance skip and before the content scan, with nocontinue, so a backup file is still scanned for profile paths. The header comment,.SYNOPSISand.DESCRIPTIONof the guard script now describe rule C.Test-RepositoryHygiene.Rules.Tests.ps1gains aDescribe 'Test-BackupFilePath'block of 10 cases (positive: root and nested backups, upper-case extension, bare.bak; negative: directory namedbak,.bakery,notes.bak.md,backup, no extension, barebak).Test-RepositoryHygiene.Tests.ps1gains fourInvoke-RepositoryHygieneMaincases: a negative control, backup-lookalike names, a governance-directory record, and a backup file that also carries a profile path.git rmdeletions, one.gitignoreline, one README table row.docs/features/active/2026-10-01-remaining-tracked-backup-files-and-hygiene-guard-rule-961/with the plan, evidence and the reduced audit artifacts; the promoted potential record.Architecture / How It Fits Together
Test-RepositoryHygiene.ps1enumerates tracked paths through the Git adapter, skips.claude/records, then applies rule C (path-only, via the pure predicate) and the existing content rules A and B. Rule C emitsHYGIENE backup-file <path>. The Git adapterTest-RepositoryHygiene.Git.ps1is unchanged. The_hygiene.ymlworkflow runs this guard unchanged.Verification
Completed (from the evidence in the feature folder):
HYGIENE backup-filelines andHYGIENE Findings=3. After the change:HYGIENE Findings=0.git ls-files -- "*.bak"is empty;git check-ignore -vreports.gitignore:259:*.bakfor the three former paths; a negative control (README.md) exits 1.Recommended:
scripts/hygieneline coverage must meet the 80 percent LINE threshold in_pester.yml. Local PoshQC coverage does not carryscripts/hygiene, so the figure is CI-sourced.Backward Compatibility / Migration Notes
A newly tracked file with a
.bakextension anywhere outside.claude/now fails the hygiene guard. The three removed backups were unreferenced. Git history is not rewritten.Risks and Mitigations
*.bakwould fail the guard. No such file is tracked today; the.claude/governance directory remains exempt. Mitigation: rename the file or discuss an exemption in a follow-up.*.bakignore line makes the older*.csproj.bakand*.rptproj.baklines redundant. They are left in place; removal is cosmetic.Review Guide
scripts/hygiene/Test-RepositoryHygiene.Rules.ps1andscripts/hygiene/Test-RepositoryHygiene.ps1(about 30 added lines).tests/scripts/hygiene/..gitignoreand.github/workflows/README.md(one line each).feature-audit.*.mdfirst.Follow-ups
-Becausetext to the array-equality assertions in the four new orchestration tests and split the lookalike test into per-name cases (code review items CR-1 and CR-2, low severity).*.csproj.bakand*.rptproj.baklines from.gitignore(CR-3).scripts/hygieneline coverage for this head once the Pester job reports.GitHub Auto-close
🤖 Generated with Claude Code