Go to file
caoqianming 1646205364 fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2)
实测 bug:isolated 定时 job 跑满 timeout_seconds 被协作式 cancel 后,
_run_agent_bg 对 ok/cancelled 都把 run_status 收回 idle(DB 不可区分),
而 _execute_scheduled_job 收尾只判 run_status=="error",于是超时中断被落成
last_status="ok" —— 掩盖"跑到一半没写 sections/没推送",且不计连续失败、
不触发兜底。复盘 job e621c8a6「每日水泥科研简报」:timeout=600s,task
创建→last_run_at 正好 600.0s,agent 停在"按期刊打印 38 篇摘要"(还在取数)。

修:超时分支置 timed_out 标志,run 收尾后若 timed_out → record_result(
status="error", 半成品不投递 notify)并直接返回。复用既有 error 语义(计入
consecutive_failures、到阈值自动停用、前端 crons 显示「上次失败」)。不动
_run_agent_bg 的 idle-on-cancel 共享语义(HTTP cancel/drain 也依赖)。

配套:PROGRESS/RUN 故障兜底各加一条;诊断脚本 scripts/diag_sched_e621.py
(dump 输出 scripts/_*.txt 入 gitignore)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:35:40 +08:00
config feat: per-account 模型访问控制(档位制,复用 plan 列)(bump 0.31.0) 2026-06-26 14:11:22 +08:00
core fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
db/migrations feat: channel 长会话上下文软重置(gap 自动分段 + 新话题命令)(bump 0.32.0) 2026-06-29 10:05:07 +08:00
deploy feat(rendering): 平台渲染层 rendering/ 统一三 skill docx + chromium md→pdf + bump 0.21.0 2026-06-23 13:07:19 +08:00
docs docs: 操作说明书精简版表格微调 + 新增「科研AI双智能体·汇报PPT大纲」+ bump 0.24.4 2026-06-24 14:57:57 +08:00
prompts/system feat(web): ask_user 工具 — 回复里渲染可点击「方案确认」选项卡 + bump 0.14.0 2026-06-16 11:23:59 +08:00
rendering feat(rendering): 平台渲染层 rendering/ 统一三 skill docx + chromium md→pdf + bump 0.21.0 2026-06-23 13:07:19 +08:00
scripts fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
skills feat(rendering): 平台渲染层 rendering/ 统一三 skill docx + chromium md→pdf + bump 0.21.0 2026-06-23 13:07:19 +08:00
tests feat: 定时任务对话归属 + push 统一记录到渠道对话(bump 0.28.0) 2026-06-26 10:51:06 +08:00
tools feat: 定时任务对话归属 + push 统一记录到渠道对话(bump 0.28.0) 2026-06-26 10:51:06 +08:00
web fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
.gitattributes
.gitignore fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
CLAUDE.md
DESIGN.md docs(design): 新增 §8.8 channel 长会话上下文治理(Phase 1 / Phase 2-3 design)(bump 0.32.1) 2026-06-29 10:47:02 +08:00
DOCUMENT_SEARCH_API.md
EMBED.md
PROGRESS.md fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
RUN.md fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
SCIENTIFIC_SKILLS.md
SKILL_LIST.md feat(rendering): 平台渲染层 rendering/ 统一三 skill docx + chromium md→pdf + bump 0.21.0 2026-06-23 13:07:19 +08:00
WW_verify_THssshZfneJwIG5Y.txt chore(wecom): 加企业微信可信域名校验文件 WW_verify_THssshZfneJwIG5Y.txt(放 repo 根)+ bump 0.26.7 2026-06-25 10:25:06 +08:00
alembic.ini
main.py feat(web): main.py web 支持 --ssl-certfile/--ssl-keyfile(uvicorn 原生 TLS,免 nginx)+ bump 0.26.8 2026-06-25 10:43:18 +08:00
requirements.txt feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00