Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#484 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cloud, typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
5
Fork
3
Merge trung bình
10 giờ 12 phút
Pull request đã merge (30 ngày)
102

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NEARBuilders/everything-dev

Tất cả issue của NEARBuilders/everything-dev

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.