Skip to content

machine-health: the 10-file windows check envelope is repeated verbatim across the check family #3451

Description

@kyle-sexton

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

  • Checks share one envelope implementation; full Pester lane green on Windows CI.

References

  • plugins/machine-health/skills/audit/scripts/windows/checks/

Filed by the /code-tidying:batch-simplify closeout (Phase 8).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions