build-train: remote content-addressed build cache (R2)
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
- Lĩnh vực
- build-system, infrastructure
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ả
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
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NEARBuilders/everything-dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NEARBuilders/everything-dev#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
NEARBuilders/everything-dev#531 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
NEARBuilders/everything-dev#526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
NEARBuilders/everything-dev#518 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NEARBuilders/everything-dev#496 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NEARBuilders/everything-dev
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
endora-commerce/endora-commerce#397 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
level/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opennextjs/opennextjs-cloudflare#1461 ·
Maintainer thường phản hồi trong vòng 1 ngày