Menu ▾ ▴

#119 Orchestrator scope/period filter follow-ups (#115): coverage, LIKE-escape, validation, tests

closed
nobody
None
2026-06-30
2026-06-29
Anonymous
No

Originally created by: grynn-in

Follow-ups from the review of [#115] (merged). Non-blocking; the opt-in design is sound and injection-safe for period_filter.

  • Scoped closes don't cover cash-flow / YTD. gold_cash_flow_indirect and gold_ytd_trial_balance ref('gold_trial_balance') directly, so they build FULL during a scoped close. Either apply period_filter/scope_filter there too, or correct the PR/code comment that claims they inherit the slice (gold_consolidated_trial_balance.sql:38-40).
  • scope_filter LIKE wildcards unescaped. %/_ in a scope code (e.g. the _ in GROUP_CORP) are LIKE metacharacters → potential over-match. Add an ESCAPE clause / escape %_. (Quote-escaping was added in the review fix.)
  • period_filter silently coerces non-numeric vars to = 0 (via | int) → empty result instead of an error. Validate numeric or document the integer requirement.
  • Add macro tests — assert no-var no-op (full build unchanged) and that a GROUP code expands to its descendant entities.
  • Seed-fallback path is only 2-segment — a top-level group scope may miss grandchildren when the hierarchy comes from the seed (data-dependent).

Related

Tickets: #115
Tickets: #121
Tickets: #123

Discussion

  • Anonymous

    Anonymous - 2026-06-30

    Originally posted by: grynn-in

    Resolved by [#121] (merged): cash-flow period+scope filters; YTD scope + period_filter(include_period=false); ClickHouse backslash LIKE-escaping; period_filter integer validation; macro tests; seed-path depth documented.

     

    Related

    Tickets: #121

  • Anonymous

    Anonymous - 2026-06-30

    Ticket changed by: grynn-in

    • status: open --> closed
     

Log in to post a comment.