Repository navigation
fix(grpc): GetElementProperties reads a model one document at a time - #2052
Closed
devin-ai-integration[bot] wants to merge 25 commits into
Closed
devin-ai-integration[bot] wants to merge 25 commits into
devin-ai-integration[bot] wants to merge 25 commits into
Conversation
A document the parser could not read whole, or one declaring a top-level name an earlier document already declares, is left out of the model and reported in the response (excluded_documents) instead of refusing every element of every document. An element of an excluded document answers that document's error; any other element is answered. The Go, Python and TypeScript clients surface the excluded documents. Fixes #2029 Co-Authored-By: jason.han <hanhuijun@gmail.com>
… documents 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)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ment-properties-per-document
…ment-properties-per-document
…ment-properties-per-document Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # client/python/tests/test_element_properties.py # internal/frontend/grpc/element_properties.go
…ment-properties-per-document
…ment-properties-per-document Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # api/proto/sysml.pb.go # client/node/src/generated/sysml_pb.ts # client/python/opensysml/proto/sysml_pb2.py # client/rust/conformance/sysml.descriptor.binpb
…ment-properties-per-document
…ment-properties-per-document
…ment-properties-per-document Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # internal/frontend/grpc/element_properties.go
…ment-properties-per-document
…ment-properties-per-document Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # client/rust/conformance/sysml.descriptor.binpb
…ment-properties-per-document
…ment-properties-per-document
…declarations documentExclusions counted the top-level declarations of a document it had already refused for a syntax error, so a valid later declaration of the same package was refused too, and it keyed collisions by every binding name, so a package sharing only a short name with another was refused although their ids differ. Bindings of refused documents are skipped and only the primary name, which mints the id, is compared. Co-Authored-By: jason.han <hanhuijun@gmail.com>
GetElementPropertiesResponse gained excluded_documents, and the Rust client's
ergonomic layer did not carry it: ElementProperties now lists the documents
the model was read without as ExcludedDocument {document, error}, the
conformance runner writes them back to the wire, and the decoding test covers
one. Without the field the client's test and conformance crates did not
compile against the regenerated wire types.
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…'s element GetElementProperties keeps a value that points into an excluded document rather than dropping or marking it: the derived properties it answers (KerML 8.3.3.3 Feature::type, 8.3.3.1 Type::inheritedMembership, 8.2.3 Namespace::member) are defined over the whole model, and the pilot keeps a partially parsed file's elements the same way. A request for such an element answers its document's error, and excluded_documents says why the document is unavailable. Stated on the proto field and in the GetElementProperties compliance row; stubs regenerated (comments only). Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tructure' into feat/element-properties-per-document Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/spec-compliance/08-grpc-service-layer.md
6 tasks done
…tructure' into feat/element-properties-per-document
…tructure' into feat/element-properties-per-document
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # client/node/src/generated/sysml_pb.ts # client/python/opensysml/proto/sysml_pb2.py # client/rust/conformance/sysml.descriptor.binpb # docs/project/spec-compliance/08-grpc-service-layer.md # internal/frontend/grpc/element_properties.go
The clause citations and the pilot's behaviour stay in the comment; the GetElementProperties compliance row carries the full basis. Stubs regenerated. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This was referenced Nov 10, 2026
5 of 6 tasks
devin-ai-integration
Bot
deleted the
feat/element-properties-per-document
branch
November 23, 2026 15:24
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
Fixes #2029
Stacked on #2042 (base branch
feat/element-properties-symbol-structure); retarget todeveloponce that merges.GetElementPropertiesanswered the same error for every element of a model when any one document had a syntax error or declared a top-level name another document also declares. It now reads the model one document at a time.What the RPC reads and how refused documents are reported
metamodel.SymbolStructure(feat(grpc): GetElementProperties reads the symbol-backed metamodel structure #2042).CachedModel.documentExclusions(internal/frontend/grpc/element_properties.go) lists, in document order, each document the model is read without: oneconvert.SyntaxErrorOfrefuses (the parser could not read it whole), and one declaring a top-level name an earlier document already declares (Index.TopLevelBindings; the earlier declaration stays readable, the later document is excluded — the same declarationConvertrefuses the model for). A validation error alone (an unresolved reference) excludes nothing.error; a request for any other element is answered. Every response carriesexcluded_documents(new field 4,ExcludedDocument{document, error}, wire-compatible), empty when the whole model was read, so a client can tell a complete model from a partial one.Convertkeeps its whole-model contract untouched.Clients
ElementProperties.ExcludedDocuments []ExcludedDocument.ElementProperties.excluded_documents;ConversionErroris raised only when the requested element's own document is excluded and carriesexcluded_documentsas(document, error)pairs.ElementProperties.excludedDocuments.ExcludedDocumentmessage andgetExcludedDocumentsList()onGetElementPropertiesResponse(message classes are generated by the Maven build fromapi/proto/sysml.proto).make proto).Specification basis
No new clause: the documents left out are exactly the declarations
Convertalready refuses a whole model for (a document the parser could not read whole; two documents minting one element id). No compliance row moves.How it was verified
internal/frontend/grpc/element_properties_documents_test.go: a syntax error in another document, a top-level name declared again by a later document, and a validation error only.internal/frontend/grpc/element_properties_corpora_test.go: the reporter's reproduction —examples/pilot-corporaandexamples/sysml-v2-trainingloaded as one model (313 documents, 12 excluded for duplicate top-level declarations); 8,775 elements answered, the 50 of excluded documents answer their document's error.client/python/tests/test_element_properties.pydecodesexcluded_documentsand checksConversionError.excluded_documents.go build ./...,go vet ./...,gofmt -l .,go test ./...on the pushed head.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/e543991fdf9549d7b1dd87e0695bae23
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/e543991fdf9549d7b1dd87e0695bae23?variant=devin
Requested by: @HuiJun
👀 Devin fixed 2 findings · 1 finding for you to triage · Follow Devin's work
Re-stack on #2042's merged head
b1d029d2d5(develope074d3f40cand480c3f4f5ein). Conflicts:internal/frontend/grpc/element_properties.go(symbolIDskeeps its excluded-documents parameter), the GetElementProperties row ofdocs/project/spec-compliance/08-grpc-service-layer.md(develop's Query row beside this PR's row), and the generated Node, Python and Rust stubs, regenerated withmake proto.excluded_documentsproto comment fits two lines; it keeps the KerML clause citations and the pilot's behaviour, and the compliance row carries the full basis.library_members_are_listed_on_requestfails locally, also on develop locally, green in CI); Node 482 passed, 0 failed; Java install with the service required passed; Python 1771 passed, 6 known local failures (4 unnamed-metaobject identity tests that fail on develop locally too and are green in CI; 2test_versiontwo-checkout artifacts).