Skip to content

spots: apply moderators' and spotters' removals - #271

Merged
xbmc4lyfe merged 4 commits into
mainfrom
spot-moderation
Nov 7, 2026
Merged

xbmc4lyfe merged 4 commits into
mainfrom
spot-moderation

Conversation

@xbmc4lyfe

@xbmc4lyfe xbmc4lyfe commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

What

Atlas now applies Spotnet removals. A key-2 DISPOSE, DELETE or REMOVE <message-id> line in free.pt counts only when its signatures hold (spotnet::sign, #264). Spotweb applies the same moderation (Services_Retriever_Spots, removeInvalidDisposes).

  • A moderator's removal is signed by Spotnet's key 2. It removes any spot or comment.
  • A spotter's own removal comes from a key-2 From with their own key. The spotter's key must have signed both the command's title, which names the target (Verdict::title_signed), and its message-id (Verdict::message_id_signed). Either signature alone could be replayed. It removes only that spotter's posts, and only within five days of the spot, as in Spotweb.

The design stores first and filters later. Removals go into a new main-DB table, spot_disposals (message_id, spotter, at), where spotter is empty for a moderator. Every read filters through one SQL helper, store::disposed_sql. The order doesn't matter: a spot noted, saved or commented on after its removal is still treated as removed.

  • Fetching: todo and waiting skip removed spots, so they are never fetched. They age out like any other waiting spot.
  • Listings and API: spots_of drops removed spots, so the release loses the SPOT badge in listings and the tag=spot / spotter attributes in the Newznab API.
  • Release page: a removed spot shows a SPOT REMOVED tag instead of SPOT, and a caution box in the Spot section says who removed it and when. The release itself stays. It is still a real post, and the spot just no longer vouches for it.
  • Comments: comments removed by a moderator or by their poster are hidden.
  • Pruning: a removal is pruned after 180 days, unless it names a saved spot or a stored comment. Those are kept for good, so their removals stay too.

Measured on live free.pt

In the last 30,000 overview lines:

  • 707 moderator removals.
  • 1,410 spotters' own removals that pass both signatures. Another 29 have Latin-1 titles that the overview decoder can't rebuild, so they are dropped.
  • 10 lines don't verify: Latin-1 titles, see spots: check spot signatures as Spotweb does #264.

Matched against prod's spots_seen (read-only):

Removal Spots waiting Spots saved
By a moderator 14 3
By the spotter 608 26

None of the spotters' own removals named another spotter's spot. The 608 waiting spots their own spotters removed (mostly reposts) will no longer be fetched.

Tests

  • store::removed_spots_are_not_fetched_tagged_or_shown_as_spots covers:
    • moderator removals and the spotter's own;
    • a spotter removing someone else's spot (ignored);
    • a removal before the spot is noted;
    • the five-day rule on saved spots;
    • the page detail;
    • pruning.
  • header tests cover command parsing.
  • The web test covers both notes.
  • cargo test --lib passes.

Screenshots

These come from a local test home (made-up spot row, moderator removal), not prod:

The tag row shows SPOT REMOVED instead of SPOT, and the Spot section opens with the caution box. Everything else on the page is unchanged.

🤖 Generated with Claude Code

A key-2 DISPOSE, DELETE or REMOVE in free.pt whose signatures hold is
kept in spot_disposals: a moderator's removes any spot or comment, a
spotter's own (their key must sign its message-id) only theirs, within
five days of the spot as in Spotweb. A removed spot isn't fetched, its
release loses the spot tag in listings and the API, and its page shows a
SPOT REMOVED tag and says who removed it and when. The release stays.
Removed comments are hidden. Removals are kept as long as what they
remove may be.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T20:11:31.783999Z 2a31438 Manual request
🔒 Security Review ❌ Failed 2026-11-07T20:09:46.540014Z
We couldn’t complete this review. Comment @codex security review to try again.
2a31438 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d93415eab9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/spotnet/ingest.rs Resolved
Comment thread src/spotnet/store.rs Resolved
Comment thread src/spotnet/store.rs Resolved
xbmc4lyfe and others added 2 commits November 7, 2026 14:06
A spotter's own removal needs their key to have signed its title (which
names the target) as well as its message-id; a spot's created of 0
counts as unknown in the listing filter as on its page; and a removal of
a spot still waiting is kept until the spot ages out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 2a31438ddc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

Codex code review is clean on 2a31438 (the security review couldn't run: usage limit). Since then the branch has only taken a merge of main (#274, which made the same one-line clippy fix to sign.rs). All three threads are resolved. Merging.

@xbmc4lyfe
xbmc4lyfe marked this pull request as ready for review November 7, 2026 20:26
@xbmc4lyfe
xbmc4lyfe merged commit 408ef7d into main Nov 7, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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