Repository navigation
Show a subclass's call on the state set it inherits from a superclass's spec - #174
CatarinaGamboa wants to merge 3 commits into
Conversation
…'s spec When a state error was on a method declared in a subclass's spec (Frame's setUndecorated) and the state set in a superclass's spec (Window), the State Machine view showed no diagram for the error, or Window's diagram without the call and without any marked state. The diagrams of a state error are now parsed for the receiver's class with liquidjava-fsm 0.2.3, which merges the specs of its supertypes as the verifier does. Besides the declaration's file, the parser reads the files of the state sets the verifier knows, where those specs may be. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex review, round 1Run over both diffs (this PR and liquid-java/liquidjava-fsm#16). Codex's findings, verbatim: I found two issues in the server’s file selection. I could not run tests, as requested.
|
A supertype's spec without a state set, such as Frame's between JFrame and Window, was not read, so its methods were missing from the diagram. The server now also passes the files of the verifier's state refinements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 1 replies
Server |
Codex review, round 2Run over both diffs (this PR and liquid-java/liquidjava-fsm#16). Codex's findings, verbatim: I found two correctness gaps and one language server performance risk. I did not run commands or tests, as requested.
The new test at |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 2 replies
Server |
Codex review, round 3Run over both diffs (this PR and liquid-java/liquidjava-fsm#16). Codex's findings, verbatim: I found three correctness gaps in the supplied changes. I reviewed the provided code only; I did not run commands.
|
Round 3 replies
No code change in this round. |
Codex review, round 4Run over both diffs (this PR and liquid-java/liquidjava-fsm#16). Codex's findings, verbatim: I found two correctness gaps and one test gap across the PRs. I could not run tests, as requested.
|
Round 4 replies
Codex's remaining findings repeat ones already declined, so the review loop stops here. No code change in this round. |
Closes #173.
Needs liquidjava-fsm 0.2.3, from liquidjava-fsm#16. CI fails until that version is on Maven Central. The tests below were run against a local build of #16.
Why
A state error can be on a method declared in a subclass's spec (
Frame.setUndecorated) while the state set is declared in a superclass's spec (Window). In that case the State Machine view could not explain the error:Window's diagram withoutsetUndecoratedand marked no states (the issue's screenshot).java.awt.Frame. The parser then foundFrame's spec, which has no@StateSet, so the error had no diagram at all.What
StateRefinementErrorDTO. It parses the diagrams for the context'sreceiverClass. It reads the declaration's file plus the files of the state sets and state refinements the verifier registered (ContextHistory), so specs split across files are found, including a supertype spec with methods but no state set. Without a context it behaves as before (first class of the declaration's file).server/pom.xml. liquidjava-fsm 0.2.2 → 0.2.3.No verifier change is needed. liquidjava#464 already sends the context with the receiver's states for this case. The view needs a verifier release with #464 (after 0.0.36). With 0.0.36 nothing changes for this case: that verifier sends no context, so the view still shows the first class of the declaration's file (
Windowin the issue's file).Screenshots
Both columns use verifier main @ 9e4b5e64.
host.pack(); host.setUndecorated(true);)GameWindow)In A1_09 the actual state shows as "unknown" because the verifier finds both
displayableandnotDisplayablepossible (it depends on the path).notDisplayableis marked as the expected state, andsetUndecoratedis the failing call.I did not take a split-files screenshot. With
FrameRefinements.javaread beforeWindowRefinements.java, the verifier stops with liquid-java/liquidjava#461 before it reaches the state error.StateRefinementErrorDTOTestcovers that layout.Tests
mvn test: 39 passed, 0 failures (liquidjava-fsm 0.2.3 built locally from Update README #16, verifier 0.0.36). NewStateRefinementErrorDTOTest:java.awt.Frame, withsetUndecorated,disposeandpackonWindow's states;displayableis marked invalid andnotDisplayableaccepted.JFramespec over a method-onlyFramespec andWindow's state set: all their methods are drawn.npm run test:unit: 123 passed.npm run test:typecheck: clean.npm test(VS Code): 9 + 1 passing.Overlap with #172
None. #172 changes only the client webview. This PR changes only the server and its fsm dependency.
🤖 Generated with Claude Code