diff --git a/crates/aura-engine/src/construction.rs b/crates/aura-engine/src/construction.rs index bc731ef..cdf5e5f 100644 --- a/crates/aura-engine/src/construction.rs +++ b/crates/aura-engine/src/construction.rs @@ -1493,6 +1493,32 @@ mod tests { ); } + /// Documented residue pin (#317 audit): a `gang` op cannot fuse a spliced + /// instance's member param — a gang fuses a PRIMITIVE's raw `(name, pos)` + /// slot, and an instance's params are nested/path-qualified. The refusal + /// is the ordinary no-such-open-param shape on the instance node, so the + /// authoring-guide/C24 claim "the gang op refuses a composite instance's + /// member path" stays an observed fact, not prose. + #[test] + fn gang_of_a_spliced_instance_member_path_refuses() { + let subgraph = |_: &str| Some(use_fixture()); + let mut s = GraphSession::new("g", &std_vocabulary, &subgraph); + s.apply(Op::Use { ref_id: "fixture".into(), name: Some("gate".into()), bind: vec![] }) + .unwrap(); + s.apply(Op::Add { type_id: "SMA".into(), as_name: Some("solo".into()), bind: vec![] }) + .unwrap(); + assert_eq!( + s.apply(Op::Gang { + as_name: "fused".into(), + into: vec!["gate.sma.length".into(), "solo.length".into()], + }), + Err(OpError::BadParam { + node: "gate".into(), + err: BindOpError::UnknownParam("sma.length".into()), + }) + ); + } + /// DAG invariant (domain invariant 5 / C9), through an instance: a /// `connect` closing a cycle through a spliced instance is rejected /// eagerly, the instance treated as one opaque node (#317) — the same