Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A headless run hashes every untracked file by loading it whole

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, go

調査の方向性

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 の本文から書いたものです。

説明

area:headless bug sev:papercut

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 --json in 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 invalidates entry.
主要言語
Go
スター
115
フォーク
14
平均マージ
9時間 38分
マージ済み PR(30日)
749

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Agent-Field/CodeAF のほかの issue

Agent-Field/CodeAF の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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