feat(libs): vendor the extension libraries pinned to OpenSysML-Extensions-Library, with an engine contract - #881
Open
devin-ai-integration[bot] wants to merge 12 commits into
Open
devin-ai-integration[bot] wants to merge 12 commits into
devin-ai-integration[bot] wants to merge 12 commits into
Conversation
…sML-Extensions-Library The extension libraries live upstream; scripts/sync-extension-libraries.sh vendors the pinned commit, --check fails CI on drift, and engine-contract.json records the qualified names the engine binds. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…act.json Co-Authored-By: jason.han <hanhuijun@gmail.com>
… and the new library home Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ies; name all 14 libraries in README Co-Authored-By: jason.han <hanhuijun@gmail.com>
…lt site Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tools module in the upstream job Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…rary main Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
This was referenced Oct 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The non-normative
OpenSysML Libraries/extensions are now maintained at Open-MBEE/OpenSysML-Extensions-Library, so other SysML v2 tools can consume them. That repository imported them with their history in Open-MBEE/OpenSysML-Extensions-Library#1. OpenSysML keeps a vendored copy at the same path:go installand the module proxy must build without fetching another repository, and the embed, element identity andstdlib.snapshotstay as they are. This PR does not change any.sysmlor.kermlbyte, so the snapshot is not regenerated.Pin:
scripts/extension-libraries-pin.shholdsEXTENSIONS_REPO,EXTENSIONS_REFandEXTENSIONS_COMMIT, currentlymainat4213d77dc89ad89e79591e425536d6ef9e9dab89.Sync:
scripts/sync-extension-libraries.shfetches the pinned commit (--depth 1), verifies its sha and rewrites the directory from upstreamlibraries/*.{sysml,kerml}plusengine-contract.json.--ref REFsyncs a branch or tag instead of the pin;--source DIRsyncs a local checkout.engine-contract.json, before writing anything. Any file in the directory that is neither upstream norREADME.mdis an error.Drift check:
make extension-libraries-checkruns the sync with--check. It runs in pr.yml'schangesjob, so the changed-areas filter can't skip it. CircleCI gates onlymain/developmerges, not PRs, so it needs no change.make extension-libraries-syncre-vendors.Engine contract:
engine-contract.jsoncomes from upstream and lists the 125 qualified names the engine binds, each with a kind:function, with parameters in order;metadata, with the features the engine reads;document,elementorpackage;migratorEmittedflag on names the SysML v1 migrator writes into user models.Two tests keep the manifest and the engine in step:
internal/exec/runtime/engine_contract_test.go: every registry function in an extension package is a manifestfunctionentry with identical parameters, and every manifest function in a package the registry implements is registered.tests/hygiene/engine_contract_test.go: parses all non-test Go underinternal/,cmd/andtools/and constant-folds string literals,+concatenations and package-level string consts. Every extension-qualified name it finds must be in the manifest. A manifest entry no code derives is stale, unless its package composes names under aPkg::prefix (DiagramLayout, DocumentQueries and StateMachines), which the derivation can't enumerate.Upstream CI resolves every entry against the libraries with the pinned OMG pilot. It fails a PR that removes or renames an entry or changes its parameters unless
contractis bumped, which means a MAJOR release and a re-pin here.Advisory upstream tracking:
.github/workflows/extension-libraries-upstream.ymlruns nightly and onworkflow_dispatch(with an inputref, defaultmain).main, not the pin, checks or regenerates the snapshot, and runsgo test ./...andgo test -C tools ./....Docs:
README.mdin the vendored directory: edits go upstream.docs/project/extension-libraries.mdcovering pin, sync, drift check, contract and the nightly.Merge order
Open-MBEE/OpenSysML-Extensions-Library#1 has merged, and the pin points at its merge commit on
main, so this PR has no remaining upstream dependency.How it was verified
go build ./...,go vet ./...,gofmt -l .(empty) andgo test ./...pass, as domake docs-check,python3 scripts/changelog.py check,make extension-libraries-checkandmake stdlib-snapshot-check."Simulation::Bogus"fails the hygiene test.log'sbase→b) fails the runtime test:registry [x b] != manifest [x base].--ref main: the sync was clean and the snapshot unchanged.engine-contract.jsonis refused and leaves the vendored directory untouched.Checklist
make testandmake lintpass locally (go test ./...+go vet/gofmtgates)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (no gate count moved)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/bf0cf4d7769a49a8adfee6bfd87860f3
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/bf0cf4d7769a49a8adfee6bfd87860f3?variant=devin
Requested by: @HuiJun