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

@ -328,9 +328,14 @@ fn handle_send(
}
};
}
// Resolve magic-recipient sentinels (currently `<parent>`) against
// topology.json; no-op for ordinary names. Lets agents address
// structural roles without learning the label — runtime reparenting
// (#486) propagates for free (#692).
let resolved = crate::topology::resolve_recipient(agent, to);
match coord.broker.send(&Message {
from: agent.to_owned(),
to: to.to_owned(),
to: resolved,
body: body.to_owned(),
in_reply_to,
}) {