Commit dc6bfb88 by luoqi

docs(cleanup): 修注释漂移(审计 E 组,高确信子集)

- ai-invocations: callKey 阈值注释 <10 → <=20(对齐代码 callKeys.length<=20)
- dw-lag-monitor: webhook 已接 AlertService.send,删过时 (TODO)
- derive.op: 内置 op 注释 8 → 9(漏了 recode)
- dictation.gateway: partial 间隔注释 700ms → 450ms(对齐 PARTIAL_EVERY_MS=450)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parent b8d7cfb0
......@@ -86,7 +86,7 @@ export class AiInvocationsService {
]);
// 二次 query 拿每个 callKey 的平均 latency(endedAt - startedAt)— Prisma raw 最简
// 为了不爆 SQL,只在数据量小(<10 callKey)时算;数量多直接 null
// 为了不爆 SQL,只在数据量小(<=20 callKey)时算;数量多直接 null
const callKeys = byCallKeyRows.map((r) => r.callKey);
const avgDurationMap = new Map<string, number | null>();
if (callKeys.length <= 20) {
......
......@@ -15,7 +15,7 @@ import { TranscribeService } from './transcribe.service';
* DictationGateway — 实时听写(socket.io,模式同 realtime-coach)。
*
* 前端持续推 PCM16 16k 帧(自带 RMS 静音门控 → 没说话就没有帧)。本网关按"帧到达的间隙"断句:
* - 说话中:每 ~700ms 把当前句(累积 PCM 包 44 字节 WAV 头)发 SenseVoice → emit dictation:partial
* - 说话中:每 ~450ms(PARTIAL_EVERY_MS)把当前句(累积 PCM 包 44 字节 WAV 头)发 SenseVoice → emit dictation:partial
* - 停顿 ≥800ms:同句最终解码 → emit dictation:final,清缓冲,等下一句
* SenseVoice 是离线模型但 RTF~0.1,句级(≤30s)重解码远快于实时 → 体感"边说边出字"。
* 关闭 = 客户端直接 disconnect(纯退出),已上屏文字留在输入框。
......
......@@ -4,7 +4,7 @@ import { isEmptyText, type Row } from '../row';
/**
* derive — 给行加新字段(in-place,output 可以同 input)。
*
* 8 个内置 op(纯函数,无副作用):
* 9 个内置 op(纯函数,无副作用;另含 recode 值映射):
* - substring { op, from, start, end? }
* - concat { op, parts: ["${field}" | "literal", ...] }
* - lower / upper { op, from }
......
......@@ -14,7 +14,7 @@ import { AlertService } from '../common/alerting/alert.service';
* - 24h < diff <= 48h:🟡 注意(DW 可能没刷新,提醒值班)
* - diff > 48h:🔴 异常(数据严重滞后,事件可能漏召)
*
* 当前实现:log + (TODO) 接 webhook/email/钉钉
* 当前实现:log + AlertService.send(webhook/钉钉)
*
* 调整阈值:PAC_LAG_WARN_HOURS=24 / PAC_LAG_ERROR_HOURS=48 env
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment