Skip to content

Downgrade AI-Generated tag from sensitive back to standard - #292

Merged
WilfordGrimley merged 1 commit into
masterfrom
sensitive-tags-ai-downgrade
Jul 21, 2026
Merged

Downgrade AI-Generated tag from sensitive back to standard#292
WilfordGrimley merged 1 commit into
masterfrom
sensitive-tags-ai-downgrade

Conversation

@WilfordGrimley

Copy link
Copy Markdown

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-Generated a SENSITIVE tag (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" from cardpicker/sensitive_tags.py's SENSITIVE_TAGS list. Kept as a new FORMERLY_SENSITIVE_TAG_NAMES = frozenset({"AI-Generated"}) set (not just deleted from history) so seed_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 over SENSITIVE_TAGS, so once "AI-Generated" is removed from that list, simply re-running the old command would do nothing to the already-SENSITIVE prod 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 to SENSITIVE for 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 in FORMERLY_SENSITIVE_TAG_NAMES (currently just AI-Generated): any row with that exact name still sitting at SENSITIVE gets set back to STANDARD.

Exact post-merge prod step (orchestrator, gated after merge):

manage.py seed_sensitive_tags

Expected output on this prod instance (which has the #263-era row stuck at SENSITIVE):

Sensitive tags: 0 created, 0 updated, 1 downgraded.

(the 1 downgraded is AI-Generated; if it's already STANDARD for some reason, it'll report 0 downgraded instead — either way this command is safe/idempotent to re-run.)

Checklist

  • I have installed pre-commit and installed the hooks with pre-commit install before creating any commits.
  • I have updated any related tests for code I modified or added new tests where appropriate.
  • I have manually tested my changes as follows:
    • Ran cardpicker/tests/test_sensitive_tags.py + cardpicker/tests/test_local_detect_ai_art.py against the live Postgres/ES containers via the pre-provisioned host venv (/home/ubuntu/.venvs/mpcautofill-pilot, ephemeral test_* DB per pytest-django's normal lifecycle) — 40 passed.
    • Ran the broader consensus/moderation regression suites (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.
    • Full local pre-commit run (ruff/isort/black/mypy/prettier) — clean.
  • I have updated any relevant documentation or created new documentation where appropriate.
    • docs/features/moderation.md's Sensitive taxonomy section (table now lists four tags, not five) and its AI-Generated paragraph rewritten in place to describe the upgrade-then-revert and the new downgraded seed-command output.

…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.
@WilfordGrimley
WilfordGrimley merged commit 2353f9a into master Jul 21, 2026
7 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