Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#482 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
build-system

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
5
Fork
3
Merge medio
9h 55m
PR unite (30g)
108

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NEARBuilders/everything-dev

Tutte le issue di NEARBuilders/everything-dev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.