Repository navigation
server: seed statements only from moderators; comments no longer wait on the toxicity check - #3074
Merged
Merged
Conversation
POST /api/v3/comments approved any caller's statement on arrival when the request carried is_seed, so anyone, even without signing in, could skip strict moderation and have a statement shown to every participant. The seed flag now counts only for a moderator of the conversation; from anyone else it is ignored, the statement is stored as an ordinary one and moderated like any other. Moderators are unchanged, with or without the flag. The bulk upload route already required a moderator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
Every comment from a non-moderator first asked the identity provider, with two uncached management API calls, whether the conversation's owner had the plan that enables a toxicity check, and for those owners it then sent the statement to an external language model before saving it. Those calls had no time limit, so a slow provider held the citizen's statement unsaved. The check is off: a statement is saved with the conversation's own moderation setting and no outside call. The functions stay in place, unused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
Delphi Coverage Report
|
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.
Two observable changes, one commit each. No schema change.
1. Only a moderator can contribute a seed statement.
POST /api/v3/commentsapproved any caller's statement on arrival when the request carriedis_seed, so anyone, even without signing in, could skip strict moderation and have a statement shown to every participant. The seed flag now counts only for a moderator of the conversation. From anyone else it is ignored: the statement is stored withis_seed = falseand moderated like any other (under strict moderation, hidden until approved). Moderators (owner, site moderators, admins) are unchanged, with or without the flag. The bulk upload route already required a moderator, and a control test pins it.2. Comments no longer wait on the toxicity check. Every non-moderator comment first made two uncached identity-provider management API calls to see whether the conversation's owner had the plan that enables a toxicity check. For those owners, it then sent the statement to an external language model, and only then saved it. None of those calls had a time limit, so a slow provider held the participant's statement unsaved. The check is now off: a statement is saved with the conversation's own moderation setting and no outside call. The profanity filter ran inside the same check (and only ever for those plan owners), so it is off with it. The functions stay in place, unused.
GET /comments?moderation=true&mod_gt=…still consults the plan check and is unchanged here.Tests.
comment-seed-moderator-only.test.ts(6): a participant's flagged statement is stored pending,is_seedfalse, and is not served to other participants; it behaves the same as without the flag; moderator seeds are still approved; the bulk route refuses participants.comment-toxicity-check-off.test.ts(3): no identity-provider management call and no language-model call on a comment, even when the stubbed model would have rejected it.commentModerationLocation.test.tsadapted: it asserted that the language-model prompt was sent from the handler.tsc --noEmitand prettier are clean; eslint has 0 errors. The vote-sign lint reports 0 new sites.🤖 Generated with Claude Code