feat(federation): startup sweep removes dead-incarnation channels and self-homed stubs (dead-incarnation spec §3.4)
This commit is contained in:
@@ -13,7 +13,7 @@ import { generateThumbnail } from './thumbnail.js';
|
||||
import type { FederationRelayRequest, FederationRelayResponse, FederationRelayEvent } from '@backspace/shared';
|
||||
import { startupBootstrapSync, onPeerDeactivated } from './federationPeerActivation.js';
|
||||
import { probePeerReachable, recoverOrDetectReset, detectResetOnNeedsAttentionPeers, detectResetForPeer } from './federationRecovery.js';
|
||||
import { backfillReplicatedProfileAssets } from '../routes/federation.js';
|
||||
import { backfillReplicatedProfileAssets, sweepDeadIncarnationArtifacts } from '../routes/federation.js';
|
||||
import { invokePermanentFailureCallback } from './federationRollback.js';
|
||||
import { refreshPeerEpochs, getInstanceId } from './federationEpoch.js';
|
||||
import fs from 'node:fs';
|
||||
@@ -1305,6 +1305,13 @@ export function startFederationWorkers(): void {
|
||||
console.error('[federation-worker] Startup reset-detection sweep error:', err);
|
||||
});
|
||||
|
||||
// Remove dead-incarnation artifacts left by pre-fix initial syncs (spec §3.4).
|
||||
try {
|
||||
sweepDeadIncarnationArtifacts();
|
||||
} catch (err) {
|
||||
console.error('[federation-worker] Dead-incarnation sweep error:', err);
|
||||
}
|
||||
|
||||
// Backfill any replicated user avatars/banners still stored as absolute URLs
|
||||
// (legacy data from before file replication, or rows whose home was offline
|
||||
// on a previous attempt). Best-effort and idempotent — safe to re-run.
|
||||
|
||||
Reference in New Issue
Block a user