fix: route reviewer failover through reviewer bot, not arbiter bot

Reviewer handoff channel was based on target_agent_type (codex →
discord-review/arbiter bot). Now uses REVIEWER_AGENT_TYPE like the
normal reviewer path — role determines the bot, not the fallback type.
This commit is contained in:
Eyejoker
2026-04-01 05:37:56 +09:00
parent bfd781c552
commit 671eb18252

View File

@@ -608,10 +608,10 @@ export function createMessageRuntime(deps: MessageRuntimeDeps): {
const handoffRole = resolveHandoffRoleOverride(handoff);
let handoffChannel = channel;
if (handoffRole === 'reviewer') {
// Use the same channel as the normal reviewer path — role determines
// which bot speaks, not the fallback agent type.
const revChName =
handoff.target_agent_type === 'claude-code'
? 'discord'
: 'discord-review';
REVIEWER_AGENT_TYPE === 'claude-code' ? 'discord' : 'discord-review';
handoffChannel = findChannelByName(deps.channels, revChName) || channel;
} else if (handoffRole === 'arbiter') {
handoffChannel =