eduaguilera/whep

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

Aperta

#263 aperta il 22 lug 2026

 (1 commento) (0 reazioni) (0 assegnatari)R (3 fork)auto 404
area:cbsbuggood first issuehelp wantedmechanicalno-data-neededpriority:lowtesting

Metriche repository

Star
 (1 stella)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor