feat: rewrite non-canonical model files on pull - #244
Merged
angeloashmore merged 1 commit intoJul 30, 2026
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Resolves:
Description
Stacked on #243.
Files that matched remote semantically but had non-canonical key order were never rewritten by
prismic pull. They stayed non-canonical until a real change arrived, which then buried that change in a full-file reformat diff.The fix: pull no longer canonicalizes the local side of the comparison. The remote model's canonical form is compared against the local file as parsed. Non-canonical files now count as updates and get rewritten, so files self-heal on the next pull.
statusandpushkeep the semantic comparison. Push has no file bytes to compare against, and reorder-tolerance there prevents no-op version bumps.Checklist
Preview
How to QA 1
In a project with committed model files in non-canonical key order (e.g. written by Slice Machine), run
prismic pull. The files should be rewritten in canonical form and reported as updated. A second pull should report "Already up to date."🤖 Generated with Claude Code
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩