Skip to content

fix(organizer): reconcile filename mode symlinks - #133

Merged
moderniselife merged 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-organizer-filename-reconcile
Oct 12, 2026
Merged

moderniselife merged 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-organizer-filename-reconcile

Conversation

@samtruman

Copy link
Copy Markdown
Contributor

Summary

When ORGANIZER_FILENAME_MODE changes between canonical and original release filenames, existing organized symlinks were left behind. In deployments where the same source is visible through different mount aliases, source identity could also be misclassified.

This follow-up makes filename-mode changes converge safely:

  • compares source identity using normalized paths and realpath when available;
  • tracks the desired organized target for each source during an organizer run;
  • removes only obsolete organized symlinks that point to the same provider source;
  • removes empty directories left by those obsolete links;
  • preserves regular files and distinct media versions.

This is generic organizer behavior and does not depend on any deployment-specific paths, compose files, or provider configuration.

Validation

  • Targeted organizer filename tests: pass (6 tests)
  • Typecheck: pass
  • Full pre-commit test suite: pass (149 tests, 0 failures)
  • git diff --check: pass

Related to the filename-mode behavior introduced by #125.

@moderniselife

Copy link
Copy Markdown
Owner

Thanks @samtruman, this looks good to me. Comparing sources by realpath fixes the duplicate-link case for mount aliases, and the reconcile pass is nicely conservative: it only unlinks symlinks (never real files), skips dry runs, and only removes a link when the same source has a different desired target. CI is green; I've queued it for a final merge decision.

@moderniselife
moderniselife merged commit cb60c2f into moderniselife:develop Oct 12, 2026
3 checks passed
@samtruman

samtruman commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I reproduced a separate runtime issue on provider-backed FUSE mounts: realpath() can block organizer startup/reconciliation when the remote is degraded. The focused correction is available in PR #136, which avoids realpath() for paths under the configured provider mount while preserving local-filesystem alias handling. PR #133 remains closed and is superseded by #136.

moderniselife added a commit that referenced this pull request Oct 13, 2026
Merge #136 into develop: avoid blocking FUSE I/O during symlink reconciliation. Retargeted from main (follow-up to #133, which lives in develop); conflict resolved keeping both FUSE non-blocking guards and collision-safe versioning. Thanks @samtruman.
@samtruman
samtruman deleted the fix/upstream-organizer-filename-reconcile branch October 15, 2026 09:16
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.

2 participants