Found reviewing #846.
select_universe (keel/commands/dca_plan.py:227) folds target_weights keys with .upper() in a dict comprehension, and _parse_target_weights does not validate or dedupe keys. A config with both btc and BTC keeps whichever comes last and drops the other with no excluded line.
Reproduced: target_weights={"btc": 0.9, "BTC": 0.1, "ETH": 0.5} -> allocations [(BTC, 0.1), (ETH, 0.5)], excluded names only PAXG; the 0.9 weight vanished.
Fix: refuse (DcaPlanError naming both keys) when two keys fold to the same asset, with a test.
🤖 Generated with Claude Code
Found reviewing #846.
select_universe(keel/commands/dca_plan.py:227) foldstarget_weightskeys with.upper()in a dict comprehension, and_parse_target_weightsdoes not validate or dedupe keys. A config with bothbtcandBTCkeeps whichever comes last and drops the other with no excluded line.Reproduced:
target_weights={"btc": 0.9, "BTC": 0.1, "ETH": 0.5}-> allocations[(BTC, 0.1), (ETH, 0.5)],excludednames only PAXG; the 0.9 weight vanished.Fix: refuse (DcaPlanError naming both keys) when two keys fold to the same asset, with a test.
🤖 Generated with Claude Code