Repository navigation
fix(machine-health): honor service_exclusions and drop the unread noise_allowlist - #9260
Conversation
check_overrides.services.service_exclusions was documented as the list of services Restart-StoppedService must never touch, but nothing read it. Restart-StoppedService takes -ExcludedService and skips any target whose name equals an entry (case-insensitive) before Get-Service or Start-Service, with no attempt record, reporting the skip on the information stream. Get-ServiceExclusion reads the list from the loaded approvals state, returning an empty list when any level is absent. The orchestrator passes the list and writes each skip to the run log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No check reads check_overrides.event-log-errors.noise_allowlist, so approvals.md and the Test-EventLogErrors comment no longer present it as a per-host extension. approvals.json stays at schema_version 1.0. The schema is strict (additionalProperties: false), so noise_allowlist stays an accepted property, now described as ignored, and an existing file that holds it still validates. The schema description also no longer invites hand edits: approvals.json is written by /machine-health:setup (Set-ApprovalState) and the one-time first-run migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup cannot write it yet (#9258), so the schema's no-hand-edit line excepts it. 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 Security review: PR #9260 (head f95e4e6)Result: no security issues found. 0 findings, no inline comments posted. Scope: The PR makes Analysis
|
|
claude-review reviewed No findings on #9260 at f95e4e6. I read the diff and the PR context, and checked the call path in the source. I ran no tests and no PowerShell, so the Pester results in the PR body are the author's claim and I haven't confirmed them. What I checked
Test coverage |
No related issue: owner-approved follow-up T-CHALLENGE-OVERRIDES from the machine-health checkup extension plan (decided 2026-10-21).
Summary
approvals.jsondocumented twocheck_overrideskeys that no script read. This wires the one that is a safety control and stops documenting the other.services.service_exclusionsnow keepsRestart-StoppedServiceaway from the listed services.event-log-errors.noise_allowlistis no longer documented, and the schema still accepts it so existing files validate.Fix
Restart-StoppedService.ps1takes-ExcludedService. A target whose name matches an entry exactly, ignoring case, is skipped before anyGet-ServiceorStart-Servicecall, gets no attempt record, and is reported on the information stream. The orchestrator passes the list through the newGet-ServiceExclusion(it returns an empty list when any part of the path is absent) and logs each skip asremediation_info.noise_allowlistis removed fromapprovals.mdand theTest-EventLogErrors.ps1comment. The schema keeps the property but describes it as ignored: the schema is strict (additionalProperties: false), so dropping it would fail validation for any existing file that holds it.approvals.schema.jsontop-level description no longer invites hand edits. Writes go through/machine-health:setup. The exception isservice_exclusions, which setup cannot write yet (#9258).Verification
Restart-StoppedServiceexclusions (an excluded stopped service is never started, the others are) andGet-ServiceExclusion(absent at each level returns an empty list).-ExcludedServicedoes not exist there), not at a restarted service. No test harness drives the orchestrator's remediation dispatch, so the end-to-end wiring is covered by reading the call site, not by a test.check-shell-portability.sh origin/main, markdownlint, typos and the changelog-fragment check pass.Related
🤖 Generated with Claude Code