addtional fixes - #1112
Merged
rsenden merged 4 commits intoSep 29, 2026
Merged
addtional fixes#1112
Conversation
kireetivar
approved these changes
Sep 29, 2026
ankit2995
approved these changes
Sep 29, 2026
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.
Summary
Fix coordinate-space mismatch in HunkClassifier pre-classification and
correct incomplete overlap detection logic in range comparisons.
Changes
1. Fix: HunkClassifier declared-vs-actual coordinate mismatch
Problem: HunkClassifier.classifyRange was comparing a candidate hunk's
DECLARED line numbers against AppliedChange entries storing ACTUAL (post-shift)
coordinates. When a broader remediation shifted hunks via offset projection,
narrower nested hunks would fail to be pre-classified as POSSIBLY_REMEDIATED
and instead fell through to real application, where they failed with
ANCHOR_DOES_NOT_MATCH.
Example:
(shifted to 32-50), missed the nesting, returned APPLIED
correctly returns POSSIBLY_REMEDIATED
Solution: Thread declared coordinates through ledger pipeline:
PendingAppliedChange: adddeclaredLineFrom/declaredLineTofieldsAppliedChange: add declared fields and newcoversDeclaredRange()/overlapsDeclaredRangePartially()methodsHunkClassifier.classifyRange: use declared-range methods for pre-classificationprojectOffset()and actual-coordinate shifting untouched2. Fix: Incomplete overlap detection in overlapsPartially
Problem:
overlapsPartially()docstring says "without either side fullycontaining the other," but implementation only checked one direction. A candidate
range fully containing the applied range would incorrectly return true.
Solution: Check both directions: