feat(#2485): remove vestigial Noop + StartupSweep residuals
Since the boot sweep (#2450) and meta-update cascade (#2476) became single DAGs that grow subgraphs in-place, nothing constructs the old fan-out anchors/parents anymore: - NodeKind::Noop (the old boot_root grouping anchor) — no constructors. - Template::StartupSweep / Source::StartupSweep (the old fan-out parent template + cascade-child source) — replaced by Template::Boot and Source::AutoUpdate/MetaUpdate respectively. Drops the three variants + their as_str arms + the Noop executor arm, and refreshes the stale fan-out/anchor doc comments (Boot/MetaUpdate/Source docs, coordinator.md, dashboard.md). Frontend: the queue-kind glyph moves from the dead startup_sweep to boot (which had none), and the dead rqe-source-startup_sweep style is dropped. No behaviour change — pure dead-variant removal.
This commit is contained in:
parent
a73216e8be
commit
fbbd5d921c
9 changed files with 27 additions and 45 deletions
|
|
@ -241,10 +241,10 @@ On startup, `auto_update::run` classifies every agent by rev freshness (the
|
||||||
per-agent `.{name}.hyperhive-rev` marker under `/var/lib/hyperhive/applied/`
|
per-agent `.{name}.hyperhive-rev` marker under `/var/lib/hyperhive/applied/`
|
||||||
vs the current flake path) and persisted `wanted` intent, then:
|
vs the current flake path) and persisted `wanted` intent, then:
|
||||||
|
|
||||||
1. **Config path** — when *any* marker is stale, submit one `StartupSweep`
|
1. **Config path** — when *any* marker is stale, submit one `Boot`
|
||||||
DAG: a `MetaLock` (hyperhive input bump, non-fatal) that fans out `Rebuild`
|
DAG: a `MetaLock` (hyperhive input bump, non-fatal) that grows an in-DAG
|
||||||
children for the stale agents whose `wanted = Up` (topology-sorted, parents
|
`Rebuild` subgraph for each stale agent whose `wanted = Up` (topology-sorted,
|
||||||
first). Stale but wanted-offline agents get no boot-time nix work — their
|
parents first). Stale but wanted-offline agents get no boot-time nix work — their
|
||||||
rebuild happens on their next start (the start submit path upgrades a
|
rebuild happens on their next start (the start submit path upgrades a
|
||||||
stale start to rebuild+start), which is also why the lock bump runs even
|
stale start to rebuild+start), which is also why the lock bump runs even
|
||||||
when every stale agent is offline: those later start-upgrades must build
|
when every stale agent is offline: those later start-upgrades must build
|
||||||
|
|
|
||||||
|
|
@ -207,9 +207,9 @@ One operation runs at a time; the worker drains FIFO. Each row
|
||||||
shows a state glyph (`⏸` queued / `▶` running / `✔` done /
|
shows a state glyph (`⏸` queued / `▶` running / `✔` done /
|
||||||
`✖` failed / `⊘` cancelled), kind glyph + verb (`↻ rebuild`,
|
`✖` failed / `⊘` cancelled), kind glyph + verb (`↻ rebuild`,
|
||||||
`◆ meta_update`, `✨ spawn`, `🗑 destroy`, `↺ restart`,
|
`◆ meta_update`, `✨ spawn`, `🗑 destroy`, `↺ restart`,
|
||||||
`⚡ startup_sweep`, `🔑 perm_change`, `⏹ graceful_stop`, `▶ start`,
|
`⚡ boot`, `🔑 perm_change`, `⏹ graceful_stop`, `▶ start`,
|
||||||
`■ stop`), agent name,
|
`■ stop`), agent name,
|
||||||
source chip (`manual | meta_update | auto_update | startup_sweep | crash_recover | approval`
|
source chip (`manual | meta_update | auto_update | crash_recover | approval`
|
||||||
— green for operator-approved config changes), timing, and an
|
— green for operator-approved config changes), timing, and an
|
||||||
optional reason / error. A multi-step op is a single DAG: its
|
optional reason / error. A multi-step op is a single DAG: its
|
||||||
per-agent subgraphs and sub-steps (a meta-update cascade's per-agent
|
per-agent subgraphs and sub-steps (a meta-update cascade's per-agent
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ const QUEUE_KIND_GLYPH = {
|
||||||
spawn: '✨',
|
spawn: '✨',
|
||||||
destroy: '🗑',
|
destroy: '🗑',
|
||||||
restart: '↺',
|
restart: '↺',
|
||||||
startup_sweep: '⚡',
|
boot: '⚡',
|
||||||
perm_change: '🔑',
|
perm_change: '🔑',
|
||||||
graceful_stop: '⏹',
|
graceful_stop: '⏹',
|
||||||
start: '▶',
|
start: '▶',
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,6 @@
|
||||||
.rqe-source-manual { color: var(--cyan); border-color: var(--cyan); }
|
.rqe-source-manual { color: var(--cyan); border-color: var(--cyan); }
|
||||||
.rqe-source-meta_update { color: var(--purple); border-color: var(--purple); }
|
.rqe-source-meta_update { color: var(--purple); border-color: var(--purple); }
|
||||||
.rqe-source-auto_update { color: var(--muted); }
|
.rqe-source-auto_update { color: var(--muted); }
|
||||||
.rqe-source-startup_sweep { color: var(--muted); }
|
|
||||||
.rqe-source-crash_recover { color: var(--amber); border-color: var(--amber); }
|
.rqe-source-crash_recover { color: var(--amber); border-color: var(--amber); }
|
||||||
.rqe-source-approval { color: var(--green); border-color: var(--green); }
|
.rqe-source-approval { color: var(--green); border-color: var(--green); }
|
||||||
.rqe-when { color: var(--muted); font-size: 0.85em; }
|
.rqe-when { color: var(--muted); font-size: 0.85em; }
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,6 @@ pub(super) async fn run_node(coord: &Arc<Coordinator>, claim: &Claim) -> Result<
|
||||||
NodeKind::WriteDropin => run_write_dropin(coord, claim).await,
|
NodeKind::WriteDropin => run_write_dropin(coord, claim).await,
|
||||||
NodeKind::WritePermFile => run_write_perm_file(coord, claim, &ctx).await,
|
NodeKind::WritePermFile => run_write_perm_file(coord, claim, &ctx).await,
|
||||||
NodeKind::ApprovalDeploy => run_approval_deploy(coord, claim).await,
|
NodeKind::ApprovalDeploy => run_approval_deploy(coord, claim).await,
|
||||||
// A pure grouping anchor (boot root): no work, completes immediately so
|
|
||||||
// its child DAGs settle it and the boot tree resolves.
|
|
||||||
NodeKind::Noop => Ok(NodeOutput::default()),
|
|
||||||
NodeKind::SetWanted { up } => run_set_wanted(coord, claim, *up),
|
NodeKind::SetWanted { up } => run_set_wanted(coord, claim, *up),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,11 +115,6 @@ pub enum NodeKind {
|
||||||
/// deploy stays inside `actions.rs` in v1 — deliberately not
|
/// deploy stays inside `actions.rs` in v1 — deliberately not
|
||||||
/// modeled as scheduler nodes (see the design doc §9).
|
/// modeled as scheduler nodes (see the design doc §9).
|
||||||
ApprovalDeploy,
|
ApprovalDeploy,
|
||||||
/// No-op anchor that completes immediately with no work. Vestigial since
|
|
||||||
/// the boot sweep became one in-DAG graph (no `boot_root` anchor / child
|
|
||||||
/// DAGs) — slated for removal with the other `StartupSweep` residuals.
|
|
||||||
/// Holds no lease and no build slot.
|
|
||||||
Noop,
|
|
||||||
/// Write the agent's durable power intent (`wanted = Up` when `up`, else
|
/// Write the agent's durable power intent (`wanted = Up` when `up`, else
|
||||||
/// `Offline`) as a first-class DAG node, at the head of a power-op
|
/// `Offline`) as a first-class DAG node, at the head of a power-op
|
||||||
/// template so the downstream `Reconcile` reads it. Replaces the old
|
/// template so the downstream `Reconcile` reads it. Replaces the old
|
||||||
|
|
@ -154,7 +149,6 @@ impl NodeKind {
|
||||||
NodeKind::WriteDropin => "write_dropin",
|
NodeKind::WriteDropin => "write_dropin",
|
||||||
NodeKind::WritePermFile => "write_perm_file",
|
NodeKind::WritePermFile => "write_perm_file",
|
||||||
NodeKind::ApprovalDeploy => "approval_deploy",
|
NodeKind::ApprovalDeploy => "approval_deploy",
|
||||||
NodeKind::Noop => "noop",
|
|
||||||
NodeKind::SetWanted { .. } => "set_wanted",
|
NodeKind::SetWanted { .. } => "set_wanted",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -210,11 +210,10 @@ pub fn meta_update(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The boot is now assembled inline in `workers/auto_update.rs::submit_boot_tree`
|
// The boot is assembled inline in `workers/auto_update.rs::submit_boot_tree`
|
||||||
// as ONE DAG (a sweep `MetaLock` root that grows rebuild subgraphs in-DAG, plus
|
// as ONE `Boot` DAG (a sweep `MetaLock` root that grows rebuild subgraphs
|
||||||
// a `Reconcile` root per drifted agent) — no `boot_root` Noop anchor, no
|
// in-DAG, plus a `Reconcile` root per drifted agent) — no anchor node and no
|
||||||
// `startup_sweep` parent template, no per-agent child DAGs. The old single-use
|
// per-agent child DAGs.
|
||||||
// `boot_root` / `startup_sweep` builders were inlined there and removed.
|
|
||||||
|
|
||||||
/// Validate a spec before it enters the queue: node ids are dense
|
/// Validate a spec before it enters the queue: node ids are dense
|
||||||
/// (index = id), deps reference existing nodes, and the dep graph is
|
/// (index = id), deps reference existing nodes, and the dep graph is
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
//! Boot reconcile: on `hive-c0re serve` boot, (a) run the config path
|
//! Boot reconcile: on `hive-c0re serve` boot, (a) run the config path
|
||||||
//! for agents whose per-agent rev marker is stale — a `StartupSweep`
|
//! for agents whose per-agent rev marker is stale — one `Boot` DAG
|
||||||
//! DAG (meta hyperhive lock bump) fanning out `Rebuild` children for
|
//! (meta hyperhive lock bump) that grows a `Rebuild` subgraph for each
|
||||||
//! the stale agents whose `wanted` power intent is `Up` — and (b)
|
//! stale agent whose `wanted` power intent is `Up` — and (b)
|
||||||
//! converge every other drifted agent to its persisted `wanted` via
|
//! converge every other drifted agent to its persisted `wanted` via
|
||||||
//! `Reconcile` DAGs. Two rules keep boot-time nix work minimal:
|
//! `Reconcile` DAGs. Two rules keep boot-time nix work minimal:
|
||||||
//!
|
//!
|
||||||
|
|
@ -194,10 +194,10 @@ pub fn topology_sort(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Boot reconcile (see the module doc): classify every agent by rev
|
/// Boot reconcile (see the module doc): classify every agent by rev
|
||||||
/// freshness + persisted `wanted` intent, submit one `StartupSweep`
|
/// freshness + persisted `wanted` intent, submit one `Boot` DAG
|
||||||
/// DAG (hyperhive lock bump → fan-out rebuilds for stale wanted-up
|
/// (hyperhive lock bump growing an in-DAG rebuild subgraph per stale
|
||||||
/// agents) when anything is stale, and `Reconcile` DAGs for agents
|
/// wanted-up agent) when anything is stale, and `Reconcile` DAGs for
|
||||||
/// whose observed power state drifted from `wanted`. Returns Ok even
|
/// agents whose observed power state drifted from `wanted`. Returns Ok even
|
||||||
/// if some submissions failed.
|
/// if some submissions failed.
|
||||||
pub async fn run(coord: Arc<Coordinator>) -> Result<()> {
|
pub async fn run(coord: Arc<Coordinator>) -> Result<()> {
|
||||||
let containers = match lifecycle::list().await {
|
let containers = match lifecycle::list().await {
|
||||||
|
|
@ -287,8 +287,8 @@ pub async fn run(coord: Arc<Coordinator>) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Submit this boot's work as **one DAG** (no `boot_root` Noop anchor, no
|
/// Submit this boot's work as **one DAG** (no anchor node, no per-agent
|
||||||
/// per-agent child DAGs). Node 0 is the sweep `MetaLock` (only when
|
/// child DAGs). Node 0 is the sweep `MetaLock` (only when
|
||||||
/// something is stale) — its executor bumps the hyperhive lock, then grows
|
/// something is stale) — its executor bumps the hyperhive lock, then grows
|
||||||
/// one rebuild subgraph per stale agent into *this same* DAG (rooted on the
|
/// one rebuild subgraph per stale agent into *this same* DAG (rooted on the
|
||||||
/// `MetaLock`, so they build against the post-bump lock; see
|
/// `MetaLock`, so they build against the post-bump lock; see
|
||||||
|
|
|
||||||
|
|
@ -17,16 +17,13 @@ pub enum Template {
|
||||||
/// Rebuild one agent's container (prebuild → stop → profile-swap →
|
/// Rebuild one agent's container (prebuild → stop → profile-swap →
|
||||||
/// reconcile).
|
/// reconcile).
|
||||||
Rebuild,
|
Rebuild,
|
||||||
/// Bump meta flake locks; child `Rebuild` DAGs fan out on
|
/// Bump meta flake locks; grows a rebuild subgraph per affected
|
||||||
/// completion for every affected agent.
|
/// agent into the same DAG on completion.
|
||||||
MetaUpdate,
|
MetaUpdate,
|
||||||
/// First-deploy spawn (approval-driven).
|
/// First-deploy spawn (approval-driven).
|
||||||
Spawn,
|
Spawn,
|
||||||
/// Reserved for a future destroy integration.
|
/// Reserved for a future destroy integration.
|
||||||
Destroy,
|
Destroy,
|
||||||
/// Boot-time config sweep (hyperhive lock bump + stale-agent
|
|
||||||
/// rebuild fan-out).
|
|
||||||
StartupSweep,
|
|
||||||
/// Mechanical stop + converge to `wanted = Up` (a restart).
|
/// Mechanical stop + converge to `wanted = Up` (a restart).
|
||||||
Restart,
|
Restart,
|
||||||
/// Signal → drain → mechanical stop → converge to `wanted = Up` — a
|
/// Signal → drain → mechanical stop → converge to `wanted = Up` — a
|
||||||
|
|
@ -45,9 +42,9 @@ pub enum Template {
|
||||||
/// Bare converge of observed power state to the persisted intent
|
/// Bare converge of observed power state to the persisted intent
|
||||||
/// (boot reconcile).
|
/// (boot reconcile).
|
||||||
Reconcile,
|
Reconcile,
|
||||||
/// Boot-time root anchor: a single no-op node that groups this boot's
|
/// Boot-time config sweep as one DAG: a hyperhive lock bump that grows
|
||||||
/// `StartupSweep` + per-agent `Reconcile` child DAGs under one tree, so the
|
/// a rebuild subgraph per stale agent, plus a `Reconcile` per drifted
|
||||||
/// dashboard renders the whole boot as one entry instead of N+1 rows.
|
/// agent — all in a single DAG (no anchor node, no child DAGs).
|
||||||
Boot,
|
Boot,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +56,6 @@ impl Template {
|
||||||
Template::MetaUpdate => "meta_update",
|
Template::MetaUpdate => "meta_update",
|
||||||
Template::Spawn => "spawn",
|
Template::Spawn => "spawn",
|
||||||
Template::Destroy => "destroy",
|
Template::Destroy => "destroy",
|
||||||
Template::StartupSweep => "startup_sweep",
|
|
||||||
Template::Restart => "restart",
|
Template::Restart => "restart",
|
||||||
Template::GracefulRestart => "graceful_restart",
|
Template::GracefulRestart => "graceful_restart",
|
||||||
Template::PermChange => "perm_change",
|
Template::PermChange => "perm_change",
|
||||||
|
|
@ -79,12 +75,10 @@ impl Template {
|
||||||
pub enum Source {
|
pub enum Source {
|
||||||
/// Operator action (dashboard button, CLI, manager tool).
|
/// Operator action (dashboard button, CLI, manager tool).
|
||||||
Manual,
|
Manual,
|
||||||
/// Cascade child of a `MetaUpdate` DAG's fan-out.
|
/// Meta-update cascade rebuild (grown into the meta-update DAG).
|
||||||
MetaUpdate,
|
MetaUpdate,
|
||||||
/// Boot-time submission (sweep parent, boot reconciles).
|
/// Boot-time submission (the boot sweep DAG + boot reconciles).
|
||||||
AutoUpdate,
|
AutoUpdate,
|
||||||
/// Cascade child of a `StartupSweep` DAG's fan-out.
|
|
||||||
StartupSweep,
|
|
||||||
/// Crash recovery path (future use).
|
/// Crash recovery path (future use).
|
||||||
CrashRecover,
|
CrashRecover,
|
||||||
/// Operator approved a pending `Approval` row; `approval_id` on
|
/// Operator approved a pending `Approval` row; `approval_id` on
|
||||||
|
|
@ -99,7 +93,6 @@ impl Source {
|
||||||
Source::Manual => "manual",
|
Source::Manual => "manual",
|
||||||
Source::MetaUpdate => "meta_update",
|
Source::MetaUpdate => "meta_update",
|
||||||
Source::AutoUpdate => "auto_update",
|
Source::AutoUpdate => "auto_update",
|
||||||
Source::StartupSweep => "startup_sweep",
|
|
||||||
Source::CrashRecover => "crash_recover",
|
Source::CrashRecover => "crash_recover",
|
||||||
Source::Approval => "approval",
|
Source::Approval => "approval",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue