Repository navigation
[pull] main from forem:main - #405
Merged
Merged
Conversation
…23902) * Spam-block content that Gemini refuses as PROHIBITED_CONTENT When Gemini blocks a prompt (or a candidate) with PROHIBITED_CONTENT it returns no answer, and every spam check treated that as an error and fell back to "not spam". The most severe content was the content getting through, and LabelCleanupWorker re-ran it every 30 minutes. Ai::Base now raises Ai::Base::ProhibitedContentError for that response. The labelers and spam checks let it through, and Spam::Handler treats it as a clear violation: the mascot vomits the article, comment or profile and the author gets the spam role. Articles are also labeled clear_and_obvious_harmful so the cleanup worker stops retrying them. Claude-Session: https://claude.ai/code/session_01FLx46puMiJkQWtNe7kTRJU * Only sanction prompt-level blocks, and re-check blocked comments on their own - Ai::Base raises ProhibitedContentError only for promptFeedback.blockReason. A candidate's finishReason is about Gemini's own output, not the user's input. - CommentCheck's prompt includes the parent post, which may belong to someone else. When that prompt is blocked, re-ask about the comment alone; the author is only spam-blocked if the comment by itself is blocked. Claude-Session: https://claude.ai/code/session_01FLx46puMiJkQWtNe7kTRJU
… posts (#23904) The repeat-offender rule marked any low-trust author with 3+ clear-violation flags in the last month. Authors of self-promotional but useful technical posts collect a few clear-spam labels among many well-rated posts, and were being marked as spam too. Now the flagged posts must also be at least 75% of the author's published posts in that month. Claude-Session: https://claude.ai/code/session_01FLx46puMiJkQWtNe7kTRJU
#23903) * Refresh article notifications only when their data changes, in batches Notifications::UpdateWorker was the top source of Sidekiq statement timeouts on DEV (~500 a day, plus ~50 deadlocks). Article#update_notifications ran after almost every article update, including the last_comment_at touch on each new comment, and rewrote json_data on every follower's Published notification in a single UPDATE. - Only refresh when a field the notification shows changes (title, path, tags, published_at, reading_time, author or organization). - Update in id-ordered batches of 1,000 so each statement stays under the timeout and concurrent refreshes lock rows in the same order. Claude-Session: https://claude.ai/code/session_01FLx46puMiJkQWtNe7kTRJU * Refresh article notifications when crossposted_at changes readable_publish_date in the notification payload comes from displayable_published_at, which prefers crossposted_at over published_at. Also move NOTIFICATION_DATA_ATTRIBUTES up with the other constants (Layout/ClassStructure). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Ben Halpern <bendhalpern@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Make linked domain spam score threshold admin-configurable Replaces the hard-coded -2000 net score threshold in Spam::Handler.article_linked_domain_spam? with a Settings::RateLimit.linked_domain_spam_score_threshold setting (default 2000, so behavior is unchanged). Adds a form on the admin Linked Domains page to set it, with explanations of roughly how many spam posts the number corresponds to and the effective threshold by author score. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Strictly parse admin domain spam threshold; fix explanation grammar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )