Skip to content

feat(task): harden remote cache requests - #11626

Merged
jdx merged 1 commit into
agent/task-cache-remote-authfrom
agent/task-cache-remote-resilience
Aug 3, 2026
Merged

feat(task): harden remote cache requests#11626
jdx merged 1 commit into
agent/task-cache-remote-authfrom
agent/task-cache-remote-resilience

Conversation

@jdx

@jdx jdx commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • apply mise's standard retry/backoff policy to transient remote cache GET, PUT, and DELETE errors
  • enforce configured connect/read and total artifact download timeouts with redirects disabled
  • deduplicate concurrent reads per cache key and fall back to local execution when remote access fails

Tests

  • cargo test task_cache_store::tests
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • mise run lint-fix

AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.


Note

Medium Risk
Changes remote cache I/O behavior (timeouts, retries, redirect policy) and concurrency around promotion; failures still fall back to local-only misses rather than failing tasks.

Overview
Hardens the experimental remote task cache so flaky or slow networks are less likely to break cache hits.

HTTP client and requests: Remote cache reqwest clients now use mise Settings connect/read timeouts, disable redirects, and route GET/PUT traffic (action results, metadata blobs, artifact blobs) through the shared http::retry_async backoff policy. Large blob downloads are additionally capped by http_download_timeout.

Composite store: Concurrent remote lookups for the same cache key are serialized via a per-key lock, with a second local check after acquiring the lock so only one remote fetch promotes an entry. Remote lookup failures still degrade to a local miss (existing warn-and-continue behavior).

Tracker: TASK_CACHE_PARITY.md marks remote timeouts, retries, deduplication, and offline fallback as complete.

Reviewed by Cursor Bugbot for commit 535fdd5. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: bb3bffed-c7b8-47e8-ba8a-4f586990e30e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR hardens remote task-cache operations against transient network failures and redundant concurrent reads.

  • Applies standard retry and backoff behavior to remote cache GET and PUT requests.
  • Configures connection, read, and total download timeouts while disabling redirects.
  • Adds per-key read serialization and a local-cache double-check before remote retrieval.
  • Marks timeout, retry, deduplication, and offline-fallback parity as complete.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/task/task_cache_store.rs Adds HTTP retries and timeout policies plus per-key remote-read serialization; the existing per-key filesystem lock already coordinates the production read paths across processes.
TASK_CACHE_PARITY.md Marks remote-cache timeout, retry, request-deduplication, and offline-fallback support as complete.

Reviews (12): Last reviewed commit: "feat(task): harden remote cache requests" | Re-trigger Greptile

Comment thread src/task/task_cache_store.rs
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from 5230fc9 to 256ca9e Compare August 2, 2026 03:42
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from 256ca9e to e929957 Compare August 2, 2026 13:09
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▂▄▂▁▁▁▄▃▃█ 80,074,952 → 80,187,743 +0.14% 17.64 → 17.71ms +0.37%
hook-env ▆▅▁▃▂▂▄▃▅█ 82,190,914 → 82,306,183 +0.14% 18.34 → 18.35ms +0.04%
ls ▄▃▁▁▁▅▅▅▄█ 73,127,800 → 73,252,897 +0.17% 15.71 → 15.83ms +0.72%
registry ▁▁▂▂▃▆▆█▂▆ 49,102,713 → 49,166,259 +0.13% 11.64 → 12.46ms +7.02%
startup ▃▃▁▂▂▁▁▂▂█ 15,784,751 → 15,850,015 +0.41% 9.04 → 9.27ms +2.55%

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.

535fdd5d5d7f vs e5230aa14775 · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from e929957 to c8ca847 Compare August 2, 2026 15:18
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from c8ca847 to 8988b42 Compare August 2, 2026 15:20
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from 8988b42 to 1eb66ce Compare August 2, 2026 15:27

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1eb66ce. Configure here.

Comment thread src/task/task_cache_store.rs Outdated
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch 2 times, most recently from c6904f3 to 39473fb Compare August 2, 2026 18:18
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from 39473fb to ea3cf0c Compare August 2, 2026 18:58
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from ea3cf0c to 916ffad Compare August 2, 2026 19:10
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from 916ffad to e4af54e Compare August 2, 2026 21:25
@jdx
jdx force-pushed the agent/task-cache-remote-resilience branch from e4af54e to 535fdd5 Compare August 3, 2026 00:46
@jdx
jdx merged commit c3c6352 into main Aug 3, 2026
37 of 55 checks passed
@jdx
jdx deleted the agent/task-cache-remote-resilience branch August 3, 2026 03:04
donbeave pushed a commit to donbeave/mise that referenced this pull request Aug 3, 2026
## Summary
- apply mise's standard retry/backoff policy to transient remote cache
GET, PUT, and DELETE errors
- enforce configured connect/read and total artifact download timeouts
with redirects disabled
- deduplicate concurrent reads per cache key and fall back to local
execution when remote access fails

## Tests
- `cargo test task_cache_store::tests`
- `cargo clippy --workspace --all-features --all-targets -- -D warnings`
- `mise run lint-fix`

*AI-assisted — Tool: Codex; model: unavailable/unavailable; version:
unavailable.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes remote cache I/O behavior (timeouts, retries, redirect policy)
and concurrency around promotion; failures still fall back to local-only
misses rather than failing tasks.
> 
> **Overview**
> Hardens the experimental **remote task cache** so flaky or slow
networks are less likely to break cache hits.
> 
> **HTTP client and requests:** Remote cache `reqwest` clients now use
mise `Settings` connect/read timeouts, disable redirects, and route
GET/PUT traffic (action results, metadata blobs, artifact blobs) through
the shared `http::retry_async` backoff policy. Large blob downloads are
additionally capped by `http_download_timeout`.
> 
> **Composite store:** Concurrent remote lookups for the same cache key
are serialized via a per-key lock, with a second local check after
acquiring the lock so only one remote fetch promotes an entry. Remote
lookup failures still degrade to a local miss (existing
warn-and-continue behavior).
> 
> **Tracker:** `TASK_CACHE_PARITY.md` marks remote timeouts, retries,
deduplication, and offline fallback as complete.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
535fdd5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant