broker: resolve <parent> sentinel to topology parent at send time (#692)

This commit is contained in:
damocles 2026-05-31 10:54:16 +02:00 committed by Mara
commit 7142e95c8f
7 changed files with 154 additions and 8 deletions

View file

@ -113,9 +113,15 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
}
}
} else {
// Resolve magic-recipient sentinels (currently `<parent>`)
// against topology.json; no-op for ordinary names. The
// manager has no parent in topology, so `<parent>`
// resolves to OPERATOR_RECIPIENT — matching mara's
// "no parent → tell the operator" rule (#692).
let resolved = crate::topology::resolve_recipient(MANAGER_AGENT, to);
match coord.broker.send(&Message {
from: MANAGER_AGENT.to_owned(),
to: to.clone(),
to: resolved,
body: body.clone(),
in_reply_to: *in_reply_to,
}) {