Detect silent Plaid upstream staleness during transaction sync - #6
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/transactions/syncsucceeds inPlaidTransactionSyncWorkflow, call/item/getand inspectstatus.transactions.last_{successful,failed}_update. If the upstream Plaid↔institution pull has been failing for >24h whileitem.erroris stillnull, mark the sync joberrorwith codeSTALE_DATAand trigger the existing disconnect-notification path so the user knows to reconnect via Plaid Link update mode.success,records=0) for days while Plaid's background fetch was actually broken.last_successful_updatemay not be set yet;STALE_DATAis 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 forgetItemStatus)errorCode=STALE_DATAand a fresh disconnect notification (deduped 24h)status=success