Skip to content

Fall back when move optimization is invalid#184

Closed
gaoflow wants to merge 1 commit into
stefankoegl:masterfrom
gaoflow:fix-stale-move-detection-179
Closed

Fall back when move optimization is invalid#184
gaoflow wants to merge 1 commit into
stefankoegl:masterfrom
gaoflow:fix-stale-move-detection-179

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • make the existing optimization flag control move-detection bookkeeping
  • validate optimized patches that contain move operations before returning them
  • fall back to a conservative no-move diff when the optimized patch cannot be applied back to the source
  • add the three Move-detection bug #179 reproductions as regression coverage

Tests

  • python -m unittest tests.MakePatchTestCase.test_issue179
  • python tests.py
  • python -m compileall jsonpatch.py tests.py
  • git diff --check

Closes #179

@gaoflow

gaoflow commented Jul 26, 2026

Copy link
Copy Markdown
Author

Closing to keep my open PR count here manageable. Happy to reopen if this is useful.

@gaoflow gaoflow closed this Jul 26, 2026
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.

Move-detection bug

1 participant