Repository navigation
The ratchet treats an occurrence moved between changed modules as moved, not written - #2565
Merged
Merged
Conversation
…ed, not written Scopes are class and function names, so a class moved from one changed module to another keeps its occurrences' identities. They were still counted as introduced because each module was compared only with its own base: unit-ownerexit's P429 (NoneAbsence +4 from moving ReplayAssessments out of attempts.py) and unit-mi-1b's P428 both went red on moves. Occurrences that leave changed modules now pay for the same occurrences arriving elsewhere in the same change; a new occurrence still fails with its line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeUaZjvChAcb6qAd6zPYmw
trissim
enabled auto-merge
October 21, 2026 21:59
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
unit-ownerexit (P429, #2510) and unit-mi-1b (P428, #2543) both went red on
NoneAbsencefor code they only moved between modules. The ratchet compared each module only with its own base, so a class moved to another file counted as new writes, even though the identity (class and function scope plus source text) is unchanged.Now
CleanChangedLines.introducedreads every changed module present at the base for what left it. A moved occurrence spends that departure, and a new occurrence still fails with its line. Two cases are covered: a class moved into an existing module is not written, and a moved class arriving beside a genuinely new occurrence fails only on the new line. It applies to every strict per-line measure (NoneAbsence, FrozenFieldWrite, BannedVocabulary and the rest).CI runs the guard suite, since the module imports agent_comms and the refactor-audit submodule, which this session lacks.
Generated by Claude Code