Repository navigation
feat(task): compose local and remote cache stores - #11622
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Greptile SummaryThe PR introduces a version-compatible composite task-cache store while retaining the local-only production configuration.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains within the eligible follow-up review scope. Important Files Changed
Reviews (9): Last reviewed commit: "fix(task): recover failed local cache ev..." | Re-trigger Greptile |
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
2e5bccf to
cb9ddc7
Compare
cb9ddc7 to
cce4928
Compare
cce4928 to
35d52ba
Compare
35d52ba to
58eb836
Compare
58eb836 to
4ce7380
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ce7380. Configure here.
7a62859 to
8e8b0a0
Compare
8e8b0a0 to
53dd271
Compare
## Summary - add a version-compatible composite task-cache store - read local entries first and promote remote hits into the local store - publish locally before mirroring entries remotely so local results survive remote write errors - cover artifact-bearing and result-only promotion and mirroring - mark the composite-store tracker item complete ## Validation - `cargo test --all-features composite_store_promotes_remote_hits_and_mirrors_writes -- --nocapture` - `cargo check --all-features` - `mise run lint-fix` *AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.* <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes cache hit/miss, expiry, and delete ordering on correctness-sensitive paths; remote is not enabled yet but composite semantics are exercised in tests. > > **Overview** > Adds a **composite task cache store** that layers local and remote backends behind the existing `TaskCacheStore` trait, with `compose_task_cache_stores` wiring the artifact cache through local-only today (`remote: None`) until a remote implementation is plugged in. > > **Reads** prefer the local store; on a remote hit, entries are **promoted** into local storage (resetting the local `cache_max_age` window). Failed promotion still returns the remote entry with a warning. > > **Writes** commit locally first, then **mirror** manifest and artifact files to remote; remote mirror failures are warnings so local cache hits keep working. > > **Deletes** run remote before local so a failed remote delete cannot resurrect an entry via promotion. **`remove_local`** (used when entries expire) drops only the local copy and can **re-promote** from remote if local removal fails or the remote copy is still valid. > > Unit tests cover promotion, mirroring, result-only entries, and behavior when remote commit/remove fails. The parity tracker marks the composite-store item complete. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 53dd271. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->

Summary
Validation
cargo test --all-features composite_store_promotes_remote_hits_and_mirrors_writes -- --nocapturecargo check --all-featuresmise run lint-fixAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Note
Medium Risk
Changes cache hit/miss, expiry, and delete ordering on correctness-sensitive paths; remote is not enabled yet but composite semantics are exercised in tests.
Overview
Adds a composite task cache store that layers local and remote backends behind the existing
TaskCacheStoretrait, withcompose_task_cache_storeswiring the artifact cache through local-only today (remote: None) until a remote implementation is plugged in.Reads prefer the local store; on a remote hit, entries are promoted into local storage (resetting the local
cache_max_agewindow). Failed promotion still returns the remote entry with a warning.Writes commit locally first, then mirror manifest and artifact files to remote; remote mirror failures are warnings so local cache hits keep working.
Deletes run remote before local so a failed remote delete cannot resurrect an entry via promotion.
remove_local(used when entries expire) drops only the local copy and can re-promote from remote if local removal fails or the remote copy is still valid.Unit tests cover promotion, mirroring, result-only entries, and behavior when remote commit/remove fails. The parity tracker marks the composite-store item complete.
Reviewed by Cursor Bugbot for commit 53dd271. Bugbot is set up for automated code reviews on this repo. Configure here.