agents-runtime: background compaction stays running after normal idle exit
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
packages/agents-runtime/src/process-wake.ts から始め、アイドルタイムアウトのループとクリーンアップを通じて pendingBackgroundCompaction を追跡します。100 ms のアイドルタイムアウトと保持した summarizeComplete フックを使って、制御された fixture の再現を実行します。完了条件は、完了したバックグラウンド処理が実行中のチェックポイントを残せず、回帰テストが終端チェックポイントまたは明示的なキャンセルを確認することです。
索引モデルが issue の本文から書いたものです。
説明
Versions
Reproduced in a local TypeScript integration with agents-runtime 0.6.3 based on
91758919586d7c0c70a7b8190a39b6e06fc2ea14. This build has downstream compaction
configuration changes, but the background processWake lifecycle is unchanged.
I also inspected main at bb397424db0e1c153dc356713fd3dfd40315470c; the same
lifecycle is present there. I have not run the integration against that main SHA.
Bug description
Background compaction can finish successfully after the normal idle timeout
ends its wake, but its checkpoint stays running and the summary is never
applied. The original conversation remains available.
The non-blocking behavior in #4605 is intentional. The problem is the unfinished
checkpoint after the background work has ended, not that a user turn returns
before its summary finishes.
To reproduce without live inference, use a fixture turn whose reported usage
exceeds the background threshold and hold the public summarizeComplete hook
behind a barrier:
const gate = Promise.withResolvers<void>()
const returned = Promise.withResolvers<void>()
const summarizeComplete: NonNullable<AgentConfig['summarizeComplete']> = async () => {
await gate.promise
returned.resolve()
return { content: [{ type: 'text', text: 'Generated summary.' }], stopReason: 'stop' }
}
- Configure a 100 ms runtime idle timeout and a longer summary deadline.
- Send one user message. Let the turn finish and background summarization start.
- Keep the gate closed until the runtime reports that the wake has ended.
- Resolve the gate and await
returned.promise. - Read the persisted stream again. The latest status for that compaction
generation is stillrunning; nocompleteorfailedcheckpoint is saved.
The local regression fails with BACKGROUND_CHECKPOINT_MUST_FINISH, after
confirming summarySettled: true and checkpointStatuses: ["running"].
This uses controlled completion, not a sleep or a stopped runtime process.
In packages/agents-runtime/src/process-wake.ts, the promise callback only
updates the wake-local pendingBackgroundCompaction slot and interrupts an
active idle wait. After an idle timeout with a pending slot, the loop exits and
cleanup closes the writer and sends done. There is no continuation or
cancellation for that slot. A subsequent wake creates a new slot.
The 100 ms idle window makes the test quick. The defaults also allow this
ordering: 20 seconds idle versus a 120 second summary deadline. This does not
mean every background summary fails.
Expected behavior
On a normal idle exit, finish the generation through an owned continuation, or
cancel it and record a terminal status. Either policy is reasonable. A summary
that has finished should not leave an orphaned running checkpoint or perform
work whose result no active wake can use.
- 主要言語
- TypeScript
- スター
- 10.4k
- フォーク
- 399
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
electric-sql/electric のほかの issue
-
camelToSnake and snakeCamelMapper() drop the underscore when a digit precedes a camelCase boundaryオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
electric-sql/electric#4855 ·
-
ShapeStream does not notify subscribers when it gives up on a non-Error value対応中かも @Tyagiquamar が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
electric-sql/electric#4830 ·
-
@electric-sql/client throws SecurityError on import when the browser blocks site storage (typeof localStorage outside try)対応中かも @mohanedmoh が 37 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
electric-sql/electric#4826 · コメント 1 件 ·
-
agents-chat-starter: spawn PUT goes to the durable-streams proxy, so no entity is created and agents never wake対応中かも @adityavkk が 133 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
electric-sql/electric#4687 ·
-
Listen IP addressオープンfeature request triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
electric-sql/electric#4150 · コメント 1 件 ·
electric-sql/electric の issue をすべて見る
似ている issue
-
bug
難易度 2/5 半日 初心者へのやさしさ 68/100
amosblomqvist/learnharness#758 ·
メンテナーはふだん 2 日以内に返信
-
Change Workspacesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dsh-market/dsh-market#1210 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
trustjonathan/STUDY-HUB#13 ·