Add bounded exact text item batch resolution - #246
Draft
MadeByDouglas wants to merge 3 commits into
Draft
MadeByDouglas wants to merge 3 commits into
MadeByDouglas wants to merge 3 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Adds
Yex.StickyIndex.resolve_text_items/2for bounded exact item-ID runs against one XML text. It resolves all positions in one read transaction on a dirty CPU scheduler, returns live/collapsed/unavailable/wrong-type results, and checks the actual containing branch. Deleted original IDs stay collapsed when undo/redo recreates content under new IDs.The binding uses public Yrs APIs only. Input is limited to 4,096 runs and 131,072 UTF-16 units; a separate linked-item traversal budget fails recoverably. Applications still own root reachability, plain-text validation, authorization and provenance.
This is a draft because it depends on the companion Yrs API in y-crdt/y-crdt#656. For reproducible integration, Cargo currently pins a public immutable backport of that change to Yrs 0.25. The fork pin should be replaced with a compatible released dependency before a normal package release. No machine-local paths are required.
The follow-up at
a312e0ccorrects two Elixir typespecs to match existing native behavior:Yex.Doc.Options.collection_idacceptsnil, andYex.Awareness.apply_update/3can return{:error, term()}for malformed updates. It adds regressions for default collection options with UTF-16 editing and awareness decode errors preserving existing state. No Rust or runtime behavior changes are included in this follow-up.Validation:
b6fa2ba: 617 cases passed (63 doctests and 554 tests), using the actual remote Git dependency.a312e0c: 70 focused checks passed (11 doctests and 59 tests) in the document and awareness test files, using the existing source-built native library. The complete suite has not been rerun at this commit.