feat(news): add content safety baseline gate for daily news morning
Memind CI / Test, build, and release guards (push) Successful in 4m51s

Rules-first safety gate covering adult content, minor protection, legal
compliance (stock tips, crypto promotion, gambling, drugs, source
provenance for political news) and ethics (tragedy tone, discrimination,
gossip). Filters without blocking publication:

- SearXNG prefetch uses safesearch=2 and drops block-level results before
  they can be supplemented into the page
- worker sanitizes the page after dedupe and after the image gate, with a
  single batched model review; review-level items are removed fail-safe
  when the reviewer is unavailable
- sections the gate filtered are exempt from fill/structure audits so
  filtering never turns into a failed generation
- push/preview recheck removes block-level items and masks title/digest
- AI-assisted disclosure in page footer and WeChat draft, plus aigc and
  content-safety meta markers

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-23 10:24:29 +08:00
parent 7de5eeba61
commit c136f06823
14 changed files with 1385 additions and 15 deletions
@@ -12,6 +12,7 @@ import { isScheduledTaskWorkerEnabled } from '../scheduled-task-worker-config.mj
import { startHealthBaselineWorker } from '../health-baseline-worker.mjs';
import { startWechatNewsMorningDraftWorker } from '../wechat-news-morning-draft-worker.mjs';
import { createWechatNewsMorningDraftService } from '../wechat-news-morning-draft.mjs';
import { createNewsMorningContentReviewer } from '../wechat-news-morning-content-safety.mjs';
import { createHealthEventNotificationService } from '../health-event-notification-service.mjs';
import { isPassiveCanaryRuntime } from './portal-runtime-role.mjs';
import { loadWechatMpModule } from '../wechat-mp-loader.mjs';
@@ -401,6 +402,7 @@ export async function bootstrapPortalIntegrationServices({
pool,
h5Root,
env,
contentReviewer: createNewsMorningContentReviewer({ llmProviderService, env, logger }),
logger,
});
if (wechatNewsMorningDraftWorker?.runOnce) {