fix(backup): don't let a stale export pause a reconnected backup

- An export now pauses a revoked integration only if its row is
  unchanged since the export read it, using the trigger-maintained
  updatedAt column as the row version. If the user reconnected in the
  meantime, the stale failure no longer disables the fresh credentials
  or asks the user to reconnect again. updateExportStatus now reports
  whether a row was written.
- The backup status store ignores a response overtaken by a newer
  refresh, or by the status being flagged, cleared or set directly, so
  a slow response can't overwrite newer state.
- Unit tests cover the whole integration repository, the guarded pause
  and stale status responses. Coverage thresholds are raised to the
  new baseline.
This commit is contained in:
Josh Creek
2026-09-14 19:03:29 +01:00
parent fb95b43b30
commit 7786d46078
8 changed files with 398 additions and 26 deletions
+4 -4
View File
@@ -22,10 +22,10 @@ export default defineConfig({
exclude: ['src/lib/models/**', 'src/lib/stores/**', 'src/lib/actions/**'],
// Set to the measured baseline. Ratchet these up as coverage grows; never down.
thresholds: {
statements: 53.84,
functions: 82.89,
lines: 53.84,
branches: 86.93
statements: 59.73,
functions: 85.88,
lines: 59.73,
branches: 88.35
}
}
}