🤖 perf: plan the turn's system sections in one pass over the history
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- performance
調査の方向性
Start with src/node/utils/messages/volatileSystemTail.ts and read how withRecordedRows and the four planning functions process segment history. Check the existing volatileSystemTail and replay-verify tests before changing the shared traversal. Done means the sections are planned from one history pass, output stays byte-identical, and those tests pass; the issue says this work is low priority until one of its listed triggers occurs.
索引モデルが issue の本文から書いたものです。
説明
Problem
Each turn plans 4 system sections over the same history, one pass per section:
- volatile tail (
planVolatileSystemTail) - custom instructions (#7304,
planCustomInstructions) - skill index (#7308,
planSkillIndex) - tool instructions (#7323,
planToolInstructions)
Once a segment has a frozen record, each plan slices the segment after the latest context boundary, collects its records, and rebuilds the whole message array with one flatMap (withRecordedRows in src/node/utils/messages/volatileSystemTail.ts). So the cost per turn grows with (sections x history length).
Numbers
Measured on main 42c551ec10 with bun, a synthetic segment with a frozen record on every channel, and a user row last. Host load was about 30, so the absolute values are high, but the ratio holds.
| Rows in history | 1 section (before #7304) | 4 sections (now) |
|---|---|---|
| 1,000 | 0.07-0.08 ms | 0.13-0.16 ms |
| 10,000 | 0.19-0.24 ms | 0.72-0.90 ms |
| 100,000 | 1.9-2.5 ms | 8.4-9.9 ms |
This is well below the send-path line I act on (50 ms per turn, #6912). It is low priority today.
Fix (when it is worth it)
Read the segment once: one boundary search, one loop that collects the records of all channels, and one flatMap that puts back every channel's rows. Each channel's plan then works from the shared records. The output must stay byte-identical: the existing volatileSystemTail and replay-verify tests cover the row order.
Triggers
- A fifth section joins this pattern, or
- a live capture or nightly shows section planning at 5 ms or more per turn, or
- segments of 100k+ rows become common.
Refs #7304 #7308 #7323. Earlier measurement: #7308 issuecomment-6361801415.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 140
- 平均マージ
- 4時間 57分
- マージ済み PR(30日)
- 946
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
🤖 fix: a Daytona connection test started before a settings save can show the old key as connectedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug require-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
expressjs/expressjs.com#2549 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
umami-software/umami#4686 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --display対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
pingdotgg/t3code#24900 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
inu-appcenter/UNIDorm-web#411 ·
メンテナーはふだん 1 日以内に返信
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信