Skip to content

CI: make the LLM reviewer terser and let it close out fixed findings - #131

Open
hauke wants to merge 2 commits into
openwrt:mainfrom
hauke:llm-review-brevity
Open

CI: make the LLM reviewer terser and let it close out fixed findings#131
hauke wants to merge 2 commits into
openwrt:mainfrom
hauke:llm-review-brevity

Conversation

@hauke

@hauke hauke commented Aug 27, 2026

Copy link
Copy Markdown
Member

Two prompt changes for the LLM review routines, based on how the reviews
read on openwrt/openwrt.

Cut the review down to its findings. Bodies were recapping the change
instead of flagging anything — #24915 opened with a "Verification
performed:" list of checks that all passed, #24916 followed "no new issues
found" with a six-bullet "Re-verified on the new head:" rundown. Inline
comments ran to several paragraphs, restated the line they were anchored
to, and appended unrelated "Separately: ..." findings. Both prompts now
carry a "Keep it short" section: never recap the change, three sentences
max per inline comment, commit-check bullets only in the body, one finding
per comment.

Acknowledge findings the contributor fixed. Nothing ever happened to a
thread once its finding was fixed — the bot account only holds triage
permission, so it cannot resolve conversations. It now replies "fixed,
thanks" on its own threads instead, but only where the thread is still
unresolved and nobody else has replied. This also replaces the "what the
last round fixed" prose removed above: the acknowledgement belongs on the
thread, not in a summary.

Note these files are only the source of truth — the text has to be pasted
into the two routines at claude.ai/code/routines to take effect.

hauke added 2 commits August 27, 2026 22:18
The reviews the bot posts on openwrt/openwrt are dominated by
text the maintainer already has. Review bodies recap the
change instead of flagging anything: openwrt/openwrt#24915
opened with a "Verification performed:" list of three checks
that all passed, #24916 followed "no new issues found" with a
six-bullet "Re-verified on the new head:" rundown, and #24919
spent a paragraph on "the interdiff is confined to the
previous round's feedback and each change checks out: ..."
followed by every change in it. Inline comments run to several
paragraphs with the reasoning chain spelled out, restate the
line they are anchored to, and append unrelated "Separately:
..." findings that belong on their own anchor.

Add a "Keep it short" section to both prompts — in the nightly
digest it goes inside the sub-agent template, where the
reviewing actually happens — and enforce it again at the two
points that produce output:

- Never recap the change. No description of what the PR does,
  what a commit changed, what was inspected or verified, or
  which earlier findings are now fixed.
- Inline comments: three sentences at most before the optional
  suggestion block, no restating the commented line, no "this
  matters because ..." tail, several defects on one line get
  one short bullet each.
- Review body: commit-check bullets only, one or two lines
  each — no summary, no verification log, no pointer to the
  inline comments, no praise for what is already correct.
- One finding per comment.

The nightly no-op body stays "Reviewed N new commits; no new
issues found." — it is the marker the next run uses to detect
re-review work — but it is now the entire body.

docs/llm-review-setup.md still advertised a "1-2 sentence
summary" the prompt has not asked for since 6013348; describe
the current shape instead.

Fixes: 2d30538 ("CI: add LLM-driven PR review workflows")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Once a contributor fixes an inline finding, nothing ever
happens to the thread: the bot account only holds triage
permission, so it cannot resolve conversations (that needs
write access), and it never came back to the thread either.
Threads from three rounds ago sit open next to code that has
long since changed, and the maintainer has to open each one to
find out whether it still applies.

Have the reviewer reply on its own threads instead, once the
review is posted. The reply is deliberately tiny — "fixed,
thanks" when the finding was addressed as asked, one short
sentence when it was addressed some other way, and nothing at
all when it is unfixed or only half fixed, so the bot never
nags and never repeats itself.

It replies only when the thread is its own, is still
unresolved, and holds exactly one comment: if the author or a
maintainer has already answered there, the conversation is
theirs and the bot stays out of it. This is also what replaces
the "what the previous round fixed" prose that the preceding
commit removed from the review body — the acknowledgement
belongs on the thread it concerns, not in a summary.

Mechanically this uses `add_reply_to_pull_request_comment`,
added to the Tools paragraph of both prompts (and the
nightly-digest sub-agent template). It takes the numeric REST
comment ID, which `get_review_comments` does not return
directly, so the prompt spells out that it is the number in
the comment's `html_url` anchor (`#discussion_r3874849507`)
rather than the GraphQL thread node ID (`PRRT_...`).

Assisted-by: Claude:claude-opus-5
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
@hauke hauke changed the title Improve LLM reviwer CI: make the LLM reviewer terser and let it close out fixed findings Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant