Repository navigation
Move raw-protocol server tests to the end-to-end tier - #682
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
=========================================
Coverage 99.73% 99.73%
Complexity 1900 1900
=========================================
Files 135 135
Lines 4873 4873
=========================================
Hits 4860 4860
Misses 13 13 ☔ View full report in Codecov by Harness. |
Firehed
added this pull request to stack #688
October 4, 2026 01:49
Firehed
marked this pull request as ready for review
October 6, 2026 04:24
Firehed
force-pushed
the
e2e-raw-protocol
branch
2 times, most recently
from
October 6, 2026 04:45
72ff404 to
b34c247
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firehed
force-pushed
the
e2e-raw-protocol
branch
from
October 6, 2026 04:48
b34c247 to
ee0397c
Compare
Firehed
added a commit
that referenced
this pull request
Oct 6, 2026
## Summary Stacked on #682. Moves variable go-to-definition coverage (#301) onto the end-to-end tier. - `Marker\VariableMarker` addresses the `//jtd:name var` style: the last `$var` on the marked line. A cursor marker cannot sit inside a variable name without breaking the parse. - `scripts/variable-definition.php` holds one case per case of `VariableDefinitionTest`: assignments, parameters, foreach keys and values, catch variables, the nearest of two assignments, shadowing, closure `use` clauses, arrow-function fall-through, an uncaptured name in a long closure, `$this`, global scope, and top-level closures. Each expects the line the original asserted, or `NoAnswer()` where it asserted none. - `LandsOn` takes an optional `column:`. Columns are 1-based, like lines. The four cases the original checked by column still are, and so are three it did not: where another variable shares the binding's line (a foreach key, a closure `use` clause, a top-level closure), a line alone would also accept the wrong variable. - The top-level closure `use` case expects its line; the original accepted any location. - `VariableResolutionTest` is a new unit test for the resolution paths only `VariableDefinitionTest` reached: arrow-function capture from the enclosing function, a top-level arrow function with no enclosing function, and a top-level closure's `use` binding with no type. It builds `SymbolResolver` directly, with a real parser and stubbed knowledge interfaces. - `VariableDefinitionTest` is removed. Coverage: unchanged, file by file. Without the new unit test, removing the original would have uncovered statements in `ExpressionResolver` and `Scope`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <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.
Summary
Stacked on #681.
Covers the raw-protocol cases of
ServerTeston the end-to-end tier, and adds the first variation in client capabilities.Client capabilities
Session\ClientCapabilitiesis what the client declares ininitialize, one named field per variation a script needs.Scriptcarries it, defaulting to nothing declared.LspClientanswers the server'sclient/registerCapabilityrequest withnull, as an editor that accepts it would, and fails the test on any other server request.transcripts/cover watched-file registration, since the exchange itself is the point: one declares dynamic registration support and locks the server's registration and the client's answer; one declares nothing and locks that none is sent.Raw-protocol tests
LifecycleTestgains: exit without shutdown exits 1, closed input exits 1, a request beforeinitializegets -32002, a request aftershutdowngetsInvalidRequestand exit still returns 0.MessageErrorTestcovers: an unknown method getsMethodNotFound; a frame that is not JSON getsParseErrorat a null id; a frame that is JSON but not a valid request getsInvalidRequestat its own id. Each checks the session ends cleanly afterward.Client\ErrorCodeholds the specification's codes for these assertions, since nothing in the tier may depend onsrc/.Originals
ServerTestare removed: they usedServer::forProjectand the container, and the scripts cover them.ServerTestcases buildServerdirectly and test the read loop, so they stay.Coverage: unchanged.
🤖 Generated with Claude Code