fix(cli): the graph render positional shape-discriminates op-scripts like its siblings
aura graph <op-script.json> exited 2 mislabeling the valid JSON array as 'blueprint document is not valid JSON' — dispatch_graph parsed the render positional with the envelope-only blueprint_from_json while the introspect siblings (register, --params, --content-id) route through composite_from_any. The render positional now uses the same shape-discriminating path (made pub(crate)); an op-script renders byte-identically to its built envelope, and a genuinely-bad document gets the shared honest error including the unresolved-namespace hint (preserved verbatim in composite_from_any's envelope arm). Verified: RED test green, full workspace suite green (independent mini-verify). closes #226
This commit is contained in:
@@ -2730,12 +2730,7 @@ fn dispatch_graph(a: GraphCmd, env: &project::Env) {
|
||||
eprintln!("aura: {path}: {e}");
|
||||
std::process::exit(2);
|
||||
});
|
||||
let bp = blueprint_from_json(&doc, &|t| env.resolve(t)).unwrap_or_else(|e| {
|
||||
let mut msg = graph_construct::blueprint_load_prose(&e);
|
||||
if let Some(hint) = graph_construct::unresolved_namespace_hint(&e, env) {
|
||||
msg.push_str(" — ");
|
||||
msg.push_str(&hint);
|
||||
}
|
||||
let bp = graph_construct::composite_from_any(&doc, env).unwrap_or_else(|msg| {
|
||||
eprintln!("aura: {path}: {msg}");
|
||||
std::process::exit(2);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user