Skip to content

[stable32] fix: detect that the signer search has more results - #8287

Merged
vitormattos merged 3 commits into
stable32from
backport/8286/stable32
Sep 7, 2026
Merged

[stable32] fix: detect that the signer search has more results#8287
vitormattos merged 3 commits into
stable32from
backport/8286/stable32

Conversation

@backportbot-libresign

Copy link
Copy Markdown

Backport of PR #8286

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>
@github-project-automation github-project-automation Bot moved this to 0. Backlog in Roadmap Sep 7, 2026
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Sep 7, 2026
@vitormattos
vitormattos merged commit ce40d57 into stable32 Sep 7, 2026
66 checks passed
@vitormattos
vitormattos deleted the backport/8286/stable32 branch September 7, 2026 03:38
@github-project-automation github-project-automation Bot moved this from 0. Backlog to 4. to release in Roadmap Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants