derive_signature()/signature() panic on malformed composite indices where compile() returns a typed CompileError #24
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?
From the 0012 cycle-close audit (commit
a4fb5d7).Composite::schema()(crates/aura-engine/src/blueprint.rs) indexesnodes[..]/inputs[..]/output[..]raw, so a malformed composite makes it panic — whereascompile()returns a typedCompileError(BadInteriorIndex / RoleKindMismatch / OutputPortOutOfRange) for the same malformations. Two validity surfaces with divergent failure modes (panic vs Result). The doc-comment acknowledges it ('assumes well-formed indices; compile() is the validator'), so it is a known, named gap, not silent drift. Low priority: schema() is the derived authoring interface and is only reached on already-validated composites in the current code path. Consider making schema() total (Result or best-effort) when the C20 named-handle authoring surface lands and schema() gets called pre-compile.Composite::schema() panics on malformed indices where compile() returns a typed CompileErrorto derive_signature()/signature() panic on malformed composite indices where compile() returns a typed CompileErrorStill open after cycle 0024 (
1b39093), under renamed symbols. Composite::schema() is gone; the same raw-indexing now lives in derive_signature() / interior_slot_kind() / BlueprintNode::signature() (blueprint.rs:83 c.nodes()[of.node].signature().output[of.field], :96 nodes[t.node].signature().inputs[t.slot]). These index nodes[..]/inputs[..]/output[..] raw and panic on a malformed composite, whereas compile_with_params returns a typed CompileError (BadInteriorIndex / OutputPortOutOfRange / kind mismatch) for the same malformations. The panic-vs-Result divergence this issue named persists verbatim; only the function names changed. Title updated accordingly.Resolved by cycle 0040 (commits
227d004/8b330e3). The raw indexing this issue named —derive_signature/interior_slot_kind/signature()indexingnodes[..]/inputs[..]/output[..]and panicking on a malformed composite — is gone: both paths are now bounds-total (.get().and_then(...).unwrap_or(F64), blueprint.rs:98-120), yielding a placeholder kind instead of a panic, with the real fault reported byvalidate_wiring's guarded checks (BadInteriorIndex/OutputPortOutOfRange). The panic-vs-Result divergence no longer exists. Closing.