compare_global_whep.R: multi-column comparison verdict reflects only the last value column
#263 建立於 2026年7月22日
倉庫指標
- 星標
- (1 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
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.