feat(#343): route container restart through rebuild queue

This commit is contained in:
damocles 2026-06-02 12:59:49 +02:00
commit dce2bd0686
4 changed files with 35 additions and 21 deletions

View file

@ -38,9 +38,9 @@ somewhere."
| `MetaUpdate` | `nix flake update` on the meta flake. The worker runs the lock bump itself, then enqueues a cascade of `Rebuild` entries with `parent_id` set to the meta-update's id. |
| `Spawn` | First-deploy of a new agent (approval-driven). Same serialisation as `Rebuild` from the operator's POV. |
| `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, manager `restart` MCP tool. |
**Intentionally not queued** (sub-second ops; adding them adds dashboard noise
without serving the "one at a time" goal): `start`, `stop`, `restart`, `kill`.
**Intentionally not queued** (sub-second ops): `start`, `stop`, `kill`.
### Dedup