fix: K6 leaves rate and coefficient columns alone - #105
Merged
Conversation
К6's exclusion filter (_NOT_MONEY) covered day/percentage/hour columns but not rate or coefficient columns, so a legitimate „Часова ставка" (1000/21/8 = 5.9524) or a чл. 9б НРВПО СИРВ coefficient (25/24 = 1.0417) read as an unrounded accrual on every row. proverki.md's K6 is explicit that it means a sum paid out, not a rate a sum is computed from - reproduced on a two-row fixture with a four-decimal "Часова ставка" column. _NOT_MONEY now excludes \bставк[аи]\b and \bкоеф(\.|ициент(и|а)?)?\b, whole word only, the same way "час" was corrected in 2.14.2 against matching inside "**час**т". K5 gives up the same rate/coefficient columns for a totals row, matching the day/percentage trade already made. test/k_checker_test.py's hand-built fixture now carries a "Часова ставка" column with four legitimate decimals throughout, left out of the totals row the way a real export leaves it - the clean fixture must stay silent on it. A new MONEY_LIKE_CASES table pins _is_money_like() against specific header strings directly, so the next fix to the exclusion regex is checked against every case already handled, not only the one it's fixing. Verified against test/generate_wide.py at 60 seeds: K5 28/28, K6 20/20 unchanged. Confirmed the new test has teeth by reverting to the pre-fix _NOT_MONEY and watching 11 checks fail before restoring it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_NOT_MONEYexcluded day/percentage/hour columns from K5/K6 but not rate or coefficient columns, so a legitimate „Часова ставка" (1000/21/8 = 5.9524) or a чл. 9б НРВПО СИРВ coefficient (25/24 = 1.0417) read as an unrounded accrual on every row.proverki.md's K6 is explicit that it means a sum paid out, not a rate a sum is computed from. Reproduced on a two-row fixture with a four-decimal „Часова ставка" column._NOT_MONEYnow excludes\bставк[аи]\band\bкоеф(\.|ициент(и|а)?)?\b, whole word only — the same style as theчас/частfix in 2.14.2. K5 gives up the same rate/coefficient columns for a totals row, matching the existing day/percentage trade.Added a
MONEY_LIKE_CASEStable pinning_is_money_like()against specific header strings directly, so the next regex fix is checked against every case already handled.Test plan
python test/k_checker_test.py(60 seeds) — K5 28/28, K6 20/20 unchanged, all new cases pass_NOT_MONEY, watched 11 checks fail, restored itpython test/run_tests.py --seeds 25,python test/skill_test.py— green🤖 Generated with Claude Code
https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno