Skip to content

Make backend integrations resilient to retries and key rotation - #2

Merged
rafaelaugustos merged 2 commits into
mainfrom
feat/backend-reliability
Nov 8, 2026
Merged

rafaelaugustos merged 2 commits into
mainfrom
feat/backend-reliability

Conversation

@rafaelaugustos

Copy link
Copy Markdown
Contributor

When a backend loses a connection-creation response, retrying can create another grant. Sync results currently require polling, and replacing the installation key immediately disconnects existing consumers.

This adds Idempotency-Key / ConnectWithKey with a 24-hour replay window, durable signed sync webhooks, and API key rotation with a timed overlap. Connection requests and webhook events commit with their associated records in SQLite or PostgreSQL. Webhook delivery uses bounded retries and fenced leases; operators can inspect and retry failed deliveries through the API and Go SDK. The personal configuration observes key changes without restarting.

The PR includes additive migrations, the OpenAPI contract, a durable Go webhook receiver example, updated installation/operations docs and v0.4.0 release metadata. SQLite restore clears the outbox to avoid replaying notifications from an old backup. Existing requests without an idempotency key keep their behavior; webhooks are opt-in.

Validation:

  • make check build VERSION=v0.4.0, including race detection, vet, SQLite and PostgreSQL 17 integration tests.
  • Running service + Go backend smoke test: import/authentication, connection replay across restart, signed webhook retry after restart and overlapping API keys.
  • Tests cover concurrent creation, migrations preserving existing data, transaction rollback, stale leases, consumed/expired consent, signature tampering, redirect rejection, duplicate delivery and key expiration.
  • OpenAPI JSON and internal references checked.

Bank adapters remain experimental. Real-account validation and a third-party Open Finance sharing adapter still require an enabled banking operation; these changes do not claim either capability.

Closes #1

@rafaelaugustos
rafaelaugustos merged commit 2bd1f78 into main Nov 8, 2026
12 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.

Make backend integrations resilient to retries and key changes

1 participant