Skip to content

feat(grpc,clients): census every served and omitted metamodel property through GetElementProperties, per-family conformance cases, Julia and MATLAB bindings - #2073

Merged
HuiJun merged 7 commits into
developfrom
feat/element-properties-closeout
Nov 10, 2026
Merged

HuiJun merged 7 commits into
developfrom
feat/element-properties-closeout

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Closes out the acceptance of #2012 that is not owned by #2042/#2052: the full served/omitted census through GetElementProperties, per-metaclass-family tests/grpc conformance cases, the Julia and MATLAB bindings (and the Go capability re-export the parity table was waiting on), and the docs for every bound client. Refs #2012.

Census and conformance (tests/grpc)

  • TestElementPropertiesServeEveryRuleAndExplainEveryOmission walks the whole of metamodel.Rules() and metamodel.Omitted(): every rule and omission must name a property the metamodel declares on its defining class; for every served rule some element whose metaclass specializes the defining class is answered without a reason, and for every omission such an element is answered with the recorded reason. It reads the conformance fixtures first — element_properties_census_carriers.{sysml,kerml} supply the metaclasses no other fixture reaches — and stops reading examples/ once every key is settled, out of tries or uncarriable, so the package stays within the rest race shard's hour. The relationship metaclasses the API element form states as text of their owner (Unioning, Intersecting, Differencing, CrossSubsetting, TypeFeaturing) are allowlisted with that reason; element_properties_census_absent_forms.kerml writes each of them and the census fails the day the form states one as an element.
  • TestGRPCConformance drives GetElementProperties (element_id, properties, expected_properties; a model field lets cases share a fixture), with 19 cases over eight fixtures, one per family of the issue: Type, Feature, Connector, Flow, SendActionUsage, StateDefinition, FeatureValue/Expression, Membership/Import.

What the census found and this PR fixes (internal/semantic/metamodel)

  • Documentation::documentedElement was a served rule that was refused on every element (the structure asked for an owning related element, which a Documentation does not have). It is now derived as the documentation's owner — KerML 1.1 §8.3.2.3.5 ({subsets owner, redefines annotatedElement}) and §7.2.4.2 ("always the owning element of the documentation"). The derived census shows it leaving the silent list (0/407 → 407/407 values; pilot 420/420) and the api-json differential moves 387 pairs from oursMissing to presentEqual, nothing else.
  • MetadataAccessExpression::referencedElement was listed as omitted while the export already wrote it. It is now a served rule the evaluator derives (§8.3.4.8.15: the memberElement of the first owned membership that is no FeatureMembership); constraint-manifest.json row updated to faithful.
  • Five served rules named properties the metamodel does not declare — FeatureChaining::owningFeature, Unioning::owningType, Intersecting::owningType, Differencing::owningType, Usage::ownedUsage (the pilot column records 0 values on every carrier) — and are withdrawn, with the matching rows of TestStructureBackedOwningRelationshipOpposites and the three owningType completions of api_json_derived.go. Baselines re-recorded: derived_census_baseline.json (served 297 → 293, silent 18 → 17, pilot column unchanged), api-json-differential-baseline.json, structure_differential_expected.txt (the symbol structure answers documentedElement for the nine spec-example docs nested in relationship bodies where the graph structure answers null; the symbol side is the spec's).

Clients

  • Go: CapabilityElementProperties re-exported (the typed call and its test already existed; the parity row was reading the missing re-export).
  • Julia: element_properties(model, element, names...), ElementProperties/ElementProperty/ElementIdentity, property_elements, property_value, is_answered, CAPABILITY_ELEMENT_PROPERTIES; recorded-service tests (request shape, every value arm, refusal before the call, in-band error) and a live test.
  • MATLAB: model.elementProperties(element, names...), opensysml.internal.decodeElementProperties, capabilities().elementProperties; offline decoder test, capability-gate test and a live test.
  • docs/reference/client-parity.md row element_properties: every client bound (checked by tests/hygiene).

Docs: docs/guide/09-clients.md (every bound client, Julia/MATLAB tabs), docs/reference/julia-api.md, docs/reference/matlab-api.md, tests/grpc/testdata/conformance/README.md; doc counts regenerated.

Specification basis

  • KerML 1.1 §8.3.2.3.5 Documentation::documentedElement ({subsets owner, redefines annotatedElement}) and §7.2.4.2 ("the documented element of a documentation comment is always the owning element") — derived as the documentation's owner.
  • KerML 1.1 §8.3.4.8.15 deriveMetadataAccessExpressionReferencedElement — the memberElement of the first owned membership that is not a FeatureMembership; docs/project/constraint-manifest.json row moves from not-implemented to faithful (validation-census -check agrees).
  • The withdrawn rules name no property of their defining class in the KerML/SysML abstract syntax: Unioning/Intersecting/Differencing have typeUnioned/typeIntersected/typeDifferenced and the inherited owningRelatedElement, not owningType; FeatureChaining has chainingFeature and featureChained, not owningFeature; Usage declares no ownedUsage.
  • No row of docs/project/spec-compliance/08-grpc-service-layer.md moves; the GetElementProperties row already describes the RPC.

How it was verified

  • go test ./tests/grpc -run 'TestElementPropertiesServeEveryRuleAndExplainEveryOmission|TestGRPCConformance/element_properties' — the census and the 19 new cases. On develop the census test fails on Documentation::documentedElement (every carrier answers an unsupported reason), on the five undeclared properties and on MetadataAccessExpression::referencedElement (answered although listed omitted).
  • go test ./internal/semantic/metamodel (TestStructureBackedDocumentedElementIsTheOwner added), go test ./internal/translate/export with -update-structure-differential, go run -C tools ./cmd/derived-census -update, go run -C tools ./cmd/pilot-apijson-diff -update (Java 21, all corpora downloaded): the baseline diffs move only Documentation::documentedElement (ours 0 → 407 values of 407 carriers; +387 present-equal / −387 ours-missing api-json pairs) and add MetadataAccessExpression::referencedElement (5 values, 1 empty of 6 carriers); the pilot column is unchanged.
  • Julia Pkg.test() (recorded-service and live tests pass against bin/sysml-grpc); MATLAB tests run in CI's Octave job (no Octave locally).
  • go test ./tests/hygiene (parity row vs client capability declarations), go run -C tools ./cmd/validation-census -check, go run -C tools ./cmd/doc-counts -check, python3 scripts/changelog.py check.
  • Full gate: go build ./..., go vet ./..., gofmt -l . (empty), go test ./..., go test -C tools ./..., go test -C tools ./referee/apijson — all green at this head.

Still open after this PR

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

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


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

…y through GetElementProperties, per-family conformance cases, Julia and MATLAB bindings

Refs #2012. A census test reads the whole of metamodel.Rules() and Omitted() through the RPC over the examples and the conformance fixtures, and GetElementProperties conformance cases cover the Type, Feature, Connector, Flow, SendActionUsage, StateDefinition, FeatureValue/Expression and Membership/Import families. The census found and this change fixes: Documentation::documentedElement was refused on every element and is derived as the documentation's owner (KerML 1.1 8.3.2.3.5, 7.2.4.2); MetadataAccessExpression::referencedElement was listed as omitted while the export wrote it and is now served (8.3.4.8.15); five rules naming properties the metamodel does not declare are withdrawn. Baselines re-recorded. The Julia and MATLAB clients bind the RPC, the Go client re-exports its capability, and the parity table and guides document every bound client.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@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

… lines

Co-Authored-By: jason.han <hanhuijun@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

devin-ai-integration Bot and others added 5 commits November 9, 2026 21:58
…rties-closeout

Co-Authored-By: jason.han <hanhuijun@gmail.com>
… fixtures

The census exported every example before it could stop, since the rules of the relationships the element form states as owner text can never be witnessed; under -race that kept tests/grpc past the rest shard's hour. The scan now reads the fixtures first and stops once every key is settled, out of tries or has no carrier the form can state, and a carriers fixture supplies the metaclasses no other fixture reached.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…onships load-bearing

The census stopped reading before the examples once the fixtures settled every key, so a relationship the element form began stating as an element could escape elementFormAbsentMetaclasses. It now reads every fixture, records every object stated with one of those metaclasses, and a fixture writes each of the five relationship forms.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…rties-closeout

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit c010f23 into develop Nov 10, 2026
34 checks passed
@HuiJun
HuiJun deleted the feat/element-properties-closeout branch November 10, 2026 02:47
devin-ai-integration Bot added a commit that referenced this pull request Nov 10, 2026
…rties-symbol-structure

Takes develop c010f23 (#2073 element-properties closeout). Conflicts: the
api-json differential baseline and doc scorecard, the derived census baseline
and the structure differential expectation, all taken from develop's side and
re-recorded with their tools in the following commit.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration Bot added a commit that referenced this pull request Nov 10, 2026
…mbol-backed reader

#2073's census test (TestElementPropertiesServeEveryRuleAndExplainEveryOmission) read
the element-form reader; on the symbol-backed one seven served rules answered no
carrier and 53 omissions were worded no-rule.

- The reader keys a property by the most specific served rule its metaclass
  specializes (FeatureChainExpression::operator is ".", not OperatorExpression's
  no-rule) and explains a registry omission with the registry's reason.
- Flow::sourceOutputFeature/targetInputFeature, Import::importedElement and
  Function::result (the inherited library result when no return is written)
  read the symbol a structure handle projects; a library member's membership
  answers its member (Behavior::parameter).
- UseCaseDefinition::includedUseCase (SysML 8.3.25.3): the use case each owned
  IncludeUseCaseUsage names, else the include itself.
- The semantic model classifies an exhibit state / include use case usage as
  ExhibitStateUsage / IncludeUseCaseUsage, as the export already wrote them.
- Agreement ratchet re-recorded: new export-side classes under clauses
  symbol-73..78; the stale Exhibit/Include rows left.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
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.

GetElementProperties answers nothing for a model when one document has an error or a duplicate top-level name

1 participant