P1: Движок автомодерации и политики (reject/flag/censor) #38

Closed
opened 2026-07-17 15:31:38 +03:00 by cursor-ai · 4 comments
Owner

Проблема

check_content/auto_moderate не вызываются при create/update. Нет конфигурируемой политики и word-boundary matching.

Ожидаемый результат

Движок автомодерации:

  • scan_text → clean | hit
  • match_mode: word_boundary (default) | substring
  • keyword_action: reject | flag | censor (default flag)
  • Wire: calendar/event (title, description), review (comment)
  • reject → 400 content_banned; censor → ***; flag → soft-hide + hit
  • Soft-hide: review→hidden, event/calendar→frozen, reason auto:keyword
  • Audit + WS automod_hit

Критерии приёмки

  • Create/update ведёт себя по политике settings
  • word_boundary: bad не матчит badge
  • Unit-тесты scan + три политики
  • Пустой бан-лист не ломает существующие тесты

Приоритет

P1

Epic

EventHub/EventHubBack#

## Проблема check_content/auto_moderate не вызываются при create/update. Нет конфигурируемой политики и word-boundary matching. ## Ожидаемый результат Движок автомодерации: - scan_text → clean | hit - match_mode: word_boundary (default) | substring - keyword_action: reject | flag | censor (default flag) - Wire: calendar/event (title, description), review (comment) - reject → 400 content_banned; censor → ***; flag → soft-hide + hit - Soft-hide: review→hidden, event/calendar→frozen, reason auto:keyword - Audit + WS automod_hit ## Критерии приёмки - [ ] Create/update ведёт себя по политике settings - [ ] word_boundary: bad не матчит badge - [ ] Unit-тесты scan + три политики - [ ] Пустой бан-лист не ломает существующие тесты ## Приоритет P1 ## Epic EventHub/EventHubBack#
cursor-ai added the Story label 2026-07-17 15:31:38 +03:00
cursor-ai self-assigned this 2026-07-17 15:31:38 +03:00
Author
Owner

Беру в работу. Defaults: flag + word_boundary + threshold 3.

Беру в работу. Defaults: flag + word_boundary + threshold 3.
Author
Owner

Реализовано в коде:

  • logic_automoderation: scan (word_boundary/substring), evaluate (reject/flag/censor), soft-hide, hits
  • Wire в create/update calendar/event/review
  • Unit: logic_automoderation_tests — 8/8 ok

Остаётся: Front UI + спека после полного прогона.

Реализовано в коде: - logic_automoderation: scan (word_boundary/substring), evaluate (reject/flag/censor), soft-hide, hits - Wire в create/update calendar/event/review - Unit: logic_automoderation_tests — 8/8 ok Остаётся: Front UI + спека после полного прогона.
Author
Owner

Расширены тесты:

  • unit: logic_automoderation_tests (23), core_automod_tests (4), admin_handler_automod_tests (11)
  • API CT: admin_automod_tests, user_automod_tests (reject/flag/threshold/review reports)
    Все перечисленные — зелёные.
Расширены тесты: - unit: logic_automoderation_tests (23), core_automod_tests (4), admin_handler_automod_tests (11) - API CT: admin_automod_tests, user_automod_tests (reject/flag/threshold/review reports) Все перечисленные — зелёные.
Author
Owner

Закрываю в составе эпика #37.

Реализовано в e9d1a13. Тесты: unit 875, API CT 38. Спека обновлена (EventHubSpec e365e35).

Закрываю в составе эпика #37. Реализовано в e9d1a13. Тесты: unit 875, API CT 38. Спека обновлена (EventHubSpec e365e35).
Sign in to join this conversation.