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:
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `federation_peers` ADD `consecutive_auth_failures` integer DEFAULT 0 NOT NULL;
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,13 @@
|
|||||||
"when": 1776689384005,
|
"when": 1776689384005,
|
||||||
"tag": "0002_peer_approval_requests",
|
"tag": "0002_peer_approval_requests",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 3,
|
||||||
|
"version": "6",
|
||||||
|
"when": 1776789567488,
|
||||||
|
"tag": "0003_classy_loki",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -363,6 +363,7 @@ export const federationPeers = sqliteTable('federation_peers', {
|
|||||||
lastSeenAt: integer('last_seen_at'),
|
lastSeenAt: integer('last_seen_at'),
|
||||||
lastFailureAt: integer('last_failure_at'),
|
lastFailureAt: integer('last_failure_at'),
|
||||||
consecutiveFailures: integer('consecutive_failures').default(0),
|
consecutiveFailures: integer('consecutive_failures').default(0),
|
||||||
|
consecutiveAuthFailures: integer('consecutive_auth_failures').notNull().default(0),
|
||||||
lastSyncedAt: integer('last_synced_at').default(0),
|
lastSyncedAt: integer('last_synced_at').default(0),
|
||||||
remoteMaxUploadSize: integer('remote_max_upload_size'),
|
remoteMaxUploadSize: integer('remote_max_upload_size'),
|
||||||
nonceSupported: integer('nonce_supported').notNull().default(0),
|
nonceSupported: integer('nonce_supported').notNull().default(0),
|
||||||
|
|||||||
Reference in New Issue
Block a user