Make @useFinalStateVia validation decorator-order independent for PUT operations#4394
Open
Make @useFinalStateVia validation decorator-order independent for PUT operations#4394
@useFinalStateVia validation decorator-order independent for PUT operations#4394Conversation
4 tasks
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/04a20e6a-4942-4513-a23b-c7da149424ee Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix @useFinalStateVia decorator to recognize put operations consistently
Make May 7, 2026
@useFinalStateVia validation decorator-order independent for PUT operations
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/14286848-b019-40c2-a281-89302c5b0347 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
| @route("/polling") | ||
| @get op bar(): {status: "Succeeded" | "Failed" | "Cancelled"}; | ||
| `); | ||
| assert.strictEqual( |
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/d6094bc1-183d-4852-9009-4382ff621a74 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/d6094bc1-183d-4852-9009-4382ff621a74 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/d6094bc1-183d-4852-9009-4382ff621a74 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/d6094bc1-183d-4852-9009-4382ff621a74 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/618a3a05-8004-439d-af10-6fde0d07caad Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Member
|
@copilot run formatter |
commit: |
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/ad275149-796e-4de5-9507-fb351ef41273 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Contributor
Author
Collaborator
|
All changed packages have been documented.
Show changes
|
Collaborator
|
You can try these changes here
|
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.
@useFinalStateVia("original-uri")could incorrectly reportinvalid-final-statewhen@putwas applied before/after it in a different order. The validator was effectively sensitive to decorator execution order instead of final operation shape.Post-decorator validation for
@useFinalStateVia@useFinalStateViavalidation into a decorator post-validation callback (onTargetFinish).Regression coverage for the reported ordering bug
@put @useFinalStateVia("original-uri")on an LRO operationinvalid-final-statediagnostic and confirms the override is stored asoriginal-uri.Behavioral impact