Review providers
Review providers are in alpha and available by request. Behavior, fields, and limits can change without notice. Ask your Inspect contact to turn them on for your organization.
A review provider is an automated code reviewer that is not built into Inspect: a GitHub App that posts inline pull request review comments and check runs. Inspect shows any GitHub App's comments and checks already. Registering the app as a provider, and having it follow the format on this page, adds:
- A row for the provider in a pull request's Reviews menu, with its status and open findings counted by severity.
- The provider's summary and open findings, grouped by severity, when you select the row.
- Auto-fix by severity: Inspect fixes critical and warning findings and skips the rest.
- With the status API: a status, message, and summary that come from the provider directly, including when a review fails.
- With a webhook: Run review, Re-run review, and Retry review in the provider row, and the reason when someone resolves a finding.
Inspect does not decide whether a review blocks a merge. To gate merges, the provider posts its own check run and the organization marks it required in GitHub branch protection.
Without registration
A GitHub App that posts inline review comments and check runs already gets this, with no setup:
- Its inline comments appear in Inspect's diff views and comment list, grouped by file, with per-file counts.
- People can reply to, resolve, or Address this on its comments from Inspect. Replies and resolutions go to GitHub.
- Its check runs appear with their GitHub status.
- A pull request author can auto-fix comments from robot reviewers, or from this bot specifically, in Fix Pull Request review findings. Without registration that covers all of the bot's comments, because Inspect cannot tell a critical finding from a nit.
Register a provider
Someone with the Manage code review role or Admin registers the provider in Settings → Review agent under Review providers:
| Field | Type | Description |
|---|---|---|
| Display name | string | Shown in the Reviews menu. Up to 80 characters. |
Slug | string | 3 to 40 lowercase letters, digits, and hyphens, starting and ending with a letter or digit, such as acme-review. It cannot change. |
| GitHub App ID | number | The numeric ID of the app that posts the check runs and comments. |
| GitHub App slug | string | The app's URL name, as in github.com/apps/acme-review. Inspect identifies the app's comments by its bot user, acme-review[bot]. |
| Logo URL | string | Optional https:// image URL. |
Repositories | string[] | Up to 500 owner/name repositories the provider reviews. Leave empty for all repositories. |
| Webhook URL | string | Optional HTTPS URL that receives webhooks from Inspect. |
The GitHub App must be installed on those repositories with checks: write and pull_requests: write.
Trust rules
- Inspect uses only check runs created by the registered GitHub App.
- Inspect reads a finding marker only from a comment the app's bot user wrote.
- If a person edits a finding comment, Inspect ignores its marker until the app edits the comment again.
Markers are visible to anyone who can read the pull request. Do not put secrets or private data in them.
Report status with a check run
Create a check run from your GitHub App for each commit you review.
| Field | Type | Description |
|---|---|---|
name | string | Your reviewer's name, such as Acme Review. Keep it stable; branch protection matches checks by name. |
head_sha | string | The commit you reviewed. |
status | 'queued' | 'in_progress' | 'completed' | The check run status. |
conclusion | string | Your choice. Inspect shows it as is. |
details_url | string | A link to the review in your product. The provider row links to it. |
output.summary | string | Your summary in Markdown. Inspect shows the first 16 KB. |
The provider row reflects your app's newest check run on the pull request:
status: queuedshows Queued.status: in_progressshows Reviewing.status: completedwithconclusion: cancelledortimed_outshows Did not finish.status: completedwith any otherconclusionshows your finding counts, or No findings.- A check run on a commit that is not the pull request head shows Outdated review.
If your review stops on an error, complete the check run with cancelled or timed_out so Inspect does not show it as finished. Check runs on merge queue commits are ignored.
The row appears once Inspect receives a check run from your app for the pull request, or once the pull request has an open finding from your app. With a webhook turned on, the row always appears, as Not reviewed yet until you report a status, so people can start a review.
Report status with the API
Instead of a check run, the provider can send its review status to Inspect directly. Use this to show a failure reason, or when your review is not a check run. Findings still come from inline comments.
API key
Select Create API key for the provider in Review providers and give the key (rip_…) to the provider. Inspect shows it once, and it works only for this provider. Rotate API key replaces it and the old key stops working immediately.
Authorization: Bearer rip_...Send a status
Send the full current state of your review of one commit, each time it changes.
PUT /api/v2/review-providers/{provider}/repos/{owner}/{repo}/pulls/{number}/reviews/{sha}
Content-Type: application/json
{
"status": "completed",
"updated_at": "2026-10-22T14:03:11Z",
"message": "3 findings",
"summary_markdown": "Found one retry loop with no upper bound.",
"details_url": "https://acme.example/reviews/7781"
}{provider} is your slug and {sha} is the full 40-character lowercase commit SHA you reviewed. Use the same host as the Inspect web app.
| Field | Type | Required | Description |
|---|---|---|---|
status | 'queued' | 'running' | 'completed' | 'failed' | 'canceled' | Yes | The review status. |
updated_at | string | Yes | When you produced this state, RFC 3339 with at most millisecond precision. Inspect never applies an update older than the one it has. |
message | string | No | One line, up to 200 characters, shown in the provider row. |
summary_markdown | string | No | Markdown summary, up to 16 KB. |
details_url | string | No | An https:// link to the review in your product, up to 2,048 characters. |
error_message | string | No | Up to 2,000 characters. Shown in place of message when status is failed. |
Unknown fields are rejected. The response is {"data": {"applied": true, "reason": null, "review": {...}}}. If updated_at is older than the state Inspect has for that commit, Inspect keeps the newer state and returns {"data": {"applied": false, "reason": "stale_update", "review": null}}; do not retry it. An update with the same updated_at applies again, so retries are safe.
GET on the same URL returns your stored state. GET .../pulls/{number}/reviews returns your 50 most recently updated reviews of the pull request. Each review has outdated: true when its commit is no longer the pull request head.
How Inspect shows it
When you send an API status for the pull request head, it takes the place of any check run on the same head. An open pull request page updates as soon as Inspect stores it.
queuedshows Queued.runningshows Reviewing.completedshows your finding counts, or No findings.failedorcanceledshows Did not finish, with yourerror_messageormessage, and Retry review if you have a webhook.- A status on a commit that is not the pull request head shows Outdated review.
The API status does not appear among checks and does not block merges. To gate merges, also post a check run.
Errors
Errors return {"message": "...", "code": "..."}. invalid_payload errors also include issues.
| Status | code | Meaning |
|---|---|---|
400 | invalid_payload | The body does not match the schema. issues lists the fields. |
400 | invalid_sha | {sha} is not a full 40-character lowercase commit SHA. |
400 | invalid_updated_at | updated_at is not RFC 3339 with at most millisecond precision. |
401 | invalid_key | The key is missing, wrong, rotated, or for another provider, or review providers are off for the organization. |
403 | repository_not_allowed | The repository is not in the provider's Repositories. |
404 | repository_not_registered | Inspect does not know the repository. |
404 | pull_request_not_found | Inspect does not know the pull request. |
404 | review_not_found | GET only: you have not sent a status for this commit. |
Retry 5xx responses with the same body.
Report findings with inline comments
Post each finding as an inline pull request review comment with a finding marker at the end of the body. GitHub supplies the file, line, and commit.
The retry loop has no upper bound. A poisoned message blocks the queue.
<!-- inspect-review:v1 {"severity":"warning","auto_address":true} -->| Field | Type | Required | Default | Description |
|---|---|---|---|---|
severity | 'critical' | 'warning' | 'suggestion' | 'informational' | Yes | How serious the finding is. | |
auto_address | boolean | No | true for critical and warning, false for the others | Whether Inspect may fix the finding automatically. |
category | string | No | Free text up to 64 characters, such as security. |
The Reviews menu counts your open findings on the pull request across all commits. The comment is the finding:
- Edit the comment to change its text or severity.
- If the issue persists on a new commit, keep the existing comment. A second comment for the same issue is counted twice.
- When the issue is fixed or no longer applies, resolve the thread or delete the comment, and Inspect stops counting it.
A thread that a person resolves counts as addressed too.
Marker rules
- Use exactly one marker per comment. Markers inside fenced code blocks are ignored.
- The JSON must be one object of at most 4 KB.
- The JSON cannot contain
--, which would end the HTML comment. Escape one hyphen as\u002dwhen a string needs two in a row. - Unknown fields are ignored, and new optional fields can appear in
v1. A breaking change will use a new marker name, such asinspect-review:v2. - An invalid marker never breaks the pull request. Inspect shows the comment as an ordinary bot comment.
Auto-fix
A pull request author turns on auto-fix in Fix Pull Request review findings in Settings → Agent, for Robot reviewers or for your bot as a specific identity. For a registered provider's marked findings, Inspect then:
- Fixes
criticalandwarningfindings. - Skips
suggestionandinformationalfindings, unless the marker sets"auto_address": true. - Never fixes a finding whose marker sets
"auto_address": false, even when the author allowed your bot by identity.
An Ignore rule for your bot still wins. Comments without a marker follow the author's setting for robot reviewers.
Receive webhooks from Inspect
A provider with a webhook receives:
review.requestedwhen someone selects Run review, Re-run review, or Retry review in the provider row.review.finding_feedbackwhen someone resolves one of the provider's marked finding comments with a reason.
Set up the webhook
- Enter the provider's Webhook URL. It must be HTTPS on a public host name; IP addresses and names like
localhost,*.local,*.internal, or hosts without a dot are rejected. - Select Create secret and give the secret (
whsec_…) to the provider. Inspect shows it once. - To change it, select Rotate secret. For 24 hours after a rotation, Inspect signs each webhook with both the old and new secret, so the provider can switch without missed deliveries.
Run review appears only when the webhook has a URL and a secret and is on.
Delivery
Inspect sends a POST with a JSON body and these Standard Webhooks headers:
| Field | Type | Description |
|---|---|---|
webhook-id | string | The delivery ID, the same on every retry of a delivery. Use it to drop duplicates. |
webhook-timestamp | string | Unix seconds when Inspect signed the request. |
webhook-signature | string | v1,<base64 signature>. During a secret rotation, two signatures separated by a space. |
Every body has type, schema_version (currently 1), delivery_id (equal to webhook-id), occurred_at, and organization.id, the ID of the Inspect organization that sent it.
Verify the signature
The signed content is {webhook-id}.{webhook-timestamp}.{raw body}. The HMAC-SHA256 key is the base64-decoded part of the secret after whsec_. Sign the raw request body, never re-serialized JSON, and reject timestamps more than 5 minutes old.
import base64, hashlib, hmac, time
def verify(secret: str, headers: dict, body: bytes) -> None:
msg_id = headers["webhook-id"]
ts = headers["webhook-timestamp"]
if abs(time.time() - int(ts)) > 300:
raise ValueError("stale timestamp")
key = base64.b64decode(secret.removeprefix("whsec_"))
signed = f"{msg_id}.{ts}.".encode() + body
expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode()
for candidate in headers["webhook-signature"].split():
version, _, sig = candidate.partition(",")
if version == "v1" and hmac.compare_digest(sig, expected):
return
raise ValueError("bad signature")review.requested
{
"type": "review.requested",
"schema_version": 1,
"delivery_id": "dlv_V1StGXR8Z5jdHi6BmyT",
"occurred_at": "2026-10-22T14:03:05.000Z",
"organization": { "id": "3f6c2a8e-9b1d-4e7a-8c5f-2d0b9e4a7c13" },
"trigger": "inspect_ui",
"actor": { "github_login": "jdoe" },
"repository": { "github_id": 5521, "full_name": "acme/api" },
"pull_request": { "number": 812, "base_ref": "main", "draft": false },
"sha": "9c1e5d0b7a2f4e1c8d3b6a5f0e9d8c7b6a5f4e3d"
}sha is the pull request's head when the person made the request. Review that commit and report it. trigger is always inspect_ui. Two requests for the same pull request and sha ask for the same review, so you can ignore the second while the first runs.
review.finding_feedback
{
"type": "review.finding_feedback",
"schema_version": 1,
"delivery_id": "dlv_8c1rWq0Yb4KpN2sTz7a",
"occurred_at": "2026-10-22T14:09:41.000Z",
"organization": { "id": "3f6c2a8e-9b1d-4e7a-8c5f-2d0b9e4a7c13" },
"github_comment_id": 1987654321,
"comment_url": "https://github.com/acme/api/pull/812#discussion_r1987654321",
"reason": "incorrect",
"note": null,
"actor": { "github_login": "jdoe" },
"repository": { "full_name": "acme/api" },
"pull_request": { "number": 812 }
}Inspect sends this only for a comment your bot wrote with a valid finding marker. note is free text up to 2,000 characters, or null.
reason is one of these, shown in Inspect as the label after it:
addressed: Fixed itincorrect: Incorrectnot_relevant: Not relevantnoise: Too minorwont_fix: Won't fixstale: Outdated
Responses and retries
2xx: Inspect records the delivery as done.408,429,5xx, no answer in 10 seconds, or a connection error: Inspect retries with exponential backoff, starting at 1 minute and capped at 1 hour, for up to 24 hours.410: Inspect stops and turns off the webhook. Saving the provider's webhook URL turns it on again.- Any other status, including a redirect: Inspect stops. It does not follow redirects.
Delivery is at least once and can arrive out of order. When a delivery stops, the provider's entry in Review providers shows the last failure and its HTTP status.
Launch checklist
- The organization has your GitHub App ID and slug, and the app has
checks: writeandpull_requests: write. - You post one check run per reviewed commit and complete it with
cancelledortimed_outwhen the review fails, or you send every status change to the status API with a newupdated_at. - Each finding comment ends with a marker, is edited in place on later commits, and has its thread resolved once fixed.
- If organizations want a merge gate, your check run has a stable name they can require in branch protection.
- If you have a webhook, you verify the signature on the raw body and drop duplicates by
webhook-id.