aura graph <op-script> misreports valid JSON as invalid — shape-discriminate the render positional like its introspect siblings #226

Closed
opened 2026-07-10 14:34:08 +02:00 by Brummel · 1 comment
Owner

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's graph 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).

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's `graph 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).
Brummel added this to the Real-project readiness — role-complete research loop (no freeze) milestone 2026-07-10 17:16:15 +02:00
Author
Owner

Landed as 0d9fdf8 (RED: parity test at the same e2e seam as the register/--params op-script tests — an op-script and its own graph build envelope must render byte-identically at exit 0) + the follow-up fix commit: the render positional now routes through composite_from_any (made pub(crate)) exactly like its introspect siblings, instead of the envelope-only blueprint_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 in composite_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.

Landed as 0d9fdf8 (RED: parity test at the same e2e seam as the register/--params op-script tests — an op-script and its own `graph build` envelope must render byte-identically at exit 0) + the follow-up fix commit: the render positional now routes through `composite_from_any` (made pub(crate)) exactly like its introspect siblings, instead of the envelope-only `blueprint_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 in `composite_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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#226