fix: throttle Cortex conflict probes without conflicts

This commit is contained in:
Marc J Saint-jour 2026-03-12 20:09:16 -04:00
parent ee40c6e338
commit 98db8cce7b

View File

@ -412,6 +412,7 @@ export async function resolveAgentCortexConflictNotice(params: {
.filter((entry) => entry.id && entry.summary)
.toSorted((left, right) => right.severity - left.severity)[0];
if (!topConflict) {
cortexConflictNoticeCooldowns.set(targetKey, now + cooldownMs);
return null;
}
cortexConflictNoticeCooldowns.set(targetKey, now + cooldownMs);
@ -424,6 +425,7 @@ export async function resolveAgentCortexConflictNotice(params: {
].join("\n"),
};
} catch {
cortexConflictNoticeCooldowns.set(targetKey, now + cooldownMs);
return null;
}
}