PR comments: what each round did

The PR opens first. After that, every review round posts two new comments, so a reviewer can follow the loop on the PR itself instead of reading .reviews/ on the box. They are never edited, so the history stays.

CommentContents
🔧 Changes — round NEvery commit since the previous round, with its full message, plus the test run Mainark did itself on that head.
🤖 Claude review — round NVerdict, round, head reviewed, model, supervisor attempts and time, then the full findings.

When validation finds new failing tests, Claude is skipped and the failing tests become that round's verdict. The review comment says so.

Turning it on

MAINARK_REVIEW_POST_COMMENTS=1

It is off by default. Comments post through gh with GH_TOKEN, so they appear under that token's GitHub account. A failed post is a warning, never a failed round. It is not recorded as done either, so the next round lists those commits again instead of losing them. .reviews/pr-N.changes-head records which head the last Changes comment covered.

Where commit messages come from

Agents follow a commit protocol, written into both the implement and fix briefs (src/executor/agent/commitProtocol.ts) and into .cursor/rules/commit-protocol.mdc for agents started outside Mainark. For every commit, an agent runs the tests first, then commits with:

What changed: …
Why: …
Tests: `<command>` → <N passed, M failed>

Mainark posts these rather than the agent, for three reasons:

  • On a first implementation the PR does not exist yet.
  • An agent can forget to post, or report a result it did not see.
  • Posting from Mainark works the same on Cursor-hosted VMs and on our own machine.

Mainark's own test run sits under each commit, so a gap between what the agent claimed and what the tests actually did is visible on the PR.

What it is not

It shows what the reviewer wrote: its summary, findings and missing tests. It does not expose the model's hidden reasoning.