mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 22:02:59 -07:00
4810e7794b
This PR implements several critical improvements to repository health monitoring and automated triage workflows. ### Summary of Changes 1. **Backlog Age Metric**: Added `tools/gemini-cli-bot/metrics/scripts/backlog_age.ts` to measure the median and P90 age of open issues and PRs. This addresses the "Survivorship Bias" in current latency metrics, which only sample recently closed items. 2. **Metrics Persistence**: Fixed a bug in `tools/gemini-cli-bot/metrics/index.ts` that limited the timeseries history to 100 lines (effectively ~2 runs). Increased to 5000 lines to preserve historical trends. 3. **Robust Stale Closer**: Upgraded `.github/workflows/gemini-scheduled-stale-issue-closer.yml` to a 2-phase system (Mark as Stale -> Close). This centralized logic replaces the throttled default stale action and includes robust human activity detection. 4. **Triage Bug Fix**: Fixed a critical bug in `.github/workflows/unassign-inactive-assignees.yml` where a missing `for` loop caused the script to fail. 5. **Policy Consolidation**: Disabled issue staleness in `.github/workflows/stale.yml` to avoid conflicts with the new custom 2-phase closer. ### Why this is recommended - **Data-Driven Triage**: Without backlog age metrics, we were blind to the "Slow Path" backlog that is growing despite fast "recently closed" latency. - **Automated Hygiene**: The broken and throttled triage workflows were allowing the backlog to grow unchecked (now at 2351 issues). These fixes restore automated pruning. - **Metrics Reliability**: Expanding the timeseries window ensures that deltas and trends are calculated against stable historical data. ### Impact - **Backlog Visibility**: New metrics will show the real age of open items. - **Throughput**: Increased stale closer throughput will begin reducing the 2300+ issue backlog. - **Reliability**: Automated unassignment of inactive contributors will keep "help wanted" items moving.