Repository navigation
refactor(conformance): move x-demo-lang symbol semantics behind the puzzle seam - #52
Merged
Merged
Conversation
…uzzle seam methods.rs re-derived declaration/reference/rename rules from Puzzle's public fields in three private derivations (puzzle_symbols, rename_edits, and inline matches). Those semantics now live as typed queries on Puzzle in a new puzzle::symbols module — symbol_at, document_symbols, declaration_range, occurrences (single-sourcing the declaration+references rule), rename_collides, and rename_ranges — so the wire adapter only shapes params, envelopes, and method-namespaced refusal codes. Op, OpKind, SolutionEntry, and Puzzle's fields are now module-private, making further AST-derivation a compile error. Behavior-preserving: the full fixture suite passes unchanged, and the moved rules gain unit coverage in puzzle/tests.rs. Fixes #48
Teakowa
approved these changes
Oct 6, 2026
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
Implements #48:
methods.rsis now a pure protocol adapter — it shapes wire params and response envelopes and emits the method-namespaced refusal codes, while all x-demo-lang symbol/edit semantics live behind typedPuzzlequeries in a newpuzzle::symbolsmodule.puzzle::symbolshostsSymbol,symbol_at,document_symbols,declaration_range,occurrences(single-sourcing the declaration+references rule previously derived three times),rename_collides,rename_ranges, andis_valid_identifier.Op,OpKind,SolutionEntry, andPuzzle's fields are module-private — re-deriving semantics from AST fields inmethods.rsis now a compile error (the issue's deletion test).puzzle/tests.rs;DocumentSymbolserializes the exactlpp/symbolsentry shape.Verification
cargo fmt --all --check— cleancargo clippy --all-targets -- -D warnings— cleancargo test --workspace— 20 passed (8 new symbol-query tests)lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1— passlpp-conformance-runner --provider ./target/release/lpp-mock-provider --fixtures conformance/fixtures/v1— 61 passed, 0 failed, fixtures unchangedgit diff --check— clean