Repository navigation
feat(task): add per-run cache controls - #11396
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds ChangesPer-run task cache modes
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant mise run
participant TaskExecutor
participant TaskArtifactCache
User->>mise run: select --task-cache mode
mise run->>TaskExecutor: pass TaskCacheMode
TaskExecutor->>TaskArtifactCache: restore when reads are enabled
TaskExecutor->>TaskArtifactCache: publish when writes are enabled
TaskExecutor-->>mise run: return task result
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 SummaryAdds per-run task artifact-cache modes and propagates the selected mode through normal, naked, and bootstrap task execution.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (6): Last reviewed commit: "fix(task): preserve cache env when disab..." | 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.
|
bd0deff to
deeb33c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@man/man1/mise.1`:
- Around line 3151-3155: Update the duplicated task output caching mode
descriptions in man/man1/mise.1 at lines 3151-3155 and 3925-3929: clarify in the
local-only entry that, because remote caching is not implemented, it is
currently equivalent to read-write and does not provide distinct behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 474ebcfe-2703-4cda-a6db-c89519a0f0e4
📒 Files selected for processing (1)
man/man1/mise.1
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 53830ec. Configure here.

What
--task-cacheandMISE_TASK_CACHEper-run controlsread-write,read-only,write-only,off, andlocal-onlymodesWhy
CI and local workflows need to control cache consumption and publication independently. Read-only mode lets untrusted jobs consume existing results without publishing misses, write-only mode warms the cache without consuming entries, and off mode provides a clean diagnostic path.
Impact
This is experimental and only affects tasks with task output caching enabled. The default remains
read-write.local-onlycurrently matches read-write behavior because remote caching is not yet implemented, while establishing the per-run contract needed for that follow-up.Stack
Checks
mise run lintmise run test:e2e e2e/tasks/test_task_artifact_cache e2e/tasks/test_task_artifact_cache_modescargo test --bin mise task_cachemise run docs:buildmise run render:usagegit diff --checkAI-assisted — Tool: Codex; model: openai/GPT-5; version: unavailable.
Note
Medium Risk
Changes when cached artifacts are read, written, and how dependents see keys; default read-write preserves prior behavior, but mis-set modes in CI could skip restores or publish unwanted entries.
Overview
Adds
--task-cacheandMISE_TASK_CACHEso a single run can control the experimental task output cache independently of task config. Modes areread-write(default),read-only,write-only,off, andlocal-only(documented as equivalent to read-write until remote cache exists).The executor now gates artifact restore, skip-via-current-output,
mark_current, and store on per-modereads()/writes().offdisables artifact caching and keeps normalsourcesfreshness behavior. The experimental check for artifact caching only runs when the run mode is notoff. Bootstrap and naked task entry points pick upTaskCacheMode::from_env()somise buildhonorsMISE_TASK_CACHElikemise run.Docs, usage/man output, parity tracker, and e2e coverage (
test_task_artifact_cache_modes,--task-cache offin global-env test) accompany the change. This is separate from--no-cache(remote task definitions).Reviewed by Cursor Bugbot for commit 9729ba1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
--task-cache <mode>(alsoMISE_TASK_CACHE) for bothmise runandmise tasks run.read-write(default),read-only,write-only,local-only, andoff(local-onlyacts likeread-writewithout remote caching).