Repository navigation
feat(cache): report action cache phase timings - #12077
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe cache agent now records restoration, remote-transfer, prefetch, CAS, and timing metrics. Cache sessions can write versioned JSON reports through the new ChangesCache statistics
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Possibly related PRs
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 |
Greptile SummaryThis PR adds a versioned action-cache statistics report with request counts, transfer volumes, restored-output metrics, and phase timings while retaining the existing console summary.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported qualification-accounting issue is fixed because verification records materialization timing without adding staged outputs to restored file or byte totals. Important Files Changed
Reviews (2): Last reviewed commit: "fix(cache): exclude verified outputs fro..." | Re-trigger Greptile |
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 4b36fd6. Configure here.
Instruction countsNothing was compared, and so nothing was gated. No series appears on both sides: either the base has no measurements recorded, or the two were measured on different runner classes, which are deliberately not comparable — counts shift between machine types by more than a real regression does. New, nothing to compare against: 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.
|

Summary
Configuration
Set
task.cache.stats_reportorMISE_TASK_CACHE_STATS_REPORTto the report path. Timing values are nanoseconds; concurrent phase values are cumulative work and may exceed the end-to-end session duration.The current client still fetches blobs individually, so the schema intentionally reports
remote_blob_requestsand blob-transfer time. This gives follow-up packed-transfer work a measurable baseline without claiming a protocol path that is not in use.Validation
mise run lint-fixcargo test --locked -p mise-cache-core --no-fail-fastcargo test --locked --bin mise cache::session --no-fail-fastcargo clippy --locked -p mise-cache-core --all-features --all-targets -- -D warningscargo clippy --locked --bin mise --all-features -- -D warningsmise run test:e2e e2e/tasks/test_task_rust_cache_restoremise run render:schemaAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Note
Low Risk
Additive metrics and optional file output; agent protocol gains required
restorefields on hit/verification requests, which must stay in sync with rustc shims in the same release.Overview
Adds observability for Rust action-cache sessions: phase timings, remote request counts, restored output volume, and an optional versioned JSON report for CI/benchmarking.
Instrumentation extends the cache agent with
RestoreStatson hit/verification records so the rustc adapter reports materialization time and restored file/byte counts. Remote manifest/action lookups, per-blob transfers, local CAS writes, and prefetch runs are timed and counted viaAtomicDurationTimerand newAgentStatsfields. Session end-to-end duration is set when the cache session finishes.User-facing output:
task.cache.stats_report/MISE_TASK_CACHE_STATS_REPORTwrites a v1 JSON report atomically aftermise run; the stderr summary gains a second line with cumulative phase timings (nanoseconds). Schema and settings document the new option; e2e restore test asserts the report shape.Reviewed by Cursor Bugbot for commit 984a1c1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
task.cache.stats_reportorMISE_TASK_CACHE_STATS_REPORT.Improvements