Files
Jyotisha/docs/tasks/PROGRESS-consult-answer-clock-20261001.md
T
Jesse_ChenandClaude Opus 5.5 04c09cbf4d
Independent Staging Quality Gate / validate (push) Successful in 13m22s
Independent Staging Quality Gate / publish (push) Successful in 3m46s
fix(consult): five-minute answer clock as a hang guard; general mode runs on it from the start (BUG-1142)
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
2026-10-01 11:12:01 +08:00

36 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROGRESS · 普通对话答题时钟 5 分钟(2026-10-01)
## 改动
- `frontend/src/mastra/consultation-tools.ts`:`CONSULTATION_ANSWER_TIMEOUT_MS` 70_000 → 300_000,注释改写;`createConsultationRunClock` 新增 `answerFromStart`(创建时即启动答题时钟,工具钟到点因 `if (answer) return` 不再掐循环)。
- `frontend/src/app/api/consult/route.ts`:`maxDuration` 240 → 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 `requestTimeout` 300 s 管的是接收请求体,不管流式响应。
- Provider(undici 默认):`bodyTimeout` 300 s 是两块数据之间的空闲时间;DeepSeek 推理内容也是流式下发(10-01 实测推理 5,200 token 在 30 s 内持续到达),正常不会空闲到 300 s。
- 浏览器:无停滞检测;断线后服务端继续生成,客户端每 1.75 s 轮询状态。
- 预留扣点:`/api/consult/status` 15 分钟租约后才懒取消,> 410 s。
- 输出 token 上限 16,384 + 思考 8,192(`agent-generation-settings.ts`,与校正共用,未动)。