Skip to content

# Proactive Improvement: Backlog Health & Stale Policy Optimization#26302

Draft
gemini-cli-robot wants to merge 2 commits into
mainfrom
bot/productivity-updates-20260430233504-25194369122
Draft

# Proactive Improvement: Backlog Health & Stale Policy Optimization#26302
gemini-cli-robot wants to merge 2 commits into
mainfrom
bot/productivity-updates-20260430233504-25194369122

Conversation

@gemini-cli-robot
Copy link
Copy Markdown
Collaborator

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.

## 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.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Size Change: -4 B (0%)

Total Size: 33.9 MB

Filename Size Change
./bundle/chunk-6T7LODRD.js 0 B -12.5 kB (removed) 🏆
./bundle/chunk-JKKHUHFA.js 0 B -3.8 kB (removed) 🏆
./bundle/chunk-MWHJZNC5.js 0 B -2.72 MB (removed) 🏆
./bundle/chunk-OM6PKJAW.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-QUZ45LFB.js 0 B -14.7 MB (removed) 🏆
./bundle/chunk-RPWGWKL2.js 0 B -657 kB (removed) 🏆
./bundle/chunk-SQOJE6BH.js 0 B -19.5 kB (removed) 🏆
./bundle/chunk-WEBZVAAD.js 0 B -49.2 kB (removed) 🏆
./bundle/core-LT6732JI.js 0 B -48.2 kB (removed) 🏆
./bundle/devtoolsService-MSSLNJIW.js 0 B -28 kB (removed) 🏆
./bundle/gemini-EZJRMIUT.js 0 B -582 kB (removed) 🏆
./bundle/interactiveCli-J7VSCHNV.js 0 B -1.32 MB (removed) 🏆
./bundle/liteRtServerManager-S6K35VP4.js 0 B -2.11 kB (removed) 🏆
./bundle/oauth2-provider-AIKDFEYV.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-B37HSR6L.js 3.8 kB +3.8 kB (new file) 🆕
./bundle/chunk-BE5Q2ULQ.js 14.7 MB +14.7 MB (new file) 🆕
./bundle/chunk-DH45F7XA.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-ES5Y6GJH.js 657 kB +657 kB (new file) 🆕
./bundle/chunk-TIJB5IVB.js 2.72 MB +2.72 MB (new file) 🆕
./bundle/chunk-U4X5OZJB.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/chunk-VQANU2IC.js 12.5 kB +12.5 kB (new file) 🆕
./bundle/chunk-ZVLB3QPX.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/core-X3HCKR4V.js 48.2 kB +48.2 kB (new file) 🆕
./bundle/devtoolsService-YG5SNLDT.js 28 kB +28 kB (new file) 🆕
./bundle/gemini-LSTUGRPA.js 582 kB +582 kB (new file) 🆕
./bundle/interactiveCli-WCXUDIOA.js 1.32 MB +1.32 MB (new file) 🆕
./bundle/liteRtServerManager-RLTU4CAZ.js 2.11 kB +2.11 kB (new file) 🆕
./bundle/oauth2-provider-S5KGACHV.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-533APETE.js 1.97 MB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-L5DUC55V.js 0 B -932 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.14 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-LIJKMASE.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/start-ZJQDOAYH.js 0 B -652 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-CO33EHIH.js 932 B +932 B (new file) 🆕
./bundle/start-4DRGNQT3.js 652 B +652 B (new file) 🆕

compressed-size-action

@gundermanc
Copy link
Copy Markdown
Member

@gemini-cli please fix the linter error in this PR.

@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli Bot commented Apr 30, 2026

I've fixed the linter error in backlog_health.ts. The PR has been updated and should now pass CI.

@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli Bot commented Apr 30, 2026

Fixed the prefer-const linter error in backlog_health.ts as requested. Verified with npm run lint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants