Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
TÂCHES 2026-03-13 23:20:48 -06:00 committed by GitHub
parent 8b068f98bc
commit 742e26abc1

View file

@ -1144,6 +1144,19 @@ async function dispatchNextUnit(
"warning",
);
// Close out the previously active unit before overwriting currentUnit.
if (currentUnit) {
const modelId = ctx.model?.id ?? "unknown";
snapshotUnitMetrics(
ctx,
currentUnit.type,
currentUnit.id,
currentUnit.startedAt,
modelId,
);
saveActivityLog(ctx, basePath, currentUnit.type, currentUnit.id);
}
// Dispatch fix-merge as the next unit (early-dispatch-and-return)
const fixMergeUnitType = "fix-merge";
currentUnit = { type: fixMergeUnitType, id: fixMergeUnitId, startedAt: Date.now() };