Skip to content

Fix "failed to map parentId" errors and other correctness fixes#2008

Merged
marcelklehr merged 13 commits into
developfrom
fix/correctness-fixes
Aug 2, 2025
Merged

Fix "failed to map parentId" errors and other correctness fixes#2008
marcelklehr merged 13 commits into
developfrom
fix/correctness-fixes

Conversation

@marcelklehr
Copy link
Copy Markdown
Member

@marcelklehr marcelklehr commented Jul 30, 2025

Signed-off-by: Marcel Klehr mklehr@gmx.net

  • Fix benchmark without caching
  • Fix linkwarden tests
  • Fix fake benchmark for seed 12dd05d

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr requested a review from Copilot July 30, 2025 11:43
@marcelklehr marcelklehr changed the title fix: Fix "failed to map parentId" errors Fix "failed to map parentId" errors and other correctness fixes Jul 30, 2025

This comment was marked as outdated.

marcelklehr and others added 5 commits July 30, 2025 13:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr requested a review from Copilot July 30, 2025 15:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes "failed to map parentId" errors and other correctness issues in the synchronization logic. The changes primarily address mapping-related bugs in the sync process and improve the handling of reorderings during synchronization.

  • Corrects tree comparison logic in tests to use consistent tree references
  • Fixes mapping cleanup timing to prevent orphaned mappings that cause "failed to map parentId" errors
  • Improves reordering reconciliation logic with better mapping handling and parameter naming

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/test.js Updates test assertions to use correct tree references and replaces hardcoded values with constants
src/lib/strategies/Unidirectional.ts Adds proper mapping cleanup for removed items in unidirectional sync
src/lib/strategies/Merge.ts Fixes method signature and parameter naming for reordering reconciliation
src/lib/strategies/Default.ts Major refactoring of mapping cleanup timing and reordering reconciliation logic
src/lib/browser/BrowserTree.ts Adds safety check to skip missing items during folder reordering
src/lib/Mappings.ts Adds new utility method and improves string comparison in mapping checks
src/lib/Diff.ts Optimizes parent containment checking with caching and improves chain finding logic

Comment thread src/test/test.js
Comment thread src/test/test.js
Comment thread src/test/test.js
Comment thread src/lib/strategies/Default.ts Outdated
Comment thread src/lib/strategies/Default.ts
marcelklehr and others added 2 commits July 30, 2025 17:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
make sure to convert to string before comparing

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/correctness-fixes branch from e1700c3 to db02934 Compare August 1, 2025 17:35
improves processing times for large diffs by up to 29%

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr merged commit abee5bc into develop Aug 2, 2025
27 of 37 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.

2 participants