From 16c10f269c129da051d5697fb5deae0edb746796 Mon Sep 17 00:00:00 2001 From: elasticdotventures Date: Sat, 22 Aug 2026 13:41:51 +0000 Subject: [PATCH] fix(holon-viz): emit valid SysML v2 (part def, not block def); wire real parser validation into ufo-types Ran SysmlV2Emitter's own output through the real sysml-v2-parser crate (docs/sysml-v2-parser-spike.md, an existing unmerged spike) and confirmed two bugs make it non-parseable: - The closing '}' was on the same line as a trailing '//' comment, so the comment swallowed it -- the block was never syntactically closed. - The emitter used SysML v1's 'block def' keyword. SysML v2 renamed this construct to 'part def'; 'block' is not a SysML v2 keyword at all. Fixed both. Added ufo_types::sysml -- a shared Constraint/Satisfies-based SysML v2 syntax validator wired to sysml-v2-parser (pinned to =0.54.0 per the spike's crate-health findings; not wasm32-compatible, so this must stay out of holon-viz's runtime dependency graph -- added to holon-viz only as a dev-dependency, used in a new round-trip test that feeds the emitter's own output through the real parser instead of just asserting on substrings. This is the concrete round-trip-closed signal the existing spike (PR #187) called out as the next step. --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index 9e1f3de..39d5e10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8770,6 +8770,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.117", + "ufo-types", ] [[package]]