Skip to content

Add boundary-value test for interest theme id count limit #442

Open

Description

@leynos

Summary

The scheduled mutation-testing run on 2026-07-17 (run 29575897246, commit range covering backend/src/inbound/http/users.rs and related test files) tested 78 mutants: 1 missed, 3 caught, 74 unviable. This is wildside's first survivor-harvested mutation run, so the one surviving mutant below is the initial finding to triage.

Survivor

backend/src/inbound/http/users.rs:71:41 — in parse_interest_theme_ids:

if payload.interest_theme_ids.len() > INTEREST_THEME_IDS_MAX {
    return Err(InterestsRequestError::TooManyInterestThemeIds { .. });
}

Mutation: replace > with >=. The full workspace test suite (694 library tests plus integration suites) passed unchanged against the mutant, meaning no test exercises the boundary where interest_theme_ids.len() == INTEREST_THEME_IDS_MAX. With >= substituted, a request supplying exactly the maximum permitted number of interest theme identifiers would be wrongly rejected as TooManyInterestThemeIds, but no test catches this behavioural change.

Proposed next step

Add a boundary-value test (e.g. in backend/src/inbound/http/users.rs's test module or the users_list_pagination_bdd/interests request-validation suite) that submits exactly INTEREST_THEME_IDS_MAX interest theme identifiers and asserts the request is accepted, alongside the existing "one over the limit" rejection test (update_interests_rejects_too_many_ids / interests_request_validation_rejects_too_many_ids) so the > boundary is pinned down in both directions.

Reference

Activity

  1. added
    testingTest coverage, test infrastructure, and verification tooling work.
    on Jul 20, 2026
  2. coderabbitai commented on Jul 20, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    leynos/agent-template-rust#52 - Add scheduled mutation testing to generated repos [open]
    leynos/agent-template-python#24 - Add scheduled mutation testing to generated repos [open]
    leynos/ortho-config#381 - Package-qualify mutation baseline features [merged]
    leynos/diesel-cte-ext#99 - Skip mutation of the non-postgres SEARCH clause gate (#92) [merged]
    leynos/wireframe#612 - Kill mutation-testing survivors and widen scaffolding excludes (#566, #567, #569, #570, #593, #595, #598) [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. added
    lowBacklog work, hygiene, or technical debt planned opportunistically, without a strict deadline.
    on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lowBacklog work, hygiene, or technical debt planned opportunistically, without a strict deadline.testingTest coverage, test infrastructure, and verification tooling work.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions