Release: GUID canonicalization fix (dev -> main) #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Promotes
devtomainfor release. Included since the lastmainrelease:OrphanTreeEntryfindings from ignorable characters in TaskCache Ids (#6).Some
TaskCache\Tree"Id" values carry a stray ignorable character (for example a zero-widthspace) after the GUID. The registry and PowerShell hashtables ignore such characters, but a
.NET
HashSetkeyed withOrdinalIgnoreCasetreats them as significant, which produced alarge batch of false
OrphanTreeEntryfindings (observed: 197 of 213 on a host whose taskswere actually healthy - only 26 were genuinely orphaned). GUIDs are now normalized by
regex-extracting the canonical 8-4-4-4-12 hex pattern in both
Test-ScheduledTaskHealth.ps1and
Get-TaskCacheSummary.ps1.Confirmed on the affected host after the fix: TreeWithoutTasks dropped from 197 to 26 and
TasksWithoutTree from 172 to 1, matching a direct
Test-Pathverification.Fixes #
How was this tested?
regression-tested that genuine orphans are still detected, and confirmed corrected counts on
the real host.
Checklist
Some TaskCache\Tree 'Id' values carry a stray ignorable character (e.g. a zero-width space) after the GUID. The registry and PowerShell hashtables (culture-aware) ignore such characters, but a .NET HashSet keyed with OrdinalIgnoreCase treats them as significant. GUID comparison via that HashSet therefore failed to match the clean TaskCache\Tasks\{GUID} subkey names, producing a large batch of false OrphanTreeEntry findings (observed: 197 of 213 on a host whose tasks were actually healthy). Normalize GUIDs by extracting the canonical 8-4-4-4-12 hex pattern with a regex, which discards any surrounding or embedded stray characters before comparison: - Get-TaskCacheSummary.ps1: Format-Guid now regex-extracts the canonical GUID. - Test-ScheduledTaskHealth.ps1: add ConvertTo-CanonicalGuid and apply it when reading Tree Id values and Tasks subkey names. OrphanTaskEntry findings keep the real subkey name for backup/removal paths. Verified against fixtures: a host with zero-width-space Tree Ids now reports zero false orphans, while genuinely orphaned Tree and Tasks entries are still detected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>