Skip to content

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

Merged
nathanjmcdougall merged 2 commits into
mainfrom
docs/sync-flow-seq-comment
Jun 2, 2026
Merged

docs: explain two-phase flow-sequence handling in sync()#53
nathanjmcdougall merged 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.

@nathanjmcdougall nathanjmcdougall merged commit 6a430a7 into main Jun 2, 2026
18 checks passed
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