# Learning and review quality

> How MergeHarbor learns what your team cares about from fixes, reactions, replies and your reviewers' own comments, and how to see and undo what it learned.

MergeHarbor adjusts to each team. It watches how people respond to its comments and how they review each other's code. It keeps doing what gets acted on and holds back what keeps being passed over.

## What it learns from

| Signal                   | What MergeHarbor records                                                                                                                                                                                         |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fixes                    | A comment whose lines changed before the pull request merged counts as **acted on**. A comment still unchanged at merge counts as **passed over**.                                                               |
| Reactions                | Thumbs up and thumbs down on its comments.                                                                                                                                                                       |
| Dismissals               | A comment dismissed in the console, with the reason given (wrong, not applicable, won't fix, fixed elsewhere).                                                                                                   |
| Replies                  | A reply in one of its threads is read as thanks, as context ("we do this on purpose because…"), or as disagreement. A context reply becomes a **proposed rule**, scoped to that folder, for an admin to approve. |
| Your reviewers' comments | Points your own reviewers keep raising across pull requests, such as "keep database calls in the service layer", become proposed rules.                                                                          |

Proposed rules appear under **Memory → Custom rules** for an admin to approve or decline. Rules are only suggested once an organization has about ten reviewed pull requests in the last month, so a single comment cannot set policy.

## Learned preferences

When a team keeps passing on one kind of comment in a repository or folder, MergeHarbor stops posting lower-priority comments of that kind there. For example, style comments under `generated/` might be left unchanged at merge again and again. Two things trigger this:

- the last three or more comments of that kind there were passed over and almost none were acted on; or
- across at least six responses, few were acted on, judged with smoothing so a handful of votes cannot decide it.

Some things are never held back: **security, correctness, concurrency and data-integrity findings, and every critical finding.**

Each review summary says how many findings were held back. Go to **Insights → Quality** to see every learned preference with the evidence behind it, in plain words. **Undo** brings the comments back right away; **Hold back again** reverses that. Both actions are recorded in the audit log. To turn the behaviour off, use **Settings → Review behaviour → Review quality → Learn what your team passes on**.

## Review quality

**Insights → Quality** shows, for the last 7, 30 or 90 days:

- **Acted on**: comments the team fixed, upvoted or thanked, out of those that got any response.
- **Fixed before merge**: comments whose lines changed before merge, out of all comments.
- **Stopped by verifier**: draft findings that the second pass disproved, so they were never posted.
- **Passed over**: comments that were downvoted, dismissed as wrong, answered as unwanted, or unchanged at merge.
- **Comments per review**, a weekly trend, and a breakdown by category.

## Review-quality settings

Under **Settings → Review behaviour → Review quality** (per repository too):

| Setting                          | Default                          | What it does                                                                                                                             |
| -------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Start with the riskiest changes  | on                               | Ranks each part of the diff by risk before the review. No extra model cost.                                                              |
| Trace what depends on the change | off (always on for Deep and Max) | Follows callers, implementations and config readers of the changed code, and adds a blast-radius line to the summary.                    |
| Bring in related code            | off (always on for Deep and Max) | Adds related code found by text search, semantic search and the code graph, within a fixed budget.                                       |
| Merge repeated findings          | on                               | Posts one comment for an issue found in several places, and skips issues already raised on earlier commits.                              |
| Score confidence from evidence   | off                              | Recomputes each finding's confidence from what the verifier checked, the deterministic checks and your team's past responses.            |
| Precision target                 | 0 (off)                          | With evidence-based scoring on, posts only the findings that together meet this expected precision. Critical findings are always posted. |
| Learn what your team passes on   | on                               | Learned preferences, described above.                                                                                                    |

Replies and teammates' comments are read on GitHub and GitLab. On other code hosts MergeHarbor learns from fixes, reactions and dismissals.
