Add a compass client stop command

Table of Contents

This page is a capture in the discarded bucket of the product backlog.

Resolved (deep backlog refinement, 2026-07-11): projects/ores.compass/src/compass_services.py defines cmd_client_stop (line 497) and run_client() registers a 'stop' subparser (line 566) dispatching to it; compass.py wires 'client' to compass_services.run_client. The stop verb already exists.

What

compass client launches the Qt client detached (compass client [--instance-name …] [--colour …]) and prints its PID, but there is no way to stop it again through compass. compass client stop is not a recognised subcommand — the parser only accepts launch options (--preset, --colour, --instance-name, --log-level), so stopping a running client currently means finding the PID by hand (pgrep -af ores.qt) and killing it, or tearing down the whole fleet. Add a stop verb that terminates the detached client(s): compass client stop [--instance-name <name>] to stop a specific instance, and stop-all when no name is given. It should resolve the PID the same way launch records it (PID file / instance name / instance-color), terminate gracefully, and report what was stopped — mirroring compass services stop.

Why

The launch/stop asymmetry is a rough edge: you can start a client through compass but not stop it, which breaks the compass-first workflow and forces raw pgrep=/=kill (a documented anti-pattern). This bites especially when running multiple named instances (e.g. the two-client NATS eventing verification), where killing the right one by PID is error-prone.

References

  • projects/ores.compass/ client launch implementation (Operate pillar, compass client).
  • Symmetry reference: compass services stop.

See also

Emacs 29.3 (Org mode 9.6.15)