feat(schema): add consecutive_auth_failures column on federation_peers

Tracks HMAC-failure count separately from consecutive_failures (network
errors). Auth failures and network failures have different resolution
paths; mixing them would let a single successful retry after a network
blip mask real secret desync.

Part of backlog #19 — outbox auth-failure recovery.

Note: drizzle-kit generated the 0003 SQL with an unexpected CREATE TABLE
for peer_approval_requests because the 0002 migration was authored
manually without a corresponding 0002_snapshot.json (see 14041e9). The
generated SQL has been trimmed to the single intended ALTER TABLE. The
regenerated 0003_snapshot.json correctly reflects the full current
schema, so future migrations will diff cleanly.
This commit is contained in:
Jannis Braun
2026-04-21 18:40:39 +02:00
parent 85668d4da8
commit 0d3343ab6d
4 changed files with 3234 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -22,6 +22,13 @@
"when": 1776689384005,
"tag": "0002_peer_approval_requests",
"breakpoints": true
},
{
"idx": 3,
"version": "6",
"when": 1776789567488,
"tag": "0003_classy_loki",
"breakpoints": true
}
]
}