job_queue: finish reparent call-site swap, delete dead sync path

This commit is contained in:
damocles 2026-07-26 19:28:08 +02:00 committed by mara
commit 18745f1a98
8 changed files with 94 additions and 216 deletions

View file

@ -196,12 +196,6 @@ pub enum NodeKind {
/// window. `(child, new_parent)` pairs, applied in order under one
/// `META_LOCK` acquisition / one git commit (`meta::bulk_commit_topology`
/// handles both the single- and multi-move case uniformly).
#[allow(
dead_code,
reason = "constructed by templates::reparent(), landed ahead of the call-site swap \
(pending an answer on whether that swap should be synchronous or \
fire-and-forget) exercised today by job_queue::tests only"
)]
Reparent {
moves: Vec<(hive_types::Ident, Option<hive_types::Ident>)>,
},

View file

@ -422,21 +422,12 @@ pub fn meta_update(
}
/// Topology move(s) as a queue DAG. `moves` is `(child, new_parent)` pairs —
/// one entry for `set-parent`, N for `set-parent-bulk`. Not yet wired to the
/// `set-parent`/`set-parent-bulk` HTTP handlers or the `hivectl`/MCP
/// `SetParent` surface — those still call `Coordinator::reparent*_with_notify`
/// directly, which blocks until the commit lands and returns a synchronous
/// `ok`/`err`, unlike every other queue-backed op. Whether that call-site
/// swap should keep the synchronous contract or go fire-and-forget (submit
/// returns a DAG id immediately, like everything else in this module) is an
/// open question — exists so the `NodeKind::Reparent` shape is exercised
/// end-to-end (tests, and any future caller) ahead of that call-site swap.
#[allow(
dead_code,
reason = "landed ahead of the server.rs/dashboard::topology call-site swap, pending an \
answer on whether that swap should be synchronous or fire-and-forget \
exercised today by job_queue::tests"
)]
/// one entry for `set-parent`, N for `set-parent-bulk`. Fire-and-forget like
/// everything else in this module: submits and returns a DAG id
/// immediately, the caller learns the outcome async (dashboard job view /
/// `hivectl`'s `QueueDag` poll). Wired from `server.rs`'s `HostRequest::
/// SetParent` (hivectl) and `dashboard/topology.rs`'s `set-parent`/
/// `set-parent-bulk` handlers.
pub fn reparent(
coord: &Arc<Coordinator>,
moves: Vec<(hive_types::Ident, Option<hive_types::Ident>)>,

View file

@ -361,12 +361,6 @@ pub fn meta_update(
/// dedicated variant would) and the per-template history-retention bucket —
/// both cosmetic. Swap this to whatever the eventual node-kind-derived
/// dispatch lands with, whenever it lands.
#[allow(
dead_code,
reason = "landed ahead of the server.rs/dashboard::topology call-site swap, pending an \
answer on whether that swap should be synchronous or fire-and-forget \
exercised today by job_queue::tests and submit::reparent"
)]
pub fn reparent(
moves: Vec<(hive_types::Ident, Option<hive_types::Ident>)>,
source: Source,