fix(review): allow ReviewFixer as a review session primary agent - #2127
Merged
Conversation
added 2 commits
August 6, 2026 22:59
The remediation phase of a review child session runs with agentType=ReviewFixer (DeepReviewActionBar.handleStartFixing submits it on "Start fixing"). The primary-agent resolution added by ca94825 only allowed CodeReview/DeepReview through, so the fix turn failed with "Failed to start dialog turn: Unknown session mode: ReviewFixer". The same resolution gate also broke manual compaction of ReviewFixer sessions and silently rewrote the session agent_type to agentic during restore. Add REVIEW_FIXER_AGENT_TYPE to the builtin session-primary whitelist so create, turn, restore, and compaction all resolve identically. ReviewWorker/ReviewJudge stay restricted. Registry tests now cover ReviewFixer through both the no-route fallback and explicit Local routes, plus the unchanged ReviewWorker/ReviewJudge and external-owner guards.
Follow-up from the review pass on the ReviewFixer session-primary fix: - non_builtin_same_name_review_agent_does_not_resolve_as_session_primary: a non-Builtin entry occupying the builtin ReviewFixer id fails closed instead of inheriting the builtin primary path. - Extend the external-owner guard to DeepReview alongside CodeReview and ReviewFixer. - Document in coordinator is_review_agent_type that ReviewFixer is intentionally excluded from review-phase manifest injection (remediation runs outside DeepReview execution policy gates), and record the primary resolution boundary in deep_review/AGENTS.md.
Author
|
Ubuntu编译问题我认为和该补丁无关,重跑CI应该就能正常。 |
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.
背景
review 会话可以正常创建并产出 review 结果,但从 review 结果点击「开始修复」时报错:
根因
commit
ca94825ad把 external primary agent 解析接入会话创建与 turn 启动路径后,resolve_primary_agent_for_turn的本地回退白名单只放行了会话创建/首轮使用的CodeReview/DeepReview。但 review 流程的「修复阶段」由前端以agentType='ReviewFixer'提交(DeepReviewActionBar.handleStartFixing → sendMessage(..., 'ReviewFixer', 'agentic')),ReviewFixer 不在白名单(SubAgent 类别,hidden(["CodeReview","DeepReview"])),导致修复轮启动失败。同一解析函数的全部受影响路径:
Failed to start dialog turn: Unknown session mode: ReviewFixeragentic(修复中途重启丢失 ReviewFixer 绑定)修复
is_builtin_session_primary_agent白名单加入REVIEW_FIXER_AGENT_TYPE(常量已存在于bitfun-agent-runtime::deep_review::constants,经deep_review_policy导出),一处修改覆盖 create/turn/restore/compact 全部路径。ReviewFixer 注册为 hidden 且仅允许在 CodeReview/DeepReview 下使用,放行不会暴露给普通会话;ReviewWorker/ReviewJudge等 team 角色保持受限。测试
registry 测试扩展:
expected_owner=External时仍返回 None34 个 registry 测试全部通过;
cargo check -p bitfun-core --no-default-features通过。关联:修复 #2124;此前 #2106(修复 #2100)只覆盖了 CodeReview/DeepReview,本 PR 补齐修复阶段。