Skip to content

Move folders: log phantom-move collisions as INFO + DEBUG, not WARNING#696

Merged
ajslater merged 1 commit intov1.11-performancefrom
claude/folder-move-collision-log
May 2, 2026
Merged

Move folders: log phantom-move collisions as INFO + DEBUG, not WARNING#696
ajslater merged 1 commit intov1.11-performancefrom
claude/folder-move-collision-log

Conversation

@ajslater
Copy link
Copy Markdown
Owner

@ajslater ajslater commented May 2, 2026

Summary

The poller emits dirs_moved for inode-matched delete/add pairs. When the destination path of a "move" is already a known Folder row, _remove_move_collisions correctly drops the move (it would explode the (library, path) unique constraint, and isn't needed — the destination is already correctly tracked) and lets the source-side absence fall out via the next delete pass.

This is normal reconciliation, not a fault. The previous WARNING made it look like something had gone wrong:

2026-05-02 03:54:40 | WARNING | Not moving folders to destinations that would collide with existing database folders: ['/comics/Dynamite Entertainment/James Bond Agent of SPECTRE (2021)', …]

…and prompted operators to investigate something that needed no investigating.

Change

  • One-line INFO: Resolved 3 phantom folder moves by skipping the rename and leaving the destinations in place.
  • DEBUG with the actual path list, for anyone who does want to see which folders were involved.

Same data, healthier signal-to-noise.

Test plan

  • make test-python T=tests/importer/ — green.
  • ruff check, basedpyright — clean.

🤖 Generated with Claude Code

The poller emits ``dirs_moved`` for inode-matched delete/add
pairs. When the destination path of a "move" is already a known
``Folder`` row, ``_remove_move_collisions`` correctly drops the
move (it would explode the unique constraint and isn't needed —
the destination is already correctly tracked) and lets the
source-side absence fall out via the next delete pass.

This is normal reconciliation, not a fault. The previous WARNING
made it look like something had gone wrong:

```
2026-05-02 03:54:40 | WARNING | Not moving folders to destinations
that would collide with existing database folders: ['…', '…', '…']
```

…and prompted operators to investigate something that needed no
investigating. Replace with:

* one-line INFO: ``Resolved 3 phantom folder moves by skipping the
  rename and leaving the destinations in place.``
* DEBUG with the actual path list, for anyone who does want to
  see which folders were involved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ajslater ajslater merged commit f172532 into v1.11-performance May 2, 2026
1 check failed
@ajslater ajslater deleted the claude/folder-move-collision-log branch May 2, 2026 22:38
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