feat: auto-forward PR review comments to agent with dedup#972
Open
Koan-Bot wants to merge 1 commit into
Open
Conversation
Closes Anantys-oss#742 When a human reviewer leaves comments on a Koan-created PR, the check loop now automatically creates a mission to address them without requiring an explicit @mention. Changes: - review_runner: extract is_bot_user() helper (was inline in two places) - pr_review_learning: add fetch_unresolved_review_comments(), compute/ get/store_comment_fingerprint(), and dispatch_review_comments_mission() - utils: add resolve_project_name() combining resolve_project_path + project_name_for_path; used by dispatch and check_runner - check_runner: wire dispatch into _handle_pr() after rebase/review checks; wire learn_from_reviews() as best-effort post-check side effect; add _get_review_dispatch_include_drafts() for config toggle - instance.example/config.yaml: document review_dispatch.include_drafts - tests: 34 new tests in test_pr_review_dispatch.py Draft PRs are included by default (review_dispatch.include_drafts: true). Bot comments are filtered. Dispatch is skipped when a rebase is pending. Fingerprint dedup (sha256 of sorted comment IDs) prevents re-dispatching the same comment set across multiple check runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
This is interesting, but probably deserve a documentation/help patch as well, to properly explain that feature. |
Collaborator
|
@sukria-koan0 read this PR and add a patch to the appropriate documentation file (README.md or other). Also make sure all tests pass. |
sukria
pushed a commit
that referenced
this pull request
Mar 27, 2026
Add documentation for the review comment dispatch feature introduced in PR #972. Updates user manual (/check section with config example), README (Git & GitHub features list), and CLAUDE.md (pr_review_learning.py architecture description). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
atoomic
pushed a commit
that referenced
this pull request
Mar 29, 2026
Add documentation for the review comment dispatch feature introduced in PR #972. Updates user manual (/check section with config example), README (Git & GitHub features list), and CLAUDE.md (pr_review_learning.py architecture description). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Koan-Bot
pushed a commit
to Koan-Bot/koan
that referenced
this pull request
May 23, 2026
Add documentation for the review comment dispatch feature introduced in PR Anantys-oss#972. Updates user manual (/check section with config example), README (Git & GitHub features list), and CLAUDE.md (pr_review_learning.py architecture description). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
SupersededThis PR has been superseded by PR #1541 ( Key differences:
Recommend closing this PR in favor of #1541. |
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.
Summary
When a human reviewer leaves comments on a Kōan-created PR, the check loop now automatically creates a mission to address them — no explicit @mention required. Fingerprint-based deduplication (SHA-256 of sorted comment IDs) prevents re-dispatching the same comment set across multiple check runs.
Fixes #742
Changes
review_runner.py: Extractis_bot_user()helper (was duplicated inline at two call sites). Handles bothuser_typeflat field and nesteduser.typedict.pr_review_learning.py: Addfetch_unresolved_review_comments()(inline + review-body comments, bot-filtered),compute_comment_fingerprint(),get/store_comment_fingerprint()(atomic JSON tracker at.review-dispatch-tracker.json), anddispatch_review_comments_mission()(inserts mission only when fingerprint changed).utils.py: Addresolve_project_name(repo, owner)combiningresolve_project_path+project_name_for_path. Eliminates duplicated pattern incheck_runnerand makes it importable frompr_review_learning.check_runner.py: Wire dispatch into_handle_pr()(skipped when rebase pending); wirelearn_from_reviews()as best-effort post-check side effect; add_get_review_dispatch_include_drafts()config reader.instance.example/config.yaml: Documentreview_dispatch.include_draftsoption (default:true).tests/test_pr_review_dispatch.py: 34 new tests covering all new functions and wiring.Design decisions
review_dispatch.include_drafts: falseinconfig.yamlto exclude them.learn_from_reviews()wired here — runs on every PR check (not just mission completion), maximising coverage. Wrapped intry/exceptso learning failure never aborts the check..review-dispatch-tracker.json) — keeps comment fingerprints isolated from.check-tracker.jsontimestamp data.Test plan
koan/tests/test_pr_review_dispatch.py— all passGenerated by Kōan /fix