refactor(#2591): model a DAG as a container node — grouping side-tables become graph walks

This commit is contained in:
atlas 2026-07-20 22:33:43 +02:00 committed by mara
commit a78280feed
4 changed files with 362 additions and 324 deletions

View file

@ -141,21 +141,6 @@ pub enum NodeKind {
/// `Prebuild`, but that's a no-op there — the agent is down, so prebuild
/// is skipped.)
SetWanted { up: bool },
/// Per-DAG terminal hook (approval-driven DAGs — spawn / opaque deploy):
/// resolve the DAG's approval row from the rolled-up outcome. Appended once
/// with a weak (`AfterAny`) edge on the DAG's tails, so it runs exactly when
/// the DAG has settled (any outcome, including a cancel before starting).
/// Build-slot- and lease-exempt; always runs (weak edge ⇒ never cascaded).
ResolveApproval,
/// Per-DAG terminal hook (rebuild / perm-change DAGs): emit one `Rebuilt`
/// manager event per targeted agent — `ok` on `Done`, `!ok` on `Failed`,
/// none on cancel. Appended weak-dep on the tails; slot/lease-exempt.
EmitRebuilt,
/// Per-DAG terminal hook (power-op DAGs): on a *cancelled* DAG, revert each
/// agent's `wanted` intent to its observed state — the operator's cancel
/// means "don't do it". Noop on any non-cancelled outcome. Appended weak-dep
/// on the tails; slot/lease-exempt.
RevertIntent,
/// The **DAG container** node: one per submitted DAG, carrying the group's
/// domain metadata. Every template node hangs *under* it (its subtree), so
/// the container's `NodeId` **is** the DAG id, its rolled-up state **is** the
@ -196,9 +181,6 @@ impl NodeKind {
NodeKind::WritePermFile => "write_perm_file",
NodeKind::ApprovalDeploy => "approval_deploy",
NodeKind::SetWanted { .. } => "set_wanted",
NodeKind::ResolveApproval => "resolve_approval",
NodeKind::EmitRebuilt => "emit_rebuilt",
NodeKind::RevertIntent => "revert_intent",
NodeKind::Dag { .. } => "dag",
}
}