feat(task): report task cache statistics - #11601
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 |
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 ede2f60. Configure here.
Greptile SummaryThis PR adds opt-in aggregate task-cache statistics and persists compatible byte and execution-duration metadata in cache manifests.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "feat(task): report task cache statistics" | 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.
|
ede2f60 to
ac6b27b
Compare

Summary
--task-cache-statsfor an opt-in per-run cache summaryWhy
Cache hits were individually visible, but users could not assess the aggregate benefit of caching across a run.
User impact
Users can run
mise run --task-cache-stats <task>to receive a summary such asTask cache: 1/1 hits (100%), 10 B restored, 6.4ms saved. Existing cache entries remain readable; older entries contribute zero bytes and time until rewritten.Validation
cargo test stats -- --nocapturemise run test:e2e e2e/tasks/test_task_artifact_cachemise run rendermise run lintcargo clippy --workspace --all-features --all-targets -- -D warningsAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Note
Low Risk
Additive CLI and manifest fields with backward-compatible defaults; behavior is observability-only and does not change cache keying or restore logic beyond recording metrics.
Overview
Adds
--task-cache-statstomise runfor an opt-in end-of-run summary of experimental task output cache lookups: hit rate, uncompressed bytes restored, and execution time saved from manifest metadata.Cache manifests now record
restored_bytes(archive + captured log bytes) andexecution_duration_nswhen entries are written; restores surface those fields on hits and older entries deserialize with zeros.TaskExecutoraggregates per-run hits/misses and metrics; freshness skips that never hit the artifact cache are excluded from totals (Task cache: no lookups).The flag conflicts with
--dry-run; docs, usage spec, man pages, parity tracker, and e2e coverage are updated.Reviewed by Cursor Bugbot for commit ac6b27b. Bugbot is set up for automated code reviews on this repo. Configure here.