Fix custom-code repair without local TypeSpec path#16459
Merged
JoshLove-msft merged 2 commits intoJul 23, 2026
Conversation
Make spec-repo guidance and tools optional for CustomCode-only repair while preserving the TypeSpec path requirement for scopes that edit spec inputs. Fixes Azure#16456. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 018c878c-dc5e-43fa-bccb-31ed333ed489
|
Azure Pipelines: Successfully started running 1 pipeline(s). 64 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a crash in azsdk tsp client customized-update when running CustomCode-only repairs without a local TypeSpec checkout, by making spec-repo inspection optional while preserving fail-fast validation when spec inputs are in scope.
Changes:
- Allow
FeedbackClassifierServiceto run classification with a null/emptytspProjectPathwheneditScope=CustomCode, avoiding spec-repo path resolution. - Make spec-repo tools + reference-doc prompt sections conditional on whether spec inspection is available.
- Add regression tests covering the production failure and the new “no spec inspection” prompt behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/azsdk-cli/CHANGELOG.md | Documents the custom-code-only repair fix. |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/FeedbackClassifierService.cs | Avoids dereferencing/using spec repo paths when tspProjectPath is omitted and spec inputs aren’t in scope; gates spec tools accordingly. |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli/Prompts/Templates/FeedbackClassificationTemplate.cs | Adds a specInspectionAvailable switch to remove spec-tool and spec-inspection instructions when unavailable. |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Services/FeedbackClassifierServiceTests.cs | Adds regression coverage ensuring CustomCode-only classification doesn’t touch spec repo when tspProjectPath is null, and still fails fast for SpecInputs/All. |
| tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Prompts/Templates/FeedbackClassificationTemplateTests.cs | Adds coverage to ensure spec tools aren’t advertised when spec inspection is unavailable. |
Avoid referring to omitted TypeSpec reference documentation when custom-code-only repair runs without spec inspection tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 018c878c-dc5e-43fa-bccb-31ed333ed489
samvaity
reviewed
Jul 23, 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
Fixes #16456.
--generated by Copilot