Private
Public Access
poll_due_feeds scanned for due feeds and dispatched fetch_feed without marking them claimed, so overlapping beat ticks or a slow-running fetch could dispatch the same feed twice, racing on ETag/status/error- count writes. Feed.claimed_at is now set via an UPDATE ... WHERE claimed_at IS NULL OR claimed_at < stale-cutoff, so only one caller's UPDATE can ever match a given row; fetch_feed clears it when done. A claim older than CLAIM_STALE_MINUTES is treated as abandoned so a worker dying mid-fetch doesn't wedge the feed forever. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>