Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#484 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cloud, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
5
フォーク
3
平均マージ
11時間 8分
マージ済み PR(30日)
90

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。