Originally created by: grynn-in
Follow-up to [#196] (konsolidat#195), from the full build after [#201] merged.
assert_cta_not_zero_when_rates_differ failed on 12 entity-periods, all 2025 P11. Those entities' P11 balance files repeat P10's balances exactly (e.g. 56,559,572.06 declared in both), so after normalisation every P11 movement is 0. Nothing was translated, so a CTA of 0 is right — but the test counted the P&L rows as "translated at the average rate" because their translation_rate differs from the closing rate, whatever their amount.
having countIf(translation_rate != closing_rate and local_amount != 0) > 0: only rows that carried an amount count. Header updated.
assert_cta_not_zero_when_rates_differ.zero_movement.sql (a period of zero movements, P&L row at the average rate, CTA 0) → Got 1 result on main (3cb50c1) → PASS with the fix (8b73dda). The existing pass fixture still passes; the must-flag fixture still gives Got 2 results.🤖 Generated with Claude Code
Originally posted by: grynn-in
Review: one finding, taken — the guard is now
group_amount != 0(CTA is −sum(group_amount); 0% ownership zeroes group_amount while local_amount stays). Red fixture for the 0% case, then the fix; all three fixtures green (pass / zero-movement pass / must-flag Got 2); live rows flagged: 0.Ticket changed by: grynn-in