Skip to content

fix(engine): settle inline findings from the conversation, and finish the 👀 - #71

Merged
TorstenDittmann merged 10 commits into
mainfrom
claude/project-thread-x5w6n8
Nov 27, 2026
Merged

TorstenDittmann merged 10 commits into
mainfrom
claude/project-thread-x5w6n8

Conversation

@TorstenDittmann

@TorstenDittmann TorstenDittmann commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Torsten · project thread

What happened

On appwrite-labs/application-configuration#1420 Hansi left one inline finding (a missing toleration). Torsten replied in its thread that the nodes aren't tainted, but Cloud dropped that reply before it reached Hansi (fixed in appwrite/appwrite#16212). He then wrote in the conversation: "@appwrite read the comments - its resolved", and later "@appwrite then dismiss and approve".

Hansi agreed both times that the finding didn't apply, but nothing changed: the finding stayed open, the thread unresolved, the summary at Tier B and the check run neutral. The second answer even said "I can't change the GitHub review state from here."

A conversation comment could only settle findings listed in a review body (openBodyFindings, no thread). An inline finding had to be answered in its thread, so the chat had no finding to mark and no mark_finding tool.

The fix

  • openFindings() lists every open finding, inline or in a body, with its thread root. openBodyFindings() is that list without the inline ones.
  • A conversation comment that mentions Hansi now names from all open findings (by title, path:line, or the only open one when it names none). An unmentioned conversation comment still only reaches body findings, as Appwrite queues those only when body findings are open.
  • When the chat settles inline findings named this way, their threads are resolved, then the summary is refreshed as before.

With #70, that refresh also approves once nothing open holds approval back, so "it's resolved" in the conversation ends the same way as in the thread.

Only the pull request's author settles a finding

A finding is resolved or dismissed only from a comment by the pull request's author, in its thread or in the conversation. Anyone else still gets an answer, but the chat gets no mark_finding tool, and the prompt says the finding stays as it is. Before this, a trusted maintainer who wasn't the author could dismiss a minor note.

The 👀 now turns into 👍

Hansi reacted 👀 to every comment it took on, and nothing ever removed it. Now:

  • a chat swaps it for 👍 after its answer, or after the fixed failure reply on the last attempt;
  • a review asked for by a mention swaps it once the review has ended (completed or skipped), or once the last attempt failed;
  • a failed attempt that will be retried keeps the 👀.

GitHubClient.finishAcknowledgement does the swap. On GitHub, creating the 👀 again returns the bot's existing reaction, so its id is found without knowing the bot's login, and only that reaction is deleted. GitLab (thumbsup) and Gitea swap only the bot's own reaction too. Origin can't take a reaction back, so the 👍 is added next to the 👀. Bitbucket has no reactions. GitHub's reactions have no ✅, so 👍 stands in for done.

Tests

  • chat-job.test.ts: #1420's case, where a mention in the conversation dismisses an inline finding, resolves its thread and grades S; and an unmentioned conversation comment leaves inline findings alone.
  • chat-finding.test.ts: openFindings returns both kinds with their thread roots.
  • chat-job.test.ts / review-job.test.ts: the reaction is swapped after an answer, after the last failed attempt and after a skipped mention review, and kept after a failed attempt that will be retried.
  • GitLab, Gitea and GitHub (pulls.test.ts) client tests cover the swap requests.
  • chat-job.test.ts: a member who isn't the PR author gets an answer but can't settle the finding; a mention that names no finding isn't matched to one while another project reviews the PR.

bun run lint, bun run check and bun run test (506 pass, after merging main with #70) are green.

https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC


Generated by Claude Code

A conversation comment could only settle findings listed in a review body.
When someone answered an inline finding there instead of in its thread
("@appwrite read the comments - its resolved"), Hansi agreed but had no
finding to mark, so the finding, summary and review stayed as they were.
A mentioned conversation comment now names inline findings too, and the
threads of the ones it settles are resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
@TorstenDittmann TorstenDittmann self-assigned this Nov 27, 2026
@appwrite

appwrite Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code review

Commit Status Tier Verdict Details
e842171 Reviewed Reviewed 🟢 S · Ready to merge ✅ Approved View review

After a failed thread-resolution call with the reply already posted, the retry recovers the original comment and closes the settled inline thread; I found no remaining issue in these commits.

Conversation replies can settle applicable findings, including inline findings, and the engine refreshes the review summary and closes their threads. Only pull-request-author comments can settle findings, and acknowledgement reactions are completed with provider-specific behavior after chat or mention-review jobs finish.

Latest changes: The retry path now recovers the original conversation comment before matching settled findings and closes the settled thread(s) after a thread-resolution failure; a regression test covers this retry.

Walkthrough (20)
File Change
packages/bitbucket/src/client.ts Implements acknowledgement completion as a no-op for Bitbucket, which has no reactions.
packages/engine/src/chat-finding.test.ts Tests discovery and matching of body and inline findings.
packages/engine/src/chat-finding.ts Lists open and settled findings with their thread roots and matches findings named in comments.
packages/engine/src/chat-job.test.ts Covers conversation settlement, author-only settlement, retry recovery, and acknowledgement completion.
packages/engine/src/chat-job.ts Settles eligible findings, resolves inline threads, refreshes summaries, and recovers settled threads on retry.
packages/engine/src/github.ts Adds the client contract for finishing a comment acknowledgement.
packages/engine/src/prompts.ts Tells the chat model that non-author comments cannot settle findings.
packages/engine/src/review-job.test.ts Tests acknowledgement completion for completed, skipped, and terminal-failure mention reviews.
packages/engine/src/review-job.ts Finishes mention acknowledgements when reviews complete, are skipped, or reach terminal failure.
packages/engine/src/scope.test.ts Tests repository-scoped summaries and detection of summaries from another repository.
packages/engine/src/scope.ts Adds detection of summaries keyed to another repository row.
packages/engine/src/testing.ts Records acknowledgement completion in the in-memory GitHub client.
packages/gitea/src/client.test.ts Tests replacing the bot's eyes reaction with a thumbs-up.
packages/gitea/src/client.ts Swaps the bot's eyes reaction for a thumbs-up.
packages/github/src/client.ts Connects acknowledgement completion to the GitHub reaction helper.
packages/github/src/pulls.test.ts Tests acknowledgement reaction swaps for issue and review comments.
packages/github/src/pulls.ts Adds GitHub acknowledgement completion by adding a thumbs-up and removing the bot's eyes reaction.
packages/gitlab/src/client.test.ts Tests replacing the bot's eyes award with a thumbs-up.
packages/gitlab/src/client.ts Swaps the bot's eyes award for a thumbs-up.
packages/origin/src/client.ts Adds a completion thumbs-up where reactions cannot be removed.
Fixed since the last review (1)
  • Retry can miss settled conversation findings · packages/engine/src/chat-job.ts:160

Reviewed the commits since 87d4ec5

Tip

Comment @appwrite review to re-run, or mention @appwrite with a question.

appwrite[bot]
appwrite Bot previously requested changes Nov 27, 2026

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Tier B · 1 blocking finding to address. Summary

Comment thread packages/engine/src/chat-job.ts Resolved
Comment thread packages/engine/src/chat-job.ts Resolved
claude and others added 3 commits November 27, 2026 13:23
…-x5w6n8

Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>

# Conflicts:
#	packages/engine/src/chat-job.test.ts
The reaction said Hansi was on it, but nothing ever removed it, so every
mention kept 👀 forever. A chat removes it after its answer (or after the
fixed failure reply on the last attempt), and a review asked for by a
mention removes it once the review has ended. A failed attempt that will be
retried keeps it. GitHub, GitLab and Gitea remove only the bot's own
reaction; Origin and Bitbucket have nothing to remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
GitHub's reactions have no check mark, so 👍 marks a comment as answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
@TorstenDittmann TorstenDittmann changed the title fix(engine): let a mention in the conversation settle an inline finding fix(engine): settle inline findings from the conversation, and finish the 👀 Nov 27, 2026

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Tier B · See the inline comments. Summary

Comment thread packages/github/src/pulls.ts Resolved
…ews the PR

Each project reviewing a repository gets the conversation comment and sees
only its own findings, so a mention that names none could settle one
finding in every project. The only-open-finding guess now needs the pull
request to carry no other repository row's summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
appwrite[bot]
appwrite Bot previously requested changes Nov 27, 2026

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Tier B · 1 blocking finding to address. Summary

Comment thread packages/engine/src/chat-job.test.ts Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
@appwrite
appwrite Bot dismissed stale reviews from themself November 27, 2026 13:33

The findings that requested changes are resolved. See the summary comment for what is still open.

claude and others added 3 commits November 27, 2026 13:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
A reply from anyone else still gets an answer, but Hansi gets no
mark_finding tool for it and is told not to call the finding settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
Resolving the thread of a finding a chat settled could fail after the
answer was posted, and a redelivery stopped at the answer's marker, so the
thread stayed open. A failure now fails the attempt while attempts remain,
and a retry that finds the answer closes the threads of the findings the
comment settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Tier A · See the inline comments. Summary

Comment thread packages/engine/src/chat-job.ts Resolved
On a retry the findings a conversation comment named are no longer open,
so the comment's text was not loaded and nothing matched. Read it from the
conversation, and when a mention named no finding, close every settled
finding's thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3M7ttH9uWbxTyZiza9BAC
Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@TorstenDittmann
TorstenDittmann merged commit 0b4ce26 into main Nov 27, 2026
5 checks passed
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.

2 participants