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