compare_global_whep.R: multi-column comparison verdict reflects only the last value column
#263 aberto em 22 de jul. de 2026
Métricas do repositório
- Stars
- (1 estrela)
- Métricas de merge de PR
- (Métricas PR pendentes)
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.