build-train: remote content-addressed build cache (R2)
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
- Ambito
- build-system, infrastructure
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
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
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NEARBuilders/everything-dev
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NEARBuilders/everything-dev#400 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NEARBuilders/everything-dev#531 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NEARBuilders/everything-dev#526 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
NEARBuilders/everything-dev#518 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#496 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NEARBuilders/everything-dev
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
endora-commerce/endora-commerce#397 ·
I maintainer di solito rispondono entro 1 giorno
-
level/task
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
xavxyz/bei-shan-lin-shui#57 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opennextjs/opennextjs-cloudflare#1461 ·
I maintainer di solito rispondono entro 1 giorno