feat(#438): add StartupSweep queue kind — group boot-time rebuilds under a parent entry
This commit is contained in:
parent
816523861c
commit
ba7e9b0ef2
4 changed files with 64 additions and 20 deletions
|
|
@ -54,14 +54,15 @@ since the current run started).
|
|||
| Source | Meaning |
|
||||
|--------|---------|
|
||||
| `Manual` | Operator clicked rebuild / update-all / meta-update on the dashboard, or any other direct human action (CLI, manager tool). |
|
||||
| `AutoUpdate` | Fired by the startup sweep or a meta-update cascade. |
|
||||
| `AutoUpdate` | Legacy startup-sweep source (flat, no parent). Replaced by `StartupSweep` for new boots. |
|
||||
| `StartupSweep` | Child of a `StartupSweep` parent entry; boot-time per-agent rebuild with the sweep as the visual group header. |
|
||||
| `Approval` | Triggered by an operator-approved `ApprovalKind::{Spawn, ApplyCommit}`. |
|
||||
|
||||
### Cascade parent tracking
|
||||
|
||||
`MetaUpdate` entries fan out `Rebuild` children, each carrying
|
||||
`parent_id = <meta_update_id>`. The dashboard groups children under their parent
|
||||
in the queue panel so the operator sees the whole meta-update cascade as a tree,
|
||||
`MetaUpdate` and `StartupSweep` entries fan out `Rebuild` children, each carrying
|
||||
`parent_id = <parent_id>`. The dashboard groups children under their parent
|
||||
in the queue panel so the operator sees the whole cascade as a tree,
|
||||
not a flat list.
|
||||
|
||||
### Step labels
|
||||
|
|
@ -89,8 +90,17 @@ render.
|
|||
On startup, `auto_update.rs` rebuilds every known container unconditionally.
|
||||
`nixos-container update` is a no-op at the nix level when nothing changed (same
|
||||
store path), so the cost is low and avoids rev-marker staleness — all agents always
|
||||
need an update pass when any meta commit lands. Each rebuild is enqueued as a
|
||||
`Rebuild` entry with `source = AutoUpdate` and drains through the global queue.
|
||||
need an update pass when any meta commit lands.
|
||||
|
||||
`auto_update::run` enqueues a single `StartupSweep` parent entry (`kind =
|
||||
startup_sweep`, `agent = "hyperhive"`) followed by per-agent `Rebuild` children
|
||||
(`source = startup_sweep`, `parent_id = sweep_id`). The worker processes the parent
|
||||
by bumping the meta `hyperhive` input lock, then transitions it to Done. The child
|
||||
rebuilds drain sequentially through the queue; the dashboard renders them nested
|
||||
under the parent so the operator can see the whole boot-time sweep in one group.
|
||||
|
||||
Before this change, each boot enqueued flat `Rebuild` entries with
|
||||
`source = AutoUpdate` and no parent — visible but ungrouped.
|
||||
|
||||
## Meta flake
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue