Repository navigation
refactor(machine-health): derive the elevation banner coverage from the catalog - #8910
Conversation
…he catalog The banner's "Covered non-elevated" list was a hardcoded nine-line list that had drifted behind the catalog. Get-NonElevatedCoverage now derives it from the enabled needs_admin: false entries through Format-CheckLabel, which moves to its own lib file so the banner and the report label checks the same way. The banner call moves after the catalog load. The prose table in elevation-matrix.md is removed in favor of Get-ElevationMatrix.ps1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ign review Get-NonElevatedCoverage filters only on needs_admin, since the caller passes the run set; Format-CheckLabel requires -CustomIds so a call that omits it fails instead of mislabeling custom checks. Its tests use literal cases. The elevation-matrix doc, the banner docstring and the Test-Drivers comment cite the helpers by name instead of restating them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security issues found in PR #8910 at head f12a8f8. The PR is a refactor in the machine-health audit skill:
What I checked:
|
|
claude-review reviewed No findings. I read the full diff and the surrounding orchestrator code. I did not run the Pester suites or the host smoke test, so the PR's verification counts (545 passed, 0 failed) are the author's claims and unverified by me.
|
No related issue: Phase 1 of the owner-approved machine-health PC-checkup plan (ADR 0081 landed in #8906).
Summary
The banner's "Covered non-elevated" list was a hardcoded copy of the catalog. It had drifted to 9 phrases against 17 enabled
needs_admin: falsechecks. The prose table inelevation-matrix.mdalso copiedGet-ElevationMatrix.ps1and had drifted to 4 rows against 5. This change removes both copies, soGet-ElevationMatrix.ps1and the catalog are the only sources before later phases add matrix rows.Fix
lib/Get-NonElevatedCoverage.ps1derives the covered list from the run set (Windows, enabled, not deprecated) filtered onneeds_admin: false, labeled throughFormat-CheckLabel.Format-CheckLabelmoves tolib/Format-CheckLabel.ps1.-CustomIdsis now a mandatory parameter instead of a script-scope read.elevation-matrix.mddrops its prose table and its "update both files" and drift-check lines, and points toGet-ElevationMatrix.ps1andGet-NonElevatedCoverage.patch).Dead-code search: every function under
scripts/windows/lib/was counted againstscripts,SKILL.md,referenceandskills/setup. Twenty functions had no caller outside their own file, but each has two or more uses inside it, so none is dead and nothing is deleted for being uncalled.Verification
run-tests.ps1exits 0: 545 passed, 0 failed, 1 skipped (baseline 536 + 9 new).Get-NonElevatedCoverage,Format-CheckLabelandWrite-ElevationBannereach list one file and exit 0.-DryRun), with and without-SkipBanner, exits 0 andlatest.jsonparses.check-changelog-fragments.sh --checkexits 0.Related
Later phases add matrix rows for
startup-items,app-last-useandbackup-statusagainst this single source.🤖 Generated with Claude Code