eduaguilera/whep

compare_global_whep.R: multi-column comparison verdict reflects only the last value column

Open

#263 opened on Jul 22, 2026

 (1 comment) (0 reactions) (0 assignees)R (3 forks)auto 404
area:cbsbuggood first issuehelp wantedmechanicalno-data-neededpriority:lowtesting

Repository metrics

Stars
 (1 star)
PR merge metrics
 (PR metrics pending)

Description

What

In compare_global_whep.R:288-296, n_differ is reassigned inside for (vc in val_cols_present) and then used after the loop for the IDENTICAL vs DIFFERENCES FOUND verdict. For the Processing Coefficients comparison (6 value columns), the verdict is decided only by the last column (final_value_processed).

Why it matters

If an earlier column diverges but the last matches within tolerance (and keys fully overlap), the script prints "IDENTICAL (within tolerance)". Per-column diffs are still printed above, so it's a summary-level false-confidence issue. (Primary and CBS have a single value column, so they're unaffected.)

Suggested fix / check

Accumulate n_differ across all value columns (e.g. any/sum) before deciding the verdict.


From deep static audit (2026-07-23), round 7, inst/scripts validation/diagnostic scripts. Deduplicated against open+closed issues. Not verified by running unless stated. Related to the false-confidence-tests concern in #177.

Contributor guide