Skip to content

simstudy backend fails for n = 0 categorical variables (pre-existing) #50

Description

@DougManuel

Surfaced during #39 Task 2 review verification (2026-07-16), reproduced on unmodified code — pre-existing, unrelated to the formula work.

While executing the simstudy-guarded tests with a temporary simstudy install, a pre-existing failure appeared: a categorical variable generated through the simstudy backend with n = 0 fails (the native backend handles n = 0 categoricals cleanly per the edge-case contract tests from #35). Not caught in CI because simstudy tests skip when the package is absent, and the edge-case contract suite (#35) exercises the native path only.

To reproduce: install simstudy, run tests/testthat/test-simstudy-backend.R (or generate a 0-row categorical spec via generate_mock_data_simstudy()).

Fix direction: align the simstudy path's n = 0 handling with the native backend's zero-row contract; extend test-edge-case-contract.R with skip-guarded simstudy cells so the contract covers both backends when simstudy is present.

Sized XS-S. Relates to #35 (edge-case contract), #33.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Nice to have, lower urgencybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions