Skip to content

fix: K5 skips percentage columns, and the skill now knows k_checker.py exists - #103

Merged
svedbg merged 1 commit into
mainfrom
fix/k-checker-percent-and-skill-wiring
Sep 6, 2026
Merged

fix: K5 skips percentage columns, and the skill now knows k_checker.py exists#103
svedbg merged 1 commit into
mainfrom
fix/k-checker-percent-and-skill-wiring

Conversation

@svedbg

@svedbg svedbg commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Two follow-ups from the same-day review of 2.14.1.

K5 false positive on averaged percentage totals. Walking every header for K5 (2.14.1's fix for the known-concept-only miss) opened a new gap: a real layout sometimes writes the average of a percentage column (e.g. „Клас %“) into the totals row instead of its sum, which a generic sum check can't distinguish from a hand-typed total. Reproduced on a minimal two-row fixture. K5 now excludes the same day/percentage/hour columns K6 already excluded — trading K5 coverage on day-column totals (which would still sum validly) for removing the confirmed false positive.

Fixing that surfaced a second, adjacent bug: the exclusion regex used a bare час substring match, which also fired inside "част" ("лична част" — one of generate_wide.py's own three K5 target columns), silently dropping K5 coverage for it. Now word-bounded.

The skill didn't know the tool exists. Nothing in SKILL.md or proverki.md told the model tools/k_checker.py exists, so an audit still computed K5/K6 in prose — exactly where the original evaluation measured the model weakest. Both now point to it, in the same shape as the existing tools/preflight.py pointers: when its report is available, take the findings from there instead of recomputing them.

Test plan

  • python test/k_checker_test.py --seeds 300 — K5 129/129, K6 130/130, zero false positives, including the new percent-average shape
  • Proved the regression test has teeth: reverted the K5 filter, watched it fail, restored it
  • python test/skill_test.py — still green, SKILL.md/proverki.md additions don't trip any length or reference checks
  • python test/run_tests.py, preflight_test.py, komplekt_test.py, lifecycle_test.py — all green

🤖 Generated with Claude Code

https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno

…y exists

Two follow-ups from the same-day review of 2.14.1.

K5 walking every header (2.14.1's fix for the known-concept-only miss) opened a
new false positive: a real layout sometimes writes the *average* of a
percentage column (e.g. „Клас %“) into the totals row instead of its sum, which
a generic sum check cannot tell from a hand-typed total. Reproduced on a
two-row fixture. K5 now excludes the same day/percentage/hour columns K6
already excluded, at the cost of giving up K5 on a day-column total (which
would still sum validly) to remove the confirmed false positive.

Fixing that exposed a second bug in the exclusion regex itself: a bare "час"
substring match also fired inside "**час**т" ("лична част" - one of
generate_wide.py's own three K5 target columns), which silently dropped K5
coverage for it. Word-bounded now.

Separately: nothing in SKILL.md or proverki.md told the model tools/k_checker.py
exists, so an audit still computed K5/K6 in prose - exactly where the original
evaluation measured the model weakest. Both now point to it, in the same shape
as the existing tools/preflight.py pointers: when its report is available, take
the findings from there instead of recomputing them.

Verified against test/generate_wide.py at 300 seeds: K5 129/129, K6 130/130,
zero false positives, including the new percent-average shape. Confirmed the
regression test has teeth by reverting the K5 filter and watching it fail
before restoring it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno
@svedbg
svedbg merged commit ef2e5a4 into main Sep 6, 2026
12 checks passed
@svedbg
svedbg deleted the fix/k-checker-percent-and-skill-wiring branch September 6, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant