Skip to content

feat(cli): sysml -metamodel-table writes the pinned metamodel's table as JSON for generators outside the module - #1609

Merged
NicolasRouquette merged 7 commits into
developfrom
feature/metamodel-table
Oct 28, 2026
Merged

NicolasRouquette merged 7 commits into
developfrom
feature/metamodel-table

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

sysml -metamodel-table writes the committed metamodel table (internal/translate/rdf/ontology/table.go, generated from the pilot's SysML.ecore at scripts/pilot-pin.sh) as one JSON record: metamodel (the ecore namespace date), pilotTag, pilotCommit, classes (name, abstract, parents), properties (name, definingClass, kind object|datatype, range as a metaclass or enumeration name or a datatype IRI, lower, upper with -1 unbounded, ordered, nonunique, derived, default, redefines, subsets, opposite) and enumerations (name, literals).

It is the sibling of -metaclass-graph, with the same "own run, no model" rule, and exists so generators outside this module follow the same table the API-JSON and RDF writers do: the first consumer is the QVTS reflection generator in Open-MBEE/qvts, which emits reflection.sysml / reflection-compare.sysml from it and re-emits them when the pilot pin moves.

ontology.CurrentTable() / MarshalTable() (table_json.go) are the record; the CLI only writes it.

Specification basis

Tooling: no SysML v2 clause, no row of docs/project/spec-compliance.md moves. The table itself is unchanged.

How it was verified

  • internal/translate/rdf/ontology/table_json_test.go: spelling of an ordered many object property (Element::ownedRelationship → Relationship, upper -1), a datatype property (Element::declaredName → xsd:string), an enumeration range (Feature::direction → FeatureDirectionKind), a Boolean default, and the header.
  • cmd/sysml/metamodel_table_test.go: the output parses back to the table with its counts and header; a model file, -convert, -metaclass-graph and -from beside it are refused with the same wording as -metaclass-graph's; -o writes the bytes stdout carries; the input file is untouched.
  • go build ./..., go vet, gofmt clean; make changelog-check; make man regenerated packaging/man/man1/sysml.1, make man-check passes.

Checklist

  • make test and make lint pass locally (packages touched; full tier in CI)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (docs/reference/cli.md, docs/reference/rdf-mapping.md § Metaclass hierarchy graph)
  • Changelog entry added as changes/unreleased/metamodel-table.added.md
  • No gate count moved
  • No internal work-item labels in the body, docs, or changelog

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

… as JSON for generators outside the module

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@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[bot]

This comment was marked as resolved.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@NicolasRouquette
NicolasRouquette marked this pull request as ready for review October 28, 2026 03:04
devin-ai-integration Bot and others added 5 commits October 28, 2026 03:05
…etamodel-table writes a finite bound as is

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…re states it

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…o RPC answers the table)

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@NicolasRouquette
NicolasRouquette merged commit d93b20e into develop Oct 28, 2026
32 of 33 checks passed
@NicolasRouquette
NicolasRouquette deleted the feature/metamodel-table branch October 28, 2026 12:35
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