`GetElementProperties` `Feature::type` leaves out the type a feature gets by subsetting when it also has its own typing

Open
#2,198 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@devin-ai-integration is already working on this.

Since Nov 15, 2026.

  • #2263 by @devin-ai-integration — open

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, python
Domain
backend

Research direction

Start by running the SysML snippet in the issue through the Python client and comparing element_properties("P::Owner::pBoth", "type") with type_facts.types, then check the A40-040..042 cases in test-suite/data/models/A40.sysml. Find where the GetElementProperties type read stops at the feature's own typing and skips the types inherited through subsetting, and find the Symbol API code that already includes them. Done when type returns [P::V, P::T] for pBoth and the A40 types cases pass in the Go and Python property suites.

Written by the indexing model from the issue text.

Description

bug

This issue was written with AI help. The reproduction was run against the version below.

What happened

Since #2040 (#2007), the Symbol API's type_facts.types gives a feature's derived Feature::type, including the types it gets through subsetting. #2021's closing comment says it equals element_properties(el, "type"). For a feature that has both its own typing and a subsetting, the two answers differ:

package P {
    part def T;
    part def V;
    part def Owner {
        part q : T;
        part pBoth : V :> q;    // typed by V, subsets q : T
    }
}
m = opensysml.loads(SRC)                                         # no diagnostics
[t.id for t in m.get("P::Owner::pBoth").type_facts.types]        # ['P::V', 'P::T']
m.element_properties("P::Owner::pBoth", "type")                  # ['P::V']
Read P::Owner::pBoth
Symbol API type_facts.types P::V, P::T
GetElementProperties type P::V
Pilot Feature::type P::V, P::T

ownedTyping and ownedSubsetting each list their one relationship. A feature that only subsets (part pSub :> q;) answers P::T through both reads, so the gap seems to be the combination of the two.

Expected

type is [P::V, P::T]: KerML §8.3.3.3 Feature::type includes the types of the features it subsets. That is the answer of the Symbol API, the Pilot (0.64.0-SNAPSHOT, commit 378a8700c) and sysml-toolkit.

Version

OpenSysML develop at a159469093, bin/sysml-grpc from make build-grpc, Python client from client/python of the same commit.

Found by

The test suite at https://github.com/hideo67/sysmlv2-tests, matrix A40 (test-suite/data/matrices/A40.md, model test-suite/data/models/A40.sysml). pBoth's types fails on the def, through a typing usage and through a usage of a specializing def (A40-040..042), in opensysml-py-props and opensysml-go-props. The six Symbol API suites pass these cases.

Dominant language
Go
Stars
59
Forks
20
Avg merge
10h 23m
Merged PRs (30d)
897

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-MBEE/OpenSysML

All issues in Open-MBEE/OpenSysML

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.