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

オープン
#1,312 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
github, typescript
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
4.9k
フォーク
749
平均マージ
9時間 25分
マージ済み PR(30日)
74

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

chaitin/MonkeyCode のほかの issue

chaitin/MonkeyCode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。