aura run: phrase loader UnknownNodeType as house-style prose (parity with graph build) #184

Closed
opened 2026-07-02 22:25:13 +02:00 by Brummel · 1 comment
Owner

aura run on a blueprint referencing an unresolvable type id surfaces the raw Rust Debug form (UnknownNodeType("momentum_lab::Nope")), while aura graph build phrases the same fault house-style (op 5 (add): unknown node type "momentum_lab::Nope"). The exit-code split (usage 2 vs runtime 1) is documented and correct; only the presentation diverges. The #162 precedent (bind-mismatch prose at the binary seam) established that engine error types are Display-free by convention and the CLI presentation layer phrases them — the run path's loader errors never got that treatment.

Observed by the milestone fieldtest (finding F4, fieldtests/milestone-project-environment/FINDINGS.md, 2026-07-02); reproduction in the corpus .err fixtures there.

Likely shape: route LoadError through a small presenter in the run path (parallel to format_op_error on the graph-build path), naming the offending type id in prose and never leaking the Debug variant name — pinned at the binary seam like the existing graph_build_renders_a_bind_kind_mismatch_as_prose test.

  • depends on: nothing
  • context: post-milestone polish from the green project-environment fieldtest. Sibling of the missing-project hint (filed separately): that one adds context when NO project is loaded, this one fixes phrasing wherever the loader refuses.
`aura run` on a blueprint referencing an unresolvable type id surfaces the raw Rust Debug form (`UnknownNodeType("momentum_lab::Nope")`), while `aura graph build` phrases the same fault house-style (`op 5 (add): unknown node type "momentum_lab::Nope"`). The exit-code split (usage 2 vs runtime 1) is documented and correct; only the presentation diverges. The #162 precedent (bind-mismatch prose at the binary seam) established that engine error types are Display-free by convention and the CLI presentation layer phrases them — the run path's loader errors never got that treatment. Observed by the milestone fieldtest (finding F4, `fieldtests/milestone-project-environment/FINDINGS.md`, 2026-07-02); reproduction in the corpus `.err` fixtures there. Likely shape: route `LoadError` through a small presenter in the run path (parallel to `format_op_error` on the graph-build path), naming the offending type id in prose and never leaking the Debug variant name — pinned at the binary seam like the existing `graph_build_renders_a_bind_kind_mismatch_as_prose` test. - depends on: nothing - context: post-milestone polish from the green project-environment fieldtest. Sibling of the missing-project hint (filed separately): that one adds context when NO project is loaded, this one fixes phrasing wherever the loader refuses.
Author
Owner

Handled together with #185 at the shared loader-error seam. The base prose reuses the existing graph build presenter (blueprint_load_prose, now pub(crate), kept env-agnostic) so both surfaces phrase a LoadError identically and neither leaks the UnknownNodeType Debug token. The #185 missing-Aura.toml hint fires only when the unresolved id is ::-namespaced AND no project was loaded (env.provenance().is_none()); a bare std id gets none. Scope note: the hint was extended beyond the run path to graph build's composite_from_any as well, since env was already cleanly in scope there — no plumbing hack — so both invocation paths get the same orientation. Sweep/mc/walkforward share the same {e:?} leak pattern and were left untouched (out of scope; separate follow-up if wanted).

Handled together with #185 at the shared loader-error seam. The base prose reuses the existing `graph build` presenter (`blueprint_load_prose`, now `pub(crate)`, kept env-agnostic) so both surfaces phrase a `LoadError` identically and neither leaks the `UnknownNodeType` Debug token. The #185 missing-`Aura.toml` hint fires only when the unresolved id is `::`-namespaced AND no project was loaded (`env.provenance().is_none()`); a bare std id gets none. Scope note: the hint was extended beyond the run path to `graph build`'s `composite_from_any` as well, since `env` was already cleanly in scope there — no plumbing hack — so both invocation paths get the same orientation. Sweep/mc/walkforward share the same `{e:?}` leak pattern and were left untouched (out of scope; separate follow-up if wanted).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#184