mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-04 23:27:00 -07:00
# Proactive Improvement: Backlog Health & Stale Policy Optimization
## Overview
This PR addresses a significant growth in the repository's open issues (2342) and PRs (440) by optimizing the automated stale policy and adding visibility into backlog health.
## Changes
1. **New Metrics**:
- `backlog_health.ts`: Tracks the median age (in days) of the 100 oldest open PRs and issues. This provides a "worst-case" signal for backlog stagnation.
- `stale_ratio.ts`: Tracks the percentage of open items currently labeled as `stale`.
2. **Stale Policy Optimization**:
- Increased `operations-per-run` in `.github/workflows/stale.yml` from default (~30) to 500 total (300 for issues, 200 for PRs).
- Split the stale job into two parallel jobs (`stale-issues` and `stale-prs`) to increase daily throughput and prevent issues from blocking PR processing.
## Rationale
Metrics analysis showed that while the repository has excellent "Fast Path" performance (PRs merged in ~23 hours), it has a massive "Slow Path" backlog that is likely not being touched by automation due to default throttling in `actions/stale`. By increasing the processing limit, we can accelerate the cleanup of stale items and help maintainers focus on active work.
## Impact
- **Productivity**: Reduces "noise" in the issue tracker and PR list.
- **Observability**: New metrics will allow the "Bot Brain" to monitor the effectiveness of these policy changes over time.
- **Latency**: Expected to decrease the median age of open items as stale ones are closed.
This commit is contained in:
+27
-21
@@ -7,38 +7,44 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner:
|
||||
- 'ubuntu-latest' # GitHub-hosted
|
||||
runs-on: '${{ matrix.runner }}'
|
||||
if: |-
|
||||
${{ github.repository == 'google-gemini/gemini-cli' }}
|
||||
stale-issues:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'google-gemini/gemini-cli'
|
||||
permissions:
|
||||
issues: 'write'
|
||||
pull-requests: 'write'
|
||||
concurrency:
|
||||
group: '${{ github.workflow }}-stale'
|
||||
cancel-in-progress: true
|
||||
issues: write
|
||||
steps:
|
||||
- uses: 'actions/stale@5bef64f19d7facfb25b37b414482c7164d639639' # ratchet:actions/stale@v9
|
||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # ratchet:actions/stale@v9
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: >-
|
||||
This issue has been automatically marked as stale due to 60 days of inactivity.
|
||||
It will be closed in 14 days if no further activity occurs.
|
||||
stale-pr-message: >-
|
||||
This pull request has been automatically marked as stale due to 60 days of inactivity.
|
||||
It will be closed in 14 days if no further activity occurs.
|
||||
close-issue-message: >-
|
||||
This issue has been closed due to 14 additional days of inactivity after being marked as stale.
|
||||
If you believe this is still relevant, feel free to comment or reopen the issue. Thank you!
|
||||
days-before-stale: 60
|
||||
days-before-close: 14
|
||||
exempt-issue-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap,needs-triage,waiting-on-maintainer,status: blocked'
|
||||
operations-per-run: 300
|
||||
only-issues: true
|
||||
|
||||
stale-prs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'google-gemini/gemini-cli'
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # ratchet:actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: >-
|
||||
This pull request has been automatically marked as stale due to 60 days of inactivity.
|
||||
It will be closed in 14 days if no further activity occurs.
|
||||
close-pr-message: >-
|
||||
This pull request has been closed due to 14 additional days of inactivity after being marked as stale.
|
||||
If this is still relevant, you are welcome to reopen or leave a comment. Thanks for contributing!
|
||||
days-before-stale: 60
|
||||
days-before-close: 14
|
||||
exempt-issue-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap'
|
||||
exempt-pr-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap'
|
||||
exempt-pr-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap,needs-triage,waiting-on-maintainer,status: blocked'
|
||||
operations-per-run: 200
|
||||
only-prs: true
|
||||
|
||||
Reference in New Issue
Block a user