fix: factorization dropping operations when paths share a string prefix - #46
Merged
Conversation
wI2L
force-pushed
the
fix_factorize_error
branch
from
April 1, 2026 15:02
b68d9c8 to
15c7d1c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 94.89% 94.93% +0.04%
==========================================
Files 12 12
Lines 979 987 +8
==========================================
+ Hits 929 937 +8
Misses 30 30
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
wI2L
force-pushed
the
fix_factorize_error
branch
from
April 1, 2026 15:15
15c7d1c to
32b52b1
Compare
wI2L
force-pushed
the
fix_factorize_error
branch
from
April 1, 2026 15:17
32b52b1 to
31743f2
Compare
wI2L
self-requested a review
April 1, 2026 15:18
wI2L
approved these changes
Apr 1, 2026
Owner
|
@fnoopv Thank you for your contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #45
This fixes issue #45, where enabling Factorize() could produce an incomplete patch.
Root cause:
the move validation logic used a plain string prefix check to determine whether the source path was a proper prefix of the destination path. This was too broad for JSON Pointers and incorrectly treated sibling paths such as /key/b and /key/bb as a parent/child relationship.
As a result, a valid factorization candidate could be rejected and the add operation was dropped, leaving an incomplete patch.
Changes:
With this change: