Value-empty LeafFactory declares no input/output interface pre-build (only params) #43

Closed
opened 2026-06-08 10:12:33 +02:00 by Brummel · 0 comments
Owner

A value-empty LeafFactory (crates/aura-core/src/node.rs) declares only its
name, its params: Vec<ParamSpec>, and a build closure. It does not
declare its input/output interface (InputSpec / FieldSpec) — those exist
only on the built Node's schema(), post-build. So nothing can read a
leaf's declared inputs or outputs at the blueprint (pre-build, value-empty)
level.

Where it bites

  • Typed boundary signature (render). The post-#41 render redesign wants the
    composite signature macd(fast:i64, slow:i64, signal:i64) -> (macd:f64, signal:f64, histogram:f64). Param types resolve fine (factory().params() is
    pre-build), but the output types (:f64) do not — OutField carries only
    {node, field, name}, and the producer leaf is a value-empty factory with no
    output schema pre-build. The render cycle therefore ships output names only
    (-> (macd, signal, histogram)); the typed arrow depends on this.
  • Pre-build introspection (mc_4 finding, #42). Surfaced porting
    fieldtests/milestone-construction-layer/mc_4_introspect_graph.rs: leaf
    introspection can only print label + declared param countinputs /
    output_fields are unavailable until the node is built, so a graph-as-data
    walk of a blueprint cannot show a leaf's arity or field shape.
  • Input-slot typing. The render can derive the count/ordering of a node's
    wired input slots from the interior edges (Edge.to/.slot + role targets),
    but not their kinds — same root cause.

Shape

Let the value-empty LeafFactory declare its static interface — the InputSpecs
and output FieldSpecs it will build — alongside its ParamSpecs, so
param_space()-style pre-build reads can see inputs and outputs too. Most nodes'
input/output shape is static (independent of the injected params), so this is a
declaration the factory can carry without building.

Relation

Adjacent to #36 (param declared twice): both are about the factory declaring its
full static interface once. #36 is the params half (dedup the double
declaration); this is the inputs/outputs half (declare them at all,
pre-build). A unified "factory declares its complete static schema" change could
subsume both — worth considering together when either is picked up.

Surfaced: #42 (mc_4 port) and the post-#41 render-redesign design discussion.

A value-empty `LeafFactory` (crates/aura-core/src/node.rs) declares only its `name`, its `params: Vec<ParamSpec>`, and a `build` closure. It does **not** declare its input/output interface (`InputSpec` / `FieldSpec`) — those exist only on the *built* `Node`'s `schema()`, post-build. So nothing can read a leaf's declared inputs or outputs at the **blueprint (pre-build, value-empty)** level. ## Where it bites - **Typed boundary signature (render).** The post-#41 render redesign wants the composite signature `macd(fast:i64, slow:i64, signal:i64) -> (macd:f64, signal:f64, histogram:f64)`. Param types resolve fine (`factory().params()` is pre-build), but the **output types** (`:f64`) do not — `OutField` carries only `{node, field, name}`, and the producer leaf is a value-empty factory with no output schema pre-build. The render cycle therefore ships output **names only** (`-> (macd, signal, histogram)`); the typed arrow depends on this. - **Pre-build introspection (mc_4 finding, #42).** Surfaced porting `fieldtests/milestone-construction-layer/mc_4_introspect_graph.rs`: leaf introspection can only print `label + declared param count` — `inputs` / `output_fields` are unavailable until the node is built, so a graph-as-data walk of a blueprint cannot show a leaf's arity or field shape. - **Input-slot typing.** The render can derive the *count*/ordering of a node's wired input slots from the interior edges (`Edge.to`/`.slot` + role targets), but not their kinds — same root cause. ## Shape Let the value-empty `LeafFactory` declare its static interface — the `InputSpec`s and output `FieldSpec`s it will build — alongside its `ParamSpec`s, so `param_space()`-style pre-build reads can see inputs and outputs too. Most nodes' input/output shape is static (independent of the injected params), so this is a declaration the factory can carry without building. ## Relation Adjacent to #36 (param declared twice): both are about the factory declaring its full static interface once. #36 is the **params** half (dedup the double declaration); this is the **inputs/outputs** half (declare them at all, pre-build). A unified "factory declares its complete static schema" change could subsume both — worth considering together when either is picked up. Surfaced: #42 (mc_4 port) and the post-#41 render-redesign design discussion.
Brummel added the feature label 2026-06-08 10:12:33 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#43