[BUG] Repository health merge rate can exceed 100%
I maintainer di solito rispondono entro 1 giorno
@Dhruvdesai793 ci sta già lavorando.
Dal 3/12/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github, next.js, typescript
- Ambito
- analytics, backend-api-design
Direzione di ricerca
Start with the GraphQL query and date filters in src/app/api/metrics/repo-health/route.ts, then read the existing score tests in test/repo-health-scoring.test.ts. Add a route test with older PRs merged during the window and PRs opened during it, as the issue describes. Done means the API computes the rate from a consistent cohort and returns a value from 0 to 1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Repository health divides PRs merged during the selected window by PRs opened during that window. Those are different cohorts: a PR opened earlier but merged now is included in the numerator and omitted from the denominator.
For example, if two older PRs merge during the window and one PR is opened but remains open, the API returns a merge rate of 2.0 (200%). This makes the displayed metric misleading and can overstate the health score.
Source: the GraphQL query fetches recent opened PRs and merged PRs separately (route query); the route filters them using different timestamps and divides mergedCount by opened.length (calculation). Expected: calculate the rate over a consistent PR cohort and keep the returned value within 0–1.
Steps to reproduce
- Use a repository with at least two PRs opened before the selected period that merge during it.
- Have one additional PR opened during the period that is still open.
- Sign in and load Dashboard → Repository Health for that repository.
- Inspect the response from GET /api/metrics/repo-health?days=30.
- The route can return prMergeRate: 2 (200%) because it counts the two older merged PRs over the one newly opened PR.
Where is it?
Dashboard overview
Where did you see it?
Local development
Browser and device
Not browser-specific; server-side API data.
Screenshots, console errors or logs
No screenshot or runtime log applies. This is based on the route's date filters and division; the example above is arithmetic from those inputs, not a live API capture. I did not run tests for this report to avoid using the shared checkout while another contributor is working. Existing test/repo-health-scoring.test.ts covers scorePrMergeRate inputs, including clamping values above 1, but does not test how the API builds the rate from PR dates. A route test should mix older PRs merged in-range with PRs opened in-range and assert a coherent rate.
Want to fix it?
- I'd like to work on this. A maintainer will assign you; please don't start before that.
- Lingua principale
- TypeScript
- Stelle
- 246
- Fork
- 436
- Merge medio
- 9h 33m
- PR unite (30g)
- 213
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Priyanshu-byte-coder/devtrack#4067 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Priyanshu-byte-coder/devtrack#4066 ·
I maintainer di solito rispondono entro 1 giorno
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalForse già presa @Nandaninaulaa l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:design
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshForse già presa @KartikeyG-world l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:design
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Goals: the error banner and the "No goals yet" hint show at the same timeForse già presa @KartikeyG-world l’ha presa 4 giorni fa. Apertagood first issue level 1 level:beginner status:assigned type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Priyanshu-byte-coder/devtrack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
提出物確認の詳細で状態バッジの重複と期限切れの欠落を直すApertaCodex使用可 かんたん コード
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ryuki-moro/Nicomaru#348 ·
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
openclaw/openclaw#211919 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno