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

build-train: record output (dist) hash in the cache entry

Abierto
#482 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
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
build-system

Línea de trabajo

Start with workspace.ts around isStale at line 403 and find recordBuilt and distOracle; first inspect the cache entry shape and input manifest work tracked in #480, plus the stats fast path in #481. Add output digest and dist stats validation, then verify the listed fault cases: truncated, deleted, stale but present, and interrupted dist writes. Done means mismatches trigger rebuilds and unchanged dist files avoid full rehashing.

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

Descripción

ready-for-agent

What to build

isStale only checks the dist entry exists (existsSync(join(member.dir, distEntry)), workspace.ts:403) — a truncated, corrupted, or externally-deleted-then-touched dist stays "fresh". Record the output hash alongside the input hash and verify integrity on judgement.

  • In recordBuilt: after a successful build, hash the dist output (per distOracle(member.dir) entry point — entry file plus whatever the config emits, or a bounded hash of the dist tree) and store it in the cache entry.
  • In isStale: input-hash match and dist-exists and dist-hash match → fresh. Dist hash mismatch/missing → stale (rebuild), never trusted.
  • Bound the cost: hashing dist every run is the same file-read profile as the input tree; the #481 stats fast path should cover dist files too (record dist file stats, rehash dist only when they drift).

This is the prerequisite for restoring dists from a remote cache (#484): without output verification, a corrupted or interrupted restore is undetectable. It is also the train's answer to "output hermeticity" — actions whose outputs are validated against recorded digests.

Blocked by

#480 (cache entry shape and input-manifest work land first).

Status

  • Output hash recorded in the cache entry post-build
  • isStale verifies dist integrity; mismatch rebuilds
  • Dist stats fast path (no full dist rehash when unchanged)
  • Fault-injection tests: truncated dist, deleted dist file, stale-but-present dist, interrupted write
  • Changeset added
Lenguaje dominante
TypeScript
Estrellas
5
Forks
3
Merge medio
9 h 55 min
PR fusionados (30 d)
108

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.