Add a time-boxed hold on autonomous work

Working on the live stack meant fighting the daemon: it triaged alerts a
deploy caused, and its own commits landed mid-session. Stopping the service
is the only lever today, and it is easy to leave stopped.

`hold 45m <why>` in Matrix, or `maintainer.py --hold 45m --reason …` from a
shell, pauses everything the daemon starts by itself — health cycles, alert
triage, weekly upgrades — for a bounded time. Operator messages still run,
and alerts still batch, so one triage run covers the whole hold. It says in
the room when the hold starts and when it runs out, `status` shows it, and
`resume` ends it early.

The hold lives in hold.json beside the state file: `--hold` from a shell has
to reach a daemon that rewrites its own state whenever it likes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
paulandClaude Opus 5 committed 2026-09-16 11:15:54 +12:00
1 parent a725abbfbc
commit 4782849ce5
3 files changed
+207 -4

No files matched your search

+9 -1
View File
@@ -31,7 +31,15 @@ JSON result.
- **Operator messages** (Stack Maintenance room): read by a long-poll `/sync`, so they
arrive within about a second. A follow-up within `conversation_ttl_seconds` resumes the
same Claude session (`--resume`), so it behaves like a chat. `status`, `cancel`, `new`,
`upgrade` and `help` are answered by the listener without the agent, even mid-run.
`upgrade`, `hold`, `resume` and `help` are answered by the listener without the agent,
even mid-run.
- **Hold** (`hold 45m <why>` in Matrix, `maintainer.py --hold 45m --reason …` from a
shell): a time-boxed pause on everything the daemon starts by itself — health cycles,
alert triage and upgrades — while operator messages still run and alerts still batch, so
one triage run covers the whole hold. It lives in `hold.json` next to the state file
because a shell has to reach a daemon that owns its own state file, and it expires by
itself so nothing stays paused by accident. semprini-core's `sync-to-host.sh` sets 15
minutes on each deploy.
- **Alerts** (`#stack-alerts`, written by `@alerts` via Loki → Alertmanager →
matrix-alerts): FIRING messages are batched for `alerts.batch_seconds` and triaged in
one run, answered in a thread under the alert. Non-`ok` results are mirrored to Stack