Repository navigation
feat(qvts): write a query's answer as a QVTS::QueryResult view on every query surface - #2116
Open
devin-ai-integration[bot] wants to merge 16 commits into
Open
devin-ai-integration[bot] wants to merge 16 commits into
devin-ai-integration[bot] wants to merge 16 commits into
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 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Failed query exposes another element — The frontier now keeps the element the step stopped at, and a name-only record is exposed only when its spelling picks one element; regression test covers 'a::b' beside a::b. Commit is local and goes out with the next push.
- File naming comment exceeds two lines — The fileName Javadoc is now one line. Commit is local and goes out with the next push.
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 branch has not been deployed
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 header, the exposed elements as the rows — and, withRenderViewRequest.form, as Markdown, HTML or AsciiDoc; MCPrender_model_viewtakesform.renderView; 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.
Merge of
developdevelopis merged in twice, each time to resolve a conflict. The first: its objective and body-constraint export change re-recorded the API JSON and structure differentials that this branch's eleven example models also move. The second:internal/frontend/mcp/catalog/catalog.goand thesysml-mcpman page conflicted with the MCP scopes change, and the API JSON baseline this branch re-records became per-file fragments underdocs/project/api-json-differential/.After the second merge the API JSON fragments, the pilot differential baseline and the derived-property census are re-recorded over the merged tree. Only the
examplesroot moves (56 to 67 files, by the elevenexamples/qvtsfiles' own elements; 946 files, 106047 elements matched in the API JSON differential) together with the OpenSysML Libraries provenance (16 to 17 files). In the census every count of theexamplesroot grows or stays, and the summary and the silent list are unchanged;scripts/rebaseline-movement.pyreports those census records as not explained by the merge because this branch had not recorded the census before.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 16 to 17.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) and the structure differential (117 rows, none added or removed; theexamplesroot goes from 56 to 67 models).make testas one race run. It timed out ininternal/exec/runtime,internal/translate/exportandtests/export; all three pass without the race detector.Checklist
make testandmake lintpass locally —make lintpasses;make testas 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