feat: add emergency cleanup command
Some checks failed
tamq-ci / test (push) Failing after 6s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
tegwick 2026-08-25 15:21:50 +02:00
parent 3075c63e01
commit 82cfe3da5a
10 changed files with 660 additions and 4 deletions

View file

@ -227,6 +227,31 @@ tamq stop
tmux kill-session -t tamq
```
For a runaway or stale installation, use the emergency cleanup command from a
terminal outside the managed session. It is a dry run unless `--yes` is given:
```bash
tamq cleanup
tamq cleanup --yes
```
Confirmed cleanup stops only the verified tamq broker, closes only a tmux
session carrying tamq's management marker, disconnects transient endpoints,
clears leases, removes the configured socket/PID/lock files, deletes only
tamq-generated `@repo` shims, and removes owned stale `tamq-*` tmux sockets.
Durable message history and unrelated tmux sessions or files are preserved.
The command is idempotent; an ownership mismatch is reported instead of being
removed.
History remains a separate explicit operation. A reflected delivery incident
can be selected by durable receipt direction, dry-run, and then removed without
age-based purging:
```bash
tamq purge --feedback-chain m-...
tamq purge --feedback-chain m-... --yes
```
Uninstall the user tool from the checkout with `make uninstall`, or from
anywhere with `uv tool uninstall tmux-amq`.