# Reviews

> Gather findings from CodePanel, GitHub review bots, people and webhooks into one deduplicated list. Fix or dispute each, and BareCI answers the reviewer.

Source: https://bareci.com/docs/modules/reviews

Reviews turns every reviewer's output into one list of findings for a pull request, merges the duplicates, and gives agents one loop: read the findings, fix or dispute each, and resolve it. BareCI posts the answer back to every reviewer that raised it, in that reviewer's own channel.

## Reviewers

| Reviewer         | How BareCI reads it                                                                                                                                               |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GitHub (default) | Each review thread is a finding; a "changes requested" review with a body is a finding about the whole change. Any bot or person works with no adapter of its own |
| CodePanel        | Through its API, with a CI-scoped token per repository                                                                                                            |
| Webhook          | A reviewer pushes findings to BareCI and receives `review_requested`, `reply` and `resolved` events, signed both ways                                             |

For GitHub threads, severity comes from a leading tag such as `**High:**`, `[nit]` or `P1`; untagged comments are medium. A ` ```suggestion ` block becomes the fix hint.

## A finding

Every finding has a file, lines, severity, category, title, body, fix hint, the reviewers that raised it, its sources and a status:

| Status      | Meaning                                   |
| ----------- | ----------------------------------------- |
| `open`      | Not answered yet                          |
| `fixed`     | Fixed in a commit                         |
| `disputed`  | Rebutted with a reason                    |
| `dismissed` | A person accepted the dispute             |
| `resolved`  | Every reviewer that raised it resolved it |

A finding **blocks** when it is open at a blocking severity, or disputed when the policy says disputes need a person.

## Deduplication

Findings from different reviewers merge when they are in the same file within 3 lines and their words overlap. The merged finding keeps every source, takes the highest severity, and keeps its id when another reviewer reports it later.

## The agent loop

```sh
bareci findings
bareci resolve f_3 --sha 4e1c9a2
bareci resolve f_7 --reason "the guard is in the caller"
```

`bareci resolve <id>` marks a finding fixed in a commit (`--sha`, default `HEAD`) or, with `--reason`, disputed. `bareci findings fix <id>` and `bareci findings rebut <id> --reason …` do the same.

Over MCP: `findings`, then `finding_resolve` with `{status: "fixed", sha}` or `{status: "disputed", reason}`. A fix replies in the GitHub thread and resolves it; a dispute replies and leaves the thread to its author. CodePanel findings are rated fixed or rebutted.

`bareci review` (or `reviews_request`) asks the reviewers to review the head now.

## Policy

Per repository:

| Setting                | Default                                        |
| ---------------------- | ---------------------------------------------- |
| `reviewers`            | GitHub only                                    |
| `blockingSeverities`   | critical, high, medium                         |
| `requiredReviewers`    | none                                           |
| `disputeNeedsApproval` | whether a dispute needs a person to dismiss it |

Read it with `review_config`. See the [Reviews API](https://bareci.com/docs/api/reviews).
