feat(ingest): summarise new commits after metrics

This commit is contained in:
Dave 2026-09-16 16:16:27 +02:00
parent bf7d024cef
commit 6890a6d29e

View file

@ -178,6 +178,16 @@ export async function ingestProject(
const { recomputeMetrics } = await import("@/lib/metrics/store");
await recomputeMetrics(project.id);
// Summaries are an enhancement, not part of ingestion. Commits are already
// stored and the metrics are already correct by this point, so a provider
// outage here must not fail the webhook or lose a push.
try {
const { summariseProject } = await import("@/lib/ai/summarise");
await summariseProject(project.id);
} catch (error) {
console.error(`[ingest] summarisation failed for ${project.id}`, error);
}
return { created, skipped, pagesRead: page };
}