Codex/changed file range semantics#61
Merged
Merged
Conversation
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.
This pull request introduces a more robust and explicit mechanism for handling changed file resolution and Git ranges in both the local AI review and deterministic scanning phases. The main improvements are the introduction of distinct
reviewRangeandscanRangeproperties in the changed file resolution logic, ensuring that local AI and deterministic scanners (like Gitleaks) operate over the correct and intended Git ranges. The documentation and tests have also been updated to clarify and verify this behavior.Changed file resolution and Git range handling:
reviewRange(for local AI diff context) andscanRange(for deterministic scanners) properties to theChangedFileResolutiontype, and updated all relevant code to use these properties instead of constructing Git ranges ad-hoc. (src/path-policy/types.ts,src/path-policy/index.ts,src/path-policy/git-resolution.ts, [1] [2] [3] [4] [5]scanRangeproperty for its--log-optsargument, ensuring it scans the correct commit range. (src/runner/plugins/gitleaks.ts, src/runner/plugins/gitleaks.tsL115-R115)Documentation updates:
README.mdanddocs/v2-config-schema.mdthat changed file resolution now exposes both a review range and a scan range, and described how these are used by local AI and deterministic scanning tools. [1] [2] [3] [4]Test coverage improvements:
reviewRangeandscanRangeproperties are correctly set and consumed throughout the codebase, including in plugin invocations and changed file resolution. (test/ai.test.ts,test/deterministic-runner.test.ts,test/path-policy.test.ts, [1] [2] [3] [4] [5]