Repository navigation
feat(task): cache tasks without file outputs - #11351
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAdds ChangesResult-only task cache
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant TaskExecutor
participant TaskArtifactCache
participant LocalCache
User->>TaskExecutor: run task with outputs = []
TaskExecutor->>TaskArtifactCache: check cached result
TaskArtifactCache->>LocalCache: read manifest and logs
LocalCache-->>TaskArtifactCache: manifest-only cache entry
TaskArtifactCache-->>TaskExecutor: restored result
TaskExecutor-->>User: replay cached stdout and stderr
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
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 e5f0dc4. Configure here.
e5f0dc4 to
64ed924
Compare
Greptile SummaryThis PR adds explicit result-only caching for tasks declaring
Confidence Score: 5/5The PR appears safe to merge. The previously reported missing-output issue is resolved because cache storage still requires every declared filesystem output pattern to match, while only explicit result-only tasks can legitimately produce empty-root manifests; no blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "feat(task): cache tasks without file out..." | Re-trigger Greptile |
64ed924 to
97b47d1
Compare
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 x -- echo |
18.5 ± 1.1 | 16.4 | 24.2 | 1.00 |
mise x -- echo |
20.5 ± 1.5 | 17.9 | 29.5 | 1.11 ± 0.10 |
x -- echo measured 11% slower, but the relative uncertainty overlaps the 10% threshold. |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 env |
18.0 ± 1.0 | 15.8 | 23.1 | 1.00 |
mise env |
20.0 ± 1.2 | 16.9 | 24.5 | 1.11 ± 0.09 |
env measured 11% slower, but the relative uncertainty overlaps the 10% threshold. |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 hook-env |
19.4 ± 1.2 | 16.6 | 23.9 | 1.00 |
mise hook-env |
21.3 ± 1.5 | 18.2 | 27.7 | 1.10 ± 0.10 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.7.14 ls |
16.7 ± 1.1 | 14.2 | 21.7 | 1.00 |
mise ls |
18.3 ± 1.2 | 16.0 | 24.6 | 1.09 ± 0.10 |
xtasks/test/perf
| Command | mise-2026.7.14 | mise | Variance |
|---|---|---|---|
| install (cached) | 165ms | 179ms | -7% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 67ms | 72ms | -6% |
| task-ls (cached) | 97ms | 97ms | +0% |

Summary
outputs = []as an explicit result-only task cache declarationWhy
Checks such as linting, testing, and type checking often produce no filesystem artifacts, but their successful result and logs are still useful to cache. This closes that local-cache parity gap while requiring users to explicitly assert that no filesystem side effects need restoration.
Stacking
This PR is stacked on #11347 and should be retargeted to
mainafter that PR merges.Validation
mise run lint-fixcargo check --all-featurescargo test --all-features task_outputs --quietcargo test --all-features task_cache --quietmise run test:e2e tasks/test_task_artifact_cache_no_outputs tasks/test_task_artifact_cache tasks/test_task_artifact_cache_validation tasks/test_task_artifact_cache_outputThe e2e coverage verifies current hits, manifest-only restoration, log replay, source invalidation, scoped defaults, cache clearing, and that result-only entries create no tar archive.
Note
Medium Risk
Changes experimental task cache store/restore and skip logic; incorrect
outputs = []could skip work if users misdeclare side effects, though behavior is opt-in and covered by new e2e tests.Overview
Adds
outputs = []as an explicit “result-only” cache mode for tasks that produce no filesystem artifacts (lint, test, typecheck). Successful runs can be skipped or restored from cache with manifest + replayed stdout/stderr, without writing a.tar.zstarchive.TaskOutputs::NoFilesis parsed from an emptyoutputsarray; cache validation and scopedtask_config.cachedefaults now treatoutputs = []like explicit output paths (still rejectingoutputs = { auto = true }). Store/restore only unpacks archives when manifest roots are non-empty; result-only entries skip the output-directory lock and tolerate a missing archive when the JSON manifest is present.The executor treats result-only tasks as cache-eligible on the “sources up-to-date” fast path without requiring output freshness, and reports “restored result” vs “restored outputs” on cache hits. Docs, parity tracker, validation messages, and e2e coverage for hits, manifest-only restore, log replay, invalidation, and scoped defaults are updated.
Reviewed by Cursor Bugbot for commit 97b47d1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
outputs = []can now use caching.Bug Fixes
Documentation