Skip to content

refactor(mock-provider): make comment-only behavior explicit - #102

Merged
e54-bot merged 1 commit into
mainfrom
feat/explicit-behavior-98
Oct 21, 2026
Merged

e54-bot merged 1 commit into
mainfrom
feat/explicit-behavior-98

Conversation

@e54-bot

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

Copy link
Copy Markdown
Contributor

Summary

Comment-only behavior in the conformance mock provider is now stated in code, per the owner decision on #98. All seven items:

  • server.rs: CAPABILITIES gains a Capability { name, min_minor } struct — the u32 is named min_minor.
  • symbols.rs: occurrences becomes occurrences_in_document_order (declaration merged with references, sorted at production); rename_ranges Op arm drops its re-sort. symbol_occurrences keeps the spec §14.2 declaration-first carve-out by construction.
  • artifact.rs: duplicate is_ident deleted; reconstruct_source uses shared is_valid_identifier.
  • parse.rs: diagnostics sorting extracted into named sort_diagnostics_by_range_start.
  • edits.rs: ResolvedEdit { request_index, .. } carries the original request index through sort/apply — one index space; failing_edit_index reports it directly (spec §16.3).
  • text.rs: phantom final line after trailing newline keeps empty-span behavior, pinned by trailing_newline_phantom_line_has_an_empty_span.
  • methods.rs: rename refusal on parse errors (spec §15.2) is the named predicate parse_cleanly.

No comments added; protocol spec and conformance fixtures unchanged.

Verification

  • cargo fmt --all --check, cargo clippy --all-targets -- -D warnings: clean
  • cargo test --workspace: pass
  • lpp-conformance-runner vs mock provider, conformance/fixtures/v1: 68 passed, 0 failed
  • git diff --check: clean

Fixes #98

Express behavior that the comment cleanup left unstated:

- server: CAPABILITIES entries carry a named min_minor field
- symbols: occurrences_in_document_order returns declaration and
  references sorted at production; symbol_occurrences keeps the
  declaration-first contract by construction; rename_ranges no
  longer re-sorts
- artifact: share is_valid_identifier and delete is_ident
- parse: extract the sort_diagnostics_by_range_start step
- edits: each ResolvedEdit carries its request_index, so the
  failing edit index and the document-sorted application share
  one index space
- text: the phantom-line empty span is stated by a test
- methods: the rename parse-error refusal is the named predicate
  parse_cleanly

Fixes #98
@e54-bot
e54-bot merged commit 324ddc9 into main Oct 21, 2026
2 checks passed
@e54-bot
e54-bot deleted the feat/explicit-behavior-98 branch October 21, 2026 20:26
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.

Make mock provider behavior explicit that was documented only by comments

2 participants