A headless run hashes every untracked file by loading it whole
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- git, go
- Área
- cli, performance, testing
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 115
- Forks
- 14
- Merge medio
- 9 h 38 min
- PR fusionados (30 d)
- 730
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Agent-Field/CodeAF
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Agent-Field/CodeAF#1489 ·
-
area:chat bug good first issue sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Agent-Field/CodeAF#1470 ·
-
area:chat bug good first issue sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Agent-Field/CodeAF#1469 ·
-
area:chat bug sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Agent-Field/CodeAF#1468 ·
-
area:tests bug hygiene sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Agent-Field/CodeAF#1460 ·
Todos los issues de Agent-Field/CodeAF
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Remove obsolete ipAllocationPolicy field from containernodepool-subnetworkref test dependency Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/TypeScript#64453 ·
-
OpenAI-compatible endpoint: response ids have only 999 possible values (chatcmpl-rand.Intn(999)) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100