hive-c0re/hivectl/hive-agent: pause as a job-queue DAG node (closes #3056)

This commit is contained in:
damocles 2026-08-11 21:59:25 +02:00 committed by mara
commit 20a7a21053
13 changed files with 316 additions and 27 deletions

View file

@ -119,6 +119,16 @@ pub enum NodeKind {
/// `GRACEFUL_STOP_TIMEOUT`. Resolves ok either way — the
/// downstream `Reconcile` performs the actual stop.
Drain { agent: String },
/// Write the pause marker (`Coordinator::set_paused`) + mark
/// `pause_pending`. No kick, unlike `Signal` — the harness's own
/// between-turns poll (`PAUSE_POLL`, 1s default) is already
/// responsive enough, and `Signal`'s kick-message body ("you were
/// just (re)started") would be actively misleading here.
PauseSignal { agent: String },
/// Await the harness reporting `PauseAcknowledged`, bounded by a
/// timeout. Resolves ok either way — pausing is best-effort from
/// the queue's perspective, same as `Drain`.
PauseDrain { agent: String },
/// `set_nspawn_flags` + `set_resource_limits` + daemon-reload.
WriteDropin { agent: String },
/// Commit `tool-groups.json` / `capabilities.json` per its `payload`
@ -338,6 +348,8 @@ impl NodeKind {
NodeKind::StopForUpdate { .. } => "stop_for_update",
NodeKind::Signal { .. } => "signal",
NodeKind::Drain { .. } => "drain",
NodeKind::PauseSignal { .. } => "pause_signal",
NodeKind::PauseDrain { .. } => "pause_drain",
NodeKind::WriteDropin { .. } => "write_dropin",
NodeKind::WritePermFile { .. } => "write_perm_file",
NodeKind::Reparent { .. } => "reparent",
@ -372,6 +384,8 @@ impl NodeKind {
| NodeKind::StopForUpdate { agent }
| NodeKind::Signal { agent }
| NodeKind::Drain { agent }
| NodeKind::PauseSignal { agent }
| NodeKind::PauseDrain { agent }
| NodeKind::WriteDropin { agent }
| NodeKind::WritePermFile { agent, .. }
| NodeKind::DeployWindow { agent, .. }