Skip to content

fix(review): allow ReviewFixer as builtin session primary agent - #2126

Open
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/review-fixer-session-mode
Open

fix(review): allow ReviewFixer as builtin session primary agent#2126
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/review-fixer-session-mode

Conversation

@xielixing

Copy link
Copy Markdown

Problem

The review fix phase fails with:

Failed to start dialog turn: Unknown session mode: ReviewFixer

Root Cause

PR #2106 (commit 97a4afaa5) added CodeReview and DeepReview to the is_builtin_session_primary_agent whitelist but missed ReviewFixer. The fix phase creates child sessions with agentType=ReviewFixer, which then fails to resolve through the primary-agent path because it's not in the whitelist.

Fix

Add REVIEW_FIXER_AGENT_TYPE to the is_builtin_session_primary_agent whitelist in external.rs, so ReviewFixer child sessions resolve through the primary-agent path for create, turn, restore, and compaction — matching CodeReview and DeepReview.

Changes

  1. external.rs: Import REVIEW_FIXER_AGENT_TYPE and add it to the is_builtin_session_primary_agent matches! arm. Updated doc comments to mention ReviewFixer.
  2. tests.rs: Added ReviewFixer to builtin_review_agents_resolve_as_local_session_primaries and local_route_resolves_review_agents_as_session_primaries test arrays.
  3. coordinator.rs: Added ReviewFixer to the review_agent_child_sessions_create_successfully test array.

Validation

  • cargo check -p bitfun-core — passed
  • cargo test -p bitfun-core — all 4 targeted tests pass:
    • builtin_review_agents_resolve_as_local_session_primaries
    • non_session_primary_subagents_and_unknown_ids_do_not_resolve ✅ (ReviewWorker still restricted)
    • local_route_resolves_review_agents_as_session_primaries
    • review_agent_child_sessions_create_successfully

Closes #2124

PR GCWing#2106 (commit 97a4afa) added CodeReview and DeepReview to the
is_builtin_session_primary_agent whitelist but missed ReviewFixer.
This caused the review fix phase to fail with:
'Failed to start dialog turn: Unknown session mode: ReviewFixer'

Add REVIEW_FIXER_AGENT_TYPE to the whitelist so ReviewFixer child
sessions resolve through the primary-agent path for create, turn,
restore, and compaction — matching CodeReview and DeepReview.

Closes GCWing#2124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review 修复阶段失败:Failed to start dialog turn: Unknown session mode: ReviewFixer(#2106 修复不完整)

1 participant