You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nodespace-types::SchemaNode::from_node's relationships extraction has the same silent-swallow shape fields did #2130
PR #2128 (closes #2107) fixed nodespace_types::SchemaNode::from_node silently swallowing a fields JSON parse failure to an empty Vec with zero diagnostic signal, by extracting the parse into a parse_fields helper that surfaces a diagnostic via eprintln! on a genuine failure.
The adversarial review of that PR noted that from_node's relationships extraction, two lines below fields in packages/nodespace-types/src/schema.rs, still uses the exact same pattern that was just fixed:
let relationships:Vec<SchemaRelationship> = node
.properties.get("relationships").and_then(|v| serde_json::from_value(v.clone()).ok()).unwrap_or_default();
A malformed/legacy relationships JSON value on a schema node would silently read back as zero relationships, with no diagnostic — same bug shape, same function, now inconsistent with its fields neighbor.
This was explicitly out of scope for #2107 (which named only fields), so it wasn't touched there. Filing separately to close the gap consistently.
Suggested approach
Apply the same fix shape as #2107/#2128: extract the relationships parse into a helper analogous to parse_fields that returns the (possibly empty, on failure) list alongside an optional diagnostic message, and print it via eprintln! in from_node, for consistency with the fields fix.
Acceptance criteria
A parse failure in nodespace_types::SchemaNode::from_node's relationships extraction is surfaced via a diagnostic (mirroring the fields fix), rather than silently producing an empty Vec.
Fixed in #2131 — mirrors PR #2128's parse_fields fix for the sibling relationships field: extracted the parse into a parse_relationships helper that returns (Vec<SchemaRelationship>, Option<String>), with from_node printing the diagnostic via eprintln! on a genuine parse failure. Same reasoning as #2128 for leaving from_node's Result untouched (batch-collect blast-radius risk in nodes_to_typed_values). New regression tests mirror #2128's fields coverage 1:1, including the batch-safety pin in convert.rs.
Activity
nodespace-types: correct from_node's caller-count claim, note Windows…
nodespace-types: surface SchemaNode field-parse failures via eprintln (…
mstomar125 commentedon Aug 18, 2026
Fixed in #2131 — mirrors PR #2128's
parse_fieldsfix for the siblingrelationshipsfield: extracted the parse into aparse_relationshipshelper that returns(Vec<SchemaRelationship>, Option<String>), withfrom_nodeprinting the diagnostic viaeprintln!on a genuine parse failure. Same reasoning as #2128 for leavingfrom_node'sResultuntouched (batch-collect blast-radius risk innodes_to_typed_values). New regression tests mirror #2128'sfieldscoverage 1:1, including the batch-safety pin inconvert.rs.