test(persistence): pin the sort-field contract behind #1514 - #1518
Open
manan164 wants to merge 1 commit into
Open
test(persistence): pin the sort-field contract behind #1514#1518manan164 wants to merge 1 commit into
manan164 wants to merge 1 commit into
Conversation
#1515 fixes the Agent Name sort by removing a UI-side rename of `workflowType` to `workflowName`. Nothing on the backend rejected the wrong name, which is why the bug was invisible: an unrecognised sort field is dropped silently rather than erroring, so getSort() returned "" and the query ran with no ORDER BY. Pin that contract in both query builders, so a future caller sending an unindexed field is caught by a test rather than by unordered pages: workflowType:ASC -> ORDER BY workflow_type ASC workflowName:ASC -> no ORDER BY No production code changes; these pass on main as-is and stay valid after #1515 merges. Relates to #1514
6 tasks
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.
Complements #1515, which fixes the Agent Name sort by removing a UI-side rename of
workflowTypetoworkflowName. Tests only — no production code.The reason that bug was invisible is that nothing on the backend rejects a wrong sort field:
getSort()skips anything outsideVALID_FIELDSand returns"", so the query runs with noORDER BYat all. These two tests per builder pin that behaviour —workflowType:ASCproducesORDER BY workflow_type ASC,workflowName:ASCproduces noORDER BY— so the next caller that sends an unindexed field is caught by a test rather than by unordered pages.Passes on
mainas-is and stays valid after #1515 merges.