Skip to content

Removals: take a publisher down at their request, and keep them out - #178

Merged
ralyodio merged 2 commits into
mainfrom
feat/feed-removals
Sep 5, 2026
Merged

Removals: take a publisher down at their request, and keep them out#178
ralyodio merged 2 commits into
mainfrom
feat/feed-removals

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What

A publisher who asks to be removed now stays removed. feed_removals records the host (and the exact URL) of every honoured request, and both insert paths consult it: insertFeed throws FeedRemovedError (a submission shows the reason; discovery marks the candidate rejected / removed-by-owner), and insertFeedsBulk drops 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:

node packages/db/src/remove-feed.js https://someone.substack.com/feed --reason "email 2026-08-23" --by someone@example.com
node packages/db/src/remove-feed.js --list

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 build green.
  • Migration 20260905234500_feed_removals.sql applies on boot via migrate() like the rest.

🤖 Generated with Claude Code

https://claude.ai/code/session_013GX6xEcjGFxcvcMCFLhQng

ralyodio and others added 2 commits September 5, 2026 23:36
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
@ralyodio
ralyodio merged commit d17aa2a into main Sep 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant