Repository navigation
feat(sysml_model): add KerML Activity control-flow nodes (DecisionNode/ForkNode/JoinNode/MergeNode) - #35
Conversation
Adversarial Review: feat(sysml_model): add KerML Activity control-flow nodes (DecisionNode/ForkNode/JoinNode/MergeNode)Provider: sm3lly/neo-coder | Generated: 2026-10-13T13:01Z 🟢 AdvocateApproach AssessmentThe PR solves a legitimate gap: KerML Activity control-flow nodes (decision, fork, join, merge) were missing from The PR correctly treats control nodes as a separate partition from the definition/usage dichotomy, which aligns with the KerML metamodel where these nodes have no Strong Points
Evidence
Recommended to Merge If...
The implementation is clean, well-tested, and follows established patterns in the codebase. No obvious code smells or design issues. 🔴 ChallengerConcernsNaming collision risk with existing KerML/SysML terminology.
No Missing CoverageNo serde round-trip tests for the new variants. The PR summary claims "Serde round-trip for all four new variants" as a test plan item, but the diff doesn't show any new test code for this. Verify the existing No documentation of the control node semantics. The enum variants have doc comments, but there's no design doc or README update explaining how these map to KerML Activity syntax, or how they differ from UML Activity nodes. Future maintainers will assume UML semantics. No backward compatibility test. If Alternative ApproachesConsider a wrapper type instead of enum variants. If control nodes have different lifecycle/behavior than def/usage pairs, a separate Use Blocking IssuesNone — this is a straightforward enum extension with appropriate test updates. The concerns above are worth addressing before merge but don't block. |
Adversarial Review: feat(sysml_model): add KerML Activity control-flow nodes (DecisionNode/ForkNode/JoinNode/MergeNode)Provider: sm3lly/neo-coder | Generated: 2026-10-15T17:58Z 🟢 AdvocateApproach AssessmentThe PR solves a concrete, well-scoped problem: adding four KerML Activity control-flow node variants ( Strong Points
Evidence
Recommended to Merge If...
🔴 ChallengerConcernsNaming collision risk with future KerML Activity elements. The PR adds
No Serde names use snake_case but KerML names are PascalCase. Missing CoverageNo test for assert!(ElementKind::DecisionNode.is_control_node());
assert!(!ElementKind::PartDefinition.is_control_node());No test for assert_eq!(ElementKind::DecisionNode.usage_of(), None);No round-trip test for the new variants. The PR summary mentions serde round-trip as a test plan item, but the diff doesn't show it. Verify this is actually tested. No test for assert_eq!(ElementKind::DecisionNode.kerml_name(), "DecisionNode");Alternative ApproachesGroup control nodes under a single variant with a tag. Instead of four flat enum variants, use: KermlControlNode { kind: ControlNodeKind }where Make control nodes usages. In KerML semantics, activity nodes are usages of activity node types. If Blocking IssuesNone. The PR is mechanically correct and follows existing patterns. The concerns above are design-level issues that could be addressed in follow-up PRs. |
Add four KerML Activity control-flow node variants to ElementKind: - DecisionNode: routes incoming flow to exactly one outgoing edge (guards) - ForkNode: splits one incoming flow into multiple concurrent flows - JoinNode: synchronises multiple concurrent flows into one - MergeNode: merges multiple alternative (non-concurrent) flows without sync Add is_control_node() predicate. Update ALL, kerml_name, serde_name, element_kind_all_is_complete_and_ordered test, and element_kind_def_usage_partition test to include the 4 new variants. Unblocks ledgrrr#268 (Phase 5 ProcessChart control-flow branches). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
66a6e4a to
523837f
Compare
Summary
ElementKind:DecisionNode,ForkNode,JoinNode,MergeNodeis_control_node()predicate (analogous tois_definition()/is_usage())ALL,kerml_name,serde_name, and two tests that count variantsMotivation
Unblocks PromptExecution/ledgrrr#268 — Phase 5 of the statechart unification, which requires control-flow branches in the
kr0ki-coreProcessChart.Test plan
cargo testpasses (321 tests, 0 failures)element_kind_all_is_complete_and_orderedexhaustive match compiles andALL.len() == 28element_kind_def_usage_partitionassertsdefs=10, usages=13, control=4, Package+control+defs+usages == 28🤖 Generated with Claude Code