Skip to content

refactor(conformance): move x-demo-lang symbol semantics behind the puzzle seam - #52

Merged
Teakowa merged 1 commit into
mainfrom
refactor/puzzle-symbol-seam
Oct 6, 2026
Merged

Teakowa merged 1 commit into
mainfrom
refactor/puzzle-symbol-seam

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements #48: methods.rs is 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 typed Puzzle queries in a new puzzle::symbols module.

  • puzzle::symbols hosts Symbol, symbol_at, document_symbols, declaration_range, occurrences (single-sourcing the declaration+references rule previously derived three times), rename_collides, rename_ranges, and is_valid_identifier.
  • Op, OpKind, SolutionEntry, and Puzzle's fields are module-private — re-deriving semantics from AST fields in methods.rs is now a compile error (the issue's deletion test).
  • Moved semantics gain unit coverage in puzzle/tests.rs; DocumentSymbol serializes the exact lpp/symbols entry shape.
  • Zero protocol-visible change: no spec, schema, or fixture changes.

Verification

  • cargo fmt --all --check — clean
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo test --workspace — 20 passed (8 new symbol-query tests)
  • lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 — pass
  • lpp-conformance-runner --provider ./target/release/lpp-mock-provider --fixtures conformance/fixtures/v1 — 61 passed, 0 failed, fixtures unchanged
  • git diff --check — clean

…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
Teakowa merged commit cac0139 into main Oct 6, 2026
2 checks passed
@Teakowa
Teakowa deleted the refactor/puzzle-symbol-seam branch October 6, 2026 17:18
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.

2 participants