fix: add ReviewFixer to builtin session primary agent whitelist (#2124) - #2138
Closed
xielixing wants to merge 1 commit into
Closed
fix: add ReviewFixer to builtin session primary agent whitelist (#2124)#2138xielixing wants to merge 1 commit into
xielixing wants to merge 1 commit into
Conversation
…ng#2124) PR GCWing#2106 fixed the first half of the external primary agent profile resolution issue (CodeReview/DeepReview blocked at session creation) but missed the fix phase. ReviewFixer is submitted by DeepReviewActionBar.handleStartFixing with agentType='ReviewFixer', but is_builtin_session_primary_agent only whitelisted CODE_REVIEW_AGENT_TYPE and DEEP_REVIEW_AGENT_TYPE, causing 'Unknown session mode: ReviewFixer' when starting the fix dialog turn. Add REVIEW_FIXER_AGENT_TYPE to the whitelist so ReviewFixer resolves through the local primary-agent path for create, turn, restore, and compaction — same as CodeReview and DeepReview. Tests: add ReviewFixer to builtin_review_agents_resolve_as_local_session_primaries, local_route_resolves_review_agents_as_session_primaries, and review_agent_child_sessions_create_successfully.
Author
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.
Problem
Issue #2124: Starting the Review Fix phase fails with
Unknown session mode: ReviewFixer.PR #2106 fixed the first half of the external primary agent profile resolution issue — CodeReview and DeepReview were blocked at session creation because
is_builtin_session_primary_agentdid not whitelist them. However, the fix phase was missed:ReviewFixer(submitted byDeepReviewActionBar.handleStartFixing → sendMessage(..., 'ReviewFixer', 'agentic')) is still not in the whitelist.Root Cause
src/crates/assembly/core/src/agentic/agents/registry/external.rs—is_builtin_session_primary_agentonly matchedCODE_REVIEW_AGENT_TYPEandDEEP_REVIEW_AGENT_TYPE, notREVIEW_FIXER_AGENT_TYPE.When the frontend submits
agentType='ReviewFixer', the coordinator callsresolve_primary_agent_for_workspacewhich hitsis_builtin_session_primary_agent. SinceReviewFixeris not whitelisted, it falls through to the external-subagent resolution path and fails withUnknown session mode: ReviewFixer.Fix
Add
REVIEW_FIXER_AGENT_TYPEto theis_builtin_session_primary_agentwhitelist, so ReviewFixer resolves through the local primary-agent path for create, turn, restore, and compaction — same as CodeReview and DeepReview.Changes
external.rs— ImportREVIEW_FIXER_AGENT_TYPEand add it to theis_builtin_session_primary_agentmatch. Update doc comments onis_builtin_session_primary_agentandis_local_session_primary_entry.tests.rs— Add"ReviewFixer"tobuiltin_review_agents_resolve_as_local_session_primariesandlocal_route_resolves_review_agents_as_session_primaries.coordinator.rs— Add"ReviewFixer"toreview_agent_child_sessions_create_successfully.Validation
cargo check -p bitfun-core --no-default-features --features agent-runtime— passcargo test ... builtin_review_agents_resolve_as_local_session_primaries— 1 passedcargo test ... local_route_resolves_review_agents_as_session_primaries— 1 passedcargo test ... review_agent_child_sessions_create_successfully— 1 passed (with canvas-runtime)Related