Operator limits: one clear pull request notice when a review is refused
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github, typescript
Direzione di ricerca
Start from the claim path that refuses a job with quota_exhausted or workspace_suspended, which depends on #277 and should be merged first. Add a small notice module with its dedupe table, using the existing provider client and the fake GitHub review API for comment endpoints, and put the English text in src/copy/. Done means T01 to T10 pass, with one comment per pull request and period, no untrusted text, and no notice when GitHub refuses or the instance has no entitlements.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #268. Depends on #277.
Problem
A review refused for a limit or a suspension (#277) ends as a failed run on the Runs page. The people who care are on the pull request, not on the Runs page: from where they stand the bot has gone silent. The refusal needs a short, clear message on the pull request, once, without creating any cost or confusion on every push.
Behavior
- When the claim refuses a job with
quota_exhaustedorworkspace_suspended, the app posts one comment on that pull request with the bot's identity, using the installation token of the job's connection (the same way the app already gets installation access for a job; no runner is involved, no model is called). It is best effort: a failure to post does not change the job's outcome and is logged with the code only. - One per pull request and period. Further pushes and manual reviews on the same pull request in the same period do not post again; the next period (a later
period_start) may post again. A small record keyed by workspace, repository, pull request number and period start provides this; the comment carries a hidden marker so a second app instance does not duplicate it. - Text (English, in
src/copy/): says that this workspace has used the reviews included for the current period (or that reviews are paused for this workspace), that no review ran for this change, and who can act (the workspace's Owners and Admins). No amounts, no figures, no reasons for a suspension, no counts of other pull requests. If the instance has configured a plan page (#284), a link to the app's plan page of the workspace (/w/<slug>/settings/plan, #282) may be included; without it, no link. - Pull request titles, branch names and descriptions are untrusted and never appear in the text. A closed pull request, or a draft that automatic review skips, gets no notice.
- The comment is not edited or deleted when the limit later lifts: the next review's own comment follows it.
- Settings for notices: always on when an entitlement refuses; no switch.
Scope
A small notice module and its dedupe table (scoped repository, classified in scoping.test.ts), the GitHub write through the existing provider client, the fake GitHub review API (already has comment endpoints), copy, docs.
Out of scope
Notices for other refusals (llm_not_configured, gate off), editing or removing old notices, email, notifications outside GitHub.
Test cases
| ID | kind | level | case | expected |
|---|---|---|---|---|
| T01 | behavior | integration | a job refused with quota_exhausted |
exactly one comment on the pull request via the fake GitHub; no runner credential, no model call |
| T02 | behavior | integration | a second push and a manual review on the same pull request in the same period | no second comment |
| T03 | behavior | integration | period_start moves forward and the limit is hit again |
a new comment is allowed |
| T04 | behavior | integration | workspace_suspended |
a neutral comment with no reason |
| T05 | security | unit | comment text | contains no amount, count, reason or untrusted pull request text |
| T06 | negative | integration | GitHub refuses the comment (403, 404, timeout) | job outcome unchanged, one log line with the code, no retry storm |
| T07 | behavior | integration | closed pull request, or a draft skipped by automatic review | no comment |
| T08 | security | integration | two app instances refuse the same job concurrently | one comment (marker or dedupe record) |
| T09 | behavior | integration | no plan page configured | no link in the text |
| T10 | regression | integration | an instance with no entitlements | never posts such a comment |
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 ExpidetGames/code-reviewer
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ExpidetGames/code-reviewer#585 ·
-
Flaky: models.dev refresh 'lets one of two runs at the same time work' on Postgres (#548-T03)Apertaarea: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ExpidetGames/code-reviewer#584 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ExpidetGames/code-reviewer#464 ·
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ExpidetGames/code-reviewer#308 ·
-
type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tutte le issue di ExpidetGames/code-reviewer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kunchenguid/gh-axi#247 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lidge-jun/opencodex#8101 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
effort:S P3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightscout/nocturne#3243 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
JuliusBrussee/caveman#1449 ·
I maintainer di solito rispondono entro 1 giorno