{{ message }}
Reviewer cache monitoring: in-run emit + scheduled collector#57
Draft
kacper-mikolajczak wants to merge 2 commits into
Draft
Reviewer cache monitoring: in-run emit + scheduled collector#57kacper-mikolajczak wants to merge 2 commits into
kacper-mikolajczak wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stacked on the cache-prefix change so this diff is just the monitoring. Split into two parts so analysis/alerting lives out of the review hot path.
1. In-run (minimal) —
emit-cache-usage.shA tiny step in the reviewer workflow that parses the action's
execution_file(always written, noshow_full_output) and prints one counts-only line to the log:No message content → safe in public logs. No analysis, no threshold, no failure.
2. Out-of-band collector —
reviewer-cache-monitor.yml+collect-cache-health.shA scheduled workflow (hourly + manual dispatch) that:
claude-review.ymlruns, reads their logs (only — no artifacts/content), greps theCACHE_USAGEline,Tunables:
LOOKBACK(30),CACHE_CREATION_WARN_TOKENS(15K),COLD_ALERT_PCT(40),MIN_SAMPLE(10).Why this shape
echoper review, no per-run analysis.Validated locally: emit produces the line for warm (creation 1.4K / read 333K) and cold (creation 64K) execution files; collector parse + threshold logic checked; both workflows parse as valid YAML.