Evidence and identity hygiene sweep with a repository hygiene CI guard - #943
Merged
Merged
Conversation
…giene sweep Carries issue, spec, research, write-set inventory and plan round 4 from the prior preparation worktree, plus the promoted record. Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…nced blocks Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
…iene guard (P1-T1, P1-T2) Preserves the two test files written by the previous run before the plan is re-batched for the PowerShell batch budget. Refs 927. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
…tity-hygiene-sweep-927
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
…ision 1.9) Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
…ision 1.10) Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01KNZiXntshsLY8vqqCHUvHm
…ion; batched revision 1.10 is retracted and pinned on local ref prep/927-batched-plan-r1.10 Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
… evidence at STOP AC1 ARITHMETIC MISMATCH (P1-T12) Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…and the P1-T13 range check; preflight round 8 requires revisions pending a coordinator scope ruling Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmPs3siUtjDrp1E1B9C9gS
…n R8-01 to R8-06 and the spec AC1 amendment; confirming preflight round 9 requires revisions F1 to F3, halted for a coordinator ruling Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… F1 to F4; confirming preflight pending Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lan revision 1.13 cleared by confirming preflight round 10 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Pester callee arrays Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocuments and ignore their name patterns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ile parent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the canonical placeholders Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… document the seventh context Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…QC analyze returns no diagnostic count Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sourced Pester coverage, PoshQC analyze pass line, P4-T7 line-multiset check with in-memory negative control); confirming preflight pending Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…n revision 1.14; halted for coordinator ruling on F1 to F5, F7 and F8 Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
… F1 to F8 (three-dot diff anchor, CI Pester baseline 342, AC19 ancestry checks with negative control); confirming preflight pending Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…eltas D1 to D3 under the extended standing authority; confirming preflight pending Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…y negative control Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…in consolidation Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…e artifacts Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
… main CI at the current merge base (new P6-T39 with negative control); confirming preflight pending Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
… (main-tip drift guard, PR mstest job conclusion, ledger counts, confirming guard run); feature review artifacts with zero blocking findings Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…and cross-reference fixes R15-1 to R15-4 Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
…and AC13 check-off Co-Authored-By: Claude Opus 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
Evidence and identity hygiene sweep with a repository hygiene CI guard
Summary
scripts/hygiene/Test-RepositoryHygiene.ps1with its.Rules.ps1and.Git.ps1parts) that rejects tracked raw test-platform documents, raw coverage-collector documents and absolute user-profile paths, and wires it into CI as a newhygienecontext (.github/workflows/_hygiene.yml, called from.github/workflows/ci.yml).test-output.txt, and adds.gitignorepatterns so they cannot be re-added.<repo-root>,<user-profile>,<user>and<host>; a per-file line-multiset comparison shows 0 unmatched lines, with an in-memory negative control that reports 1.tests/scripts/hygiene/and extends the CI Pester run and coverage arrays to the new folders.Why
The repository was out of compliance with its own Committed Test Evidence Format (CLAUDE.md): hundreds of raw test-platform and coverage documents and absolute host paths had been committed before the convention existed, and nothing rejected new ones at commit or CI time. Earlier tooling fixed prevention in the scripts/vscode test route but did not remove existing content or add an enforcement gate. This change removes the content, redacts the identifiers, and adds a CI gate so the cleanup does not regress. It consolidates the unresolved remainder of several earlier hygiene reports into one delivery.
What Changed
Guard (new PowerShell, T4 tooling)
scripts/hygiene/Test-RepositoryHygiene.ps1(entry point),Test-RepositoryHygiene.Rules.ps1(pure rule logic),Test-RepositoryHygiene.Git.ps1(git I/O seam).HYGIENE Findings=0summary on a clean tree; non-zero with per-finding lines otherwise.CI and ignore rules
.github/workflows/_hygiene.yml(new callee, 10-minute timeout),ci.yml(seventh context),_pester.yml(Run.Path and CodeCoverage.Path arrays include the hygiene folders),.github/workflows/README.md..gitignore:*.trxand*cobertura*.xmlpatterns with a comment naming the guard.Tests
tests/scripts/hygiene/three new Pester files (31 tests);tests/scripts/vscode/Invoke-MSTestWithCoverage.Helpers.Tests.ps1fixture literals.Docs and evidence (mechanical, large)
Architecture / How It Fits Together
The CI orchestrator
ci.ymlcalls_hygiene.yml, which runs the guard entry point on the Ubuntu runner. The entry point dot-sources the Rules and Git parts: the Git part enumerates tracked files and reads blobs, the Rules part classifies each path and content as raw document, profile path or clean, and the entry point aggregates findings and sets the exit code. The Pester suite exercises the Rules part directly and the Git part through an injected invoker, so no test touches the real repository or a temporary file.Verification
Completed (recorded under
docs/features/active/2026-09-28-evidence-and-identity-hygiene-sweep-927/evidence/):dotnet tool run csharpier check .exit 0; analyzer and nullable/t:Rebuildexit 0 with 0 errors and 0 warnings; MSTest 7346 passed, 0 failed; first-party coverage 85.92% lines, 80.08% branches, equal to main's own CI figures at the merge base.Pending on this pull request's CI run (completed by the remaining plan tasks after CI reports):
hygienecontext green on the head (AC16).pester-coverageartifact (AC4).Backward Compatibility / Migration Notes
hygiene; commits that add raw test documents or absolute profile paths will fail it.Risks and Mitigations
Review Guide
scripts/hygiene/andtests/scripts/hygiene/(the guard and its tests)..github/workflows/_hygiene.yml,ci.yml,_pester.yml,.gitignore.evidence/qa-gates/artifacts.Follow-ups
hygienecontext to the main branch ruleset's required status checks (manual; not done by this change).GitHub Auto-close
🤖 Generated with Claude Code