payslip-ingest/tests
Viktor Barzin 08f28ad581 sync: ActualBudget Meta deposit overlay (Phase C)
Adds daily sync of Meta payroll deposits from ActualBudget into
payslip_ingest.external_meta_deposits, enabling the dashboard to overlay
bank deposits against payslip net_pay and surface parser drift on net.

- Migration 0007: new table external_meta_deposits, unique on
  actualbudget_tx_id, indexed on deposit_date.
- payslip_ingest.sync.actualbudget: narrow client for the
  jhonderson/actual-http-api sidecar (list accounts + transactions).
  Filters on payee regex (META|FACEBOOK, word-boundary). Idempotent
  upsert — ON CONFLICT DO NOTHING on actualbudget_tx_id. Surfaces
  clear error if the transactions endpoint is missing so the operator
  can switch to a SQLite-mount fallback.
- CLI command: `python -m payslip_ingest sync-meta-deposits` driven by
  4 env vars (ACTUALBUDGET_HTTP_API_URL, API_KEY, ENCRYPTION_PASSWORD,
  BUDGET_SYNC_ID).
- Tests: 5 — regex positive/negative, full sync insert, idempotency,
  404-endpoint failure mode.

Part of: code-860
2026-04-19 18:20:50 +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_backfill_cash_tax.py backfill: cash_income_tax back-fill for variant-A NULL rows 2026-04-19 18:15:18 +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 backfill: cash_income_tax back-fill for variant-A NULL rows 2026-04-19 18:15:18 +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_sync_actualbudget.py sync: ActualBudget Meta deposit overlay (Phase C) 2026-04-19 18:20:50 +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