Skip to content

fix(core): report parents that local writes restore - #287

Open
marcus-pousette wants to merge 2 commits into
mainfrom
fix/local-restore-events
Open

marcus-pousette wants to merge 2 commits into
mainfrom
fix/local-restore-events

Conversation

@marcus-pousette

@marcus-pousette marcus-pousette commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

A local write under a deleted parent, such as a payload on its child or an insert under it, restores the parent when the delete didn't know about that write. The tree state was already right, but onMaterialized reported only the written node, while peers applying the same op also reported the parent's restore.

commit_local refreshed the tombstones and dropped what changed, so finalize_local_with_outcome found nothing left to report. Local plans now carry those changes, except a local delete's own node, which the plan already reports.

changedSince (#281) missed the restored parent for the same reason. The new conformance scenario checks that too, on the engines that have changedSince.

A local write under a deleted parent, such as a payload on its child,
restores the parent when the delete didn't know about the write.
commit_local refreshed the tombstones but dropped what changed, so
finalize found nothing to report: onMaterialized listed only the written
node and changedSince missed the parent, while peers applying the same
op also reported the restored parent. Local plans now carry those
changes, except a local delete's own node, which the plan already
reports.
The tree already showed the restored parent before the fix. The event
and changedSince checks are what fail without it.

This branch has not been deployed

No deployments
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