Skip to content

fix(bench): count matches correctly and keep diagnostics value-safe - #94

Merged
ma2za merged 5 commits into
ma2za:mainfrom
mazzasaverio:fix/local-benchmark-accounting
Oct 11, 2026
Merged

ma2za merged 5 commits into
ma2za:mainfrom
mazzasaverio:fix/local-benchmark-accounting

Conversation

@mazzasaverio

@mazzasaverio mazzasaverio commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The local benchmark updated matched truth outside the matching loop, producing incorrect one-to-one accounting and UnboundLocalError for empty/disjoint inputs. Correct the loop and verify exact TP/FP/FN, precision, recall and F1. Explanation logs now emit row/type/offsets without source values; optional ML imports are lazy and importing the module no longer configures the root logger.

Validation: six new cases failed before the fix; 13 focused tests passed afterwards. Full CI passed 531 tests per matrix job with 95.15% to 95.22% coverage, plus quality, docs, performance, property, packaging and installed-wheel checks: https://github.com/ma2za/pseudonymize/actions/runs/36973067973 . This repairs the local harness and does not revise the separate published quality baseline.

Current review status

Review priority: 3 of 9; PR #100 is the packaging prerequisite. Updated against main 17e8fcc while preserving development version 1.37.0 and the hosted-service changes. Includes the shared service-extra audit correction from #100. No PR has been merged.

Current branch validation: 24 focused tests passed; Ruff formatting/lint, mypy, wheel/sdist builds and release verification passed. Fresh CI on the current head completed with 18 successful checks, one skipped check, and no failures.

@mazzasaverio
mazzasaverio marked this pull request as ready for review October 2, 2026 06:33
@mazzasaverio
mazzasaverio requested a review from ma2za as a code owner October 2, 2026 06:33
@ma2za
ma2za merged commit d5efa91 into ma2za:main Oct 11, 2026
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.

2 participants