Skip to content

Add value, weight to gen_psa_samp parameterization choices #175

Description

@jurjoroa

Goal

"value, weight" is documented as the only valid parameterization for dists == "bootstrap" but is missing from the parameterization_types choices vector, so match.arg(several.ok = TRUE) silently drops it and shifts every later element down one position. A subsequent distribution is then reinterpreted under the wrong parameterization with no warning, or the shift lands on NA and crashes downstream comparisons.

Scope

  • Add "value, weight" to the parameterization_types default at R/gen_psa_samp.R:134
  • Add a regression test asserting index alignment when bootstrap is not the last entry in dists
  • Add a test covering the NA crash path at R/gen_psa_samp.R:142
  • Record the behavior change in NEWS.md — samples that silently used a shifted parameterization will now differ
  • Re-verify the audit repro on-branch before applying the proposed diff — this fix was reasoned from root cause, not re-run to green

Version: #172

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions