Problem
In crates/tinyagents-graph/src/language.rs, build_graph handles a node whose blueprint declares Routing::Conditional { .. } by calling mark_command_routing only. The declared (label, target) pairs are dropped: they are never passed to add_conditional_edges and never exposed through with_command_destinations.
Consequences:
- The routing table written in a
.rag blueprint is not structurally validated at compile time; an unknown target only fails at runtime when the handler emits Command::goto.
graph::export (topology / Mermaid / JSON) cannot see the conditional edges, so exported diagrams of blueprint-built graphs are missing them.
- The materialised node handler must independently resolve the same labels the blueprint already declared.
Question
This may be intentional (factory-owned routing logic), but if so the blueprint's target list is dead data. If not, build_graph should at least forward the targets via with_command_destinations so validation and export see them.
An inline comment describing the current behaviour was added in #162; this issue tracks deciding which way it should go.
Problem
In
crates/tinyagents-graph/src/language.rs,build_graphhandles a node whose blueprint declaresRouting::Conditional { .. }by callingmark_command_routingonly. The declared(label, target)pairs are dropped: they are never passed toadd_conditional_edgesand never exposed throughwith_command_destinations.Consequences:
.ragblueprint is not structurally validated at compile time; an unknown target only fails at runtime when the handler emitsCommand::goto.graph::export(topology / Mermaid / JSON) cannot see the conditional edges, so exported diagrams of blueprint-built graphs are missing them.Question
This may be intentional (factory-owned routing logic), but if so the blueprint's target list is dead data. If not,
build_graphshould at least forward the targets viawith_command_destinationsso validation and export see them.An inline comment describing the current behaviour was added in #162; this issue tracks deciding which way it should go.