Skip to content

fix: dedupe filter drop reports by rendered message (#1099) - #1100

Merged
TomKaltofen merged 2 commits into
mloda-ai:mainfrom
breezeFur:codex/dedupe-filter-drop-messages
Aug 11, 2026
Merged

fix: dedupe filter drop reports by rendered message (#1099)#1100
TomKaltofen merged 2 commits into
mloda-ai:mainfrom
breezeFur:codex/dedupe-filter-drop-messages

Conversation

@breezeFur

Copy link
Copy Markdown
Contributor

Summary

Closes #1099. Defect-drop and falsy-match warnings now deduplicate on the fully rendered log line, so different reasons or returned types remain visible at WARNING while byte-identical repeats are DEBUG. The per-declaration dropped_filters ledger remains unchanged, and reset clears both message ledgers.

Validation

  • python -m pytest tests/test_core/test_filter/test_global_filter.py -q -> 36 passed.

uff check on the changed module and tests -> passed.

uff format --check reports existing formatting differences in these files; no formatter rewrite was applied.

Generated by Codex.

breezeFur and others added 2 commits August 11, 2026 13:56
Both drop reports key their WARNING dedupe on the rendered line rather
than on the column, so a reason the reader can tell apart warns on its
own and only a byte-identical repeat falls to DEBUG. `_warn_on_diverging_options`
already dedupes this way in the same class.

The line is the key, so the per-column `_ReportKey` and `_report_key`
lose their last callers. The ledger keeps writing per declaration,
guarded only against overwriting another defect: what gets logged and
what gets recorded stay separate concerns.

Closes mloda-ai#1099.
Drives the new behaviour through the real matcher, next to the rest of
the elimination-reason coverage: a defect whose reason reads differently
warns instead of being muted, and so does a falsy return of another type.

Two guards keep the report dedupe out of the ledger, which is where
gating the write on the report loses facts in both directions. A second
reason under one column must not overwrite the pinned first defect, and
a second declaration failing the same way renders one identical line yet
must still get its own ledger entry, or it silently loses its nearest
miss.

Restates the contract in the filter docs, which promised a report per
FeatureGroup and declared filter.
@TKaltofen
TKaltofen force-pushed the codex/dedupe-filter-drop-messages branch from d0de9df to 7c7cc1b Compare August 11, 2026 14:00
@TomKaltofen
TomKaltofen marked this pull request as ready for review August 11, 2026 14:05
@TomKaltofen
TomKaltofen self-requested a review as a code owner August 11, 2026 14:05
@TomKaltofen
TomKaltofen merged commit edd7861 into mloda-ai:main Aug 11, 2026
18 checks passed
@TomKaltofen

Copy link
Copy Markdown
Collaborator

@breezeFur Thank you for your contributions! This really helps!

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.

Dedupe the filter drop reports on the rendered message, as the divergence warning already does

3 participants