Skip to content

feat: detect and report orphaned artifacts after swap-out#7

Merged
sysid merged 1 commit intomainfrom
feature/consistency
Dec 29, 2025
Merged

feat: detect and report orphaned artifacts after swap-out#7
sysid merged 1 commit intomainfrom
feature/consistency

Conversation

@sysid
Copy link
Copy Markdown
Owner

@sysid sysid commented Dec 29, 2025

Summary

  • Add find_orphaned_artifacts() method to detect leftover sentinel and backup files after swap-out
  • Report warnings at end of full swap-out when orphaned artifacts are found
  • User decides cleanup - no automatic deletion

Problem

When structural changes occur while files are swapped in (config entries edited/removed, files moved/deleted), sentinel files (*.rplc_active) and backup files (*.rplc.original) can become orphaned because swap_out() only processes paths from the current config.

Solution

After a full swap-out (no pattern/file filters), scan the mirror directory for any remaining artifacts. Any sentinel or backup file found after swap-out is orphaned by definition - they should have been cleaned up during the swap-out process.

Add find_orphaned_artifacts() method to scan mirror directory for
leftover sentinel (*.rplc_active) and backup (*.rplc.original) files
after a full swap-out. These indicate incomplete cleanup from
structural changes made while swapped in.

Reports warnings but does not auto-delete - user decides cleanup.
Only runs on full swap-out (no pattern/file filters).
@sysid sysid merged commit ca92bb4 into main Dec 29, 2025
2 checks passed
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