GitHub Review Bot webhook returns 200 OK but no review task is created

Aperta
#1,312 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
github, typescript
Ambito
api, backend

Direzione di ricerca

Start at the GitHub webhook handler and trace pubhost.PickHost() through ReviewAgent.ModelID lookup, review image selection, VM creation, and the GitTaskUsecase.Create transaction. Check backend logs for the reported account and Git Bot, including transaction rollbacks and task-slot allocation. Done means an accepted pull_request.opened event creates a visible Review Task and runs the cloud review.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feedback details:

I am configuring the hosted MonkeyCode GitHub Review Bot for a private GitHub repository.

Environment:

  • Hosted MonkeyCode: monkeycode-ai.net
  • Git platform: GitHub
  • Host: MonkeyCode Built in
  • Repository: private GitHub repository
  • MonkeyCode Global GitHub App is installed
  • Repository is explicitly selected in the GitHub App installation
  • GitHub App has read/write access to code, issues, pull requests, repository hooks, workflows and actions
  • A separate MonkeyCode Git Bot was created in /console/gitbot
  • GitHub PAT is limited to the repository and has Contents Read/Write and Pull Requests Read/Write

Observed behavior:

  1. GitHub webhook is configured with the webhook URL generated by MonkeyCode.
  2. Secret signing is enabled.
  3. Only pull_request events are enabled.
  4. A pull_request.opened event is delivered successfully.
  5. GitHub reports HTTP 200 from MonkeyCode.
  6. Response body is exactly:

ok

  1. Redelivering the same pull_request.opened event also returns HTTP 200 / ok.
  2. /console/gitbot -> Review tasks remains empty.
  3. No MonkeyCode review task is created.
  4. No review comment is posted on the PR.
  5. Mentioning @monkeycode-ai on the PR also produced no task or response.

The GitHub webhook transport therefore appears to work, but Git task creation does not occur after the webhook is accepted.

Could you please check the backend logs for this account/Git Bot and specifically verify failures around:

  • pubhost.PickHost
  • ReviewAgent.ModelID
  • review model lookup
  • GitTaskUsecase.Create
  • VM creation
  • Basic-plan concurrency / task-slot allocation

Expected result:

A pull_request.opened event accepted by the configured MonkeyCode Git Bot should create a visible Review Task in /console/gitbot -> Review tasks and run the cloud review without requiring an open browser session.

Additional source-level findings

I checked the current implementation more closely:

PR dedup is SETNX("pr_review:" + pr.HTMLURL, ..., 5 minutes). Therefore manual redeliveries of the same PR within 5 minutes are intentionally skipped before host selection. Our failing redelivery occurred outside that window, so dedup does not explain the observed failure.
PublicHostUsecase.PickHost() loads the public-host pool, calls taskflow.Host().IsOnline, and only considers hosts where OnlineMap[host.ID] == true and Weight > 0. If none qualify it returns no online public hosts found.
The GitBot-selected host is not used by the GitHub webhook path; the handler always calls pubhost.PickHost().
Review model resolution is server-side via cfg.ReviewAgent.ModelID. Invalid UUID yields failed to parse model id; missing DB model yields review model not found.
Review VM creation also depends on server-side cfg.ReviewAgent.Image.
Task/GitTask/VM/GitBotTask creation is wrapped in a transaction. A VM creation failure can therefore roll back the records entirely, which would explain why /console/gitbot -> Review tasks remains empty rather than showing a failed task.

Given the accepted webhook (200 ok) and no visible task, please check logs around:
PickHost() → review model lookup → review image / VM creation → transaction rollback.

Current UID: b69f3303-7ce5-41e7-a9e8-be3f213dbeaf

Lingua principale
TypeScript
Stelle
4.9k
Fork
749
Merge medio
9h 25m
PR unite (30g)
74

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di chaitin/MonkeyCode

Tutte le issue di chaitin/MonkeyCode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.