diff --git a/src/lib/git/ingest.ts b/src/lib/git/ingest.ts index 02b6bcf..82425a3 100644 --- a/src/lib/git/ingest.ts +++ b/src/lib/git/ingest.ts @@ -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 }; }