import { REPLY_QUALITY_RETENTION_DAYS } from "./reply-quality-labels.ts"; /** * 对话质量记录 retention (compliance round 2026-09-30): snapshot bodies older * than 90 days are blanked by expire_reply_quality_snapshot_bodies(); date, * model, 不满意原因 and 处理状态 stay for statistics. Logs carry a count only. */ export const REPLY_QUALITY_RETENTION_TICK_MS = 6 * 60 * 60 * 1000; export const REPLY_QUALITY_RETENTION_FIRST_TICK_MS = 2 * 60 * 1000; export async function runReplyQualityRetentionTick(deps: Readonly<{ expire: (days: number) => Promise; log: (line: string) => void; }>): Promise { const expired = await deps.expire(REPLY_QUALITY_RETENTION_DAYS); if (expired === null) deps.log("[reply-quality-retention] expire failed"); else if (expired > 0) deps.log(`[reply-quality-retention] expired=${expired}`); return expired; }