payslip-ingest/tests
Viktor Barzin 92e4ecaf78 processor: dedup bonus within tax year — zero out repeats
Meta UK pays one performance bonus per tax year (2 historically, 1
since the comp cycle change). If the same bonus amount appears on a
second payslip in the same tax_year — typically from the extractor
misreading a YTD figure as a current-period row — summing the column
on the dashboard exaggerates total comp by 2x.

`_dedup_bonus` keeps the first occurrence per (tax_year, amount) and
stores subsequent matches with bonus=0. Original figure is preserved
in raw_extraction for auditability; a warning is logged each time.

Fixes the 2021 tax year inflation flagged by the user. Existing
duplicates need a one-shot SQL cleanup (backfill task code-7z0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 15:33:07 +00:00
..
fixtures parser + P60 ingest: split income_tax cash/RSU, add P60 ground-truth 2026-04-19 15:23:05 +00:00
__init__.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
conftest.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
test_extractor.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
test_meta_uk_parser.py parser + P60 ingest: split income_tax cash/RSU, add P60 ground-truth 2026-04-19 15:23:05 +00:00
test_p60_parser.py parser + P60 ingest: split income_tax cash/RSU, add P60 ground-truth 2026-04-19 15:23:05 +00:00
test_paperless.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
test_processor.py processor: dedup bonus within tax year — zero out repeats 2026-04-19 15:33:07 +00:00
test_schema.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
test_tax_year.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00
test_webhook.py Initial commit: event-driven UK payslip ingest service 2026-04-18 22:10:23 +00:00