eduaguilera/whep

calculate_lmdi: period_targets computed but never surfaced (output_format = "total" dead path)

开放

#248 创建于 2026年7月22日

 (1 条评论) (0 个反应) (0 位负责人)R (3 个派生)auto 404
area:lmdi-decompclean codegood first issuehelp wantedmechanicalno-data-neededpriority:low

仓库指标

星标
 (1 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What

.lmdi_build_result (R/calculate_lmdi.R:1082-1099) builds period_target_df, .lmdi_process_all_groups (:1116-1183) collects it into all_results$period_targets, and it is returned — but .lmdi_format_output (:1206-1236) reads only all_results$results and never touches period_targets in either the "clean" or "total" branch.

Why it matters

Pure dead code; the "total" format presumably intended to surface this period-level summary (t0/t_t/target_initial/target_final/total_change).

Suggested fix / check

Either expose period_targets in the "total" output or remove the unused plumbing.


From deep static audit (2026-07-23), round 4, parallel subsystem review. Deduplicated against open+closed issues. Findings confirmed by running the functions unless stated.

贡献者指南