Skip to content

Commit 362c6b6

Browse files
committed
Skip per-user session services in baseline diff, merge duplicate BOM docs
Made-with: Cursor
1 parent 8f6523f commit 362c6b6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ $summary = $jsonLine | ConvertFrom-Json
137137

138138
## Code Conventions
139139

140-
- All `.ps1` files **must** be saved with UTF-8 BOM encoding. PowerShell 5.1 defaults to Windows-1252, which corrupts non-ASCII characters (checkmarks, box-drawing) and causes parse errors.
140+
- All `.ps1` files **must** be saved with UTF-8 BOM (`EF BB BF`). PowerShell 5.1 defaults to Windows-1252, which misinterprets multi-byte UTF-8 sequences (e.g. ``, ``) as string delimiters, causing parse errors. **Some edit tools strip BOM on save** -- run `.\fix-bom.ps1` (gitignored dev utility) to re-apply after editing.
141141
- See `CONTRIBUTING.md` for the full module authoring guide and test harness documentation.

lib/Helpers.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ function Compare-Baseline {
558558
$oldSvcNames = $old.Services | ForEach-Object { $_.Name }
559559
$currentSvcs = Get-CimInstance Win32_Service -ErrorAction SilentlyContinue
560560
foreach ($svc in $currentSvcs) {
561+
if ($svc.Name -match '_[0-9a-f]{5,}$') { continue } # skip per-user session service instances (e.g. AarSvc_ddff8)
561562
if ($svc.Name -notin $oldSvcNames) {
562563
Add-Finding -Severity "WARNING" -Category "Baseline" `
563564
-Title "New Service: $($svc.Name)" `

0 commit comments

Comments
 (0)