aura graph <op-script> misreports valid JSON as invalid — shape-discriminate the render positional like its introspect siblings #226
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced by the triage-harvest milestone fieldtest (2026-07-10, evidence in fieldtests/milestone-triage-harvest/).
aura graph <valid-op-script.json>fails with "blueprint document is not valid JSON: invalid type: map, expected u32" (exit 2). The file IS valid JSON — an op-script array; the message misdescribes a schema mismatch as a JSON parse failure. Asymmetry: the introspect verbs (--params, --content-id, --identity-id, graph register) shape-discriminate envelope vs op-script and accept both; the render positional requires a built envelope and says so unhelpfully. A consumer who wrote an op-script and renders it directly (the natural next step after the guide'sgraph build) hits this.Direction (not prescriptive): reuse the existing composite_from_any shape discrimination for the render positional, or at least name the actual mismatch ("an op-script array — build it first via
aura graph build, or render the built blueprint").context: milestone-fieldtest friction finding; the #28 honesty itself holds (no silent sample).
Landed as
0d9fdf8(RED: parity test at the same e2e seam as the register/--params op-script tests — an op-script and its owngraph buildenvelope must render byte-identically at exit 0) + the follow-up fix commit: the render positional now routes throughcomposite_from_any(made pub(crate)) exactly like its introspect siblings, instead of the envelope-onlyblueprint_from_json. The misleading "not valid JSON" message is gone for valid op-scripts; a genuinely-invalid document gets the shared honest error, and the unresolved-namespace hint is preserved (it lives verbatim incomposite_from_any's envelope arm). Of the two directions the issue offered, the shape-discrimination reuse was chosen over a message-only fix: the introspect siblings already prove the discrimination path, and the natural consumer step (author an op-script, render it directly) should work rather than fail better. Closes via commit on merge.