Repository navigation
feat(libs): vendor the extension libraries pinned to OpenSysML-Extensions-Library, with an engine contract - #881
Merged
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
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
The push pause is lifted for this PR, for one push after the work below. Merge Before pushing, run each of these and confirm it passes:
Two Devin Review findings from 10-04 are still open on this PR. Confirm in each thread that it is addressed, so they are not left for re-review. Push once, without force-pushing, and mark the PR ready for review when CI is green. |
…ension-libraries Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # Makefile # README.md # docs/internals/architecture.md
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ary main Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tions Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ary package declarations Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ary main Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ension-libraries Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # internal/workspace/libs/stdlib.snapshot
6 tasks done
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. Library changes that landed ondevelopdirectly (#816, #871, #886, #920 and #966) were ported upstream in Open-MBEE/OpenSysML-Extensions-Library#2. Relative todevelop, the only change to the 16 vendored files is thelibrary packagedeclarations described below.Pin:
scripts/extension-libraries-pin.shholdsEXTENSIONS_REPO,EXTENSIONS_REFandEXTENSIONS_COMMIT, currentlymainat5a47e595b9abe42e7545854eab21af20c4b1a875, the merge commit of fix(libraries): declare DiagramLayout, IdentityMetadata, MigrationMetadata and SysMLValidation as library package OpenSysML-Extensions-Library#3. Syncing from it leaves every vendored file andengine-contract.jsonunchanged.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 132 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, OpenSysMLRenderings 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.Library package declarations
DiagramLayout,IdentityMetadata,MigrationMetadataandSysMLValidationnow readlibrary packageinstead ofstandard library package. They are non-normative extensions, and the keyword drew the pilot warningUser library packages should not be marked as standard. The change landed upstream in Open-MBEE/OpenSysML-Extensions-Library#3 (merged) and is vendored here. It is the same four-line change as #882, which will merge cleanly with it.stdlib.snapshotis regenerated for the changed bytes. No test golden changed.opensysml-librariesinput digest indocs/project/pilot-differential-baseline.jsonwas re-recorded. No count moved, because the vendored files are resolved as context and are never validated.changes/unreleased/extension-libraries-non-standard.changed.mdrecords the change, including that RDF export no longer marks these packagessysml:isStandard true.Merge order
No upstream dependency remains: the pin is on Extensions-Library
main, and the branch includes currentdevelop.How it was verified
gofmt -l .(empty),go build ./...,go vet ./...,make lint,make extension-libraries-check,make stdlib-snapshot-check,make docs-check,python3 scripts/changelog.py check,python3 scripts/check-doc-ids.py,go test -C tools ./...andgo test -race -count=1 -timeout 60m ./...pass."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