Skip to content

feat(clients/java): wrap execution, verification, analysis, convert and edit RPCs - #457

Open
devin-ai-integration[bot] wants to merge 5 commits into
developfrom
feature/java-client-v2
Open

devin-ai-integration[bot] wants to merge 5 commits into
developfrom
feature/java-client-v2

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

What and why

org.openmbee:opensysml-client wrapped only parsing, evaluation, symbols and instantiation; every other RPC the service offers had to be reached through the generated stubs. This PR completes the public Java API so that a JVM host embedding OpenSysML never needs a protobuf type:

  • Model: executeAction/executeState and exploreAction/exploreState, verifyConstraint/verifyRequirement/verifySatisfaction/validateInstance, evaluateCalc, runAnalysis/exploreAnalysis, runSweep, applyEdits, query/queryOslc, runDocumentQuery, renderDocument, convert, withEngine, roots.
  • Connection: parseSources (a model of several documents), convert/convertFile, listEngines.
  • Answers are immutable records (ActionRun, StateRun, Exploration/Outcome, Verification, Satisfaction, Validation, Verdict, Calculation, Analysis, CaseEvaluation, Standing, QueryElement, EngineInfo, Conversion, EditResult/AppliedEdit/EditedDocument, Sweep/SweepRow, DocumentQueryResult/DocumentRow, RenderedDocument); closed alternatives are sealed interfaces (Edit, DocumentValue, Condition); optional request fields are options records with defaults()/withX (ExecutionOptions, AnalysisOptions, SweepOptions, EditOptions, ConversionOptions). Every response field is mirrored.
  • Error split unchanged: a refused call is ServiceException; an answer whose error field is set is ModelException (with failureReason()), AnalysisException when a failed analysis still computed something, EditException carrying the EditFailure kind and the referrers a refused edit named. A false verdict is a decided answer, not an exception. RunDocumentQuery/RenderDocument fail only by status, as the service does.
  • Each call requires the capability the service advertises (Capabilities gains PARSE_SOURCES, DOCUMENT_QUERY, RENDER_DOCUMENT and the runtime/analysis names); Model.root() keeps its meaning as the first root.

No service change was needed; the Go code is untouched. This supersedes #388, whose commit is included here.

How it was verified

  • make build; mvn -f client/java/pom.xml verify: BUILD SUCCESS — 236 client tests (mapping of every new Protos conversion both ways, options defaults/withX, error split, and integration tests against a private bin/sysml-grpc over the conformance/fixtures), 36 conformance tests.
  • The Java conformance runner now covers every RPC through the public API: 129 passed / 0 failed / 5 skipped per protocol (connect, connect-json); the five skips are the requests the public API cannot express (a ParseFile with no source, two Query shapes, two malformed EvaluateCalc arguments), listed in client/java/README.md. Multi-document scenario models parse through parseSources instead of being skipped.
  • python3 scripts/check-doc-links.py, python3 scripts/check-doc-ids.py, python3 scripts/changelog.py check clean.

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

devin-ai-integration Bot and others added 4 commits September 19, 2026 22:55
…is and query in the public API

Model gains executeAction/executeState with exploreAction/exploreState, verifyConstraint/verifyRequirement/verifySatisfaction/validateInstance, evaluateCalc, runAnalysis/exploreAnalysis, query/queryOslc and withEngine; Connection gains listEngines. Each answers an immutable record with no generated protobuf type in the public API. A false verdict is a decided answer, not an exception; ModelException carries a FailureReason and AnalysisException.partial() keeps what a failed analysis computed.

The Java conformance runner covers the new RPCs through the public API, rendering results back to protobuf, so 94 of 134 scenarios run per protocol. Unit tests cover the result types and both conversion directions; ApiIntegrationTest runs each operation against the real service binary.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
… RunDocumentQuery and RenderDocument

Add SourceDocument and Connection.parseSources for multi-document models,
whose Model now carries a root per document alongside the single root() of
a one-document model; Conversion and the Connection/Model convert calls;
the sealed Edit operations with EditOptions, EditResult, EditFailure and
EditException for refused batches; SweepRange, SweepOptions, SweepRow and
Sweep for swept case and calc runs; the sealed DocumentValue kinds,
DocumentRow and DocumentQueryResult for document queries; and
RenderedDocument for Markdown renders. Advertise the parse_sources,
document_query and render_document capabilities.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
… and the document RPCs in the conformance runner

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

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

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 19, 2026 23:45
devin-ai-integration[bot]

This comment was marked as resolved.

… and keep an EditException's referrers across serialization

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.

1 participant