Repository navigation
feat(qvts): write a query's answer as a QVTS::QueryResult view on every query surface - #2116
Merged
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…entries Co-Authored-By: jason.han <hanhuijun@gmail.com>
…lients Co-Authored-By: jason.han <hanhuijun@gmail.com>
…cuments from Cameo Co-Authored-By: jason.han <hanhuijun@gmail.com>
…d MDK surfaces Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ry and the result-view examples Co-Authored-By: jason.han <hanhuijun@gmail.com>
…:QueryResult view The catalog classifies -as-view and the capability, render_model_view takes a document form, and the figures that count the bundled libraries follow the seventeenth: the manual pages, the self-model, the kpar install test, the two round-trip ratchets and both differential baselines (digest only). Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ould capture An element whose first segment is the view's name, a QVTS name the view imports or a feature QueryResult inherits is written `expose $::…`. The structure differential is re-recorded for the eleven new example models. 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)".
|
develop's objective and body-constraint export change and this branch's eleven example models both moved the two baselines; they are re-recorded over the merged tree. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ted name holding :: stays one segment, and an element under an unnamed owner is counted, not exposed Co-Authored-By: jason.han <hanhuijun@gmail.com>
…query joins a name that is not plain Co-Authored-By: jason.han <hanhuijun@gmail.com>
…haring its name — the frontier keeps the element where a quoted name makes two share a qualified name Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 3 findings. Devin automatically fixed all 3 findings.
Fixed by Devin (3)
- Inherited result headers render as blanks — statedValue now falls back to the nearest supertype that binds the attribute; tests/qvts TestResultViewHeaderIsInherited covers it.
- Successful query response shape is misdocumented — docs/reference/api.md now says the successful result_view is a string and only the error detail is a QueryResultView.
- New comments exceed the repository limit — The eight new comment blocks under editors/mdk are trimmed to two lines; the Java client's Javadoc keeps that module's @PARAM convention.
develop split the api-json differential baseline into per-file fragments and gave every MCP catalog tool a scope; both met this branch's re-recorded baselines and its as-view flag on the query tool. Generated baselines in conflict took develop's side and are re-recorded next. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…d tree The API-JSON fragments, the pilot differential and the derived-property census take the eleven examples/qvts files and the QVTS library; only the examples root and the OpenSysML Libraries provenance move. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This was referenced Nov 11, 2026
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…a-owning-membership-native Conflicts: - internal/semantic/semantics/annotations.go: the member, ownedMember, feature, ownedFeature and ownedElement views keep develop's flow-end feature and constraint result members and this branch's prefix-first order and FeatureMembership filter. - internal/translate/export/testdata/structure_differential_expected.txt: re-recorded on the merged tree. With the prefix a member, the nested*/owned* usage collections follow their two derivations on both evaluators: nestedMetadata and ownedMetadata select from ownedMember, every other one from ownedFeature (deriveUsageNestedMetadata, deriveUsageNestedUsage and the Definition pair). The derived census and the api-json differential are re-recorded for it, and the comments this branch touches are cut to two lines. Co-Authored-By: jason.han <hanhuijun@gmail.com>
The structure differential expectation took develop's side where the cell-wise merge refused; it is re-recorded on the chain head. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…metadata-owning-membership-native The reflective member views keep both the leading prefix metadata and the synthesized members. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Source conflicts keep both sides: the capability list ends with coordinate_frame_values then query_result_view. The census records and the differential index merged cell by cell; the census baseline, the structure differential and the protobuf stubs took develop's side, the stubs regenerated. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view The census records and the differential index merged cell by cell. Co-Authored-By: jason.han <hanhuijun@gmail.com>
… on the chain head The derived census moves one record, Usage::nestedItem over manual-examples (ours.value 37 to 36, ours.empty 748 to 749; the pilot answers 36). Seven api-json fragments move a bucket each, three kerml-examples fragments are restored from a textual merge, and the structure differential is re-recorded over the merged tree. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view The census records and the differential index merged cell by cell; no source file conflicted. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…metadata-owning-membership-native
… on the chain head The differential, the derived census and the structure differential move in the examples root alone, which gains the QVTS result-view models. The census was re-recorded against the live pilot because the recorded pilot column does not hold the new models. The record adjudicates the LiteralString result gap, which enters the launch-ready rows, as the LiteralInteger one. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…sult-view Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 20, 2026
… baselines for the self-model query path after merging develop and #2116 Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ry-result-view Co-Authored-By: jason.han <hanhuijun@gmail.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 20, 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
Every query surface can now write its answer as a
QVTS::QueryResultview, and the Magic MDK plugin can write that view and render documents from Cameo.QVTS(Outcome,QueryResult) is vendored through the extension-library pin, withQVTSandQVTS::QueryResultinengine-contract.json.internal/doc/queryexec/resultview.gois the one writer the surfaces share: a singleview <name> : QVTS::QueryResultthatexposes each selected element by qualified name (elements only, never copies of projected cells) and redefinesquery,source,outcomeandprovenance. An empty selection isOutcome::established; a path or model error writespathError/modelErrorand exposes the frontieratelements and the findings' elements. A name the view's own scope, the library or an inherited feature would capture is exposed from the root (expose $::source::cabin;). The text is byte-for-byte the same for the same commit.-as-view <file|->on-run-query,-run-inline-queryand-query; REPL%run-query -as-viewand%query -as-view; gRPCas_viewonRunDocumentQueryRequestandQueryRequest,result_viewon both responses, aQueryResultViewdetail on a failed query, all under thequery_result_viewcapability; MCPqueryandrun_document_querytakeasView. OSLC translator failures (an unknown property, for one) are now typed path outcomes, so theQuerypath writes apathErrorview as the document-query path does.RenderViewrenders aQueryResultview — the four attributes as the repeatedheader, the exposed elements as the rows — and writes it as a document through the request's oneformfield:markdown,htmlorasciidocon such a view, answered inRenderViewResponse.textlike every other form. A form the view's kind does not write isINVALID_ARGUMENT; a document form needs both therender_view_formandquery_result_viewcapabilities. MCPrender_model_viewtakesform.formoption as any otherrenderViewform and read it fromtext, and refusehtmlorasciidocfrom a service that cannot write result views; the generated Node and Rust code is regenerated, anddocs/reference/client-parity.mdrecords what the remaining high-level clients lack.DocumentQueries::Document, a v1 DocGen «Document» and aQueryResultview writes Markdown and HTML and opens the folder; the DocGen bridgeRunQuerycan emit the view text and render throughRenderView, so a DocGen table and a rendered view agree.Dependency
The pin points at the head of the unmerged library pull request Open-MBEE/OpenSysML-Extensions-Library#21. It has to merge first, and the pin then moves to the merged commit on this branch before this is merged.
Companion
The agent skills that describe these flags, RPC fields and client methods are updated in Open-MBEE/OpenSysML-MDK-Skills#14, which should merge after this.
Merge of
developdevelopis merged in to resolve conflicts, most recently at9d9b320bb1. The source conflicts wereRenderView'sformfield, whichdevelopintroduced for the ordinary view forms and this branch now shares (above), the capability list, wherequery_result_viewstays last, the Go client'sQuery, which keepsdevelop's capability checks and adds the one foras_view, and the Magic MDKEngine, which keepsdevelop's publication to a SysML v2 API server beside this branch's result views. The count baselines merge cell-wise throughscripts/install-baseline-merge-driver.sh.After the merge the API JSON fragments, the pilot differential baseline, the derived-property census and the structure differential are re-recorded by their tools over the merged tree under JDK 21. Against
developonly theexamplesroot moves (57 to 68 files, by the elevenexamples/qvtsfiles' own elements) together with the OpenSysML Libraries provenance (17 to 18 files): the pilot differential goes from 925 files, 528 fully agreeing to 936 and 539 with every diagnostic count unchanged, and the API JSON differential from 936 to 947 files, 109597 to 110219 matched elements.training_examples_expected.txtis untouched.Specification basis
Open-MBEE/qvts
docs/qvts-core.md: §2 (the outcome of a query: a value, a path error, a model error, and the frontier), §3.4 (determinism), andexamples/QVTS.sysml/examples/result.sysmlfor the view's shape.examples/result.sysmlis carried underexamples/qvtswith attribution and parses and renders against the shipped library. No row ofdocs/project/spec-compliance/changes verdict; the extension-library counts move from 17 to 18.How it was verified
go build ./...,go vet ./...,gofmt -l .(empty),make lint,make proto-lint,make changelog-check,make docs-counts,make man-check,make extension-libraries-pin-check.go test ./internal/doc/... ./internal/ir/... ./internal/frontend/... ./tests/grpc/... ./tests/hygiene/... ./cmd/sysml ./tests/kpar ./internal/workspace/...: unit tests of the writer (CabinMass, EmptySelection, MissingMassProject, MisspelledName, duplicate names, root-qualified exposure), CLI and REPL goldens, gRPC conformance including the OSLC success and unknown-property cases overexamples/qvts/lander.sysml, recorded expectations underexamples/qvts/expected, and the MCP tools.mvn -f client/java/pom.xml -pl :opensysml -am verify -Dopensysml.requireService=trueandinstall -DskipTests;mvn -f editors/mdk/pom.xml verify(plugin, bridge andOpenApiFloorTest); the Python client'spytest(1633 passed).examples/qvtsfiles and the library file are new, no existing verdict moved), both corpus round-trip ratchets (eleven newstableentries), the derived-property census and the structure differential (theexamplesroot goes from 57 to 68 models).pilot-diff -check,pilot-apijson-diff -checkandderived-census -check -require-exporterreproduce them.internal/exec/runtime,internal/translate/exportandtests/export, which run without the race detector; the tools module under-race; the Rust client'sfmt,clippy, workspace tests and conformance;tests/wasm, every binary under its budget.Checklist
make testandmake lintpass locally — the race suite as described abovechanges/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/1cb9400fae2e41888d76085f38572ba4
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/1cb9400fae2e41888d76085f38572ba4?variant=devin
Requested by: @HuiJun
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work