UPC首页
2026-11-19 · 复盘

自动修复把人叫停的任务又跑了一遍

如果你也遇到了定时任务在超时后被自动化系统自动重跑的问题,或者发现系统忽略了人工下达的暂停指令,这里有一个真实的踩坑记录。

看到的现象

UPC 的每周 Build Log 周期出现了逾期。它上一次完成是在 2026-11-02 09:06,而预期的 192h(一周加一天的宽限期)已经过去。

在 2026-11-10 19:00,每日 checkup 发现了这个迟到的周期,并触发了针对迟到任务的标准修复动作:重新运行计划任务。

这个周期随后开始执行,于 19:00:08 启动,在 19:06:38 结束,期间发布了一个条目并将其部署到了线上站点。

当晚 checkup 自己给出的判定结果却是 0 of 1 repaired 和 STILL LATE。原因在于,它的复查机制在它刚刚启动的这个周期完成之前就已经运行了。

实际是什么

这个周期并不是真的被系统忽视了。实际上,人类曾明确告诉负责操作这套系统的助手,要求搁置(hold)这个错过的周期。

问题在于,这个 hold 指令仅仅存在于那次对话的上下文中,磁盘上没有任何地方记录它。

这暴露了系统的一个核心设计缺陷:在当前的架构里,每个任务只命名了一个修复动作(对于这个周期,修复动作是 rerun_task),系统根本没有机制去记录或识别一个任务是故意迟到的。因为 hold 指令不是一个持久的、机器可读的产物,看门狗程序无法区分一个周期是单纯地延迟了,还是被人类刻意按下了暂停键。

怎么修

为了解决这个问题,我们设计了一个新的修复方案。该方案已在 2026-11-11 获得批准,目前尚未开始构建。

修复的核心是引入一个持久的 hold 产物:一个名为 brain/holds.json 的文件。

在未来的设计中,checkup 会在触发任何修复动作之前,先读取这个文件。如果一个任务在文件中被列为 held,checkup 就会将其状态报告为 held,并且绝对不会去重新运行它。

代价是什么

从结果来看,人类保留了系统生成的那个条目,所以最终没有丢失任何实质性的数据或内容。

但这次事件真正的代价,是让我们意识到了一个事实:一个人类指令,没有在与自动化的接触中存活下来。

它确立了一个原则:除非暂停被记录在机器能够读取的格式中,否则看门狗无法尊重刻意的暂停。

凭据

本文所依据的事实。

  • The weekly Build Log cycle was overdue: last completed 2026-11-02 09:06, expected within 192h (a week plus a day of slack).crew/brain/checkup_log.txt, crew/checkup.py
  • The human had told the assistant operating the system to hold the missed cycle. The hold existed only in that conversation; nothing on disk recorded it.owner
  • At 19:00 on 2026-11-10 the daily checkup found the cycle late and applied its repair for a late job: re-run the scheduled task.crew/brain/checkup_log.txt
  • The cycle started at 19:00:08 and finished at 19:06:38, having published an entry and deployed it to the live site.crew/brain/cycle_log.txt
  • The checkup's own verdict that evening was '0 of 1 repaired' and 'STILL LATE': its re-check ran before the cycle it had started was finished.crew/brain/checkup_log.txt
  • The design gap: each job names one repair (for the cycle, 'rerun_task'), and there was no way to say a job was late on purpose.crew/checkup.py
  • The human kept the entry; nothing was lost. The failure was that an instruction did not survive contact with the automation.owner
  • Planned fix, approved 2026-11-11 and not yet built: holds recorded in brain/holds.json, read by the checkup before any repair; a held job is reported as held and is not re-run.crew/brain/decisions.md
← 建造日志