Skip to content

test: strengthen inline doc-sync ordering coverage for issue #9#18

Merged
meymchen merged 1 commit into
mainfrom
feat/inline-doc-sync-close-9
Jun 17, 2026
Merged

test: strengthen inline doc-sync ordering coverage for issue #9#18
meymchen merged 1 commit into
mainfrom
feat/inline-doc-sync-close-9

Conversation

@meymchen

Copy link
Copy Markdown
Owner

Closes #9.

The core dispatcher change for issue #9 — applying the built-in state mutation for textDocument/didOpen, didChange, didClose, and didSave inline in the read-loop and keeping user-side reactions on spawned tasks — is already on main (see src/dispatcher.rs and the ADR 0003 2026-06-15 addendum).

This PR strengthens the test coverage around that behavior:

  • tests/documents.rs: updates the Mirror test to simulate the dispatcher's inline open before invoking the handler, so it exercises the inline-mutation semantics rather than opening the document inside the handler.
  • tests/doc_sync_ordering.rs: adds two_did_change_mutations_apply_in_receipt_order, verifying that consecutive incremental edits compose in receipt order and that the resulting document is visible to the next request.

cargo test and cargo clippy --all-targets --all-features pass locally.

- Update tests/documents.rs Mirror test to simulate the dispatcher's
  inline open before invoking the handler, so it exercises ADR 0003
  2026-06-15 addendum semantics rather than opening the document inside
  the handler.
- Add two_did_change_mutations_apply_in_receipt_order to
  tests/doc_sync_ordering.rs, verifying that consecutive incremental
  edits compose in receipt order and are visible to the next request.
@meymchen meymchen force-pushed the feat/inline-doc-sync-close-9 branch from 5298481 to a9f7f62 Compare June 17, 2026 15:46
@meymchen meymchen merged commit d8a7668 into main Jun 17, 2026
3 checks passed
@meymchen meymchen deleted the feat/inline-doc-sync-close-9 branch June 17, 2026 15:49
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.

Apply built-in document-sync mutation inline in the read-loop

1 participant