Skip to content

docs: explain two-phase flow-sequence handling in sync()#53

Open
nathanjmcdougall wants to merge 2 commits into
mainfrom
docs/sync-flow-seq-comment
Open

docs: explain two-phase flow-sequence handling in sync()#53
nathanjmcdougall wants to merge 2 commits into
mainfrom
docs/sync-flow-seq-comment

Conversation

@nathanjmcdougall
Copy link
Copy Markdown
Collaborator

Documents the proactive/reactive split in Document.sync() that was previously unexplained.

Phase 1 (_flow_seq_replacements) pre-converts only the affected flow sequences so that nested list indentation is preserved. A full replace at a higher path would re-serialise the whole mapping with 2-space indentation.

Phase 2 (the except PatchError fallback) catches cases phase 1 misses — primarily list reordering, where new diff indices weren't in the original tree.

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