Skip to content

sync: create missing parent hierarchy for remote beta roots#554

Open
Doow501 wants to merge 1 commit intomutagen-io:masterfrom
Doow501:fix/remote-beta-root-parent
Open

sync: create missing parent hierarchy for remote beta roots#554
Doow501 wants to merge 1 commit intomutagen-io:masterfrom
Doow501:fix/remote-beta-root-parent

Conversation

@Doow501
Copy link

@Doow501 Doow501 commented Mar 13, 2026

What does this pull request do and why is it needed?

This pull request allows writable remote beta endpoints to create the missing
parent directory hierarchy for a synchronization root when the root itself does
not yet exist.

Today, synchronization can proceed if the root is missing but its parent
directory already exists. However, if the parent hierarchy is missing,
transition fails when attempting to walk to the synchronization root parent.

This change keeps the behavior narrow:

  • it only applies to remote beta endpoints
  • it only runs when the synchronization root itself does not exist
  • it only creates the missing parent directory hierarchy
  • it does not eagerly create the root leaf itself
  • existing behavior is preserved when the root already exists
  • clear errors are preserved if parent directory creation fails

This is needed to make first-time remote synchronization setup work more
smoothly when the target directory hierarchy has not yet been created on the
remote side.

Which issue(s) does this pull request address (if any)?

Closes #553

Any other notes for the review process?

This PR also adds tests covering:

  • creation of missing parent directories without eagerly creating the root
  • no-op behavior when the root already exists

@Doow501 Doow501 force-pushed the fix/remote-beta-root-parent branch from 2e35b47 to d37cd31 Compare March 13, 2026 10:53
@Doow501 Doow501 force-pushed the fix/remote-beta-root-parent branch from d37cd31 to 488bd7f Compare March 13, 2026 10:57
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.

sync: improve error message when synchronization root parent directory is missing

1 participant