Skip to content

v6.1.0 - shared library, unified report, scheduler, best-in-class coverage#3

Merged
denfry merged 6 commits into
mainfrom
feat/v6.1.0-best-on-market
Jun 24, 2026
Merged

v6.1.0 - shared library, unified report, scheduler, best-in-class coverage#3
denfry merged 6 commits into
mainfrom
feat/v6.1.0-best-on-market

Conversation

@denfry

@denfry denfry commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Maintenance-suite upgrade to v6.1.0. Four coherent pieces, each committed separately.

1. Shared library (refactor)

New WinSenior.Common.ps1 dot-sourced by every engine + the menu: admin check, WhatIf probe, byte formatter, canonical logger (Write-WsLog), and the System Restore routine (New-WinSeniorRestorePoint). ~175 duplicated lines removed; public signatures unchanged. CI now globs all root *.ps1 for parse + PSScriptAnalyzer (the UI/common/schedule libraries were previously unlinted).

2. Unified report + scheduled-task installer

  • Every engine's -ReportPath now writes one envelope via Write-WinSeniorReport: Tool/Version/Engine/Host/Timestamp/Mode/RestorePoint/DurationSec + engine-specific Summary + Items. Breaking for old clean.json/repair.json consumers (counters moved under Summary).
  • New WinSenior.Schedule.ps1 + WinSenior.ps1 -InstallSchedule/-RemoveSchedule: weekly unattended cleanup + monthly read-only health scan under \WinSenior\, reports to %ProgramData%\WinSenior\reports.

3. Best-in-class coverage (competitive gap audit)

Every proposed gap grounded against the live registry first (no duplicate targets).

  • Cleanup 57 → 63 — SRUM/EventTranscript telemetry DBs, live-kernel dumps, RDP/PowerShell/Windows caches; + OptixCache, + $WinREAgent.
  • Optimize 29 → 49 — modern Win11 privacy/debloat: Recall/Click-to-Do, Copilot, tailored-ads, Spotlight, inking/typing/speech telemetry, CEIP/Appraiser/WER, P2P-upload, classic context menu, taskbar/Start ad surfaces… Debatable items off by default; nothing touches Defender RTP / Windows Update / Edge / Store.
  • Repair 13 → 25 — firewall/SMBv1/hosts/proxy-hijack/Defender-signatures (security), System Restore safety-net, BITS/spooler/Store health, report-only SSD wear + crash history. Scans are locale-safe and read-only.

4. Release tooling

CHANGELOG.md, tools/Build-Release.ps1 (zip + SHA256SUMS), tools/Sign-Scripts.ps1; version bumped to 6.1.0; per-tool/editor configs git-ignored.

Verification

Dot-sourced under pwsh 7 and Windows PowerShell 5.1: registries build (63/49/25), IDs unique, areas/categories valid, every new repair scan runs without throwing, report round-trips, both schedule triggers build. Pester suites gained "New coverage" blocks. Live task registration / signing / actual release left to the maintainer.

Two latent bugs fixed: @() throws ArgumentException on the List[object] engines pass (cast [object[]]); Get-AppxPackage raises a terminating load error under pwsh 7 that -EA SilentlyContinue misses (wrapped in try/catch).

🤖 Generated with Claude Code

denfry and others added 6 commits June 24, 2026 10:36
The admin check, WhatIf probe, byte formatter, console+file logger, and the
System Restore point routine were copy-pasted into all three engines. Pull
them into one dot-sourced WinSenior.Common.ps1 so a fix lands once instead of
drifting between three copies.

- Each engine dot-sources Common and keeps a 1-line wrapper (Write-*Log,
  New-*RestorePoint), so every call site is unchanged.
- New-WinSeniorRestorePoint returns 'WhatIf'|'Created'|'Failed'; the caller
  owns its own $script:RestorePointMade flag and logs via a -LogAction block.
- WinSenior.ps1 drops its local Test-Admin and uses Test-AdminPrivileges.
- CI globs all root *.ps1 for parse + PSScriptAnalyzer instead of a hardcoded
  4-file list, so WinSenior.UI.ps1 is finally linted too.
- Add tests/WinSenior.Common.Tests.ps1 (Pester 5, mocked restore point).

Net -175 duplicated lines across the engines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ller

Part A - unified report. All three engines' -ReportPath now write one envelope
via the new Write-WinSeniorReport helper in Common:
Tool/Version/Engine/Host/Timestamp/Mode/RestorePoint/DurationSec + engine-specific
Summary{} and Items[]. Each Write-*Report shrinks to a single call. Fixes a latent
trap: @() throws 'Argument types do not match' on the Generic.List[object] the
engines pass, so the helper casts via [object[]].

Part B - scheduled-task installer. New dot-sourced WinSenior.Schedule.ps1 with a
pure planner (Get-WinSeniorScheduleSpec) plus Install-/Remove-WinSeniorSchedule.
WinSenior.ps1 gains -InstallSchedule / -RemoveSchedule (fire-and-exit). Registers
a weekly unattended cleanup and a monthly read-only health scan under \WinSenior\,
reports to %ProgramData%\WinSenior\reports. Weekly trigger via the cmdlet; monthly
via the MSFT_TaskMonthlyTrigger CIM class (MonthOfYear is singular and required).

Tests: report round-trip + envelope assertions in Common.Tests; pure-spec coverage
in the new Schedule.Tests. Verified by dot-sourcing under pwsh 7 and PS 5.1 (all
three engines' reports + both trigger builds); live task registration is left to a
real machine. README documents both.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… 49, repair 25)

Competitive gap audit vs CCleaner/BleachBit/Wise/Tron, O&O ShutUp10/privacy.sexy/
Win11Debloat/Sophia/WinUtil, and built-in troubleshooters. Every proposed gap was
grounded against the live registry first, so already-covered targets were not
duplicated.

Cleanup 57->63: win-caches, ps-modulecache, rdp-cache, livekernel, srum-db (stops
DPS), eventtranscript (stops DiagTrack); extended shadercache (OptixCache/NV_Cache)
and windows-old ($WinREAgent).

Optimize 29->49: modern Win11 privacy/debloat the tool was missing - Recall &
Click-to-Do, Copilot, tailored-ads, Spotlight policy, inking/typing & speech
telemetry, CEIP/Appraiser/WER, Delivery-Optimization P2P, OneDrive pre-signin,
cloud-clipboard(off); combined taskbar/Start ad-surface debloat, SCOOBE nag,
show-file-extensions(off), classic context menu(off), Teredo(off), Fast-Startup(off).
All reversible; none touch Defender RTP / Windows Update / Edge / Store.

Repair 13->25: restore-enabled, hosts-integrity, proxy/PAC hijack, firewall-state,
Defender signatures (update-only), SMBv1, critical scheduled-task health, BITS,
print spooler, Store health, plus report-only SSD wear and crash history. Scans are
locale-safe (CIM/registry/enums, Get-WinEvent in try/catch) and read-only; Get-AppxPackage
wrapped in try/catch for pwsh 7.

Tests: 'New coverage' Describe blocks added to all three suites. Verified by dot-sourcing
under pwsh 7 and Windows PowerShell 5.1 (registries build, IDs unique, every new repair
scan runs without throwing). README counts updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Bump version to 6.1.0 (Get-WinSeniorVersion single source + headers + README badge).
- Add CHANGELOG.md (Keep a Changelog) documenting the v6.1.0 work.
- Add tools/Build-Release.ps1 (zip + SHA256SUMS, version-driven) and
  tools/Sign-Scripts.ps1 (Authenticode signing of the root scripts).
- .gitignore the per-tool/editor configs (.codex/.cursor/.opencode/.windsurf/.zed,
  AGENTS.md) and the dist/ build output - they are machine-local, not project files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use a function-local list + GetNewClosure instead of $script: scope: a script-scoped
variable read inside the closure resolves to $null across the closure module boundary,
which crashed the three New-WinSeniorRestorePoint tests with 'cannot call a method on a
null-valued expression'. Verified the closure mechanism locally (WhatIf path) under pwsh 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@denfry denfry merged commit a5dd683 into main Jun 24, 2026
1 check passed
@denfry denfry deleted the feat/v6.1.0-best-on-market branch June 24, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant