Skip to content

Adapter parses mean/sd/rate columns unconditionally for every continuous variable #46

Description

@DougManuel

Follow-up from the PR #45 five-agent review (silent-failure finding 2).

.recodeflow_to_spec_variable()'s continuous branch reads mean, sd, and (since #37) rate via .row_numeric() for every continuous variable, regardless of distribution. .row_numeric() hard-errors on non-blank, non-numeric cells — so a stray value in a column the variable doesn't use (e.g. rate = "fast" on a normal variable, or leftover survival-config values) crashes generation with a message that misattributes the failure to an irrelevant parameter.

This is a pre-existing pattern (mean/sd behaved this way before #37); adding rate widened the blast radius. Related: #33 item 5 (malformed mean reported as "missing" rather than unparseable on the legacy path).

Fix direction: gate the .row_numeric() reads by the resolved distribution (only parse the parameters that distribution consumes), consistent with how blank cells are already treated as not-applicable. Add tests: junk in an unused parameter column is ignored; junk in a used column still errors with an accurate message.

Sized S. No API change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Nice to have, lower urgency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions