Removals: take a publisher down at their request, and keep them out - #178
Merged
Conversation
Deleting a feed's rows honoured a removal request only until discovery or a resubmission found the same URL again; the directory had no memory of who had asked to leave. feed_removals is that memory, keyed by host as well as URL, and both insert paths consult it: insertFeed throws FeedRemovedError, which a submission surfaces and discovery records as rejected/removed-by-owner, and insertFeedsBulk drops the rows silently. removeFeed() deletes every feed on the host with its items, extracts, links and any author record left with nothing under it, then writes the row. packages/db/src/remove-feed.js runs it against TURSO_DATABASE_URL, and --list shows what is on record. Prompted by two removal requests by email (2026-08-23, 2026-09-04) that sat unanswered because honouring one was a hand-run SQL delete. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GX6xEcjGFxcvcMCFLhQng
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GX6xEcjGFxcvcMCFLhQng
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A publisher who asks to be removed now stays removed.
feed_removalsrecords the host (and the exact URL) of every honoured request, and both insert paths consult it:insertFeedthrowsFeedRemovedError(a submission shows the reason; discovery marks the candidaterejected/removed-by-owner), andinsertFeedsBulkdrops matching rows before inserting.removeFeed(db, { feed_url, reason, requested_by })deletes every feed on the host with its items, extracts, links and any author record nothing else references, then writes the removal. Operators run it with:Why now
Two removal requests arrived by email (Aug 23, Sep 4) and the first sat for two weeks because honouring it meant a hand-run SQL delete with nothing to stop the feed coming back. The Aug 23 one was deleted by hand tonight and the owner told; this makes the next one a command and the promise permanent.
Verified
packages/db: removals suite (5 tests) + existing db tests, 39 pass;packages/ingest: 159 pass;pnpm buildgreen.20260905234500_feed_removals.sqlapplies on boot viamigrate()like the rest.🤖 Generated with Claude Code
https://claude.ai/code/session_013GX6xEcjGFxcvcMCFLhQng