Align TestUtil.findCliPath() lookup order with review feedback#221
Merged
Conversation
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code based on review comment
Align May 21, 2026
TestUtil.findCliPath() lookup order with review feedback
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns TestUtil.findCliPath() (used by test suites that need a Copilot CLI) with prior review feedback by making the runtime lookup order match the documented “Resolution order”, prioritizing explicit configuration via COPILOT_CLI_PATH.
Changes:
- Updated
findCliPath()to checkCOPILOT_CLI_PATHfirst, then PATH lookup, then parent-directory fallback. - Updated the Javadoc “Resolution order” list to match the implemented behavior.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/com/github/copilot/sdk/TestUtil.java | Reorders CLI path resolution to prefer COPILOT_CLI_PATH and updates Javadoc to match. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
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.
Before the change?
findCliPath()prioritized PATH beforeCOPILOT_CLI_PATH, and the method/docs drift noted in review commentr3284484448required correction.After the change?
findCliPath()now checksCOPILOT_CLI_PATHfirst, then PATH lookup, then parent-directory fallback.Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?