From 4634094502e80e82a21a17655759081be69be9d1 Mon Sep 17 00:00:00 2001 From: iris Date: Tue, 23 Jun 2026 21:40:47 +0200 Subject: [PATCH 1/2] =?UTF-8?q?docs(web-ui/dashboard):=20fix=20stale=20/ki?= =?UTF-8?q?ll/=20bare=20paths=20=E2=86=92=20/api/kill/=20+=20graceful=3Dtr?= =?UTF-8?q?ue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The graceful-stop description at the ■ ST0P confirm-dialog paragraph referenced `/kill/?graceful=1` and `/kill/` (bare, no /api/ prefix; lax bool `1` instead of `true`). The backend has registered these under /api/ since the /api/-prefix migration, and the frontend was updated to send `graceful=true` (not `1`) in commit f2f1a0b3 (fix: send graceful=true not =1 for the kill query param). Align the docs with shipped code. --- docs/web-ui/dashboard.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index 78fb338d..3271c08d 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -838,9 +838,9 @@ the per-agent `⋮` menu and the bulk selection bar. **Graceful stop** — the `■ ST0P` confirm dialog (per-agent and bulk) carries a `stop gracefully — let the agent finish its turn and flush state before the container stops` checkbox. When ticked, -the action POSTs `/kill/?graceful=1` (the bulk path appends -the flag per-agent); unticked is the instant hard stop -(`/kill/` with no query). The backend enqueues a +the action POSTs `/api/kill/?graceful=true` (the bulk path +appends the flag per-agent); unticked is the instant hard stop +(`/api/kill/` with no query). The backend enqueues a `GracefulStop` rebuild-queue transient: the harness runs one stop-checkpoint turn (so the agent can flush `/state`) and then exits, with a 3-minute timeout that falls back to a hard stop. The From e5da5b900e418d2ad15704e513212f88d0bd8636 Mon Sep 17 00:00:00 2001 From: iris Date: Tue, 23 Jun 2026 21:43:55 +0200 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20fix=20remaining=20bare=20/kill/=20a?= =?UTF-8?q?nd=20/rebuild/=20paths=20=E2=86=92=20/api/=20variants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit coordinator.md: GracefulStop entry referenced the old bare /kill/ path with the lax graceful=1 bool — update to /api/kill/?graceful=true. approvals.md: the auto-update badge description referenced /rebuild/ (bare, no /api/ prefix) — update to /api/rebuild/. --- docs/approvals.md | 2 +- docs/coordinator.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/approvals.md b/docs/approvals.md index c32eb7bd..55627689 100644 --- a/docs/approvals.md +++ b/docs/approvals.md @@ -617,7 +617,7 @@ auto-update is a no-op — rebuild manually. The dashboard surfaces pending updates per agent: a clickable "needs update ↻" badge appears whenever the marker differs from -current rev. The badge POSTs `/rebuild/`, calling the same +current rev. The badge POSTs `/api/rebuild/`, calling the same `auto_update::rebuild_agent` path so manual triggers and the startup scan can't drift. When at least one container is stale, a top-level `↻ UPD4TE 4LL` button appears that loops over every diff --git a/docs/coordinator.md b/docs/coordinator.md index 9dadde45..cc0f6374 100644 --- a/docs/coordinator.md +++ b/docs/coordinator.md @@ -40,7 +40,7 @@ somewhere." | `Destroy` | For future use (`destroy --purge` does real I/O). Variant exists so the wire shape doesn't change later; not currently routed through the queue. | | `Restart` | Stop + start a container without touching config (~5-10s). Routed through the queue so it serialises against in-flight rebuilds for the same agent — prevents a restart racing a rebuild mid-flight. Sources: dashboard ↺ button, the `restart` MCP tool. | | `PermChange` | Write a tool-group or capability change to the shared JSON file (`tool-groups.json` / `capabilities.json`), then rebuild the agent so the updated `HIVE_TOOL_GROUPS` / `HIVE_CAPABILITIES` env var takes effect. Serialising the file write through the queue prevents concurrent dashboard batch-apply actions from racing on the shared file. After a successful file write, emits `CapabilitiesChanged` or `ToolGroupsChanged` SSE snapshot so the P3RM1SS10NS tab updates live. | -| `GracefulStop` | Quiesce then stop a container (the `?graceful=1` path on `/kill/`). Signals the harness (its next `Recv` returns `GracefulStop` — the inbound fence — so it runs one stop-checkpoint turn to flush durable `/state`, then exits), waits for it to drain (bounded by a 3-min timeout → hard-stop fallback), then runs the normal container-stop teardown. Queued so it can't race an in-flight rebuild for the same agent. | +| `GracefulStop` | Quiesce then stop a container (the `?graceful=true` path on `/api/kill/`). Signals the harness (its next `Recv` returns `GracefulStop` — the inbound fence — so it runs one stop-checkpoint turn to flush durable `/state`, then exits), waits for it to drain (bounded by a 3-min timeout → hard-stop fallback), then runs the normal container-stop teardown. Queued so it can't race an in-flight rebuild for the same agent. | **Intentionally not queued** (sub-second ops): the *hard* `start`, `stop`, `kill`. (A *graceful* stop is the `GracefulStop` kind above — it takes a checkpoint turn, so it rides the queue.)