Serialize merge-ready owner finalize handoff

This commit is contained in:
ejclaw
2026-04-05 20:11:14 +09:00
parent b6c8546f25
commit 4b7618896e
4 changed files with 132 additions and 1 deletions

View File

@@ -1124,8 +1124,20 @@ export async function runAgentForGroup(
pairedExecutionStatus === 'succeeded' &&
pairedSawOutput
) {
const completedRole = roomRoleContext?.role ?? 'owner';
const finishedCheck = getPairedTaskById(pairedExecutionContext.task.id);
if (finishedCheck?.status !== 'completed') {
const skipGenericFollowUpForInlineFinalize =
completedRole === 'reviewer' && finishedCheck?.status === 'merge_ready';
if (skipGenericFollowUpForInlineFinalize) {
log.info(
{
taskId: pairedExecutionContext.task.id,
role: completedRole,
taskStatus: finishedCheck?.status ?? null,
},
'Skipping generic follow-up after reviewer approval because inline finalize will handle the owner handoff',
);
} else if (finishedCheck?.status !== 'completed') {
deps.queue.enqueueMessageCheck(chatJid);
}
}