Repository navigation
feat(referee): load the OpenSysML Libraries into the pilot JSON bridge and re-record the api-json differential - #1328
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
There was a problem hiding this comment.
Devin Review found 1 potential issue.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
This was referenced Oct 21, 2026
This was referenced Oct 21, 2026
* feat(identity): fix ids for OpenSysML's own library elements so references link by id
A reference into one of the bundled extension libraries (DocumentQueries,
MOSA, OOSEM, ...) was written as a {"@ref": name} name reference, because
libraryElement gave an id only to symbols the norm identifies. The
extension libraries now carry fixed, deterministic ids derived as the
normative ones are, under the libraries' upstream URL (identity.OpenSysML,
SourceExtension), so the writer links them by id and names them with a
library stub, hover reports them as (extension, OpenSysML), and the
identity gate checks they collide with nothing in the pilot's XMI.
Co-Authored-By: jason.han <hanhuijun@gmail.com>
* docs(referee): re-record the api-json differential with references into OpenSysML's libraries linked by id
The writer now links every reference into this repository's own libraries by
the element's fixed id, so the baseline moves present-different 50027 -> 45688
and indeterminate 21034 -> 25703 on the same 920 files; the record adjudicates
every row that moved and closes gap row 41 for those libraries.
Co-Authored-By: jason.han <hanhuijun@gmail.com>
* docs(referee): record the api-json writer digest after the extension-library identity change
The base branch now records the writer's source digest in the baseline; a
full -update over the merged tree moves only that digest, every count being
the one already recorded.
Co-Authored-By: jason.han <hanhuijun@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: jason.han <hanhuijun@gmail.com>
This was referenced Oct 21, 2026
The api-json differential baseline is kept from this branch for the moment and re-recorded over the merged tree in the next commit. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…merged tree develop's restated verbatim writer moved the writer source digest, one spec-example type mismatch and three extension properties; the library and identity movement already recorded is unchanged (0 lost, 90023 matched). Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-opensysml-libraries Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json
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 API JSON differential's pilot bridge (
scripts/pilot-json-exporter/ExportJSON.java) read only the pinnedsysml.library, so a member whose naming feature, type or redefined feature lives in this repository's own libraries (internal/workspace/libs/stdlib/OpenSysML Libraries/:DocumentQueries,AnalysisRecords,OpenSysMLRenderings,MOSA,OOSEM, …) stayed unnamed on the pilot's side and never really compared with ours. The bridge now takes--extension-library <dir>(repeatable, the same option and loading order as the two validator bridges:.kermlthen.sysml, read as library resources after the standard library, which stays first and is still the launcher's default). The referee passes the directory explicitly — the one the pilot differential already hands its validators,diff.LibrariesHandedOver(the libraries inside the standard-library root OpenSysML itself loads, so both sides resolve the same text) — and the baseline records it as theopensysml-librariesinput, so a run is reproducible from its command line and an edit under the libraries is a provenance mismatch.tools/referee/apijson:pilotArgsspells the bridge's command line;provenancerecords the libraries input; the committed baseline is re-recorded.tools/referee/diff: exportsLibrariesHandedOver,LibrariesInput,RelativeTofor the sibling referee.docs/project/api-json-differential.md: bridge description, refreshed figures, the referee-limitation section replaced by the measured movement and its three disagreement shapes, launch-ready gap rows 41–43.Specification basis
No behaviour of the implementation changes; the bridge and the referee do. The adjudication below cites KerML 1.1 Beta 2 (
doc/1-Kernel_Modeling_Language.pdf) for each disagreement the newly resolved comparisons expose; no row ofdocs/project/spec-compliance.mdmoves.How it was verified
Movement (
-lost-againstthe run before the change, all roots, freshXDG_CACHE_HOME)examples/sysml-v2-trainingexamples/pilot-corpora/sysml-examplesexamples/pilot-corpora/sysml-validationexamples/pilot-corpora/kerml-examplesexamples/spec-examplestests/testdataexamplesFeatureValue300,OwningMembership298,FeatureTyping266,Redefinition240,LiteralString203tools/referee/diff/testdatadocs/manual/examplesFeatureValue87,Redefinition87,AttributeUsage84,LiteralString84,Feature3"ours-only before" is a key the pilot keyed structurally (
…/AttributeUsage[0]) because it could not name the member; "absent before" is a key ofexamples/mosa-demo/mosa-demo.sysmlorexamples/oosem-demo/oosem-demo.sysml, which the pilot could not export at all. Totals: 86974 → 89957 matched (+2983), ours-only 29497 → 28511, pilot-only 40387 → 38863; properties present-equal +22010, present-different +2394, ours-missing +36881, pilot-missing +2574 (the new matches bring their whole property sets into the comparison; the ours-missing growth is the existing gap rows measured on more elements).pilotLibraryElements5236 → 30926 (the pilot writes our library elements as library elements; the referee leaves them out as it does the standard library's).Adjudication of what the newly resolved comparisons show
Every property of the 2983 gained elements that is not present-equal/absent-both was listed per element and bucketed. Newly present-equal: the names, qualified names, owners, memberships, the redefining side of the redefinitions, values and literals of the gained members (+22010). Newly ours-missing (+36881) and pilot-missing (+2574) are only the existing rows (
isLibraryElement,memberElementId,owningType, … on our side;Relationship::ownernull andvalue/redefinesoutside the metamodel's spelling on the pilot's) on more elements. Newly present-different (+2394) reduce to three shapes, all pre-existing on the scorecard and none a derivation we get wrong; the two whole files add every shape the scorecard already carries for user models (quotedqualifiedNamesegments with spaces, structural ordinals of unnamed members, connector-end naming).{"@ref": "caption"}, where the pilot writes the elementRedefinition.redefinedFeature/general/target/subsettedFeature/relatedElement;FeatureTyping.type/…;MetadataUsage.type;ViewUsage.type;FeatureReferenceExpression.referent+ itsMembership.memberElement;ReferenceSubsetting.referencedFeatureon the tworendermembersMOSA/OOSEMmetadata and view definitions); 0 + 123 metadata usages; 0 + 16 views; 0 + 28 enumeration-literal referents; 0 + 2 renderingsRedefinition::redefinedFeature : Feature(KerML 8.3.3.3.8),FeatureTyping::type(8.3.3.3.7),Element::elementId(8.3.2.1.2) — the API's JSON refers to an element by its idinternal/translate/export/rdf_identity.golibraryElementgives a library symbol an IRI only whenidentity.Of(...).Source == SourceNormative(the pilot's standard-library XMI); our libraries have no norm, soapi_json_out.gofalls back to{"@ref": name}andlibraryNamesstates none of their elements. Not small (identity for a second library tier, writer and readers) → gap row 41.ownedRelationshipon a usage that both redefines and has a value: pilot[Redefinition, FeatureValue], ours[FeatureValue, Redefinition]AttributeUsage.ownedRelationship,ReferenceUsage.ownedRelationship,RenderingUsage.ownedRelationshipElement::ownedRelationship : Relationship [0..*] {ordered}(KerML 8.3.2.1.2); the notation adds owned relationships as parsed,redefines xbefore= …FeatureReferenceExpressionowns aMembershipof its referent that ours does not writeFeatureReferenceExpression.ownedMembership/ownedRelationshipderiveFeatureReferenceExpressionReferent: referent =memberElementof the first non-ParameterMembershipownedMembership(KerML 8.3.4.8.5)Membershipis part of the abstract syntax. Pre-existing (2031 before) → gap row 43.No disagreement about naming: every gained member is named identically on both sides (that is what made it match), including
#majorSystemComponent-style prefixes (<majorSystemComponent> MajorSystemComponentMetadata), which both sides resolve to the definition — ours merely spells the typing target by the short name as written (shape 1).Pilot diagnostics on the OpenSysML Libraries
None. The bridge exports every root with the sixteen library files loaded and reports no error on them; the pilot's batch validator (
validate-sysml-batch, one resource set, both languages) over the same directory exits 0 with no diagnostic (a control model with an unresolved type produces two errors and exit 1 through the same launcher). Two files the pilot previously could not export at all (examples/mosa-demo/mosa-demo.sysml,examples/oosem-demo/oosem-demo.sysml: "eResource() is null" on an element of an unloadedMOSA/OOSEMlibrary) now export;pilotFailed58 → 56.Reproducibility
Second fresh-cache run with
-check:-checkexits 0, and the second run'spilot-apijson-diff.jsonis byte-identical (cmp) to the committed baseline and to the first run's.In-flight work and overlaps
feat/feature-reference-membership) merged this branch and feat(identity): fix ids for OpenSysML's own library elements so references link by id #1332 into itself, re-recorded the baseline over the combined tree and has landed ondevelop(3e04a2950), so everything here is already ondevelop: after the last merge ofdevelopthis branch's tree is identical todevelop's (empty diff), and the baseline isdevelop's own re-record.feat/extension-library-identity, fixed ids for this repository's own library elements so references into them link by id) was based on this branch and has been merged into it (8d2e3ffc7); its record and baseline (90023 matched, present-different 45688, gap row 41 closed for those libraries) are part of this PR now.developat5db0f7415(the restated verbatim writer and the performance work) is merged in as a merge commit and the baseline re-recorded over the merged tree with a fresh cache: against the baseline feat(identity): fix ids for OpenSysML's own library elements so references link by id #1332 recorded, onlydevelop's own drift moves — theapi-json-writersource digest, oneexamples/spec-examplestype mismatch (1742 → 1743) and threesysx:extension properties (146858 → 146861), the same movementdevelop's own re-record shows; 0 matches lost, no scorecard row moves. A second fresh-checkreproduces it byte for byte.develop(2de4131af), which is merged in last as a no-op merge commit (the tree is unchanged; the merge only gives the branch a single merge base withdevelop). This PR's own changes are its bridge, referee, baseline, record and changelog commits plus theprovenance.gomerge resolution.fix/api-json-naming-feature-keys), whose-lost-againstdiagnostic and referee-limitation paragraph this PR uses and replaces, was merged in first and has since landed ondevelop; the PR now targetsdevelop.feat/api-json-writer-provenance; at3ea1ef04b,a59c9506d,0fc1a0873, which hands the referee its build checkout, and finallye5f3a4c8a) anddevelop(c5a59e138with feat(vscode): zoom, pan and fit, selection highlighting, relationship filters and auto layout in the diagram panel #1318, thenf9f6d953fwith feat(referee): list the api-json matches a run lost and gained, and record why naming-feature keys cost manual-examples 171 #1323, then2de4131afwith feat(tools): record the API JSON writer's source digest in the differential baseline #1325) are merged in as merge commits;provenance.gowas resolved soprovenance(checkout, built, libraries)records theapi-json-writerdigest from the build checkout and theopensysml-librariesinput together. The baseline was re-recorded over the merged tree with a fresh cache: 0 matches lost, 0 gained against the previous run, every count and scorecard row identical — only thetoolslist (two entries) and the recording date moved; a second fresh-checkreproduces it.Gate
go build ./...,go vet ./...,gofmt -l .(empty),go test -C tools ./...,make lint,make docs-counts,python3 scripts/changelog.py checkall pass.go test ./...passes; two budget-bound packages (cmd/sysml,tests/codegen) hit the 10-minute default timeout whilemake lintran alongside the suite and pass when re-run alone (302 s and 338 s). The referee's own tests (tools/referee/apijson,tools/referee/diff,tools/oracle/baseline) pass, including the newpilotArgsand libraries-provenance tests; the pilot JSON exporter was rebuilt with./scripts/download-pilot-json-exporter.shand both differential runs went through it.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/5b0ba95a3c33450b84f2c55eaafa4771
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/5b0ba95a3c33450b84f2c55eaafa4771?variant=devin
Requested by: @HuiJun