:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(experiments): describe recalculation times as time series refresh (#122938)
Rodrigo Iloro5d5e1d49084a
diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsxindex ec1984a0f81f..5bae3cfd121d 100644--- a/frontend/src/scenes/settings/SettingsMap.tsx+++ b/frontend/src/scenes/settings/SettingsMap.tsx@@ -994,13 +994,13 @@ export const SETTINGS_MAP: SettingSection[] = [title: 'Daily recalculation time',description: (<>- Select the time of day when experiment metrics should be recalculated. This time is in your+ Select the time of day when experiment time series are recalculated. This time is in yourproject's timezone (<ProjectTimezoneName />).</>),searchDescription:- "Select the time of day when experiment metrics should be recalculated. This time is in your project's timezone.",+ "Select the time of day when experiment time series are recalculated. This time is in your project's timezone.",component: <ExperimentRecalculationTime />,keywords: ['schedule', 'refresh', 'update', 'time'],flag: '!EXPERIMENT_MULTIPLE_RECALCULATION_TIMES',@@ -1010,13 +1010,13 @@ export const SETTINGS_MAP: SettingSection[] = [title: 'Daily recalculation times',description: (<>- Select up to two times of day when experiment metrics should be recalculated, at least 6 hours+ Select up to two times of day when experiment time series are recalculated, at least 6 hoursapart. Times are in your project's timezone (<ProjectTimezoneName />).</>),searchDescription:- "Select up to two times of day when experiment metrics should be recalculated, at least 6 hours apart. Times are in your project's timezone.",+ "Select up to two times of day when experiment time series are recalculated, at least 6 hours apart. Times are in your project's timezone.",component: <ExperimentRecalculationTime />,keywords: ['schedule', 'refresh', 'update', 'time'],flag: 'EXPERIMENT_MULTIPLE_RECALCULATION_TIMES',diff --git a/posthog/api/team/integration_config.py b/posthog/api/team/integration_config.pyindex 31bba87ff5f1..26ba263a1607 100644--- a/posthog/api/team/integration_config.py+++ b/posthog/api/team/integration_config.py@@ -276,7 +276,7 @@ def handle_experiments_config(request: request.Request, team: Team) -> response.allow_empty=False,max_length=MAX_RECALCULATION_TIMES,help_text=(- "Times of day (UTC) when experiment metrics are recalculated, as 'HH:00:00' strings "+ "Times of day (UTC) when experiment time series are recalculated, as 'HH:00:00' strings "f"on the hour. At most {MAX_RECALCULATION_TIMES} entries, at least "f"{MIN_RECALCULATION_GAP_HOURS} hours apart. Null means the default time (02:00 UTC)."),diff --git a/products/experiments/backend/temporal/ARCHITECTURE.md b/products/experiments/backend/temporal/ARCHITECTURE.mdindex e2ad570a72f1..d01d02f53d7b 100644--- a/products/experiments/backend/temporal/ARCHITECTURE.md+++ b/products/experiments/backend/temporal/ARCHITECTURE.md@@ -1,6 +1,6 @@# Recalculation workflow architecture-This document describes the **recalculation workflow** for experiment metrics: what it does, how it's built, and why we made the design choices we made. For the daily timeseries family of workflows (the cache-warming ones in `posthog/temporal/experiments/`), see that package's `README.md`.+This document describes the **recalculation workflow** for experiment metrics: what it does, how it's built, and why we made the design choices we made. For the daily timeseries family of workflows (the ones in `posthog/temporal/experiments/`), see that package's `README.md`.## What it does@@ -9,7 +9,7 @@ When a user opens an experiment and the cached results look stale, they click **It's distinct from the daily timeseries workflows in two ways:- **One experiment per run.** Triggered by the user, by experiment lifecycle events like launch/stop, or by the hourly scheduled recalculation for enabled teams. Every trigger starts the same per-experiment run; there is no sweep across experiments inside one workflow. See "Scheduled recalculation".-- **Snapshot per run, not cache warming.** Each click creates a new run with its own results, identifiable by `recalculation_id`. The timeseries family overwrites cached values; we preserve them. (Two exceptions: a stopped experiment has a fixed window, and a `METRIC_CONFIG_CHANGE` run reuses the previous window, so those runs share result rows rather than each getting a distinct snapshot. See "Snapshot semantics for the user".)+- **Snapshot per run.** Each click creates a new run with its own results, identifiable by `recalculation_id`. The timeseries family keeps one result per metric per daily window and updates it in place; we keep every run. (Two exceptions: a stopped experiment has a fixed window, and a `METRIC_CONFIG_CHANGE` run reuses the previous window, so those runs share result rows rather than each getting a distinct snapshot. See "Snapshot semantics for the user".)## End-to-end flow@@ -300,7 +300,7 @@ The split is intentional: Grafana tells you about the worker process, PostHog te## What this doc doesn't cover-- The legacy timeseries family of workflows (`posthog/temporal/experiments/`, three workflows that share the daily cache-warming pattern). See that package's `README.md`.+- The legacy timeseries family of workflows (`posthog/temporal/experiments/`, three workflows). See that package's `README.md`.- The Temporal SDK basics. See `posthog/temporal/README.md`.- Frontend polling and rendering in depth. The kea logic has landed (`experimentMetricsLogic.ts`, with `RecalculationStatus.tsx` for rendering); this doc covers only the backend contract it polls. See the "GET path" decisions above and the poll loop in that logic.- Eviction implementation. The plan above is design intent; the actual workflow is a separate PR.diff --git a/products/experiments/frontend/scenes/ExperimentsSettingsScene.tsx b/products/experiments/frontend/scenes/ExperimentsSettingsScene.tsxindex fa4654762e20..1795b3fcb8df 100644--- a/products/experiments/frontend/scenes/ExperimentsSettingsScene.tsx+++ b/products/experiments/frontend/scenes/ExperimentsSettingsScene.tsx@@ -125,7 +125,7 @@ export function ExperimentsSettingsScene(): JSX.Element {<SettingsSection title="Recalculation"><SettingsItemlabel="Daily recalculation time"- description="The time of day when experiment metrics are recalculated, in your project's timezone."+ description="The time of day when experiment time series are recalculated, in your project's timezone."><ExperimentRecalculationTime /></SettingsItem>