Skip to content

fix: refresh credentials before replaying evidence uploads - #437

Merged
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
tolulopedd26:fix/evidence-upload-credential-refresh
Aug 20, 2026
Merged

fix: refresh credentials before replaying evidence uploads#437
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
tolulopedd26:fix/evidence-upload-credential-refresh

Conversation

@tolulopedd26

Copy link
Copy Markdown
Contributor

Summary

The offline sync queue captured evidence upload URLs and headers verbatim, so a signed URL that expired while the device was offline would strand the upload after maxRetries.

This change adds a per-action credential-refresh hook invoked when a retry fails with a credential-expiry error (401/403). The refreshed URL and headers are persisted back into the queued action so the next retry cycle uses fresh credentials.

Closes #435

Testing

  • Verified credential-expiry errors (401/403 with expiry hint) trigger the refresh callback
  • Verified permanent 4xx errors still fail without infinite refresh
  • Verified saver-mode throttling still bounds refreshes

Checklist

  • Tests added or updated for new/changed behavior
  • Existing tests pass
  • No secrets, keys, or seed phrases committed
  • Follows the coding conventions in the relevant service README
  • PR is focused on a single concern

The offline sync queue captured evidence upload URLs and headers
verbatim, so a signed URL that expired while the device was offline
would strand the upload after maxRetries.

This change adds a per-action credential-refresh hook invoked when a
retry fails with a credential-expiry error (401/403). The refreshed
URL and headers are persisted back into the queued action so the next
retry cycle uses fresh credentials.

Closes ChainForgee#435

@kilodesodiq-arch kilodesodiq-arch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilodesodiq-arch
kilodesodiq-arch merged commit 272dfe4 into ChainForgee:main Aug 20, 2026
4 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.

offline sync replays captured evidence upload URLs and headers: expiring signed URLs strand evidence uploads forever

2 participants