feat(multi-review): single comment output + remove standalone reviews#98
feat(multi-review): single comment output + remove standalone reviews#98Svtter wants to merge 8 commits into
Conversation
…ering - Add _filter_noise() to strip CLI boilerplate (tool calls, log lines, session metadata) from reviewer output - Add cleanup_reviewer_comments() to delete per-reviewer comments after coordinator synthesis is posted, keeping only the final comment - post_pr_comment() now returns comment ID for precise cleanup targeting - Keep USE_GITHUB_TOKEN=true to avoid OIDC crash in opencode CLI Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use `gh api --input` instead of `gh pr comment` so we get the comment ID in the response. Pass this ID to cleanup_reviewer_comments() for precise targeting — avoids relying on comment ordering which is not guaranteed with concurrent reviewers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
gh api --input expects a file path, not inline data. Use stdin pipe (--input -) with subprocess.run(input=...) instead. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
multi-review already covers these use cases. Keeping separate workflows causes duplicate comments on every PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增的函数都在主流程中被正确调用, |
|
Asserting permissions for user Svtter... 详细审查报告: ✅ securityAsserting permissions for user Svtter... service: "session.prompt", ✅ qualityAsserting permissions for user Svtter... service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", service: "session.prompt", |
…skipping The noise prefix matching was case-sensitive but actual CLI output uses title case (e.g. "Asserting permissions"). Also add continuation line skipping: after a noise header, skip indented JSON-like fragments (session.id, llm.runtime, etc.) until the next blank line. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增函数在主流程中均被正确调用,Comment ID 传递链路完整,两条路径(coordinator 成功/失败)均调用了 |
|
[09:48:39.407] INFO (#277): loop { 详细审查报告:
|
opencode CLI's stdout is just boilerplate (permissions, session info, tool calls). The actual AI review content is posted as a PR comment by opencode CLI itself. After each reviewer finishes, fetch that comment and use it as the real review content for coordinator synthesis and display in collapsible details. - Add _fetch_latest_bot_comment() to get the latest github-actions[bot] comment from the PR - Store fetched comment in reviewer_result["comment"] - Coordinator, format_pr_comment, and post_fallback_comment all prefer "comment" over "output" Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
[09:52:51.285] INFO (#276): loop { 详细审查报告: ✅ security分析完毕存在风险 本次 PR 为功能增强, 阻塞项:无 建议项:
✅ quality有条件合并 PR 整体改动方向合理:引入 阻塞项
GitHub API 返回 影响: 修复:移除第 542 行的 建议项
|
|
无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增函数在主流程中均被正确调用,Comment ID 传递链路完整,两条路径(coordinator 成功/失败)均调用了 |
- Log lines ([HH:MM:SS] INFO...) and tool call lines (| Shell...) now set skipping=True so their JSON-like continuation lines are also filtered out - Fix _fetch_latest_bot_comment: GitHub API already returns newest first with sort=created&direction=desc, so reversed() was returning the oldest comment instead of the latest Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增函数在主流程中均被正确调用,两条路径(coordinator 成功/失败)都调用了 |
|
[09:58:29.497] INFO (#276): loop { 详细审查报告: ✅ security无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增的函数都在主流程中被正确调用, ✅ quality无遗漏 PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增的函数都在主流程中被正确调用, |
The previous approach fetched comments per-reviewer which caused race conditions in parallel execution -- both reviewers would fetch the same "latest" comment. New approach: 1. Snapshot all bot comment IDs before reviewers start 2. Run all reviewers in parallel (no per-reviewer fetch) 3. After all reviewers finish, fetch new bot comments in bulk and assign to reviewers by creation time order 4. Snapshot again before coordinator, fetch coordinator's posted comment after it finishes 5. Cleanup deletes all opencode-CLI comments, keeps only Python-posted This also fixes the coordinator output being pure noise -- we now fetch the coordinator's actual AI synthesis from its posted PR comment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
无遗漏PR 标题和 body 列出的 5 项改动均已完整实现:
所有新增函数在主流程中均被正确调用,两条路径(coordinator 成功/失败)都调用了 |
|
有条件合并 总结security 和 quality 两位 reviewer 均确认 PR 的 5 项改动均已实现。但 quality reviewer 发现一个影响正确性的阻塞 bug。 阻塞项
建议项
注:后续 quality reviewer 另有结论为"可合并"的摘要(10:05:57),但其详细报告(09:53:11)明确将 详细审查报告:
|
|
Closing this PR. The |
* chore: remove multi-review action (fundamental design flaw) The opencode github run subprocess approach is fundamentally flawed: stdout contains only CLI boilerplate, never the actual AI review content. After multiple failed iterations (PR #87, #90, #98), removing this module to prepare for a replacement approach. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: clean up all multi-review references - Delete .github/workflows/multi-review.yml - Delete tests/test_multi_review.py - Remove multi-review from README.md action list, docs, and usage examples - Remove multi-review from skills/setup-ci/ documentation and action reference - Fix architect-review section that was accidentally merged in actions-reference.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>





Summary
_filter_noise()to strip CLI boilerplate from review outputcleanup_reviewer_comments()to delete per-reviewer comments, keeping only coordinator synthesispost_pr_comment()returns comment ID viagh apifor precise cleanup targetingUSE_GITHUB_TOKEN=trueto avoid OIDC crash; cleanup is post-hocreview.ymlandarchitect-review.yml— multi-review covers theseTest plan
python3 -m pytest tests/test_multi_review.py -v— 21 tests pass🤖 Generated with Claude Code