ADR-0102: One comment section shapes every pull request comment
Status: Accepted
Date: 2026-11-06
Amends: 0009: what the pull request comment shows; 0100: heatmap.comment becomes comment.heatmap.most
Context
The pull request comment showed every section, open, in a fixed order, with fixed caps on each list. It was written in every state of a run and on every pull request, and a passing run posted one too. A team that only reads the verdict and the survivors scrolled past the rest on each push. A team on a busy repository wanted a quieter comment, and one on a small project wanted everything. And the GitHub, GitLab and Bitbucket comments could not differ.
Decision
-
A top-level
commentsection shapes every*-commentreporter’s comment. A reporter’swith.commenttakes the same keys and lays them overcomment, key by key, for its comment alone.heatmap.commentbecomescomment.heatmap.most;heatmap.filesandheatmap.methodsstay where they are. -
comment.sectionsis an ordered list: a section listed is shown, in that order. The sections areverdict,security,trees,sets,heatmap,survivors,unjudged,ignored,problems,floors,reportandcosts.verdictis required and first; a list without it first exits 2. A run that cannot judge says why whatever the list holds. -
Each list has a cap,
comment.<list>.most:survivors,security,unjudgedandignoredshow 20,heatmap5;0leaves the section out.comment.text.most, 1,500, caps the characters of one diff or hint.comment.survivors.linesischangedorall, andcomment.survivors.detailisfullorrow.comment.tryandcomment.reproducesay whether each survivor says what to try and how to reproduce it. The whole comment is still fitted to the 65,536 characters a channel holds, as it always was. -
comment.openlists the sections shown open,[verdict, trees, heatmap]by default; every other section is folded. Bitbucket cannot fold, so it shows everything open. A section with nothing to say is left out rather than folded empty. The step summary shows every section open. -
comment.modeissticky, one comment updated in place, by default;newwrites a new comment each run, andnew-hiding-olda new one that hides the one before, on GitHub.comment.stateslists the states that write it,[planned, rechecked, verdict]by default. -
comment.passingdefaults toupdate: a passing run updates the comment already there and posts no new one.alwaysposts as any other run does, andneverwrites nothing and says why in the run’s output. This is the one default that changes: a passing run on a pull request that had no comment used to post one, and now posts none. -
comment.onlists the kinds of run that comment,[pull-request]by default, which takes a GitLab merge request too.comment.drafts,comment.sampledandcomment.cutShortsay whether a draft’s, a sampled and a cut-short run comment; each does by default. -
The PHP builder writes every key with
Comment::sections(),open(),states(),on(),mode(),passing(),lines(),detail(),most(),with()andwithout(), over the enums ofCore\Comment. -
Azure Repos and Buildkite take the comment too.
azure-commentwrites one thread on the pull request through Azure Repos’ REST API, withSYSTEM_ACCESSTOKEN, and passes over a thread the token cannot edit, asbitbucket-commentpasses over a comment.buildkite-annotationwrites the build’s one annotation throughbuildkite-agent annotate, by its context, on pull requests and on any other build, since an annotation sits on the build rather than on a conversation.azure-summaryattaches the verdict to the build’s summary, asgithub-summarywrites the step’s. A config names each underreports; none is chosen for a run.
Alternatives considered
- A setting per reporter only. Three reporters would each need the same keys written three times; the section with per-reporter overrides keeps one place and still lets one channel differ.
- A list of sections to hide. A list of those shown also orders them, and a new section does not appear in a comment that did not ask for it.
- Keeping a passing run’s comment. On a repository with many green pull
requests it is noise;
alwayskeeps it for a team that wants it.
Consequences
A team chooses how much the comment says, and in what order, once for every channel or per channel.
A passing pull request with no comment stays quiet. A comment already there is still updated, so a pull request that failed and then passed says it passed.
The comment is shorter by default: what a reviewer acts on is open, and the rest is one click away.