Add tests for cross-provider holding isolation and enhance fallback logic

- Introduced `Account::ProviderImportAdapterCrossProviderTest` to validate no cross-provider claiming of holdings.
- Updated `ProviderImportAdapter` to scope fallback matching by `account_provider_id`.
- Added early conflict guard and rescue for unique index violations during imports.
- Simplified rake task usage feedback.
This commit is contained in:
Josh Waldrep
2025-11-22 15:24:12 -05:00
parent 195dd18a52
commit 5de091b14c
3 changed files with 167 additions and 8 deletions

View File

@@ -96,7 +96,6 @@ namespace :sure do
sfa = ap&.provider || SimplefinAccount.find_by(account: acct)
sfas = Array.wrap(sfa).compact
else
success = errors.empty?
puts({ ok: false, error: "usage", message: "Provide one of item_id, account_id, or account_name" }.to_json)
exit 1
end