Skip to content

docs: position-encoding ADR + inline doc-sync mutation addendum#13

Merged
meymchen merged 1 commit into
mainfrom
docs/document-sync-adrs
Jun 14, 2026
Merged

docs: position-encoding ADR + inline doc-sync mutation addendum#13
meymchen merged 1 commit into
mainfrom
docs/document-sync-adrs

Conversation

@meymchen

Copy link
Copy Markdown
Owner

Lands the design docs for the document-sync slice so the issues that reference them have their spec on the branch.

  • ADR 0016 (new) — position encoding: negotiate UTF-8 when the client offers it, fall back to UTF-16. With UTF-8, Position.character is a native ropey/&str byte offset (zero transcoding on the hot path).
  • ADR 0003 addendum — built-in document-sync mutations (didOpen/didChange/didClose/didSave) run inline in the read-loop in receipt order, not spawned, so incremental edits can't reorder and corrupt the rope. User-side reactions (diagnostics, reparse) still spawn.
  • ADR 0004 notepositionEncoding is the one capability outside the static-const model; it's negotiated from InitializeParams.

Specifies the slice tracked in #12 (Documents store), #10 (encoding negotiation), and #9 (inline dispatch).

🤖 Generated with Claude Code

Add ADR 0016 (negotiate UTF-8, default UTF-16) and record the two
decisions that depend on it:

- ADR 0003 addendum: built-in document-sync mutations run inline in the
  read-loop in receipt order, not spawned, so incremental didChange
  edits can't land out of order and corrupt the rope.
- ADR 0004 note: positionEncoding is the one capability outside the
  static-const model — it's negotiated from InitializeParams.

These specify the document-sync slice tracked in #12 (Documents store),
#10 (encoding negotiation), and #9 (inline dispatch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@meymchen meymchen merged commit 277dece into main Jun 14, 2026
3 checks passed
@meymchen meymchen deleted the docs/document-sync-adrs branch June 14, 2026 17:27
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.

1 participant