From ed67a91b52ce2aae7c3ea2501eb4ac6d11c5f514 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Sat, 25 Jul 2026 10:38:02 +0000 Subject: [PATCH] Remove second stale NI-oncost caveat missed in the earlier cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Rota vs Actual section's caveat was already fixed, but the Forecast section had its own separate "rota excludes NI oncosts" note that referenced the same now-defunct /api/v2/schedules limitation — confirmed the forward window genuinely carries real oncosts post roster-migration (e.g. FOH 25/07: £562.75 base vs £641.93 w/ oncosts), so this was actively telling the model to understate its own forecast confidence for no reason. Co-Authored-By: Claude Sonnet 5 --- backend/src/jobs/ai-insights.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/backend/src/jobs/ai-insights.js b/backend/src/jobs/ai-insights.js index f5f0cfb..cd4f6e3 100644 --- a/backend/src/jobs/ai-insights.js +++ b/backend/src/jobs/ai-insights.js @@ -413,13 +413,6 @@ export function buildPrompt(monthProgress, priorPeriod, rotaVsActual, forecast, lines.push('') lines.push(`## Forecast (method: ${forecast.forecastMethod}, ${forecast.remainingDaysCount} days remaining)`) - if (forecast.forecastMethod === 'rota') { - lines.push( - "Note: remaining days sourced from rota exclude employer NI oncosts (Workforce's schedules API " + - "doesn't supply them), so this projection may modestly understate the true month-end total — same " + - "known limitation shown on the Monthly page." - ) - } lines.push( `Projected month-end total: ${fmtMoney(forecast.projectedTotal)} vs budget ${fmtMoney(monthProgress.budgetAmount)}` + (monthProgress.budgetAmount != null