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

オープン
#307 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
81

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DuskBotAI/duskbot のほかの issue

DuskBotAI/duskbot の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。