Skip to content

[BUG] FixVerifier checks services on the agent host instead of the target server #193

Backlog

Description

@OkiriGabriel

Problem

tools/fix_verifier.py checks whether a service came back with platform.system() and a local subprocess.run(["systemctl", "is-active", …]) (or sc query on Windows). That checks the machine running the agent, not the server that was fixed. With the centralized agent (SSH targets, SSH_REMOTE_USER), verification of a server fix:

  • reports "running" when a service of the same name happens to run on the agent host, or
  • reports failure (and escalates) when the agent host simply doesn't have that service.

Either way, resolved can be wrong. #19 fixed the same mistake in the server collector, which now detects the target's OS over SSH.

Proposed fix

  • Pass the incident's target host into the verifier and run the check through the same path as collectors/server.py (build_ssh_argv for remote hosts, local shell otherwise).
  • Choose systemctl is-active or the PowerShell Get-Service check from the target's os_family (reuse ServerCollector.detect_os).
  • Tests: a remote host check uses SSH argv; a Windows target uses the PowerShell path; a local check still works.

Files

tools/fix_verifier.py, collectors/server.py, agent/core.py (where verify_fix is called), tests/test_fix_verifier.py

Activity

  1. added
    bug
    on Nov 25, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions