Skip to content

machine-health: let /machine-health:setup add and remove service exclusions #9258

Description

@kyle-sexton

check_overrides.services.service_exclusions in approvals.json lists services the restart-stopped-service remediation never starts. The fix/machine-health-check-overrides branch wires it, but nothing writes it: Set-ApprovalState only preserves the list, so the owner has to edit approvals.json by hand, the one key where that is still allowed.

Done when /machine-health:setup can add and remove an exclusion through Set-ApprovalState (validated, locked, atomic, like mutes), and the schema and approvals.md stop calling the key hand-edited.

🤖 Generated with Claude Code

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 22, 2026
  2. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: /machine-health:setup should be able to add and remove service exclusions through Set-ApprovalState (validated, locked, atomic, like mutes). The schema and approvals.md should then stop calling the key hand-edited. The refinement comment already lists acceptance criteria and the files involved, and nothing further is missing. The related work it names (#9260, #8925, #9226) is context, not a duplicate. I found no duplicate among the open issues.

    Automated triage, applied by the lanes App.

  3. added
    priority: lowNice-to-have, cosmetic, or speculative; opportunistic.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 22, 2026
  4. github-actions commented on Oct 26, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  5. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    and removed
    priority: lowNice-to-have, cosmetic, or speculative; opportunistic.
    on Oct 26, 2026
  6. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 26, 2026
  7. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  8. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: the issue is at status: ready.

  9. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    and removed
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    on Oct 26, 2026
  10. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: /machine-health:setup apply can add and remove a service exclusion through Set-ApprovalState (validated, locked, atomic), and the schema and approvals.md no longer call the key hand-edited.

    Acceptance criteria

    • Set-ApprovalState.ps1 ValidateSet on -Action gains two actions, exclude-service and include-service, taking a service name parameter.
    • exclude-service appends the name to check_overrides.services.service_exclusions, creating check_overrides and services when absent, and keeps all other keys such as remediations and migration.
    • A name already listed (case-insensitive, as Restart-StoppedService matches) is not added twice and the call returns Changed false.
    • include-service removes the matching entry case-insensitively and throws when the name is not listed, like unmute.
    • An empty or whitespace name, or a name with control characters, throws and writes nothing.
    • Both actions run under approvals.lock, check the result against approvals.schema.json and replace the file through Write-StateFile, the same path as approve and revoke.
    • Set-ApprovalState.Tests.ps1 has passing Pester tests for add, duplicate add, remove, remove of an absent name, an invalid name, and preservation of remediations.
    • skills/setup/SKILL.md lists non-interactive arguments (e.g. exclude-service=<name>, include-service=<name>) in apply, the argument-hint and the re-read confirmation, and SkillCommands tests still pass.
    • approvals.schema.json:5 drops the exception saying setup cannot write service_exclusions yet.
    • reference/shared/approvals.md:85-87 drops the hand-edit sentence and names the new setup arguments; the Writing section no longer implies an exempt key.
    • plugins/machine-health/CHANGELOG.md has an entry for the new setup arguments.

    Dependencies

    • PR 9260 (merged per CHANGELOG.md:41) already made Restart-StoppedService read service_exclusions; nothing else is awaited.

    Related work

    Sources read

    • plugins/machine-health/skills/audit/scripts/windows/lib/Set-ApprovalState.ps1:44: Action ValidateSet is mute, unmute, approve, revoke only; no exclusion action.
    • plugins/machine-health/skills/audit/scripts/windows/lib/Set-ApprovalState.ps1:120-146: approve and revoke show the pattern (File, Validate, Apply) to follow.
    • plugins/machine-health/skills/audit/catalog/schemas/approvals.schema.json:5: description says setup cannot write service_exclusions yet.
    • plugins/machine-health/skills/audit/catalog/schemas/approvals.schema.json:63-67: service_exclusions is an array of strings.
    • plugins/machine-health/skills/audit/reference/shared/approvals.md:85-87: says the owner edits the key by hand.
    • plugins/machine-health/skills/setup/SKILL.md:167-195: lists the non-interactive apply arguments and how Set-ApprovalState is called.
    • plugins/machine-health/skills/audit/tests/windows/lib/Set-ApprovalState.Tests.ps1:203-208: test that approve preserves service_exclusions.
    • plugins/machine-health/CHANGELOG.md:41: Restart-StoppedService honors service_exclusions.

    Automated refinement by the lanes App. Intake triages the issue again with it.

  11. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 26, 2026
  12. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, or it stopped or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  13. added
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 27, 2026
  14. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, or it stopped or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  15. added
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions