Repository navigation
feat(referee): list the api-json matches a run lost and gained, and record why naming-feature keys cost manual-examples 171 - #1323
Merged
Conversation
…ost against an earlier run Co-Authored-By: jason.han <hanhuijun@gmail.com>
…1 api-json matches Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…-json root 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)".
|
… movement groups once, drop stale movement files Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…gosec Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
This was referenced Oct 21, 2026
Open
devin-ai-integration Bot
added a commit
that referenced
this pull request
Oct 21, 2026
…ridge-opensysml-libraries Brings the referee's -trimpath refusal and develop with #1323 merged; the api-json provenance keeps the writer digest and the opensysml-libraries input.
This was referenced Oct 21, 2026
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
Naming a member by its naming feature (#1304) raised the api-json differential's matched elements on every corpus root but
docs/manual/examples, which fell 6834 → 6663. This PR adds the referee diagnostic that names the moved matches, uses it to account for every one of them, and records the finding.No derivation of ours disagrees with the spec. The 171 is the net of 357 matches lost and 186 gained:
AttributeUsage+ 3ReferenceUsage, eachattribute redefines caption|title|text|term|description|kind|direction|style|groupBy = …orref redefines source|target = …of a feature ofDocumentQueries(internal/workspace/libs/stdlib/OpenSysML Libraries/), with theirRedefinition,FeatureValueand literal /FeatureReferenceExpressionvalue…::coverage::titleper KerML 8.3.3.3.4Feature::effectiveName(namingFeature().effectiveName()when nothing is declared) with the defaultnamingFeature() = ownedRedefinition->at(1).redefinedFeature. The pilot's export showsname/qualifiedNamenull and theRedefinition'sredefinedFeaturepointing at an id outside its key table — the bridge loads only the pinnedsysml.library, so it cannot resolve this repository's own libraries and keys the member structurally (…::coverage/AttributeUsage[0]). The earlier match was that structural key lining up with our then-positional one. All 87 verified in the pilot's JSON.attribute :>> x = …redefining features the model declares (withRedefinition,FeatureValue, 27LiteralString/ 19LiteralRational), plusrender asInterconnectionDiagram;(SysML 8.3.26.6RenderingUsage::namingFeature) and itsReferenceSubsettingSpecification basis
Clauses read for the adjudication: KerML 8.3.2.1.2 Element (
effectiveName,name = effectiveName()), 8.3.3.3.4 Feature (effectiveName,namingFeature); SysML 8.3.6.4 Usage (variant), 8.3.6.3 ReferenceUsage (transition payload), 8.3.17.14 PerformActionUsage, 8.3.20.4 ConstraintUsage, 8.3.26.6 RenderingUsage. Nothing was made stricter than the spec; no derivation code changed.The same shape on the other seven roots
Before → after #1304, fresh cache per tree, every root (the
-lost-againstlisting of the after run against the before run's inventory):perform VehicleActions::move :> …7.17.6/2,exhibit VehicleStates::monitoring7.18.4/2,attribute :>> massActualunder an undefinedMaximumMass7.21.2/3,render asMyTreeDiagram7.26.2/2–3,frame 'modularity'7.26.3/2,individual … redefines aircraft|preflight|…7.9.4/2,step redefines focusKerML 7.4.7.3/3) + what they own; the pilot resolves nothing and names nothing, we name by the reference as written (the same reference we export as@ref)DocumentQueries/AnalysisRecordsredefinitions (OpenSysMLDocument,Records,Reporting,RoverChecks,RelationshipMatrixReport) + 2render asMixedDiagram|asCaseDiagramofOpenSysMLRenderings(LanderViews), + what they ownEvery lost member on every root is the one shape — a naming feature the pilot does not resolve (an OpenSysML-only library it does not load, or a feature the excerpt never declares) — verified element by element in the pilot's JSON (
name/qualifiedNamenull,redefinedFeature/referencedFeatureid outside its key table). No lost member has a naming feature both sides resolve.Diagnostic
Every run now writes
pilot-apijson-diff-matches.json(per root: every key under matched / ours-only / pilot-only with its metaclass).-lost-against <earlier run>/pilot-apijson-diff-matches.jsonwritespilot-apijson-diff-movements.txt|json: the matches lost and gained since that run, grouped by root and metaclass, each with the key's fate in the run that does not match it. Tested without Java (TestMatchMovementsNameEveryMovedKey,TestCompareRootRecordsTheInventory) and end to end: a run of this branch against the pre-#1304 inventory lists exactly the 357 / 186 above.Record
docs/project/api-json-differential.mdgains "Where the pilot cannot name a member" (the limitation, the clauses, the counts) and documents the new files and flag. The baseline is unchanged (already 6663 on the base branch). Changelog fragmentchanges/unreleased/api-json-match-movements.added.md.Behaviour changes
None in the writer or the semantics; the referee's report and baseline shape are unchanged (the inventory is an extra file).
Overlapping work checked
internal/translate/export/internal/semantic/semanticsnaming or the baseline: feat(export): owned absence and evaluator-derived properties in API JSON #1232 (feature/api-json-derived-properties-layered, api-json writer — nothing here depends on it, nothing duplicated), feat(corpus): gate the specification's own textual-notation examples #1302 (base of this PR), fix(tools): re-record the API JSON differential baseline after the errata overlay change #1321 / docs(project): re-record the API JSON differential baseline over current develop #1322 (docs-only baseline re-records), feat(semantics): usages subset the base library usage of their kind #1319 / fix(runtime): nested action and state usages are performances their owner holds #1310 / fix(check): report redefinition-not-end only inside associations and connectors #1305 / feat(parser): parse the five productions the specification examples use #1315 / fix(libs): record a document whose metadata names undeclared types or elements #1314 (semantics, no naming-feature overlap).tools/referee/apijson/provenance.go); this PR does not touch that file.Follow-up (not in this PR)
Loading
OpenSysML Libraries/into the bridge alongside the pinnedsysml.librarywould let the pilot resolve these features and turn the 87 into real comparisons; it changes the bridge source (and so its recorded digest) and the baseline of two roots, so it is a change of its own.How it was verified
go build ./...,go vet ./...,gofmt -l .(empty),go test ./...,go test -C tools ./...,make lint,make docs-counts,python3 scripts/changelog.py check— all pass.go run -C tools ./cmd/pilot-apijson-diff -checkreproduces the committed baseline on every root.OPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_PILOT_CORPORA=1 go test -count=1 ./tests/corpus -run TestCorpusRoundTrippasses (no export change, nothing moved).-lost-againstare pinned without Java byTestMatchMovementsNameEveryMovedKeyandTestCompareRootRecordsTheInventory, and exercised end to end as described above (a run of this branch overdocs/manual/exampleswith-lost-againstthe pre-fix(export): name a view'srender tree;and other naming-feature members by their effective name #1304 inventory lists exactly 357 lost / 186 gained, every lost member re-read in the pilot's own JSON).Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (no count moved; the baseline is unchanged)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/556a00af681842bf9d52a532275fc761
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/556a00af681842bf9d52a532275fc761?variant=devin
Requested by: @HuiJun