feat(#2484): unify in-DAG growth on append_subgraph (drop append_node)

append_subgraph is the multi-node/multi-agent generalisation of the
single-node append_node, so the two in-DAG-growth channels collapse to
one: the Reconcile planner now emits its mechanical Start/Stop as a
single-node append_subgraph rooted on the reconcile node (stamping
claim.agent on the NodeSpec, which append_node inherited implicitly).

Removes NodeOutput.append_nodes + its scheduler drain loop and
JobQueue::append_node. No behaviour change — a channel unification.
This commit is contained in:
atlas 2026-07-15 20:21:39 +02:00
commit b87eac0a61
3 changed files with 48 additions and 104 deletions

View file

@ -9,8 +9,8 @@
//!
//! In-DAG growth (a `MetaLock` growing rebuild subgraphs after the lock
//! bump, a `Reconcile` fanning its `Start`/`Stop`) flows through
//! `NodeOutput.append_subgraph` / `append_nodes`, applied before the
//! emitting node completes — see `handle_completion`.
//! `NodeOutput.append_subgraph`, applied before the emitting node
//! completes — see `handle_completion`.
use std::collections::HashMap;
use std::sync::Arc;
@ -103,22 +103,14 @@ async fn handle_completion(
node = claim.node_id,
"job_queue: node done"
);
// Append any in-DAG sub-step nodes (e.g. a `Reconcile`
// planner's `Start` / `Stop`) BEFORE completing this node, so
// completing it doesn't roll the DAG terminal while the
// appended work is still pending — that keeps the lease-window
// transient held across the sub-step. Each depends `AfterOk`
// on this node, so it becomes ready the instant this one
// settles `Done` just below.
for kind in output.append_nodes {
coord
.job_queue
.append_node(claim.dag_id, kind, claim.node_id);
}
// Same before-completion ordering as `append_nodes`, but for
// whole per-agent subgraphs (the startup sweep's rebuild
// subgraphs growing into the boot DAG) — each an independent
// subgraph rooted on this node.
// Append any in-DAG subgraphs BEFORE completing this node, so
// completing it doesn't roll the DAG terminal while the appended
// work is still pending — that keeps the lease-window transient
// held across it. Each subgraph is independent, rooted on this
// node (`AfterOk`), so it becomes ready the instant this one
// settles `Done` just below. Covers both the multi-node case (a
// `MetaLock` growing per-agent rebuild subgraphs) and the
// single-node case (a `Reconcile` planner's `Start` / `Stop`).
for subgraph in output.append_subgraph {
coord
.job_queue