Move backfill horizon from a startup env var into the editable profile

SMARTRUN_BACKFILL_HORIZON_DAYS was a server-startup-only env var with no UI,
defaulting to 3 years -- so editing the unrelated "Rolling window" profile
field (for classification, not sync) had no effect on how far back Sync Now
reached. Backfill horizon is now Profile.BackfillHorizonDays, read fresh on
every Backfill call, with its own field on the Profile page.
This commit is contained in:
2026-07-19 12:57:18 +02:00
parent 93746666b5
commit 249826afc0
10 changed files with 84 additions and 37 deletions

View File

@@ -0,0 +1,6 @@
-- Backfill horizon used to be a startup-time env var
-- (SMARTRUN_BACKFILL_HORIZON_DAYS) with no UI at all -- exactly the kind of
-- "tunable analysis-engine parameter" this profile table exists for.
-- Default matches the old env var's default (3 years) so existing
-- deployments keep their current behavior until the user changes it.
ALTER TABLE profile ADD COLUMN backfill_horizon_days INTEGER NOT NULL DEFAULT 1095;