Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

A headless run hashes every untracked file by loading it whole

Abierto
#1,449 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

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.
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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Agent-Field/CodeAF

Todos los issues de Agent-Field/CodeAF

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.