From 9f5cd988b2c86d084af877e4f62bfda11b25c0da Mon Sep 17 00:00:00 2001 From: Jared Knowles Date: Wed, 9 Sep 2026 13:35:18 -0400 Subject: [PATCH] docs(suggestions): restore dropped M/L-counterpart rationale (roborev job 224) The #33 decomposition (0c7c7eb) silently dropped four roxygen lines explaining why .attach_ig_counterparts()'s second flow-family check is needed: condition 1 alone doesn't block ig_federal_b47_wide under cog_revenue(), since its own "B" IS inside revenue's own flow_prefixes. Restored them, plus the backticks around "B" that were also dropped as an unstated formatting change. Co-Authored-By: Claude Sonnet 5 --- R/suggestions.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/suggestions.R b/R/suggestions.R index b0299fa..ca7c40d 100644 --- a/R/suggestions.R +++ b/R/suggestions.R @@ -390,7 +390,7 @@ #' `R/basis.R`). This blocks a recipe surfaced through a mis-scoped #' category from ever reaching the M/L search, e.g. `cog_spending()`'s #' flow_prefixes are `c("E","F","G")`, which `ig_federal_b47_wide`'s own -#' "B" is not part of. +#' `"B"` is not part of. #' 2. `own_prefix %in% c("E","F","G")`: M/L only ever pairs with the #' DIRECT-expenditure family, never with revenue (`cog_revenue()`'s #' flow_prefixes already fold B/C/D in as ordinary revenue -- there is @@ -398,6 +398,10 @@ #' adds one for spending) and never with ANOTHER M/L recipe (without #' this check, `ige_local_m47_wide` would wrongly match sibling #' `ige_state_l47_wide` on their shared {"47","94"} suffix set). +#' Condition 1 alone does not catch this: under `cog_revenue()`, +#' `ig_federal_b47_wide`'s own `"B"` IS inside revenue's own +#' `flow_prefixes`, so only this second, family-specific check blocks +#' the search. #' @noRd .attach_ig_counterparts <- function(con, suggestions, flow_prefixes) { if (length(suggestions) == 0L) return(suggestions)