bug: agentop's plugin-order check misses RequiresLater, the live stream degrades, and TUI comments are stale
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- cli, testing-qa
調査の方向性
Start with the named paths at commit ab5f01f26: compare core/plugins/registry.go's validateRelationships with tui/deps.go, edit/validate.go, and the session API and client response types. Then inspect apiclient/sse.go and the cited tui/app.go and key handlers alongside their tests. Done means the dependency check includes RequiresLater, the stream and snapshot behaviors handle the described cases, and the listed comments match the code; the issue gives fixes but spans several subsystems.
索引モデルが issue の本文から書いたものです。
説明
Problem
agentop's TUI has three problems. Its plugin-order check is a weaker copy of the framework's. Its live event stream degrades over long sessions in ways #1542 does not cover. And several comments describe code that has since changed. Line numbers are at ab5f01f26.
1. The plugin-order check is written three times, and none of the copies knows RequiresLater
The copies:
tui/deps.go:39-53(requiresStatus) and:86-100(requiresAnyStatus). These are the same loop overp.Requiresvsp.RequiresAny.tui/deps.go:59-80(requiresAnyOK).edit/validate.go:76-160(validateChain).
The real rule is core/plugins/registry.go:325 (validateRelationships), and it also enforces RequiresLater. For example, litellm-budget-track declares RequiresLater: inference-parser (litellm_budgettrack/plugin.go:126). Neither the session API response shapes (core/sessionapi/server.go:90-98, 288-296) nor apiclient carry that field. There are zero references to it in cmd/agentop or core/sessionapi.
Case: an operator edits the pipeline and moves inference-parser above litellm-budget-track. agentop shows DEPS ✓ and no validation errors, and applies. The proxy refuses the reload, and agentop rolls back after the wait, which is the very error the pre-apply check exists to catch. The comment on requiresAnyOK says it "matches the framework's validateRelationships rule exactly".
Fix:
- Add
requiresLaterto the session API responses andapiclient. - Write one check in
editthat bothdeps.goandvalidateChaincall. - Fold the two
deps.goloops into one helper.
2. Live stream problems not covered by #1542
#1542 covers memory growth from retaining streamed events. Separately:
- Backoff never resets.
apiclient/sse.go:72-90(streamLoop) declaresattemptonce and increments it on every disconnect. It never resets after a successful open. After 5 disconnects, even hours apart (laptop sleep, proxy restart), every reconnect waits the full 30s, and the TUI shows an ever-growing attempt number (tui/app.go:2243).TestBackoffSchedule_CapsAt30sonly covers the schedule function. Fix: resetattemptafterstreamOncehas reached "open". - Large events kill the stream.
sse.go:129-130sets a 4 MiB scanner limit "to match the server's cap", but the server has no cap.core/sessionapi/server.go:607-613marshals full events, includingInference.MessagesandTools, and the forward proxy accepts 32 MiB request bodies. A long-context event over 4 MiB makesScanfail withErrTooLong, and the stream reconnects. Events published during the gap are lost, because the server ignores the SSE event id when a client reconnects. Fix: stream the summary projection thatsessionapi/summary.goalready builds (this also fixes most of #1542). At minimum, skip the oversized frame instead of dropping the connection, and correct the comment. - Snapshot overwrites streamed events.
snapshotLoadedMsgsetsm.events[id] = msg.events(tui/app.go:1758), with no merge by sequence number. Events streamed while the snapshot request was in flight are lost until the next manual refresh. Pausing withp(keys.go:473-475) also silently drops events, and resuming does not refetch. Fix: when a snapshot lands, keep held events with a higher sequence number. On resume, callsnapshotCmd.
3. Comments that contradict the code
- "layout() is called from exactly one place, the WindowSizeMsg handler" (
tui/keys.go:1375,spend_strip.go:563,spend_drawer.go:313,app.go:2572). There are five callers, includingapp.go:1118(backToPodsPane, a pane transition),app.go:1330,search.go:139andspend_drawer.go:368, 390. The pane-blind height reservation is justified by this false claim. tui/keys.go:647estimates memory at "~165 bytes per event and 1000 events per session". The 1000-event cap is gone, and streamed events are about 1000× larger.tui/spend_drawer.go:104says the axes are the ones "gcycles through". The key isa(keys.go:248).tui/spend_band.go:212-214says the plainrenderSpendBand"is the form the renderer publishes". Production only callsrenderSpendBandStyled.
Fix: correct or delete them. For layout(), re-derive the reservation argument or drop it.
Found by a code audit of main at ab5f01f26. The snapshot and pause losses were verified by reading the code, not reproduced.
Assisted-By: Claude (Anthropic AI) [email protected]
- 主要言語
- Go
- スター
- 21
- フォーク
- 43
- 平均マージ
- 13時間 8分
- マージ済み PR(30日)
- 267
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rossoctl/cortex のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
UI shows costs for all sessions even when drilled into a session対応中かも @esnible が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
rossoctl/cortex#1116 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CodeQL flags r.Host reaching slog in the forward proxy's debug/warn lines対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 半日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
rossoctl/cortex の issue をすべて見る
似ている issue
-
docs(prompts): IF BLOCKED workflow-scope branch says to comment on the issue on jira/local trackersオープンagent-butler-finding bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
jordansmall/spindrift#6238 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microcks/microcks-cli#608 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
esengine/DeepSeek-Reasonix#14868 ·
メンテナーはふだん 1 日以内に返信
-
Install notes print "Camunda REST API: https://" without a host when global.host is set対応中かも @irisfield が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
camunda/camunda-platform-helm#7790 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
wso2/agent-manager#2220 ·
メンテナーはふだん 1 日以内に返信