fix: block stale paired IPC and duplicate finalize turns

This commit is contained in:
ejclaw
2026-04-11 04:18:43 +09:00
parent 320fc58763
commit e88073f2f8
10 changed files with 435 additions and 61 deletions

View File

@@ -33,6 +33,7 @@ export interface IpcDeps {
jid: string,
text: string,
senderRole?: string,
runId?: string,
) => Promise<void>;
nudgeScheduler?: () => void;
roomBindings: () => Record<string, RegisteredGroup>;
@@ -51,6 +52,7 @@ export interface IpcMessagePayload {
chatJid?: string;
text?: string;
senderRole?: string;
runId?: string;
}
export interface IpcMessageForwardResult {
@@ -86,7 +88,7 @@ export async function forwardAuthorizedIpcMessage(
};
}
await sendMessage(msg.chatJid, msg.text, msg.senderRole);
await sendMessage(msg.chatJid, msg.text, msg.senderRole, msg.runId);
return {
outcome: 'sent',
chatJid: msg.chatJid,