A headless run hashes every untracked file by loading it whole
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- git, go
- 領域
- cli, performance, testing
調査の方向性
Start in internal/session/run_tree_changes.go at SnapshotRunTree and runTreeDigest, then inspect the existing digest handling for permissions, links, missing paths, and unreadable files. Add coverage for large untracked files and digest equivalence across sizes and edge cases; done means codeaf do --json reports no change for an untouched artifact while peak memory stays bounded.
索引モデルが issue の本文から書いたものです。
説明
Found on santos/dev2 at 008363c98 (#1410). It reaches dev when #1410 merges.
What happened
codeaf do snapshots changed and untracked paths before a run and compares them afterward. For each regular file, it uses os.ReadFile to compute a digest. A large untracked artifact is therefore allocated whole, twice, even when the run never touches it. The issue is resource use; no incorrect file result was observed.
Replication
Deterministic (no model). In internal/session, make a temporary Git repository with one large untracked file, call SnapshotRunTree, then Changed without editing that file. Measure peak allocation with a size larger than the test process's ordinary heap. Today each pass reads the complete file. The returned changed list is empty.
Field (real models). Place a large untracked build artifact in a throwaway repository and invoke codeaf do --json there with OPENROUTER_API_KEY and deepseek/deepseek-v4-flash. Budget a minute and a small charge; compare peak memory with the same repository without the artifact.
Where
internal/session/run_tree_changes.go:40, SnapshotRunTree, enumerates --untracked-files=all; runTreeDigest at :196 calls os.ReadFile for each regular file.
The fix
Stream each file into SHA-256 with a bounded buffer. Preserve the existing digest semantics for permissions, links, missing paths and unreadable files.
Acceptance
- e2e:
codeaf do --jsonin a repository with a large untouched untracked file reports no change to that path and keeps peak memory bounded independently of its size. - Unit: streaming and current digests match across file sizes and edge cases.
- Document any changed limit and add an
invalidatesentry.
- 主要言語
- Go
- スター
- 115
- フォーク
- 14
- 平均マージ
- 9時間 38分
- マージ済み PR(30日)
- 749
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Agent-Field/CodeAF のほかの issue
-
area:chat feature
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1510 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agent-Field/CodeAF#1489 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug good first issue sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Agent-Field/CodeAF#1470 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug good first issue sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Agent-Field/CodeAF#1469 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Agent-Field/CodeAF#1468 ·
メンテナーはふだん 1 日以内に返信
Agent-Field/CodeAF の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
coder/coder#29955 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/TypeScript#64453 ·
メンテナーはふだん 1 日以内に返信
-
OpenAI-compatible endpoint: response ids have only 999 possible values (chatcmpl-rand.Intn(999))オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信