Fix user-triggered Plaid transaction refresh (#3206)

* Fix user-triggered Plaid transaction refresh

Request a fresh Plaid institution update for explicit user syncs, then poll the saved cursor with bounded retries so private self-hosted instances do not depend on webhooks. Preserve the existing immediate sync and coalesce repeated refresh requests.\n\nCloses #3204

* Address Plaid refresh concurrency races

* Preserve Plaid refresh handoff on retry exhaustion

* Release Plaid refresh lease on enqueue errors

Ensure adapter exceptions cannot leave the shared refresh cooldown occupied when no job was queued.
This commit is contained in:
Tim Katz
2026-08-27 21:34:09 +02:00
committed by GitHub
parent 50fa0e53eb
commit 5a798435b3
14 changed files with 389 additions and 4 deletions
@@ -119,7 +119,7 @@ class PlaidItemsControllerTest < ActionDispatch::IntegrationTest
test "sync" do
plaid_item = plaid_items(:one)
PlaidItem.any_instance.expects(:sync_later_with_follow_up).once
PlaidItem.any_instance.expects(:sync_later_with_provider_refresh).once
post sync_plaid_item_url(plaid_item)