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
Goal
"value, weight"is documented as the only valid parameterization fordists == "bootstrap"but is missing from theparameterization_typeschoicesvector, somatch.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 onNAand crashes downstream comparisons.Scope
"value, weight"to theparameterization_typesdefault atR/gen_psa_samp.R:134bootstrapis not the last entry indistsNAcrash path atR/gen_psa_samp.R:142NEWS.md— samples that silently used a shifted parameterization will now differVersion: #172