broker-sync/tests/providers
Viktor Barzin 0d23487608
Some checks failed
ci/woodpecker/push/build Pipeline was successful
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / deploy (push) Has been cancelled
imap: skip InvestEngine by default; opt back in via INCLUDE env
Post-mortem 2026-05-27: 39 IMAP-source IE BUYs + their cash-flow
DEPOSITs were re-inserted into Wealthfolio at 09:22:18 UTC, exactly
the rows the £252k dedup removed the previous day. The cron's
BROKER_SYNC_IMAP_EXCLUDE_PROVIDERS=invest-engine env var did its job
(cron logged ie_skipped=53), but some other entry point — kubectl run,
poetry run on the devvm, or a sibling agent session — ran the IMAP
ingest WITHOUT that env. The opt-out was a foot-gun.

This change makes the IE-via-IMAP safety STRUCTURAL: `invest-engine`
is in the default exclude set inside _resolve_excluded_providers().
Any code path now skips IE unless the caller explicitly sets
`BROKER_SYNC_IMAP_INCLUDE_PROVIDERS=invest-engine`. The
`BROKER_SYNC_IMAP_EXCLUDE_PROVIDERS` env still works (additive) for
forward-compat in case Schwab etc. ever need similar treatment.

INCLUDE wins over both the default exclude set and EXCLUDE env.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 17:24:54 +00:00
..
parsers parsers/schwab: emit paired BUY for recent SELL (vest synthesis) 2026-05-27 10:02:07 +00:00
__init__.py Add Trading212 ticker normalisation 2026-04-17 19:29:23 +00:00
test_checkpoint.py Add per-account cursor Checkpoint helper 2026-04-17 19:30:20 +00:00
test_fidelity_planviewer.py tests: type the FidelityHolding factory list to satisfy CI mypy 2026-05-22 14:54:06 +00:00
test_finance_mysql.py Add finance_mysql provider + CLI for historical backfill 2026-04-17 22:38:21 +00:00
test_ibkr.py ibkr: emit ibkr_cash_balance{currency, account} per CashReport row 2026-05-27 12:03:41 +00:00
test_imap.py imap: skip InvestEngine by default; opt back in via INCLUDE env 2026-05-27 17:24:54 +00:00
test_invest_engine.py Add InvestEngineProvider — Bearer-token HTTP client 2026-04-17 21:52:26 +00:00
test_trading212.py Wire T212 pagination, retries, and click<8.2 pin 2026-04-17 19:45:23 +00:00
test_trading212_ticker.py Add Trading212 ticker normalisation 2026-04-17 19:29:23 +00:00