Skip to content

feat(DiagramLayout): Route.general names the general a specialization edge is routed to - #7

Merged
HuiJun merged 1 commit into
mainfrom
feature/diagram-layout-route-general
Oct 15, 2026
Merged

HuiJun merged 1 commit into
mainfrom
feature/diagram-layout-route-general

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

A SysML v2 specialization (part def Sub :> Sup;) declares no element of its own, so metadata DiagramLayout::Route about … had nothing to name for the inheritance line a tree diagram draws — a Cameo BDD's generalization routes could not be carried into the migrated model. Route gains

ref general : Base::Anything[0..1];

A Route about the specific element typing general steers the edge drawn to that general, one Route per general; a Route without general keeps steering the annotated element's own edge (a connection def Sub :> Base still routes its own line):

part def Detector;
part def Sensor;
part def 'Secondary Electron Detector' :> Detector;
part def 'Backscattered Electron Detector' :> Detector, Sensor;

view positioned {
    expose Microscope::*;
    metadata Route about 'Secondary Electron Detector' {
        points = (240, 160, 240, 110, 315, 110, 315, 53);
        ref :>> general : Detector;
    }
    metadata Route about 'Backscattered Electron Detector' {
        points = (440, 160, 440, 110, 315, 110, 315, 53);
        ref :>> general : Detector;
    }
    metadata Route about 'Backscattered Electron Detector' {
        points = (520, 160, 520, 120, 535, 120, 535, 53);
        ref :>> general : Sensor;
    }
    render asTreeDiagram;
}

The typed-redefinition form is the one MigrationMetadata::DeferredEvent already uses for signal; a value binding (general = Detector) is not a valid feature value for the pilot, and a standalone KerML specialization member is not admitted in SysML v2 textual notation, so neither was an option.

engine-contract.json lists general on DiagramLayout::Route and the new element DiagramLayout::Route::general, both read by internal/semantic/semantics/layout.go in the OpenSysML pull request that re-pins this change (Open-MBEE/OpenSysML#1166). Additive: semver MINOR, contract unchanged.

Verified: ./scripts/validate-libraries.sh — 0 errors, 0 warnings on the pinned pilot (2026-08, 0.62.0); ./scripts/check-engine-contract.sh --base origin/main clean; ./scripts/check-readme-table.sh clean; the example above validates with 0 errors under the pilot with this library and under OpenSysML.

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/850d56a6ed3e4b39b7a1dc2b4b9ec6d8
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/850d56a6ed3e4b39b7a1dc2b4b9ec6d8?variant=devin
Requested by: @HuiJun

… edge is routed to

A specialization is a clause of its specific element, not an element of
its own, so a Route about it had nothing to name. A Route about the
specific element now types general with the element the line is drawn
to, `ref :>> general : Sup;`, one Route per general; a Route naming no
general steers the annotated element's own edge as before. Semver minor.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

The required check (Validate the extension libraries) is green. The advisory "OpenSysML against these libraries" job is red on two tests that do not touch this change: TestKerMLFeatureMetaclassClassification reads examples/pilot-corpora, which that job does not download, and TestExecutionConformance/verification_chain_package_usage_value* fails identically on OpenSysML develop (fix in Open-MBEE/OpenSysML#1160). Every library- and contract-related package passed, tests/hygiene included. Open-MBEE/OpenSysML#1166 re-pins this commit once it is on main.

@HuiJun
HuiJun merged commit b6af259 into main Oct 15, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant