routines: a bot can mark its own run as failed when the data it needs is broken

未关闭
#307 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
63/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
backend

调研方向

Start with the trigger tool's action=note handling and the routine prompt text that already teaches NOTHING NEW, then find where a run is currently set to failed for engine errors, non-zero script checks and timeouts, since the new fail action should reuse that same path so the strip, the once-per-streak notice, backoff and pause all follow. Add the reason to the failed run record and cover it with a test alongside the existing run-outcome tests. Done means a routine that ends its run via fail shows failed with the reason and enters backoff, with the prompt updated to say it is only for jobs that could not be done. The reporter offered to send a PR, so check with them before starting.

由索引模型根据 Issue 内容生成。

描述

The problem

A routine run fails today only when something around the AI fails: the engine errors, a script check exits non-zero, or a script times out. Then the run is failed, the owner hears once per failure streak, and the backoff starts.

But often the AI turn itself works and finds that the job can't be done:

  • My weekly finance summary reads a snapshot from a script check. Some weeks the bank sync is broken and the snapshot says ERROR|token expired.
  • My weekly review should commit a file to a git vault, and the push is refused.

The bot can say "I could not do this" in its reply, but the run is still done. It looks like a normal report on the strip, no failure notice is sent, and the next run doesn't back off. A broken job can then look healthy for weeks.

The trigger tool has action=note for notes to the next run, but nothing for "this run failed".

What you'd like

One way for the bot to end its own run as failed, with a short reason:

  • A trigger action fail with a reason (one line), next to note. Or a reserved last line, like NOTHING NEW is for quiet runs. Use whichever fits better.
  • The run becomes failed with that reason. From there, everything works as for any other failed run: the strip, the one notice per streak, the backoff and the pause after repeated failures.
  • The routine prompt says when to use it: only when the job could not be done. Never for "nothing new".
Anything else
  • The routine prompt already teaches NOTHING NEW and action=note, so one more line covers this.
  • I'm happy to send the PR if this shape works for you.
主要语言
TypeScript
星标
277
派生
27
平均合并
7 小时 8 分钟
30 天内合并 PR
81

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DuskBotAI/duskbot 的其他 Issue

查看 DuskBotAI/duskbot 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。