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

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

Aperta
#481 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
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

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.

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

Descrizione

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

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.