mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 06:12:50 -07:00
6ec068c2ab
Fix Metrics History Retention & Accuracy This PR addresses several issues identified in the repository's metrics collection and analysis pipeline: 1. **Increased History Retention**: Increased the rolling window in `metrics/index.ts` from 100 rows to 5000 rows. The previous limit was too small (holding only ~1.5 runs of data), which prevented meaningful delta calculations. 2. **Restored Backlog Age Metric**: Re-introduced `backlog_age.ts` to calculate the average age of the oldest 100 open issues. This provides visibility into backlog stagnation. 3. **Enhanced Throughput Accuracy**: Updated `throughput.ts` to distinguish between items **authored** by maintainers and items **processed** (merged/closed) by maintainers. This gives a more accurate measure of maintainer velocity. 4. **Added Bottleneck Analysis**: Introduced `bottlenecks.ts` to sample open PRs and identify if they are likely waiting on a maintainer review or an author's response. These changes will significantly improve the "Brain's" ability to identify trends and bottlenecks in the repository workflow. # Impact - More accurate 7-day and 30-day deltas for all metrics. - Better visibility into maintainer workload and backlog health. - Data-driven identification of whether bottlenecks are due to maintainer capacity or author responsiveness.