Skip to content

Detect silent Plaid upstream staleness during transaction sync - #6

Merged
Winxton merged 2 commits into
mainfrom
Winxton/check-tangerine-sync
Apr 30, 2026
Merged

Detect silent Plaid upstream staleness during transaction sync#6
Winxton merged 2 commits into
mainfrom
Winxton/check-tangerine-sync

Conversation

@Winxton

@Winxton Winxton commented Apr 29, 2026

Copy link
Copy Markdown
Member

Summary

  • After /transactions/sync succeeds in PlaidTransactionSyncWorkflow, call /item/get and inspect status.transactions.last_{successful,failed}_update. If the upstream Plaid↔institution pull has been failing for >24h while item.error is still null, mark the sync job error with code STALE_DATA and trigger the existing disconnect-notification path so the user knows to reconnect via Plaid Link update mode.
  • Closes the silent-failure gap that left a Tangerine connection looking healthy (sync jobs success, records=0) for days while Plaid's background fetch was actually broken.
  • Skipped on initial sync (cursor null) where last_successful_update may not be set yet; STALE_DATA is intentionally NOT in the poll skip-list so we keep retrying and auto-recover when Plaid does.

Test plan

  • pnpm vitest run — all 93 tests pass (added 3 for getItemStatus)
  • Post-deploy: re-query connection 1 — within 30 min expect a new sync job with errorCode=STALE_DATA and a fresh disconnect notification (deduped 24h)
  • After user reconnects via Plaid Link, next sync flips back to status=success

After /transactions/sync succeeds, call /item/get and inspect
status.transactions.last_{successful,failed}_update. If the upstream
Plaid<->institution pull has been failing for >24h while item.error
is still null, mark the sync job error with code STALE_DATA and
trigger the existing disconnect-notification path so the user
knows to reconnect via Plaid Link update mode. Catches the case
where /transactions/sync returns 0 records indefinitely without
ever surfacing a hard error.
@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openfinance-client Ready Ready Preview, Comment Apr 29, 2026 11:05pm

The notifications page and AccountRow Reconnect button surface the
sync job's errorMessage / notification metadata.errorMessage
verbatim, with no per-errorCode branching. Split FreshnessResult
into a userMessage (passed to markError + notifyDisconnect) and
a technicalMessage (logged via DBOS.logger.info) so the diagnostic
detail stays in logs while the UI shows actionable copy.
@Winxton
Winxton merged commit 948c974 into main Apr 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant