Downgrade AI-Generated tag from sensitive back to standard - #292
Merged
Conversation
…ial revert) Ordinary crowd consensus is fine for AI-Generated per owner decision; seed_sensitive_tags now syncs the downgrade on instances that ran the prior seed.
5 tasks
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.
Description
Owner decision (2026-07-21, verbatim): "ordinary human votes is fine for AI I think. or at least not moderator eyes. they will go contested if there is not an immediate human consensus that is the system working as intended." This reverts the one aspect of merged PR #263 that made
AI-GeneratedaSENSITIVEtag (moderator co-sign required to resolve). Everything else from #263 — the marker detector, its vocabulary, its tests, the shared human-backed gate (a lone machine vote can never resolve any tag alone) — is untouched.Code change: removed
"AI-Generated"fromcardpicker/sensitive_tags.py'sSENSITIVE_TAGSlist. Kept as a newFORMERLY_SENSITIVE_TAG_NAMES = frozenset({"AI-Generated"})set (not just deleted from history) soseed_sensitive_tags()can safely sync the reversal on any instance that already ran the #263-era seed.Prod DB sync — read carefully, this is the reason the PR needs a post-merge step:
seed_sensitive_tags()(prior code) only ever creates or upgrades rows — it loops strictly overSENSITIVE_TAGS, so once"AI-Generated"is removed from that list, simply re-running the old command would do nothing to the already-SENSITIVEprod row (the #263 seed run reported "0 created, 1 updated" — the upgrade — and nothing since then has ever downgraded it). A generic "downgrade anything not currently in the list" sync was considered and rejected: it would also clobber a tag an admin hand-set toSENSITIVEfor an unrelated reason via the Django admin, which this function has no business touching.Instead,
seed_sensitive_tags()now also syncs the reverse only for names inFORMERLY_SENSITIVE_TAG_NAMES(currently justAI-Generated): any row with that exact name still sitting atSENSITIVEgets set back toSTANDARD.Exact post-merge prod step (orchestrator, gated after merge):
Expected output on this prod instance (which has the #263-era row stuck at
SENSITIVE):(the
1 downgradedisAI-Generated; if it's alreadySTANDARDfor some reason, it'll report0 downgradedinstead — either way this command is safe/idempotent to re-run.)Checklist
pre-commitand installed the hooks withpre-commit installbefore creating any commits.cardpicker/tests/test_sensitive_tags.py+cardpicker/tests/test_local_detect_ai_art.pyagainst the live Postgres/ES containers via the pre-provisioned host venv (/home/ubuntu/.venvs/mpcautofill-pilot, ephemeraltest_*DB per pytest-django's normal lifecycle) — 40 passed.test_moderation_views.py,test_tag_votes.py,test_vote_consensus.py,test_purge_machine_votes.py) the same way — 111 passed, confirming the shared human-backed gate and sensitive-tag machinery for the other three tags are unaffected.pre-commit run(ruff/isort/black/mypy/prettier) — clean.docs/features/moderation.md's Sensitive taxonomy section (table now lists four tags, not five) and itsAI-Generatedparagraph rewritten in place to describe the upgrade-then-revert and the newdowngradedseed-command output.