Fix JSON-RPC correctness bugs and implement loadProblem - #6
Merged
Conversation
unp1
force-pushed
the
fix/java-rpc-correctness
branch
from
June 22, 2026 16:53
40df641 to
4e1515e
Compare
This was referenced Jun 22, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes five correctness bugs in the KeY JSON-RPC server (
keyext.api) and the hand-rolled Java client (keyext.api.client), and implementsloadProblem:loadProblempreviously returned a future resolving tonull(NPE-ing callers). Now implemented: aProblemDefinition(sorts/functions/predicates + antecedent/succedent sequent) is rendered to a.keydocument — the sequent encoded as(a1 & … & an) -> (s1 | … | sm)— and loaded through the existing.keypath.clientApiNPE race —nulluntilsetClientApiran, so startup callbacks could NPE. Now initialised to a no-opClientApi, swapped for the real proxy on connect.KeyIdentifications— plainHashMaps under multi-threaded request dispatch could lose updates / throwConcurrentModificationException; nowConcurrentHashMaps.RPCLayerqueue —add()threwIllegalStateException(killing the reader thread) on a full queue; nowput()for back-pressure.RPCLayerpartial reads — a singleread()could truncate a message on a socket; now loops until the full message or EOF.Tests (run against KeY
3.0.0-SNAPSHOT): newRPCLayerTestcases (partial reads, back-pressure),KeyApiImplTest(loadProblemrendering + end-to-end load incl. abstract sorts),KeyIdentificationsTest(concurrent register/query via Mockito). Also wired JUnit into the client module and repaired its stale test sources so the suite compiles. All green.PR has been created with AI tooling