broker-sync/tests
Viktor Barzin ceb652b623
Some checks failed
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions
CI / deploy (push) Blocked by required conditions
ci/woodpecker/push/build Pipeline was canceled
ibkr: use IBKR account number as the canonical Account.id
Bug: provider passed the WF UUID as Account.id. ensure_account looks up
existing accounts by (provider, providerAccountId=Account.id), so the
WF-UUID-as-providerAccountId would never match the manually-created
account (which has providerAccountId=U13279690), causing the pipeline
to create a duplicate WF account on every cron run.

Fix: Account.id is now the IBKR account number (U13279690) throughout.
The pipeline's _ensure_accounts() resolves it to the WF UUID via the
canonical (provider, providerAccountId) lookup; activities are remapped
before import. CLI no longer takes the WF UUID — derives it post-import
via a cheap idempotent ensure_account call for the reconciliation step.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 09:18:42 +00:00
..
fixtures test: add IBKR Flex XML fixture (3 trades, 2 cash txns, 2 positions) 2026-05-26 22:23:20 +00:00
providers ibkr: use IBKR account number as the canonical Account.id 2026-05-27 09:18:42 +00:00
sinks wealthfolio: add compute_position_qty for broker reconciliation 2026-05-26 22:26:24 +00:00
__init__.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_cli.py Add broker-sync invest-engine CLI subcommand 2026-04-17 21:59:31 +00:00
test_dedup.py Add SyncRecordStore for authoritative dedup 2026-04-17 19:17:12 +00:00
test_fx.py Add FxCache and convert_to_gbp core 2026-04-17 19:18:41 +00:00
test_fx_ecb.py Add ECB FX fetcher + cache population 2026-04-17 19:32:23 +00:00
test_metrics.py metrics: add Pushgateway client for broker-sync providers 2026-05-26 22:24:55 +00:00
test_models.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_normaliser.py Add Provider protocol and normaliser 2026-04-17 19:20:12 +00:00
test_pipeline.py pipeline: emit matching DEPOSIT/WITHDRAWAL for every BUY/SELL 2026-04-18 19:12:49 +00:00