wip(#3001): delete NodeKind::Dag, the container this issue is about
The variant, its label, its agent-accessor arm and its no-op executor arm are gone, along with the module prose describing a job as "a single container node whose subtree is the work". A job is now just its nodes: a template declares them and names the roots it wants back. `dag_of` becomes `root_of`. It always wrapped the graph's `root_of` and still returns the same thing, but the old name asserted a concept that no longer exists — with no container, the parent chain ends at whichever root the template declared, so the honest question is "which root owns this node", not "which DAG is this in". One comment kept its old wording on purpose: `visible_roots` explains that the projection it replaced keyed on the container kind rather than selecting structurally. That is a statement about the past and stays true; it now says "the since-removed container kind" rather than naming a type that is not there to look up.
This commit is contained in:
parent
0523b4f7de
commit
aef7ead0bc
4 changed files with 37 additions and 54 deletions
|
|
@ -280,18 +280,6 @@ pub enum NodeKind {
|
|||
/// `Prebuild`, but that's a no-op there — the agent is down, so prebuild
|
||||
/// is skipped.)
|
||||
SetWanted { agent: String, up: bool },
|
||||
/// The **DAG container** node: one per submitted DAG, carrying the group's
|
||||
/// domain metadata. Every node hangs *under* it (its subtree), so
|
||||
/// the container's `NodeId` **is** the DAG id and its rolled-up state **is**
|
||||
/// the DAG state. Pure grouping — lease- and
|
||||
/// build-slot-exempt; the executor instant-completes it (`Done`) so it
|
||||
/// reaches `Finishing` and its children start.
|
||||
///
|
||||
/// No `created_at` here: the graph stamps [`hive_jobq::Node::created_at`] on
|
||||
/// every node at insert, so the container already has one. A second copy in
|
||||
/// the payload would be the same instant recorded twice, with only this
|
||||
/// variant's version reachable to a generic viewer.
|
||||
Dag { source: Source, reason: String },
|
||||
}
|
||||
|
||||
/// How a hive-c0re node describes itself to a generic graph viewer.
|
||||
|
|
@ -362,14 +350,13 @@ impl NodeKind {
|
|||
NodeKind::ResolveApproval { .. } => "resolve_approval",
|
||||
NodeKind::EmitRebuilt { .. } => "emit_rebuilt",
|
||||
NodeKind::SetWanted { .. } => "set_wanted",
|
||||
NodeKind::Dag { .. } => "dag",
|
||||
}
|
||||
}
|
||||
|
||||
/// The agent this node targets, or `""` for agentless kinds
|
||||
/// ([`NodeKind::MetaLock`] on the `hyperhive` pseudo-agent,
|
||||
/// [`NodeKind::Reparent`] which can span multiple agents, and the
|
||||
/// [`NodeKind::Dag`] container).
|
||||
/// [`NodeKind::Reparent`] which can span multiple agents, and
|
||||
/// [`NodeKind::ResolveApproval`] which acts on an approval row).
|
||||
#[must_use]
|
||||
pub fn agent(&self) -> &str {
|
||||
match self {
|
||||
|
|
@ -397,8 +384,7 @@ impl NodeKind {
|
|||
| NodeKind::SetWanted { agent, .. } => agent,
|
||||
NodeKind::MetaLock { .. }
|
||||
| NodeKind::Reparent { .. }
|
||||
| NodeKind::ResolveApproval { .. }
|
||||
| NodeKind::Dag { .. } => "",
|
||||
| NodeKind::ResolveApproval { .. } => "",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue