Log deleted-record percentages per import input - #2189
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances metric logging during import validation by extracting and reporting specific metrics (such as deleted records percentage, deleted records count, and previous observation count) when the DELETED_RECORDS_PERCENT validator is used. It also adds a comprehensive unit test to verify this behavior. The review feedback highlights two important issues: first, a potential runtime error if validation rules are malformed, which can be resolved by adding explicit type checks when parsing rules; second, a logical bug where input_validation_status is not reset to False inside the except ValueError block, potentially leading to incorrect success status logging when a validation runner fails.
Include per-input rule details with safe serialization and bounded payload size.
What changed
Tests
git diff --check