eduaguilera/whep

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

Offen

#248 geöffnet am 22.07.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)R (3 Forks)auto 404
area:lmdi-decompclean codegood first issuehelp wantedmechanicalno-data-neededpriority:low

Repository-Metriken

Stars
 (1 Stern)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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.

Contributor Guide