Skip to content

feat(reconcile): restore album shares after from-nextcloud-memories upload#1380

Open
simonclausen wants to merge 9 commits into
simulot:developfrom
simonclausen:reconcile-nextcloud-memories-clean
Open

feat(reconcile): restore album shares after from-nextcloud-memories upload#1380
simonclausen wants to merge 9 commits into
simulot:developfrom
simonclausen:reconcile-nextcloud-memories-clean

Conversation

@simonclausen

Copy link
Copy Markdown

This PR adds the new top-level immich-go reconcile workflow and its first source-specific implementation, reconcile nextcloud-memories, to complete the shared-album migration model for incremental multi-user Nextcloud Memories imports.

It is intended to work together with upload from-nextcloud-memories from #1370. The upload step preserves per-user ownership and writes migration state into Immich; the reconcile step later consumes that state to rebuild shared destination album membership for each participating user.

Closes #1365.

What changed

New reconcile workflow

  • add top-level immich-go reconcile
  • add immich-go reconcile nextcloud-memories
  • add --cleanup-migration-tags to optionally remove consumed synthetic membership tags after successful reconciliation

Nextcloud Memories shared-album reconstruction

  • read managed Nextcloud Memories album state embedded in destination album descriptions
  • resolve synthetic membership tags of the form immich-go/src/nextcloud-memories/album/<source-album-id>
  • list tagged assets for the authenticated user
  • skip assets not owned by the authenticated user
  • skip assets from external libraries
  • add missing user-owned assets to the matching destination albums
  • report malformed managed state, unresolved migration tags, permission failures, and albums with no matching user-owned assets

Workflow model

  • keep upload and reconciliation as separate steps
  • preserve ownership by having each user import into their own Immich account
  • use Immich itself as the coordination surface for migration state
  • support incremental convergence as different users migrate at different times

Documentation

  • document the reconcile command and its intent
  • add examples for the Nextcloud Memories reconciliation workflow
  • update the command reference and main README
  • remove temporary local planning docs now that the feature is ready for PR

Why

This addresses the shared album migration model in #1365 for the Nextcloud Memories migration flow introduced by #1366 / #1370.

The goal is to preserve the important user-facing relationships of a multi-user migration without centralizing ownership or relying on fragile local coordination files:

  • albums stay under the correct owning Immich user
  • assets stay in the correct user timeline
  • shared destination albums can be reconstructed incrementally
  • users can migrate independently and reconcile later

User impact

Users migrating from Nextcloud Memories can now:

  1. import each user's own library with upload from-nextcloud-memories
  2. preserve migration markers in Immich during import
  3. run reconcile nextcloud-memories per user to add that user's imported assets into the corresponding shared destination albums

This is a post-import convergence step, not a continuous sync feature.

Current limitations

  • reconciliation only considers assets owned by the authenticated Immich user
  • external library assets are skipped
  • cleanup only removes the specific synthetic album-membership tags used by reconciliation
  • this does not attempt to preserve every source-specific sharing behavior from Nextcloud

Testing

Covered by focused tests for:

  • command wiring and flag handling
  • managed album state parsing
  • matching tagged assets to destination albums
  • skipping foreign-owned and external-library assets
  • unresolved/malformed state handling
  • cleanup of consumed migration tags
  • propagation of list and cleanup errors

@simonclausen simonclausen requested a review from simulot as a code owner June 28, 2026 21:00
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