feat(FN-4809): complete Step 1 — emit merge attempt audit events

Fusion-Task-Id: FN-4809
Fusion-Task-Lineage: bd632e33-b376-47de-ad99-da4610ae4690
This commit is contained in:
Fusion (runfusion.ai)
2026-05-16 16:04:06 -07:00
committed by gsxdsm
parent 4e5bcee14f
commit df76612d78

View File

@@ -6829,22 +6829,14 @@ export async function aiMergeTask(
"merger",
);
try {
await audit.git({
type: "merge:start",
target: branch,
metadata: {
phase: `merge-attempt-${attemptNum}`,
attemptNum,
mergeConflictStrategy,
attemptLabel,
},
});
} catch (auditErr: unknown) {
mergerLog.warn(
`${taskId}: failed to emit run_audit event for merge-attempt-${attemptNum}: ${auditErr instanceof Error ? auditErr.message : String(auditErr)}`,
);
}
await emitMergeAttemptAuditEvent({
audit,
branch,
attemptNum,
mergeConflictStrategy,
attemptLabel,
taskId,
});
// Capture HEAD before the squash so the verification-fix finalizer can
// tell whether the AI agent actually created a commit (HEAD moved) or