The 70s answer clock was sized for a non-reasoning writer; thinking tokens come out of the same clock and deepseek-v4-pro took 77s on a parents answer. Product 2026-10-01 chose five minutes. The general / no-birth-minute loop has no tools, so it now starts on the answer clock instead of the 110s tool clock. Tool phase and domain budget unchanged; maxDuration 240 -> 480. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
2.3 KiB
2.3 KiB
PROGRESS · 普通对话答题时钟 5 分钟(2026-10-01)
改动
frontend/src/mastra/consultation-tools.ts:CONSULTATION_ANSWER_TIMEOUT_MS70_000 → 300_000,注释改写;createConsultationRunClock新增answerFromStart(创建时即启动答题时钟,工具钟到点因if (answer) return不再掐循环)。frontend/src/app/api/consult/route.ts:maxDuration240 → 480,注释改 410 s;run clock 传answerFromStart: usesPublicDailyGeneralAgent(consultationMode, generalDailyContext)。- 申报时段路线:有窗口工具,拿到窗口计算结果时经
onAnswerPhase切答题时钟(原有行为不变);预计算在 warmup 里用工具钟。 - 新测试
frontend/tests/consult-answer-clock-20261001.test.ts(4 条)。
改动的既有断言
| 文件 | 原值 | 新值 | 原因 |
|---|---|---|---|
tests/consult-answer-truncation-20260926.test.ts |
CONSULTATION_ANSWER_TIMEOUT_MS = 70_000;总和 ≤ 180_000 |
= 300_000;总和 ≤ 410_000 |
产品 10-01 定 5 分钟防卡死 |
tests/consult-single-pass-answer-20260927.test.ts |
总和 ≤ 180_000 | 总和 ≤ 410_000 | 同上 |
tests/consult-evidence-lookup-20260927.test.ts 的测试名与注释里仍写「70 s」,测试本身用自己的短时钟、不读常量,未改(描述性文字,记在此处)。
门禁(Node 22.14)
| 项 | 基线 8912ba68 |
本分支 |
|---|---|---|
| tsc | — | 0 |
| lint | — | 0 error / 126 warning |
| npm test | 4,842 条,fail 24 | 4,846 条,fail 24,与基线逐条同名 |
| next build | — | / Static |
下游时限核对(T5,只报告)
- Caddy(
deploy/Caddyfile*):反代未设置读写超时,默认不限响应时长。 - Next standalone / Node:无自定义 server;Node
requestTimeout300 s 管的是接收请求体,不管流式响应。 - Provider(undici 默认):
bodyTimeout300 s 是两块数据之间的空闲时间;DeepSeek 推理内容也是流式下发(10-01 实测推理 5,200 token 在 30 s 内持续到达),正常不会空闲到 300 s。 - 浏览器:无停滞检测;断线后服务端继续生成,客户端每 1.75 s 轮询状态。
- 预留扣点:
/api/consult/status15 分钟租约后才懒取消,> 410 s。 - 输出 token 上限 16,384 + 思考 8,192(
agent-generation-settings.ts,与校正共用,未动)。