[stable32] fix: detect that the signer search has more results - #8287
Merged
Conversation
The limit was incremented before the mapper call and the extra row was then looked for beyond that same incremented limit. As IdentifyMethodMapper::searchByIdentifierValue() applies setMaxResults(), it can never return more rows than it was asked for, so the condition was never true: the plugin never reported more results and never removed the extra row it had asked for. A search with more signers than the page could show returned one item too many, and that item appeared again at the top of the next page, because the offset is applied in SQL. The mapper is still asked for one row beyond the page, and that row is now what tells the plugin there is more to show, in the same way AccountPhonePlugin and ContactPhonePlugin do it. The previous pagination test could not catch this: it returned 31 rows from a mapper call made with a limit of 26. The scenarios now stay within what the mapper can answer and cover the boundary, where the number of rows found is exactly the size of the page. Ref #8053 Assisted-by: Claude Code:claude-opus-5 Signed-off-by: André Maia <andrefnkmm@gmail.com>
canValidateMethod() was private and had no caller anywhere in the project. It never ran, so no test and no mutant could reach it. Ref #8053 Assisted-by: Claude Code:claude-opus-5 Signed-off-by: André Maia <andrefnkmm@gmail.com>
Infection showed that nothing asserted the label and the value offered for a signer, so the display name and the identifier could be dropped from the result item without any test noticing. It also showed that the search term itself was never written in a different case than the stored data, so lowercasing it was not covered on either side of the comparison. The scenarios now cover an identifier stored in another case, a search typed in another case, and a match by display name where both are written differently. Ref #8053 Assisted-by: Claude Code:claude-opus-5 Signed-off-by: André Maia <andrefnkmm@gmail.com>
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.
Backport of PR #8286