Repository navigation
Conversation
The column writer marks the position as changed on every assignment, which forms do on every save. When the solidified position is the one the record already has (in the same scope), we still locked the scope, moved the record out of the way, ran both halves of a contract that touched nothing, and wrote the position back. That bumped `updated_at` and reported `saved_change_to_position?` even though nothing moved. Return early in that case and drop the change, so a save with no other changes doesn't touch the row at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.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.
The column writer marks the position as changed on every assignment, and forms resubmit
positionon every save. When the solidified position is the one the record already has (in the same scope), we still locked the scope, moved the record to 0, ran a contract that touched nothing and wrote the position back. Onmainthat's 4UPDATEs for a save that changes nothing, plusupdated_atis bumped andsaved_change_to_position?is true.Fix
After solidifying, if the scope is unchanged and the position equals the one in the database, drop the change and return. A save with no other changes now doesn't touch the row at all. Scope changes are unaffected, so the 0.1.2 behaviour (the same position number in a new scope is still an explicit position) is kept.
One behaviour change to flag: assigning the current position no longer bumps
updated_ator reportssaved_change_to_position?. I think that's correct, since nothing moved, but it's worth knowing in case anything relies on it.Tests
Assigning
2,{after: first}and{before: third}to the second item issues noUPDATEs, in all threeTestPositioningvariants (including both composite key ones).Changelog: Don't write anything when an assigned position doesn't change.
🤖 Generated with Claude Code