Context
Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). Deferred from the sweep as dedicated-PR-shaped work: the consolidation crosses file or contract boundaries a behavior-preserving sweep must not cross.
The stopwatch / id / try-catch / UNKNOWN fallback / duration restamp / Write-HealthResult envelope is repeated verbatim across the entire scripts/windows check family. Dedup would be a dedicated pass over scripts/windows/lib plus every check, with Pester mock-scope implications that need a Windows runner to prove.
Proposed work
- Design an envelope helper (or template) in scripts/windows/lib and migrate checks in reviewed batches on a runner with Pester.
Acceptance criteria
References
plugins/machine-health/skills/audit/scripts/windows/checks/
Filed by the /code-tidying:batch-simplify closeout (Phase 8).
Context
Found by the repo-wide
/code-tidying:batch-simplifysweep (62 groups / 986 files, branchclaude/repo-code-tidying-batch-twhddw). Deferred from the sweep as dedicated-PR-shaped work: the consolidation crosses file or contract boundaries a behavior-preserving sweep must not cross.The stopwatch / id / try-catch / UNKNOWN fallback / duration restamp / Write-HealthResult envelope is repeated verbatim across the entire scripts/windows check family. Dedup would be a dedicated pass over scripts/windows/lib plus every check, with Pester mock-scope implications that need a Windows runner to prove.
Proposed work
Acceptance criteria
References
plugins/machine-health/skills/audit/scripts/windows/checks/Filed by the /code-tidying:batch-simplify closeout (Phase 8).