Skip to content

feat(MigrationMetadata): AppliedStereotype records a source stereotype the v2 form does not carry - #5

Merged
HuiJun merged 1 commit into
mainfrom
feature/migration-metadata-applied-stereotype
Oct 12, 2026
Merged

HuiJun merged 1 commit into
mainfrom
feature/migration-metadata-applied-stereotype

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds one metadata def to libraries/MigrationMetadata.sysml:

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

The SysML v1 migrator writes it on an element whose v2 form is the stereotype's own form and therefore cannot name the stereotype — a dependency is a «Trace»'s v2 form, so the migrator writes @AppliedStereotype { stereotype = "Trace"; } on it — or whose stereotype comes from a profile the migration did not write (named by profile). tags keeps, as tag = value strings, the tag values no v2 feature holds. Like SynthesizedName and StandIn, it is a record of the migration, not model content.

engine-contract.json gains the matching MigrationMetadata::AppliedStereotype entry (kind metadata, attributes stereotype/profile/tags, migratorEmitted: true), since OpenSysML binds the name in internal/semantic/semantics/synthesized_name.go and internal/translate/migrate/migrate.go.

Semver impact: MINOR (a new element; no existing entry changes, so contract stays at its current value).

Checks: ./scripts/validate-libraries.sh (0 errors, 0 warnings), ./scripts/check-engine-contract.sh --base origin/main, ./scripts/check-readme-table.sh and ./scripts/build-kpar.py all pass.

OpenSysML will re-pin its vendored OpenSysML Libraries/ copy to the main commit this merges as.

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

…e the v2 form does not carry

The SysML v1 migrator writes it on an element whose v2 form is the
stereotype's (a dependency for a «Trace») or whose stereotype comes from a
profile it did not write; tags keeps the tag values no v2 feature holds.

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 marked this pull request as ready for review October 12, 2026 01:42
@devin-ai-integration

devin-ai-integration Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

The required job (Validate the extension libraries) is green. The advisory OpenSysML against these libraries job is red for two reasons, neither of which this change can fix on this side:

  • tests/hygiene TestEngineContractCoversEveryBoundName: "engine-contract.json lists MigrationMetadata::AppliedStereotype but no code derives it". The job runs OpenSysML develop, which does not yet bind the name; the OpenSysML PR that writes AppliedStereotype (and re-pins the vendored copy to this merge) is what makes both sides agree. A new migrator-emitted binding is circular across the two repos — one of the two advisory/drift checks is red until both have landed — and the convention is to merge the library side first.
  • internal/semantic/semantics TestKerMLFeatureMetaclassClassification: reads examples/pilot-corpora/..., which this job does not download. Unrelated to this change.

The coordinated OpenSysML PR is Open-MBEE/OpenSysML#1043 (branch fix/migrate-stereotype-markers): it holds the two listed consumers (internal/semantic/semantics/synthesized_name.go declares AppliedStereotypeFQN = "MigrationMetadata::AppliedStereotype", internal/translate/migrate/migrate.go writes the usage) and a vendored MigrationMetadata.sysml byte-identical to this one; it re-pins scripts/extension-libraries-pin.sh to the main commit this PR merges as.

@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: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@HuiJun
HuiJun merged commit c925739 into main Oct 12, 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