Repository navigation
Record what settled each finding and the reactions on it - #53
Merged
Merged
Conversation
Findings already move to resolved or dismissed, but not what settled them, so a finding fixed in a later commit could not be told from one the author said was fixed in its thread, or one a maintainer declined by resolving the thread. Each settlement now carries `settlement`: commit, chat or thread. The 👍 and 👎 on a finding's comment are read with the review threads GitHub already returns at the start of every review, and again after a chat answer, and stored where they changed through the new updateReactions sink call. A failure to store them only logs. Together they let Appwrite tell which findings were useful. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3M7tvvVXXtaPKh5pzVnt3 Co-authored-by: Torsten Dittmann <1759475+TorstenDittmann@users.noreply.github.com>
🟢 Tier S · Ready to mergeThe engine now records whether findings were settled by a commit, a chat, or a resolved thread, and synchronizes changed 👍/👎 counts. The Appwrite sink reads and writes these fields, while the GitHub client fetches reaction counts with its existing review-thread query.
📂 Walkthrough · 13
🔇 Filtered out · 1Findings Hansi considered but did not post.
Reviewed |
Merged
2 tasks done
This was referenced Nov 18, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Torsten · project thread
What
Hansi now reports what happened to each finding, so Appwrite can tell which findings were useful.
What settled it. Findings already move to
resolvedordismissed, but nothing recorded what settled them. Every settlement now sends asettlement:commit: a later commit fixed it (review job)chat: the author said it is fixed, or it was declined, in its thread (chatmark_finding)thread: a maintainer resolved the thread without a change (syncFindingsWithThreads, formerlydismissFindingsResolvedOnGitHub)Reactions.
ReviewThreadgains optionalreactions(👍/👎 on the root comment). The GitHub client reads them in the same GraphQL query that already lists threads (reactionGroupson the first comment), so a review costs no extra call. At the start of every review, and after each chat answer, the counts that changed since last stored go to the newResultsSink.updateReactions. A failure to store them only logs. Clients that don't read reactions (GitLab, Bitbucket, Gitea, Origin) leave the field out, and nothing is written for them.Appwrite sink.
updateFindingspassessettlementthrough;updateReactionssendsPATCH /reviews/repositories/:id/pulls/:n/findings/reactionsin batches of 100.listFindingsreadssettlement(empty means open),upvotesanddownvotes, and leaves them out against an Appwrite that doesn't return them yet.Known gap: GitHub sends no webhook for reactions, so a 👍 added after the pull request's last review or chat is not picked up.
Test plan
All against the in-memory fakes and local servers, no real provider API:
review-job.test.ts: a later commit fixing a finding recordssettlement: 'commit'and the 👍 read at the start of that review, written once. A thread resolved by a maintainer recordssettlement: 'thread'and their 👎.chat-job.test.ts: a chat dismissal recordssettlement: 'chat'.resolved-threads.test.ts:reactionChangeswrites only changed counts, treats counts missing from an older Appwrite as 0, and skips threads without reactions read.github/pulls.test.ts: 👍/👎 parsed fromreactionGroups(fixture).appwrite/results.test.ts: wire format of the settlement, reactions batching, and readingsettlementback.bun run lint,bun run checkandbun run test(455 pass) pass.Related
GET /v1/reviews/categoriesand the Console. Deploy that first; until then,updateReactionsgets a 404, which is logged and ignored.🤖 Generated with Claude Code
https://claude.ai/code/session_01F3M7tvvVXXtaPKh5pzVnt3