Clean up the FeedbackClassifierService + CustomizedCodeUpdateTool#14794
Draft
Clean up the FeedbackClassifierService + CustomizedCodeUpdateTool#14794
Conversation
Agent-Logs-Url: https://github.com/Azure/azure-sdk-tools/sessions/921b51e2-1d2f-4dc0-870b-48fe7ef925f7 Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
swathipil
March 27, 2026 23:22
View session
Copilot stopped work on behalf of
swathipil due to an error
March 27, 2026 23:22
swathipil
reviewed
Mar 30, 2026
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/FeedbackClassifierService.cs
Outdated
Show resolved
Hide resolved
…e method Agent-Logs-Url: https://github.com/Azure/azure-sdk-tools/sessions/c2aa37de-c00e-4623-818e-020c10d22d4e Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com>
Copilot stopped work on behalf of
swathipil due to an error
March 30, 2026 15:29
samvaity
approved these changes
Apr 2, 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
Implements changes from the unresolved review conversations on PR #13642 plus a new bug fix.
Changes
Item 1 —
FeedbackClassificationTemplate:languageis now requiredprivate readonly string? _language→private readonly string _languagestring? language→string language_language ?? "N/A"→_languagein the prompt (no null-coalescing needed)FeedbackClassifierService.BatchClassifyAsyncpasseslanguage ?? string.Emptyto satisfy the non-null requirementItem 5 — Remove
plainTextFeedbackFileparameterCustomizedCodeUpdateTool.GetFeedbackItemsaccepted aplainTextFeedbackFilepath that read from disk. That parameter and its file-reading code are removed; only the plain text string is supported.Item 6 — Move feedback gathering into
FeedbackClassifierServiceIAPIViewFeedbackServiceinjection toFeedbackClassifierServiceGatherFeedbackItemsAsync(string? apiViewUrl, string? plainTextFeedback, ct)preprocess method (the gathering logic moved from the tool)ClassifyItemsAsyncvia two new optional parametersapiViewUrlandplainTextFeedback— no separate method needed. When the passeditemslist is empty and either source param is set, items are gathered first (mutating the caller's list) before classification proceeds.CustomizedCodeUpdateTool.RunUpdateAsyncnow calls_classifierService.ClassifyItemsAsyncfor the first pass with an empty list and the source params (passinglanguagefrom the resolvedlanguageService), and removes the oldGetFeedbackItemsmethod entirelyClassifyItemsAsynccall also now passeslanguageNew — Detect already-applied TSP customizations
Fixes a bug where requesting a change that was already applied (e.g. running the same customization twice) returned
TSP_APPLICABLEinstead ofSUCCESS.Updated
FeedbackClassificationTemplateprompt in three places:grep_search/read_filetools to check TypeSpec files for the requested decorator before classifying as TSP_APPLICABLETests
FeedbackClassifierServiceTests: addedMock<IAPIViewFeedbackService>field; passed toCreateMockedService()andCreateRealService()constructorsCustomizedCodeUpdateToolTests: unified singleClassifyItemsAsyncmock handles both passes (items.Count == 0for first pass,items.Count > 0for second pass); updated allconfigureClassifieroverrides across tests accordinglySecurity Summary
No security vulnerabilities introduced or discovered. CodeQL skipped (database too large).