Conversation
… orchestrators Phase 4 of #205 (PR #212) shipped `resolve_cached(...)` with a `zccache_artifact::KvStore` backend, but no production code called it — every build re-ran the LDF walk from scratch. This wires the cache into the two orchestrators that already use `framework_libs`. framework_libs.rs gains: - `resolve_framework_library_sources_cached(...)` — the cached counterpart to the existing uncached entry point. Falls back to the uncached path on KvStore backend errors (open/read/write) so a degraded cache can never poison a build, mirroring the corrupt-entry recovery already in `cache.rs`. - `library_select_kv_store()` — process-shared `KvStore` opened lazily via `OnceLock`, rooted under `fbuild_paths::get_cache_root()` so it honors `FBUILD_DEV_MODE` and `FBUILD_CACHE_DIR`. Returns `None` on open failure and callers degrade gracefully. teensy + stm32 orchestrators construct `CacheKeyInputs` from the framework's `PackageInfo` (install path, version) plus a stable toolchain triple (`teensy-arm-none-eabi`, `stm32-arm-none-eabi`) and route through the cached helper when the KvStore is available. Tests: - New `cached_resolution_round_trips_through_kvstore` exercises miss → hit on the public cached entry through a tempdir-backed KvStore. - All 4 existing framework_libs tests still pass (uncached path). - All 16 fbuild-library-select tests still pass. Docs: - `docs/architecture/library-selection.md` status, cache-key, and future-work sections refreshed; Phase 4 is no longer "not yet shipped" and Phase 8.b dead-helper cleanup is essentially done. Closes #214 Refs #205 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
resolve_framework_library_sources_cached(...)andlibrary_select_kv_store()incrates/fbuild-build/src/framework_libs.rs. The cached entry routes throughfbuild_library_select::cache::resolve_cachedand falls back to the uncached resolver on anyKvStorebackend error so a degraded cache cannot poison a build.crates/fbuild-build/src/{teensy,stm32}/orchestrator.rs) to constructCacheKeyInputsfrom the framework'sPackageInfo(install path, version) and a stable toolchain triple, and call the cached helper when the process-sharedKvStoreis available.fbuild_paths::get_cache_root().join(\"library-selection\")so it honorsFBUILD_DEV_MODEandFBUILD_CACHE_DIR.docs/architecture/library-selection.md: Phase 4 has shipped and is wired; cache-key section now points atcache.rs; Phase 8.b cleanup is essentially done.This unblocks Phase 7 warm-cache benches (#215) — there is now a warm path to measure.
Closes #214
Refs #205
Test plan
uv run soldr cargo test -p fbuild-build --lib framework_libs— 5 tests pass (4 existing uncached + 1 newcached_resolution_round_trips_through_kvstore).uv run soldr cargo test -p fbuild-library-select— 16/16 tests pass (9 resolver + 7 cache).uv run soldr cargo clippy --workspace --all-targets -- -D warnings— clean (only pre-existing MSRV-mismatch warnings, no new diagnostics).uv run soldr cargo build --workspace— clean.RUSTDOCFLAGS=\"-D warnings\" uv run soldr cargo doc --no-deps -p fbuild-build— clean.