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

build-train: remote content-addressed build cache (R2)

Aperta
#484 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cloud, typescript

Direzione di ricerca

Read contentHashStalenessOracle and recordBuilt to trace the existing local cache key and build flow, then inspect the bundle-store upload path and ADRs 0015 and 0020 for storage and scoping. Start after blockers #481 and #482 are complete; add restore verification, opt-in publishing, and fault-injection coverage. Done means remote hits are verified before reuse, successful builds publish non-fatally, and local-only behavior remains the default.

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

Descrizione

ready-for-agent

What to build

The train's build cache (.bos/build-cache.json) is local-only — every fresh CI runner, agent session, and laptop rebuilds unchanged workspaces. Make the cache content-addressed and shareable: publish input-hash → dist bundle to the R2-backed bundle storage (ADR 0015 / ADR 0020 already provision the store and upload plumbing), restore on hit before judging staleness.

The cache key already exists: the member's input hash + build-mode env (envKey in contentHashStalenessOracle).

Behavior:

  • Judgement: if the local cache is cold but a remote entry exists for the key, restore the dist into the member, run the #482 output verification against the recorded hashes, and treat it fresh on match (rebuild on any mismatch — restore is never trusted unverified).
  • Publish: after a successful local build (recordBuilt), upload the dist keyed by input hash. Upload failures are non-fatal — the cache is an optimization, never a gate (same posture as the unwritable local cache, workspace.ts:394).
  • Opt-in: gated behind a flag/env (e.g. BOS_BUILD_CACHE_REMOTE=... + existing storage credentials); default remains local-only.
  • Auth/scope: reuse the bundle-store upload path and scoping (ADR 0015 bundles:write/bundles:read); keys are namespaced so members can't collide across projects.

This is the Bazel remote-cache win ported onto the train — no Bazel, no rules, just the store that already exists.

Blocked by

#481 (stats fast path — restore must be cheaper than rebuild to be worth it), #482 (output verification — restored dists must be integrity-checked before being trusted).

Status

  • Remote judgement: cold-local + remote-hit → restore → verify → fresh
  • Post-build publish keyed on input hash + envKey; failures non-fatal
  • Opt-in flag/env; local-only default preserved
  • Fault-injection tests: corrupt restore, missing remote entry, upload failure mid-train, concurrent publish
  • Changeset added
Lingua principale
TypeScript
Stelle
5
Fork
3
Merge medio
10h 12m
PR unite (30g)
102

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.