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

build-train: fast-path hash checks with mtime/size stats

Abierto
#481 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

Start with workspace.ts:339 and trace memberInputHash, hashWorkspaceTree, and recordBuilt; first check how #480 narrows the input files, since this issue is blocked by it. Add tests for unchanged, touched, added, deleted, and manifest-free trees, and verify old cache entries invalidate; done means matching stats reuse the hash while mismatches trigger a full rehash.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

ready-for-agent

What to build

Every staleness judgement re-reads and hashes every file in every member's tree (memberInputHash → hashWorkspaceTree, workspace.ts:339). Turbo's trick avoids this: persist a per-file mtime/size manifest alongside the hash; if no file's stats changed since the recorded hash, skip rehashing the tree entirely.

.bos/build-cache.json already persists per-member state — extend the cache entry with a stats manifest:

{
  "every-plugin": {
    "hash": "...",
    "files": { "src/index.ts": [1700000000000, 4021], ... }  // mtimeMs, size
  }
}

Fast path: walk the tree collecting stats only (cheap), compare against the manifest — exact match → reuse the recorded input hash without reading file contents. Any mismatch (new/removed/changed file, or no manifest) → full rehash as today. A stats match with changed content and unchanged mtime+size is theoretically possible but the same residual risk Turbo accepts; mismatches always rehash, never false-fresh.

Cache versioning: bump the cache entry shape (or add a version field) so pre-change caches invalidate cleanly rather than half-matching.

Blocked by

#480 (the input manifest defines what files even get stat'd — build on the narrowed input set).

Status

  • Stats-manifest persisted in the cache entry post-build (recordBuilt)
  • Fast path skips content reads when stats match; falls back to full rehash otherwise
  • Cache shape versioning handles pre-existing .bos/build-cache.json
  • Unit tests: unchanged tree (skip), touched file (rehash), new/deleted file (rehash), missing manifest (rehash)
  • Changeset added
Lenguaje dominante
TypeScript
Estrellas
5
Forks
3
Merge medio
10 h 12 min
PR fusionados (30 d)
102

Preparar el entorno

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 NEARBuilders/everything-dev

Todos los issues de NEARBuilders/everything-dev

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.