Skip to content

feat(libraries): add MigrationMetadata::AppliedStereotype - #4

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
feature/applied-stereotype-metadata
Closed

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
feature/applied-stereotype-metadata

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds one metadata definition to MigrationMetadata and lists it in the engine contract. Semver: minor (new definition, no existing entry changed).

metadata def AppliedStereotype {
    attribute stereotype : ScalarValues::String;
    attribute profile : ScalarValues::String[0..1];
    attribute tags : ScalarValues::String[0..*];
}

The OpenSysML SysML v1 migrator stops writing stereotype kinds as package-level comments (dependency A to B; /* «Trace» */), which CATIA Magic / Cameo renders as a Note on every diagram. The v2 element carries the kind in its name (dependency 'A traces B' from A to B) and, in non-strict output, annotates itself with @MigrationMetadata::AppliedStereotype { stereotype = "Trace"; } so tooling can still query the source stereotype. profile is set when the stereotype comes from a profile the migration did not write; tags keeps, as tag = value, the tag values no v2 feature holds.

engine-contract.json gains the MigrationMetadata::AppliedStereotype entry (metadata, attributes stereotype/profile/tags, migratorEmitted, consumers internal/translate/migrate/migrate.go and internal/semantic/semantics/synthesized_name.go); contract stays at 1 since nothing existing changes. Open-MBEE/OpenSysML#1043 re-pins to this commit.

./scripts/validate-libraries.sh: 0 errors, 0 warnings; ./scripts/check-engine-contract.sh and ./scripts/check-readme-table.sh pass (the README row for MigrationMetadata is unchanged).

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

A migrated element may carry a source stereotype its v2 form does not keep: the element is itself the stereotype's form (a dependency for a «Trace»), or the stereotype comes from a profile the migration did not write. AppliedStereotype records the stereotype, the profile when it is not in the document, and the tag values no v2 feature holds, so tooling can still query them instead of reading a comment. The engine contract lists it as migrator-emitted; 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

Copy link
Copy Markdown
Contributor Author

The advisory job (OpenSysML against these libraries, continue-on-error) is red for two reasons, neither in this PR's control:

  1. TestEngineContractCoversEveryBoundName: the contract now lists MigrationMetadata::AppliedStereotype, but OpenSysML develop does not derive it yet — fix(migrate): carry stereotype kinds in names and metadata, not comments OpenSysML#1043 adds the binding and re-pins to this change. A new migrator-emitted binding is red here until that PR lands, then red there until this one does; the required Validate the extension libraries check is green.
  2. TestKerMLFeatureMetaclassClassification on develop reads examples/pilot-corpora/kerml-examples/Vehicle Example/VehicleUsages.kerml and fails rather than skips when the pilot corpora are absent; this workflow does not run scripts/download-pilot-corpora.sh. Unrelated to this change.

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 12, 2026 00:39
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Superseded by #5, which landed the same MigrationMetadata::AppliedStereotype definition and engine-contract.json entry on main (a74e6d6); Open-MBEE/OpenSysML#1043 pins 73bed35. Closing.

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