Skip to content

: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.

fix(signals): clarify monitoring check timing (#121369)

Mikayla Thompson6dd4382d1e6e
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.md
index 5e4b4b92a538..1c15659d7ad1 100644
--- a/docs/internal/signals-pr-lifecycle.md
+++ b/docs/internal/signals-pr-lifecycle.md
@@ -62,11 +62,17 @@ Protected research runs require analytics access before a person can resume or w
## Monitoring metric definitions
+Open checks on Monitoring reports expose a server-derived `monitoring_timing` field when `signals-report-monitoring` is enabled. The field separates a scheduled or due interim measurement from the end of that check's soak window, and identifies paused, archived, unarmed, expired, or incomplete timing. It is omitted for other checks and when the flag is disabled or unavailable. Timing reads do not arm checks, change their schedules, or decide outcomes.
+
+The Follow-up checks rail and Expected impact details show the next interim measurement separately from the check's observation-window end. A closed window reads as awaiting verification, without advertising its deadline as another run. Interim measurements do not spend remaining verification runs. Agent checks and metric checks without a Monitoring definition remain paused during Monitoring. Final evaluation and automatic report completion remain separate work.
+
+Open report details refresh check timing every minute and reload checks immediately when the report status changes, so resolution or archiving replaces cached Monitoring timing before polling stops.
+
Research should make every effort to complete `config.monitoring` for each metric check using the research evidence. If required facts remain unknown, explain what is missing in the rationale instead of inventing values. The definition records the target's `reference_period_minutes`, an explicit `threshold_scaling` policy, and `baseline_period_minutes` when a baseline is supplied. These reference periods are independent of the soak, which defines the Monitoring window, and of the run interval and safety expiry. No existing check receives an inferred definition.
The definition describes a measurement from Monitoring start through the observation time. A `linear` target scales by elapsed minutes divided by reference minutes and requires a single additive event count or property sum without a formula. Session-level sums are excluded because a session can contribute to more than one chart bucket. A `fixed` target keeps its bound as the observation period grows, including for percentages, averages, distinct counts, or explicitly fixed custom targets. Rolling weekly and monthly active-user queries are refused because their lookback overrides the Monitoring bounds; use a distinct user count instead. Display format alone never selects the policy. The baseline retains its own measured period and is not presented as an observation from Monitoring.
-Expected impact keeps the activity chart visible and collapses the target period, scaling policy, baseline, and minimum wait under measurement details. Dynamic chart boundaries refresh at minute intervals so repeated views can reuse cached results. Bucket granularity follows the full displayed range and stays within the 1,000-point budget. The chart preserves date-range filters and spans one reference period on each side of Monitoring start, or now before Monitoring starts, extending through now if necessary. Start and now markers separate the surrounding activity from future dates, whose values remain empty. Compatible charts show target reference lines: additive linear targets scale to a full chart bucket, and fixed rates or property averages/quantiles retain their level. Fixed totals, distinct counts, unknown aggregations, linear calendar intervals longer than a day, and linear day buckets with unequal daylight-saving durations receive no reference line. These references do not impose per-bucket pass/fail rules. This read-time chart does not evaluate the Monitoring target or save a check result. The stored bounded query and whole-window comparison retain their existing Resolved execution meaning. Final Monitoring outcomes remain separate work.
+Expected impact keeps the activity chart visible and collapses the target period, scaling policy, baseline, and check timing under measurement details. Dynamic chart boundaries refresh at minute intervals so repeated views can reuse cached results. Bucket granularity follows the full displayed range and stays within the 1,000-point budget. The chart preserves date-range filters and spans one reference period on each side of Monitoring start, or now before Monitoring starts, extending through now if necessary. Start and now markers separate the surrounding activity from future dates, whose values remain empty. Compatible charts show target reference lines: additive linear targets scale to a full chart bucket, and fixed rates or property averages/quantiles retain their level. Fixed totals, distinct counts, unknown aggregations, linear calendar intervals longer than a day, and linear day buckets with unequal daylight-saving durations receive no reference line. These references do not impose per-bucket pass/fail rules. This read-time chart does not evaluate the Monitoring target or save a check result. The stored bounded query and whole-window comparison retain their existing Resolved execution meaning. Final Monitoring outcomes remain separate work.
During Monitoring, checks with an explicit Monitoring definition sample at their configured run interval, or every 24 hours when none is set. The first observation is due one interval after Monitoring starts. Interim observations run only before Monitoring start plus the check's `soak_minutes`. The full trailing query window does not delay them. Interim queries explicitly use the offline ClickHouse workload; interactive metric refreshes retain their default workload. The next due time is capped at that soak deadline, but this PR does not execute a final check or conclude a report there. A missing or zero soak, or a soak no longer than the sampling interval, produces no interim observations. Each query pins both bounds to Monitoring start and one captured observation cutoff, preserving the population filters. Pinned ranges include partial periods so their bounds match the scaled target. Linear comparisons scale both bounds by elapsed time divided by the reference period, without rounding; fixed comparisons stay unchanged.
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 566b054eef7a..cea76c6b7093 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -11495,25 +11495,29 @@ snapshots:
scenes-app-inbox-detail-expected-impact--metric-check--light:
hash: v1.k794b7964.310dcf4af274f3011c148d9890a4a72507418b43a800535b192d91f4cb709791.HBW72C9W6XXe-cgONBY3vJ9VA4q_26sThTLfFgQv0X0
scenes-app-inbox-detail-expected-impact--monitoring-definition--dark:
- hash: v1.k794b7964.f482d5e856f4a091907c17df4d10f7177ad0b869651f7f12db7bc4068c63af5a.Zuqxv1SHytVPlbUuSBT_BmnXRlo4gG_RWBbqfOvB2EI
+ hash: v1.k794b7964.58e7bdde7ab8b92554a4b2ad7fb68424c27ebc7bb18e40e93d1671489fe2ed28.XMKOV6wUwzwsKWSVTiSbjj7y2abLYeFrhh1_vYlHRuc
scenes-app-inbox-detail-expected-impact--monitoring-definition--light:
- hash: v1.k794b7964.1c48e4db15ed08eccbea00bcbf4ac171f5464150f4fd38b9d8b6a3059568da37.45trlRpmF2xF5WVaJuk4TKp8U2ij2xQyvfCozBCtcFU
+ hash: v1.k794b7964.ce4f3f94e83d15d3be80ef5fab7ca4148205d5389ea0ed06389e2d5b77a21c54.VrNcx2wCHyqnyK3qC2jiA6SLidLpUCR1y6-Fnjo0xn0
scenes-app-inbox-detail-expected-impact--monitoring-definition-flag-off--dark:
hash: v1.k794b7964.2159fc93ebc60413cf0baf9a6c23baf5f9002555a57d494983bcb253cc87b72a.Bnyv9obRcLTsAv-h4FIC7THgEui8LoOsj1H2qjW-lj0
scenes-app-inbox-detail-expected-impact--monitoring-definition-flag-off--light:
hash: v1.k794b7964.6a75f114a3b82e271240e13ebd0ba8d8d21f5a11da64fdf4e1c3fab06920adaa.NgM0xTjXuMDY9mDs2T1TozhdgCmL15Bp9TyklOe3htg
scenes-app-inbox-detail-expected-impact--monitoring-definition-narrow--dark:
- hash: v1.k794b7964.4dfeb114cad317e4cba7ae3f2c67de70c49c7dfa1af1d00f00d38e3f915f6270.FspNXRPH4N3s8bwmSoDqySs6ICe1u3p3br7URhC7UyM
+ hash: v1.k794b7964.809623d87ec66a9f3c2438ac3b0d89838c738e5ceb8e2c866dc3cf315eee922f.77MBOHyuDbAABWmzn_GyRTQTycocf3ZViVv4V26yxC8
scenes-app-inbox-detail-expected-impact--monitoring-definition-narrow--light:
- hash: v1.k794b7964.b7e63fb3ad4441f3e869541223241b21b9650ee2e6316d8e1c4ccbc30d3c436c._UG4NkF_E-VdiJp_pOQEekrk6pKQXoV2wSK8VFdsxtM
+ hash: v1.k794b7964.cf0dc541d523067724d10755144c5fa65c2825d8bfe04928558454648a623c56.4h83sN5i9Pdzzxa65I-9wn7yqTAvyE4VZK2t9M8-f4g
scenes-app-inbox-detail-expected-impact--monitoring-fixed-target--dark:
- hash: v1.k794b7964.91d98ef087648fdc073dc47b0156423532f35e1f16b5fb29008e5691c33a2660.QEHsmnLcRiZVgpjCkv_1Tgf67tQ8eIzb4ZrQVQky83M
+ hash: v1.k794b7964.b60d812dc930d97a889442fd71319543843f6434f09d1923ea8f509942b8aa5b.DIfYuulD17nhvclTxpYZ5Y08x2zKXXW6DBGjJS_V880
scenes-app-inbox-detail-expected-impact--monitoring-fixed-target--light:
- hash: v1.k794b7964.c8474a99c310a6d27e85bff16feecf375ea787c0d2b6dfcb5278ae4327ee0de8.c9c4hHQBYcUX5xP4GOa_xgFxCjdihqVP9iEyo2tP9qo
+ hash: v1.k794b7964.210fe320188acf7e5959ba35870e42bca8b4728fb29ed72031667b6ba6b74c63.WJruO37FR7o92GjIv8PE9VyGPEWq5X7nGhE1Rf4-Q7c
scenes-app-inbox-detail-expected-impact--monitoring-rate-target--dark:
- hash: v1.k794b7964.70cfc07fc2521c97d58224900b8a04bbbf71ab17ad9676ce3d6daee7de293ba3.6Y5k-TjzULfY4BBUpE_tMvk-phrEVF9OSNdOFg806f4
+ hash: v1.k794b7964.b733c20ee84a5eaf01efcf7f7169a1058eab10cd17b6c9146d2f70693feaaa4a.MX4zc2myg-67cHuwFEsy3nRbg4AzqNPfMh4J73FOVic
scenes-app-inbox-detail-expected-impact--monitoring-rate-target--light:
- hash: v1.k794b7964.2c04b68013375c5f011d1ab8a07b869fef0f40840c163711debb09b40a65bb78.WoFy4o2ilcUHQQWtfoJUJPX_WBl1q1dhwdcnNuBuB-8
+ hash: v1.k794b7964.3823fa715a59a2bfe844c3e2045043c2dec6df075de3b617b4fb4b0a891ef381.DxKXtEZaT_xTocZLLQOjuJng-otgs_79wYHRvx34M9o
+ scenes-app-inbox-detail-expected-impact--monitoring-window-ended--dark:
+ hash: v1.k794b7964.6ec50d57e6127d351c2261ee96bab3610d8ce692b263aee1c1159dba9d56770b.o41iNPIsGzixQa7phsk8RrRf-y0w1Z-uDUqEiS6PQqU
+ scenes-app-inbox-detail-expected-impact--monitoring-window-ended--light:
+ hash: v1.k794b7964.01953dba2882e795858f3e65868b260fbb119c649f580d18622016c2620ed3d6.03C3bZztWuRWnPQdiH-kmpRPlSbwwoeMSy_Wu6Ne6PU
scenes-app-inbox-detail-expected-impact--narrow--dark:
hash: v1.k794b7964.a2aea8677171f649ba45a21aa7103003773b36dcf0efe8093a2b4184897ac105.FESJsY6WQhEi2AtXx4RHoVDnx-pVcqRVizXrGQbSus0
scenes-app-inbox-detail-expected-impact--narrow--light:
@@ -11530,6 +11534,14 @@ snapshots:
hash: v1.k794b7964.b2d0413b7187f874afae44518461bb0c5cd33192952321712580e25e3bddd9e1.G8AgFzVjqgR2YdWYjcDkw2Eaoqg97AWcCTYAGH7N-cg
scenes-app-inbox-detail-follow-up-checks--every-state--light:
hash: v1.k794b7964.4655bef6e24070355e1a13becdc153fa8e4abc3dcdbfd2d880db3789376ae8b8.uNlpCBaS1VvSDAmoBks4FPoKLMJIY1G63WlKQ7bd64k
+ scenes-app-inbox-detail-follow-up-checks--monitoring--dark:
+ hash: v1.k794b7964.8203910c8643bee68c2895b77db7101544290e636a6cecaf6a7fd27d6e0fe87b.RurNhxFb2VgJ6Y5LHmClwOH4ihVHG6V9Rivg06oEqlE
+ scenes-app-inbox-detail-follow-up-checks--monitoring--light:
+ hash: v1.k794b7964.be376e8a1d9201dc66aa9ce7bb3433f6095bf9bf9062558aa9318bd94aff95b4.KMp3_kcYPglF3avwTCjwqU2Fa30Bq-Dku0iqNdgLKDA
+ scenes-app-inbox-detail-follow-up-checks--monitoring-narrow-rail--dark:
+ hash: v1.k794b7964.18b179f7ea5b615c1a0bdb2e400033a286a36b4f988b5533f506b07e738851d9.1z0G9ypKvN7BaB_DpHuNAUnoQFF5yz8iij-EcG0wQcs
+ scenes-app-inbox-detail-follow-up-checks--monitoring-narrow-rail--light:
+ hash: v1.k794b7964.9baf07cf5b989f8f22c8fadba9d915297b026d3eee1128dbf28478cc88e0b98c.g2-gNbvDMXhe7Wkkt9JfjDNK3N3S3kyqfaLdwM96-98
scenes-app-inbox-detail-follow-up-checks--narrow-rail--dark:
hash: v1.k794b7964.104726ab1adb7689ef0fa98cb6d95b32488a9d7a1384ff7b311dba39da93eaee.zynwpgfgVGiMUAfnykJ1qIB-DuF-fQ_VAvJWVyVhvIc
scenes-app-inbox-detail-follow-up-checks--narrow-rail--light:
diff --git a/products/signals/backend/report_check_monitoring_timing.py b/products/signals/backend/report_check_monitoring_timing.py
new file mode 100644
index 000000000000..e99f5a5b3596
--- /dev/null
+++ b/products/signals/backend/report_check_monitoring_timing.py
@@ -0,0 +1,73 @@
+from __future__ import annotations
+
+from datetime import datetime
+from typing import TYPE_CHECKING
+
+from django.db.models import TextChoices
+
+from posthog.dataclasses import frozen
+
+from products.signals.backend.report_checks import MAX_CHECK_HORIZON, monitoring_window_end
+
+if TYPE_CHECKING:
+ from products.signals.backend.models import SignalReportCheck
+
+
+class MonitoringCheckTimingState(TextChoices):
+ SCHEDULED = "scheduled", "Scheduled"
+ DUE = "due", "Due"
+ WINDOW_ENDED = "window_ended", "Window ended"
+ NO_INTERIM_MEASUREMENTS = "no_interim_measurements", "No interim measurements"
+ WAITING = "waiting", "Waiting for scheduling"
+ PAUSED = "paused", "Paused during Monitoring"
+ ARCHIVED = "archived", "Archived"
+ UNAVAILABLE = "unavailable", "Timing unavailable"
+ EXPIRY_REACHED = "expiry_reached", "Expiry reached"
+
+
+@frozen
+class MonitoringCheckTiming:
+ state: MonitoringCheckTimingState
+ started_at: datetime | None
+ ends_at: datetime | None
+ next_measurement_at: datetime | None = None
+
+ @classmethod
+ def for_check(cls, check: SignalReportCheck, *, now: datetime) -> MonitoringCheckTiming | None:
+ report = check.report
+ archived = (
+ report.status == report.Status.SUPPRESSED and report.status_before_suppression == report.Status.MONITORING
+ )
+ if check.is_terminal or (report.status != report.Status.MONITORING and not archived):
+ return None
+
+ start = report.monitoring_started_at
+ end = (
+ monitoring_window_end(start, check.soak_minutes)
+ if start is not None and check.soak_minutes is not None
+ else None
+ )
+ if archived:
+ state = MonitoringCheckTimingState.ARCHIVED
+ elif start is None or end is None:
+ state = MonitoringCheckTimingState.UNAVAILABLE
+ elif check.expires_at <= now or now >= start + MAX_CHECK_HORIZON:
+ state = MonitoringCheckTimingState.EXPIRY_REACHED
+ elif check.kind != check.Kind.METRIC_THRESHOLD or not check.config.get("monitoring"):
+ state = MonitoringCheckTimingState.PAUSED
+ elif now >= end:
+ state = MonitoringCheckTimingState.WINDOW_ENDED
+ elif check.status == check.Status.PENDING or check.measurement_start_at != start:
+ state = MonitoringCheckTimingState.WAITING
+ elif check.next_run_at >= min(end, check.expires_at):
+ state = MonitoringCheckTimingState.NO_INTERIM_MEASUREMENTS
+ else:
+ return cls(
+ state=MonitoringCheckTimingState.DUE
+ if check.next_run_at <= now
+ else MonitoringCheckTimingState.SCHEDULED,
+ started_at=start,
+ ends_at=end,
+ next_measurement_at=check.next_run_at,
+ )
+ return cls(state=state, started_at=start, ends_at=end)
diff --git a/products/signals/backend/serializers.py b/products/signals/backend/serializers.py
index 650f28116e78..26a29def6c7f 100644
--- a/products/signals/backend/serializers.py
+++ b/products/signals/backend/serializers.py
@@ -37,6 +37,7 @@ from products.signals.backend.enums import (
SignalSourceType,
SuggestedSourceProduct,
)
+from products.signals.backend.report_check_monitoring_timing import MonitoringCheckTiming, MonitoringCheckTimingState
from products.signals.backend.report_checks import (
CHECK_CONFIG_SCHEMAS,
DEFAULT_CHECK_EXPIRY_AFTER_LAST_RUN,
@@ -2178,7 +2179,39 @@ def redact_check_config(config: Mapping[str, object], policy: ReportMetricAccess
return redacted
+class MonitoringCheckTimingSerializer(serializers.Serializer):
+ state = serializers.ChoiceField(
+ choices=MonitoringCheckTimingState.choices,
+ help_text="Whether this check has an interim measurement due, is paused, or has finished its observation window. No state implies a final verdict.",
+ )
+ started_at = serializers.DateTimeField(
+ allow_null=True, help_text="Original Monitoring start for this check's report."
+ )
+ ends_at = serializers.DateTimeField(
+ allow_null=True,
+ help_text="End of this check's soak window, independent of its target reference period and safety expiry.",
+ )
+ next_measurement_at = serializers.DateTimeField(
+ allow_null=True,
+ help_text="Stored next interim attempt, only when it falls before the soak deadline and expiry. Null when no interim measurement is scheduled.",
+ )
+
+
+class SignalReportCheckSerializerExtension(OpenApiSerializerExtension):
+ target_class = "products.signals.backend.serializers.SignalReportCheckSerializer"
+
+ def map_serializer(self, auto_schema: "AutoSchema", direction: "Direction") -> dict[str, object]:
+ schema: dict[str, object] = auto_schema._map_serializer(self.target, direction, bypass_extensions=True)
+ required = schema.get("required")
+ if isinstance(required, list):
+ schema["required"] = [name for name in required if name != "monitoring_timing"]
+ return schema
+
+
class SignalReportCheckSerializer(serializers.ModelSerializer):
+ monitoring_timing = serializers.SerializerMethodField(
+ help_text="Server-derived timing for open checks on Monitoring reports, including archived Monitoring periods. Omitted when Monitoring is disabled or the check is outside that lane.",
+ )
config = SignalReportCheckConfigField(
help_text=(
"What the check measures and what the result must satisfy; the shape depends on `kind`. "
@@ -2186,18 +2219,29 @@ class SignalReportCheckSerializer(serializers.ModelSerializer):
)
)
+ def _monitoring_enabled(self, instance: SignalReportCheck) -> bool:
+ enabled_by_team = cast(dict[int, bool], self.context.setdefault("report_monitoring_enabled_by_team", {}))
+ if instance.team_id not in enabled_by_team:
+ enabled_by_team[instance.team_id] = team_report_monitoring_enabled(instance.team_id)
+ return enabled_by_team[instance.team_id]
+
+ @extend_schema_field(MonitoringCheckTimingSerializer(allow_null=True))
+ def get_monitoring_timing(self, instance: SignalReportCheck) -> dict[str, object] | None:
+ now = cast(datetime, self.context.setdefault("report_check_timing_now", timezone.now()))
+ timing = MonitoringCheckTiming.for_check(instance, now=now)
+ if timing is None or not self._monitoring_enabled(instance):
+ return None
+ return dict(MonitoringCheckTimingSerializer(timing).data)
+
def to_representation(self, instance: SignalReportCheck) -> dict[str, object]:
representation = dict(super().to_representation(instance))
+ if representation.get("monitoring_timing") is None:
+ representation.pop("monitoring_timing", None)
config = representation.get("config")
if isinstance(config, Mapping):
config = dict(config)
if "monitoring" in config:
- enabled_by_team = cast(
- dict[int, bool], self.context.setdefault("report_monitoring_enabled_by_team", {})
- )
- if instance.team_id not in enabled_by_team:
- enabled_by_team[instance.team_id] = team_report_monitoring_enabled(instance.team_id)
- if not enabled_by_team[instance.team_id]:
+ if not self._monitoring_enabled(instance):
config.pop("monitoring")
if instance.kind == SignalReportCheck.Kind.METRIC_THRESHOLD:
metric = next(
@@ -2226,6 +2270,7 @@ class SignalReportCheckSerializer(serializers.ModelSerializer):
"kind",
"status",
"config",
+ "monitoring_timing",
"approved_at",
"next_run_at",
"soak_minutes",
@@ -2253,18 +2298,22 @@ class SignalReportCheckSerializer(serializers.ModelSerializer):
},
"next_run_at": {
"help_text": (
- "When the coordinator next evaluates the check. Provisional while the check is `pending`: "
- "the report resolving is what sets it."
+ "Stored coordinator schedule, provisional while pending. During Monitoring this can be the "
+ "observation-window end rather than another measurement; use `monitoring_timing` for interim timing."
)
},
"soak_minutes": {
"help_text": (
- "Minimum wait after resolution, in minutes. Metric checks also wait for a full post-resolution "
- "query window. Null on legacy checks that did not record a soak."
+ "This check's observation window during Monitoring, in minutes. Otherwise the minimum wait after "
+ "resolution; metric checks also wait for a full post-resolution query window. Null on legacy checks."
)
},
- "run_interval_minutes": {"help_text": "Gap between runs for a recurring check; null for a one-shot."},
- "runs_remaining": {"help_text": "Evaluations still owed before the check retires as passed."},
+ "run_interval_minutes": {
+ "help_text": "Gap between interim Monitoring measurements or recurring verdicts. Null uses the Monitoring executor's default cadence, otherwise denotes a one-shot check."
+ },
+ "runs_remaining": {
+ "help_text": "Terminal evaluations still owed before the check retires as passed. Interim Monitoring observations do not consume this count."
+ },
"expires_at": {"help_text": "Horizon after which the check retires without running again."},
"last_run_at": {"help_text": "When the check last ran; null before its first run."},
"last_outcome": {"help_text": "Verdict of the most recent run."},
diff --git a/products/signals/backend/test/test_report_check_monitoring_timing.py b/products/signals/backend/test/test_report_check_monitoring_timing.py
new file mode 100644
index 000000000000..d2cf61bc4840
--- /dev/null
+++ b/products/signals/backend/test/test_report_check_monitoring_timing.py
@@ -0,0 +1,159 @@
+from datetime import UTC, datetime, timedelta
+
+from django.test import SimpleTestCase
+
+from parameterized import parameterized
+
+from products.signals.backend.models import SignalReport, SignalReportCheck
+from products.signals.backend.report_check_monitoring_timing import MonitoringCheckTiming
+from products.signals.backend.serializers import SignalReportCheckSerializer
+
+
+class TestMonitoringCheckTiming(SimpleTestCase):
+ @parameterized.expand([("enabled", True), ("disabled", False)])
+ def test_serialized_timing_respects_the_request_rollout_without_revealing_query_data(
+ self, _name: str, enabled: bool
+ ) -> None:
+ now = datetime(2026, 10, 20, tzinfo=UTC)
+ report = SignalReport(team_id=1, status="monitoring", monitoring_started_at=now)
+ check = SignalReportCheck(
+ team_id=1,
+ report=report,
+ kind="metric_threshold",
+ status="active",
+ config={
+ "monitoring": {"reference_period_minutes": 1440, "threshold_scaling": "fixed"},
+ "comparison": {"operator": "lte", "value": 10},
+ "query": {"kind": "InsightVizNode"},
+ },
+ soak_minutes=1440,
+ measurement_start_at=now,
+ next_run_at=now + timedelta(hours=6),
+ expires_at=now + timedelta(days=90),
+ )
+
+ data = SignalReportCheckSerializer(
+ check,
+ context={"report_monitoring_enabled_by_team": {1: enabled}, "report_check_timing_now": now},
+ ).data
+
+ assert data["config"]["query"] is None
+ assert ("monitoring_timing" in data) is enabled
+ if enabled:
+ assert data["monitoring_timing"] == {
+ "state": "scheduled",
+ "started_at": "2026-10-20T00:00:00Z",
+ "ends_at": "2026-10-21T00:00:00Z",
+ "next_measurement_at": "2026-10-20T06:00:00Z",
+ }
+
+ @parameterized.expand(
+ [
+ ("scheduled", 6, 12, "scheduled", True),
+ ("due", 12, 12, "due", True),
+ ("overdue", 13, 12, "due", True),
+ ("last_sample_finished", 20, 24, "no_interim_measurements", False),
+ ("exact_deadline", 24, 24, "window_ended", False),
+ ("late_tick", 30, 24, "window_ended", False),
+ ("query_error_retry_past_end", 20, 26, "no_interim_measurements", False),
+ ]
+ )
+ def test_deadline_is_not_presented_as_another_measurement(
+ self, _name: str, elapsed_hours: int, due_hours: int, state: str, has_next: bool
+ ) -> None:
+ start = datetime(2026, 10, 20, tzinfo=UTC)
+ report = SignalReport(team_id=1, status="monitoring", monitoring_started_at=start)
+ check = SignalReportCheck(
+ team_id=1,
+ report=report,
+ kind="metric_threshold",
+ status="active",
+ config={"monitoring": {"reference_period_minutes": 1440, "threshold_scaling": "fixed"}},
+ soak_minutes=1440,
+ measurement_start_at=start,
+ next_run_at=start + timedelta(hours=due_hours),
+ expires_at=start + timedelta(days=90),
+ )
+
+ timing = MonitoringCheckTiming.for_check(check, now=start + timedelta(hours=elapsed_hours))
+
+ assert timing is not None
+ assert timing.state == state
+ assert timing.ends_at == start + timedelta(days=1)
+ assert timing.next_measurement_at == (check.next_run_at if has_next else None)
+
+ @parameterized.expand(
+ [
+ ("agent", "agent", "active", 1440, True, True, "paused"),
+ ("legacy_metric", "metric_threshold", "active", 1440, False, True, "paused"),
+ ("pending", "metric_threshold", "pending", 1440, True, True, "waiting"),
+ ("missing_start", "metric_threshold", "active", 1440, True, False, "unavailable"),
+ ("missing_soak", "metric_threshold", "active", None, True, True, "unavailable"),
+ ("zero_soak", "metric_threshold", "active", 0, True, True, "window_ended"),
+ ("terminal", "metric_threshold", "errored", 1440, True, True, None),
+ ]
+ )
+ def test_only_armed_monitoring_metrics_offer_measurements(
+ self, _name: str, kind: str, status: str, soak: int | None, definition: bool, has_start: bool, state: str | None
+ ) -> None:
+ now = datetime(2026, 10, 20, tzinfo=UTC)
+ start = now - timedelta(hours=6)
+ report = SignalReport(team_id=1, status="monitoring", monitoring_started_at=start if has_start else None)
+ check = SignalReportCheck(
+ team_id=1,
+ report=report,
+ kind=kind,
+ status=status,
+ config={"monitoring": {"threshold_scaling": "fixed"}} if definition else {},
+ soak_minutes=soak,
+ measurement_start_at=start,
+ next_run_at=now,
+ expires_at=now + timedelta(days=1),
+ )
+
+ timing = MonitoringCheckTiming.for_check(check, now=now)
+
+ assert (timing.state if timing else None) == state
+ assert timing is None or timing.next_measurement_at is None
+
+ @parameterized.expand(
+ [
+ ("resolved", "resolved", None, 90, None),
+ ("reopened", "ready", None, 90, None),
+ ("archived", "suppressed", "monitoring", 90, "archived"),
+ ("expired", "monitoring", None, 0, "expiry_reached"),
+ ("safety_horizon", "monitoring", None, 90, "expiry_reached", 90),
+ ]
+ )
+ def test_report_lifecycle_and_expiry_pause_measurement_promises(
+ self,
+ _name: str,
+ report_status: str,
+ prior_status: str | None,
+ expiry_days: int,
+ state: str | None,
+ monitoring_age_days: int = 0,
+ ) -> None:
+ now = datetime(2026, 10, 20, tzinfo=UTC)
+ report = SignalReport(
+ team_id=1,
+ status=report_status,
+ status_before_suppression=prior_status,
+ monitoring_started_at=now - timedelta(days=monitoring_age_days),
+ )
+ check = SignalReportCheck(
+ team_id=1,
+ report=report,
+ kind="metric_threshold",
+ status="active",
+ config={"monitoring": {"threshold_scaling": "fixed"}},
+ soak_minutes=1440,
+ measurement_start_at=now,
+ next_run_at=now,
+ expires_at=now + timedelta(days=expiry_days),
+ )
+
+ timing = MonitoringCheckTiming.for_check(check, now=now)
+
+ assert (timing.state if timing else None) == state
+ assert timing is None or timing.next_measurement_at is None
diff --git a/products/signals/backend/test/test_report_checks.py b/products/signals/backend/test/test_report_checks.py
index 56a01360cd52..5a7cc2e8ea4e 100644
--- a/products/signals/backend/test/test_report_checks.py
+++ b/products/signals/backend/test/test_report_checks.py
@@ -1762,11 +1762,21 @@ class TestReportCheckAPI(APIBaseTest):
with self.assertRaisesMessage(CheckCreationError, "not enabled"):
self._create(config=config)
response = self.client.get(f"{self.url}{check.id}/")
+ assert "monitoring_timing" not in response.json()
+ SignalReport.objects.filter(id=self.report.id).update(
+ status=SignalReport.Status.MONITORING, monitoring_started_at=timezone.now() - timedelta(hours=1)
+ )
+ monitoring_response = self.client.get(f"{self.url}{check.id}/")
assert response.status_code == status.HTTP_200_OK
+ assert monitoring_response.status_code == status.HTTP_200_OK
returned_config = response.json()["config"]
assert ("monitoring" in returned_config) is (flag_result is True)
assert returned_config["query"] == _PAGEVIEWS
assert returned_config["comparison"] == config["comparison"]
+ assert ("monitoring_timing" in monitoring_response.json()) is (flag_result is True)
+ if flag_result is True:
+ assert monitoring_response.json()["monitoring_timing"]["state"] == "waiting"
+ assert monitoring_response.json()["monitoring_timing"]["next_measurement_at"] is None
check.refresh_from_db()
assert check.config["monitoring"] == monitoring
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index bf0322d2b3ee..335ef40049a4 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -3656,6 +3656,62 @@ export interface AgentCheckConfigApi {
export type SignalReportCheckConfigApi = MetricThresholdConfigApi | AgentCheckConfigApi
+/**
+ * * `scheduled` - Scheduled
+ * * `due` - Due
+ * * `window_ended` - Window ended
+ * * `no_interim_measurements` - No interim measurements
+ * * `waiting` - Waiting for scheduling
+ * * `paused` - Paused during Monitoring
+ * * `archived` - Archived
+ * * `unavailable` - Timing unavailable
+ * * `expiry_reached` - Expiry reached
+ */
+export type MonitoringCheckTimingStateEnumApi =
+ (typeof MonitoringCheckTimingStateEnumApi)[keyof typeof MonitoringCheckTimingStateEnumApi]
+
+export const MonitoringCheckTimingStateEnumApi = {
+ Scheduled: 'scheduled',
+ Due: 'due',
+ WindowEnded: 'window_ended',
+ NoInterimMeasurements: 'no_interim_measurements',
+ Waiting: 'waiting',
+ Paused: 'paused',
+ Archived: 'archived',
+ Unavailable: 'unavailable',
+ ExpiryReached: 'expiry_reached',
+} as const
+
+export interface MonitoringCheckTimingApi {
+ /** Whether this check has an interim measurement due, is paused, or has finished its observation window. No state implies a final verdict.
+ *
+ * * `scheduled` - Scheduled
+ * * `due` - Due
+ * * `window_ended` - Window ended
+ * * `no_interim_measurements` - No interim measurements
+ * * `waiting` - Waiting for scheduling
+ * * `paused` - Paused during Monitoring
+ * * `archived` - Archived
+ * * `unavailable` - Timing unavailable
+ * * `expiry_reached` - Expiry reached */
+ state: MonitoringCheckTimingStateEnumApi
+ /**
+ * Original Monitoring start for this check's report.
+ * @nullable
+ */
+ started_at: string | null
+ /**
+ * End of this check's soak window, independent of its target reference period and safety expiry.
+ * @nullable
+ */
+ ends_at: string | null
+ /**
+ * Stored next interim attempt, only when it falls before the soak deadline and expiry. Null when no interim measurement is scheduled.
+ * @nullable
+ */
+ next_measurement_at: string | null
+}
+
/**
* * `passed` - Passed
* * `failed` - Failed
@@ -3712,21 +3768,23 @@ export interface SignalReportCheckApi {
readonly status: SignalReportCheckStatusEnumApi
/** What the check measures and what the result must satisfy; the shape depends on `kind`. `query` and `baseline_value` are null when you cannot read the data they describe. */
config: SignalReportCheckConfigApi
+ /** Server-derived timing for open checks on Monitoring reports, including archived Monitoring periods. Omitted when Monitoring is disabled or the check is outside that lane. */
+ readonly monitoring_timing?: MonitoringCheckTimingApi | null
/** @nullable */
readonly approved_at: string | null
- /** When the coordinator next evaluates the check. Provisional while the check is `pending`: the report resolving is what sets it. */
+ /** Stored coordinator schedule, provisional while pending. During Monitoring this can be the observation-window end rather than another measurement; use `monitoring_timing` for interim timing. */
readonly next_run_at: string
/**
- * Minimum wait after resolution, in minutes. Metric checks also wait for a full post-resolution query window. Null on legacy checks that did not record a soak.
+ * This check's observation window during Monitoring, in minutes. Otherwise the minimum wait after resolution; metric checks also wait for a full post-resolution query window. Null on legacy checks.
* @nullable
*/
readonly soak_minutes: number | null
/**
- * Gap between runs for a recurring check; null for a one-shot.
+ * Gap between interim Monitoring measurements or recurring verdicts. Null uses the Monitoring executor's default cadence, otherwise denotes a one-shot check.
* @nullable
*/
readonly run_interval_minutes: number | null
- /** Evaluations still owed before the check retires as passed. */
+ /** Terminal evaluations still owed before the check retires as passed. Interim Monitoring observations do not consume this count. */
readonly runs_remaining: number
/** Horizon after which the check retires without running again. */
readonly expires_at: string
diff --git a/products/signals/frontend/inbox/components/detail/ReportCheckRow.stories.tsx b/products/signals/frontend/inbox/components/detail/ReportCheckRow.stories.tsx
index 8006427140f6..aa36d7ef8094 100644
--- a/products/signals/frontend/inbox/components/detail/ReportCheckRow.stories.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportCheckRow.stories.tsx
@@ -133,3 +133,55 @@ export const NarrowRail: Story = {
parameters: { railWidth: 'narrow' },
args: { checks: everyState },
}
+
+export const Monitoring: Story = {
+ args: {
+ checks: [
+ check({
+ id: 'monitoring-scheduled',
+ kind: 'metric_threshold',
+ config: { comparison: { operator: 'lte', value: 0 } },
+ soak_minutes: 1440,
+ run_interval_minutes: 360,
+ next_run_at: '2026-09-21T21:00:00Z',
+ monitoring_timing: {
+ state: 'scheduled',
+ started_at: '2026-09-21T00:00:00Z',
+ ends_at: '2026-09-22T00:00:00Z',
+ next_measurement_at: '2026-09-21T21:00:00Z',
+ },
+ }),
+ check({
+ id: 'monitoring-ended',
+ title: 'The export backlog stays clear',
+ kind: 'metric_threshold',
+ config: { comparison: { operator: 'lte', value: 0 } },
+ soak_minutes: 1440,
+ next_run_at: '2026-09-21T00:00:00Z',
+ monitoring_timing: {
+ state: 'window_ended',
+ started_at: '2026-09-20T00:00:00Z',
+ ends_at: '2026-09-21T00:00:00Z',
+ next_measurement_at: null,
+ },
+ }),
+ check({
+ id: 'monitoring-paused',
+ title: 'No new reports of the export timeout',
+ soak_minutes: 1440,
+ next_run_at: '2026-09-22T00:00:00Z',
+ monitoring_timing: {
+ state: 'paused',
+ started_at: '2026-09-21T00:00:00Z',
+ ends_at: '2026-09-22T00:00:00Z',
+ next_measurement_at: null,
+ },
+ }),
+ ],
+ },
+}
+
+export const MonitoringNarrowRail: Story = {
+ ...Monitoring,
+ parameters: { railWidth: 'narrow' },
+}
diff --git a/products/signals/frontend/inbox/components/detail/ReportCheckRow.tsx b/products/signals/frontend/inbox/components/detail/ReportCheckRow.tsx
index aff98ca2fb02..da3a893e7ff8 100644
--- a/products/signals/frontend/inbox/components/detail/ReportCheckRow.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportCheckRow.tsx
@@ -4,6 +4,7 @@ import { LemonButton, LemonTag, Tooltip } from '@posthog/lemon-ui'
import { LemonDialog } from 'lib/lemon-ui/LemonDialog'
import { ReportCheckRowData } from './reportCheckPresentation'
+import { ReportCheckTiming } from './ReportCheckTiming'
/**
* One follow-up check on the report rail: what it claims, where it stands, and the one thing a
@@ -27,13 +28,13 @@ export function ReportCheckRow({
cancelled ? 'opacity-60' : ''
}`}
>
- <div className="flex items-start gap-2 min-w-0">
+ <div className="flex flex-wrap items-start gap-2 min-w-0">
<span className="mt-0.5 shrink-0 text-tertiary [&_svg]:size-3.5">
{check.kind === 'agent' ? <IconClock /> : <IconTrends />}
</span>
<Tooltip title={check.rationale || undefined}>
<span
- className={`min-w-0 flex-1 text-xs leading-snug text-default line-clamp-2 ${
+ className={`min-w-0 flex-1 basis-32 text-xs leading-snug text-default line-clamp-2 ${
cancelled ? 'line-through' : ''
}`}
>
@@ -45,7 +46,9 @@ export function ReportCheckRow({
</LemonTag>
</div>
<div className="flex items-end gap-2 min-w-0 pl-[1.375rem]">
- <span className="min-w-0 flex-1 text-xs leading-snug text-tertiary">{detail}</span>
+ <span className="min-w-0 flex-1 text-xs leading-snug text-tertiary">
+ <ReportCheckTiming check={check} detail={detail} />
+ </span>
{cancellable && (
<LemonButton
type="tertiary"
diff --git a/products/signals/frontend/inbox/components/detail/ReportCheckTiming.tsx b/products/signals/frontend/inbox/components/detail/ReportCheckTiming.tsx
new file mode 100644
index 000000000000..caab45ab2a1c
--- /dev/null
+++ b/products/signals/frontend/inbox/components/detail/ReportCheckTiming.tsx
@@ -0,0 +1,29 @@
+import { TZLabel } from 'lib/components/TZLabel'
+
+import type { SignalReportCheckApi } from 'products/signals/frontend/generated/api.schemas'
+
+import { monitoringPeriodLabel } from './reportCheckPresentation'
+
+export function ReportCheckTiming({ check, detail }: { check: SignalReportCheckApi; detail: string }): JSX.Element {
+ const timing = check.monitoring_timing
+ return (
+ <span className="flex min-w-0 flex-col gap-1">
+ <span>{detail}</span>
+ {timing && check.soak_minutes != null && (
+ <span>{`Observation window: ${monitoringPeriodLabel(check.soak_minutes)}.`}</span>
+ )}
+ {timing?.next_measurement_at && (
+ <span>
+ <span>{timing.state === 'due' ? 'Measurement due since: ' : 'Next measurement: '}</span>
+ <TZLabel time={timing.next_measurement_at} timestampStyle="absolute" formatDate="MMM D" />
+ </span>
+ )}
+ {timing?.ends_at && (
+ <span>
+ <span>{timing.state === 'window_ended' ? 'Window ended: ' : 'Window end: '}</span>
+ <TZLabel time={timing.ends_at} timestampStyle="absolute" formatDate="MMM D" />
+ </span>
+ )}
+ </span>
+ )
+}
diff --git a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.stories.tsx b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.stories.tsx
index c0731af5bc0d..43ec9c3ae409 100644
--- a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.stories.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.stories.tsx
@@ -68,13 +68,26 @@ const monitoringConfig: MetricThresholdConfigApi = {
},
monitoring: monitoringDefinition,
}
+const monitoringStartedAt = '2026-08-26T00:00:00Z'
const monitoringCheck: SignalReportCheckApi = {
...check,
title: 'Checkout errors stay low',
config: monitoringConfig,
+ status: 'active',
+ soak_minutes: 10080,
+ run_interval_minutes: 360,
+ next_run_at: '2026-08-29T18:00:00Z',
+ created_at: '2026-08-25T00:00:00Z',
+ monitoring_timing: {
+ state: 'scheduled',
+ started_at: monitoringStartedAt,
+ ends_at: '2026-09-02T00:00:00Z',
+ next_measurement_at: '2026-08-29T18:00:00Z',
+ },
}
const flagOffCheck: SignalReportCheckApi = {
- ...monitoringCheck,
+ ...check,
+ title: monitoringCheck.title,
config: { ...monitoringConfig, monitoring: undefined },
}
const fixedTargetCheck: SignalReportCheckApi = {
@@ -158,7 +171,7 @@ export const MonitoringDefinitionFlagOff: Story = {
}
export const MonitoringDefinition: Story = {
- args: { report: { ...report, monitoring_started_at: '2026-08-27T12:00:00Z' } },
+ args: { report: { ...report, monitoring_started_at: monitoringStartedAt } },
parameters: {
check: monitoringCheck,
featureFlags: [FEATURE_FLAGS.SIGNALS_REPORT_CHECKS_REPLACE, 'signals-report-monitoring'],
@@ -183,6 +196,23 @@ export const MonitoringFixedTarget: Story = {
}
export const MetricCheck: Story = {}
+export const MonitoringWindowEnded: Story = {
+ args: MonitoringDefinition.args,
+ parameters: {
+ check: {
+ ...monitoringCheck,
+ soak_minutes: 4320,
+ next_run_at: '2026-08-29T00:00:00Z',
+ monitoring_timing: {
+ state: 'window_ended',
+ started_at: monitoringStartedAt,
+ ends_at: '2026-08-29T00:00:00Z',
+ next_measurement_at: null,
+ },
+ },
+ featureFlags: [FEATURE_FLAGS.SIGNALS_REPORT_CHECKS_REPLACE, 'signals-report-monitoring'],
+ },
+}
export const RangeGoal: Story = { parameters: { check: rangeCheck } }
export const Narrow: Story = { parameters: { narrow: true } }
export const Failed: Story = { parameters: { check: failedCheck } }
diff --git a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.test.tsx b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.test.tsx
index 11b370ccc4fc..949da1c18578 100644
--- a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.test.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.test.tsx
@@ -147,6 +147,7 @@ describe('ReportExpectedImpact', () => {
])
expect(screen.getByText('Measurement window: since Monitoring starts.')).toBeInTheDocument()
expect(screen.getByText('Target reference period: 7 days.')).toBeInTheDocument()
+ expect(screen.getByText('Check observation window after implementation: 14 days.')).toBeInTheDocument()
expect(screen.getByText('· Measured over 14 days')).toBeInTheDocument()
expect(
screen.getByText(
diff --git a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.tsx b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.tsx
index 7e1d123933c9..58dced880dc5 100644
--- a/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportExpectedImpact.tsx
@@ -12,6 +12,7 @@ import { asReportMetricSeriesQuery, formatReportMetricValue } from '../../utils/
import { ReportCheckMetricChart } from './ReportCheckMetricChart'
import { ReportCheckMetricSuggestionModal } from './ReportCheckMetricSuggestionModal'
import { buildReportCheckRows, latestCheckExplanations, monitoringPeriodLabel } from './reportCheckPresentation'
+import { ReportCheckTiming } from './ReportCheckTiming'
import { ReportMonitoringDetails } from './ReportMonitoringDetails'
const MAX_VISIBLE_MEASUREMENTS = 6
@@ -84,8 +85,8 @@ export function ReportExpectedImpact({ report, reportUrl }: { report: SignalRepo
<span>{` per ${monitoringPeriodLabel(config.monitoring.reference_period_minutes)}`}</span>
)}
</p>
- <p className="m-0 text-secondary text-sm">
- {cancellable ? (
+ <div className="m-0 flex flex-wrap items-center gap-x-1 text-secondary text-sm">
+ {cancellable && !check.monitoring_timing ? (
<span>{check.approved_at ? 'Approved measurement' : 'Proposed measurement'}</span>
) : (
<LemonTag type={tag.type}>{tag.label}</LemonTag>
@@ -95,7 +96,7 @@ export function ReportExpectedImpact({ report, reportUrl }: { report: SignalRepo
? ' · Monitoring definition'
: ' · Goal for the full query window'}
</span>
- </p>
+ </div>
{query ? (
<ReportCheckMetricChart
reportId={report.id}
@@ -124,12 +125,17 @@ export function ReportExpectedImpact({ report, reportUrl }: { report: SignalRepo
config={config}
monitoring={config.monitoring}
metric={metric}
- waitDescription={
- cancellable && check.soak_minutes != null
- ? `Minimum wait after implementation: ${monitoringPeriodLabel(check.soak_minutes)}.`
- : cancellable
- ? 'The soak and run schedule are separate from this definition.'
- : detail
+ timingDescription={
+ <ReportCheckTiming
+ check={check}
+ detail={
+ check.monitoring_timing || !cancellable
+ ? detail
+ : check.soak_minutes != null && report.status !== 'resolved'
+ ? `Check observation window after implementation: ${monitoringPeriodLabel(check.soak_minutes)}.`
+ : detail
+ }
+ />
}
/>
) : (
diff --git a/products/signals/frontend/inbox/components/detail/ReportMonitoringDetails.tsx b/products/signals/frontend/inbox/components/detail/ReportMonitoringDetails.tsx
index e82e002cb5de..ebe79e1d4667 100644
--- a/products/signals/frontend/inbox/components/detail/ReportMonitoringDetails.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportMonitoringDetails.tsx
@@ -1,3 +1,5 @@
+import type { ReactNode } from 'react'
+
import type {
MetricThresholdConfigApi,
MonitoringMetricConfigApi,
@@ -11,12 +13,12 @@ export function ReportMonitoringDetails({
config,
monitoring,
metric,
- waitDescription,
+ timingDescription,
}: {
config: MetricThresholdConfigApi
monitoring: MonitoringMetricConfigApi
metric: ReportMetricApi
- waitDescription: string
+ timingDescription: ReactNode
}): JSX.Element {
return (
<details className="text-sm">
@@ -42,7 +44,7 @@ export function ReportMonitoringDetails({
)}
</p>
)}
- <p className="m-0">{waitDescription}</p>
+ <div>{timingDescription}</div>
</div>
</details>
)
diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts
index af99917b37f8..bd0bfb59dc15 100644
--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts
+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts
@@ -76,6 +76,32 @@ describe('reportCheckPresentation', () => {
'Waiting',
'At least 1 day after this report is resolved',
],
+ [
+ 'a Monitoring deadline does not promise another run',
+ {
+ monitoring_timing: {
+ state: 'window_ended',
+ started_at: '2026-09-20T09:00:00Z',
+ ends_at: '2026-09-27T09:00:00Z',
+ next_measurement_at: null,
+ },
+ },
+ 'Awaiting verification',
+ 'The observation window has ended. Interim measurements have stopped. A final verdict has not been recorded.',
+ ],
+ [
+ 'a paused Monitoring check does not promise a scout run',
+ {
+ monitoring_timing: {
+ state: 'paused',
+ started_at: '2026-09-20T09:00:00Z',
+ ends_at: '2026-09-27T09:00:00Z',
+ next_measurement_at: null,
+ },
+ },
+ 'Paused',
+ 'This check is paused during Monitoring.',
+ ],
[
'a scheduled check leads with its run date and its lane',
{},
@@ -232,6 +258,20 @@ describe('reportCheckPresentation', () => {
'2 · running now',
],
['says what pending checks are waiting on', [{ status: 'pending' }], '1 · waiting for resolve'],
+ [
+ 'does not advertise a closed Monitoring window as the next run',
+ [
+ {
+ monitoring_timing: {
+ state: 'window_ended',
+ started_at: null,
+ ends_at: null,
+ next_measurement_at: null,
+ },
+ },
+ ],
+ '1',
+ ],
['says nothing is left to run', [{ status: 'passed' }, { status: 'failed' }], '2 · all done'],
])('%s', (_name, overrides, expected) => {
expect(reportChecksMeta(overrides.map((o) => makeCheck(o)))).toEqual(expected)
diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts
index 363b8922e009..9b9c6d7a500d 100644
--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts
+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts
@@ -120,7 +120,52 @@ function joinDetail(parts: (string | null | undefined)[]): string {
return parts.filter((part): part is string => !!part).join(' · ')
}
+const MONITORING_CHECK_ROWS: Record<
+ NonNullable<SignalReportCheckApi['monitoring_timing']>['state'],
+ Pick<ReportCheckRowData, 'tag' | 'detail'>
+> = {
+ scheduled: {
+ tag: { label: 'Scheduled', type: 'primary' },
+ detail: 'Interim measurements collect evidence during this check’s observation window.',
+ },
+ due: {
+ tag: { label: 'Measurement due', type: 'primary' },
+ detail: 'The next interim measurement is due.',
+ },
+ window_ended: {
+ tag: { label: 'Awaiting verification', type: 'warning' },
+ detail: 'The observation window has ended. Interim measurements have stopped. A final verdict has not been recorded.',
+ },
+ no_interim_measurements: {
+ tag: { label: 'Observing', type: 'primary' },
+ detail: 'No interim measurement is scheduled before this check’s window ends.',
+ },
+ waiting: {
+ tag: { label: 'Waiting', type: 'muted' },
+ detail: 'Waiting for interim measurements to be scheduled.',
+ },
+ paused: {
+ tag: { label: 'Paused', type: 'muted' },
+ detail: 'This check is paused during Monitoring.',
+ },
+ archived: {
+ tag: { label: 'Paused', type: 'muted' },
+ detail: 'Checks are paused while this report is archived.',
+ },
+ unavailable: {
+ tag: { label: 'Timing unavailable', type: 'warning' },
+ detail: 'A Monitoring start time and a check observation window are needed to schedule measurements.',
+ },
+ expiry_reached: {
+ tag: { label: 'Expiry reached', type: 'muted' },
+ detail: 'This check has reached its expiry. No more measurements are scheduled.',
+ },
+}
+
function openCheckRow(check: SignalReportCheckApi): Pick<ReportCheckRowData, 'tag' | 'detail'> {
+ if (check.monitoring_timing) {
+ return MONITORING_CHECK_ROWS[check.monitoring_timing.state]
+ }
const lane = laneLabel(check)
if (check.status === 'pending') {
@@ -272,6 +317,9 @@ export function splitReportCheckRows(rows: ReportCheckRowData[]): {
/** The section header's right-hand summary: how many checks, and then the next thing that happens. */
export function reportChecksMeta(checks: SignalReportCheckApi[]): string {
+ if (checks.some((check) => check.monitoring_timing)) {
+ return String(checks.length)
+ }
if (checks.some(isRunning)) {
// A dispatched check's `next_run_at` is the deadline its run has to answer by, so quoting it
// as the next date would promise a run that is already under way.
diff --git a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts
index 1bc97cd32054..f31b4a0e59c2 100644
--- a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts
@@ -914,6 +914,96 @@ describe('inboxReportDetailLogic', () => {
expect(artefactRequests).toBe(beforeKickoff + 1)
})
+ it.each([SignalReportStatus.RESOLVED, SignalReportStatus.SUPPRESSED])(
+ 'refreshes Monitoring timing on lifecycle changes before stopping polling for %s',
+ async (status) => {
+ await expectLogic(logic).toFinishAllListeners()
+ logic.unmount()
+ jest.useFakeTimers({
+ doNotFake: [
+ 'Date',
+ 'performance',
+ 'queueMicrotask',
+ 'setTimeout',
+ 'clearTimeout',
+ 'setImmediate',
+ 'clearImmediate',
+ 'nextTick',
+ ],
+ })
+ let requests = 0
+ let reportStatus = REPORT.status
+ const check = {
+ id: 'monitoring-check',
+ status: 'active',
+ updated_at: '2026-09-29T00:00:00Z',
+ monitoring_timing: {
+ state: 'scheduled',
+ started_at: '2026-09-29T00:00:00Z',
+ ends_at: '2026-09-30T00:00:00Z',
+ next_measurement_at: '2026-09-29T18:00:00Z',
+ },
+ } as SignalReportCheckApi
+ useMocks({
+ get: {
+ '/api/projects/:team_id/signals/reports/:id/checks/': () => {
+ requests += 1
+ return {
+ results: [
+ {
+ ...check,
+ monitoring_timing:
+ reportStatus === SignalReportStatus.RESOLVED
+ ? undefined
+ : {
+ ...check.monitoring_timing,
+ state:
+ reportStatus === SignalReportStatus.SUPPRESSED
+ ? 'archived'
+ : requests > 1
+ ? 'window_ended'
+ : 'scheduled',
+ next_measurement_at:
+ requests > 1
+ ? null
+ : check.monitoring_timing?.next_measurement_at,
+ },
+ },
+ ],
+ }
+ },
+ },
+ })
+ try {
+ logic = inboxReportDetailLogic({ reportId: REPORT.id, report: REPORT })
+ logic.mount()
+ await expectLogic(logic).toFinishAllListeners()
+ expect(requests).toBe(1)
+ jest.advanceTimersByTime(60000)
+ await expectLogic(logic).toFinishAllListeners()
+ expect(requests).toBe(2)
+ expect(logic.values.reportChecks?.[0].monitoring_timing?.state).toBe('window_ended')
+ inboxReportDetailLogic({ reportId: REPORT.id, report: { ...REPORT } })
+ await expectLogic(logic).toFinishAllListeners()
+ expect(requests).toBe(2)
+ reportStatus = status
+ inboxReportDetailLogic({ reportId: REPORT.id, report: { ...REPORT, status } })
+ await expectLogic(logic).toFinishAllListeners()
+ expect(requests).toBe(3)
+ expect(logic.values.reportChecks?.[0].monitoring_timing?.state).toBe(
+ status === SignalReportStatus.SUPPRESSED ? 'archived' : undefined
+ )
+ inboxReportDetailLogic({ reportId: REPORT.id, report: { ...REPORT, status } })
+ jest.advanceTimersByTime(60000)
+ await expectLogic(logic).toFinishAllListeners()
+ expect(requests).toBe(3)
+ } finally {
+ logic.unmount()
+ jest.useRealTimers()
+ }
+ }
+ )
+
it.each([REPORT.id, 'another-report'])(
'reloads checks and only the selected report %s when a task settles',
async (selectedReportId) => {
diff --git a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
index 6afb6a21c16b..eca8794ca61a 100644
--- a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
@@ -191,6 +191,7 @@ const ACTIVE_STATUSES: SignalReportStatus[] = [
]
const REPORT_TASKS_POLL_INTERVAL_MS = 5000
+const REPORT_CHECK_TIMING_POLL_INTERVAL_MS = 60000
// PR CI checks refresh cadence while the detail is open — a running build's status stays current
// without hammering GitHub. Mirrors the desktop PR-review view's 15s poll.
@@ -1939,6 +1940,9 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([
// The shell re-renders the detail with a refreshed `selectedReport`; re-gate polling on the new status.
if (props.report !== oldProps.report) {
actions.setReport(props.report ?? null)
+ if (props.report?.status !== oldProps.report?.status) {
+ actions.loadReportChecks()
+ }
}
}),
@@ -1951,6 +1955,20 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([
actions.loadReportChecks()
// Seed the report from props so polling is gated on its status from the first tick.
actions.setReport(props.report ?? null)
+ cache.disposables.add(() => {
+ const interval = setInterval(() => {
+ if (
+ values.report?.status !== SignalReportStatus.RESOLVED &&
+ values.report?.status !== SignalReportStatus.SUPPRESSED &&
+ values.report?.status !== SignalReportStatus.DELETED &&
+ !values.reportChecksLoading &&
+ values.reportChecks?.some((check) => check.monitoring_timing)
+ ) {
+ actions.loadReportChecks()
+ }
+ }, REPORT_CHECK_TIMING_POLL_INTERVAL_MS)
+ return () => clearInterval(interval)
+ }, 'reportCheckTimingPoll')
// Register the artefact-log poll once for the lifetime of the mount and let each tick decide
// whether to fetch. Re-arming it from `setReport` instead would reset the 5s cadence on every
// report prop the shell hands down, which is the starvation the PR-checks poll below avoids.
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 6e419587f97e..2758cba216f8 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -69160,6 +69160,62 @@ export namespace Schemas {
inconclusive_total: number;
}
+ /**
+ * * `scheduled` - Scheduled
+ * * `due` - Due
+ * * `window_ended` - Window ended
+ * * `no_interim_measurements` - No interim measurements
+ * * `waiting` - Waiting for scheduling
+ * * `paused` - Paused during Monitoring
+ * * `archived` - Archived
+ * * `unavailable` - Timing unavailable
+ * * `expiry_reached` - Expiry reached
+ */
+ export type MonitoringCheckTimingStateEnum = typeof MonitoringCheckTimingStateEnum[keyof typeof MonitoringCheckTimingStateEnum];
+
+
+ export const MonitoringCheckTimingStateEnum = {
+ Scheduled: 'scheduled',
+ Due: 'due',
+ WindowEnded: 'window_ended',
+ NoInterimMeasurements: 'no_interim_measurements',
+ Waiting: 'waiting',
+ Paused: 'paused',
+ Archived: 'archived',
+ Unavailable: 'unavailable',
+ ExpiryReached: 'expiry_reached',
+ } as const;
+
+ export interface MonitoringCheckTiming {
+ /** Whether this check has an interim measurement due, is paused, or has finished its observation window. No state implies a final verdict.
+ *
+ * * `scheduled` - Scheduled
+ * * `due` - Due
+ * * `window_ended` - Window ended
+ * * `no_interim_measurements` - No interim measurements
+ * * `waiting` - Waiting for scheduling
+ * * `paused` - Paused during Monitoring
+ * * `archived` - Archived
+ * * `unavailable` - Timing unavailable
+ * * `expiry_reached` - Expiry reached */
+ state: MonitoringCheckTimingStateEnum;
+ /**
+ * Original Monitoring start for this check's report.
+ * @nullable
+ */
+ started_at: string | null;
+ /**
+ * End of this check's soak window, independent of its target reference period and safety expiry.
+ * @nullable
+ */
+ ends_at: string | null;
+ /**
+ * Stored next interim attempt, only when it falls before the soak deadline and expiry. Null when no interim measurement is scheduled.
+ * @nullable
+ */
+ next_measurement_at: string | null;
+ }
+
export interface MoveTileTile {
/** Dashboard tile ID to move. */
id: number;
@@ -75704,21 +75760,23 @@ export namespace Schemas {
readonly status: SignalReportCheckStatusEnum;
/** What the check measures and what the result must satisfy; the shape depends on `kind`. `query` and `baseline_value` are null when you cannot read the data they describe. */
config: SignalReportCheckConfig;
+ /** Server-derived timing for open checks on Monitoring reports, including archived Monitoring periods. Omitted when Monitoring is disabled or the check is outside that lane. */
+ readonly monitoring_timing?: MonitoringCheckTiming | null;
/** @nullable */
readonly approved_at: string | null;
- /** When the coordinator next evaluates the check. Provisional while the check is `pending`: the report resolving is what sets it. */
+ /** Stored coordinator schedule, provisional while pending. During Monitoring this can be the observation-window end rather than another measurement; use `monitoring_timing` for interim timing. */
readonly next_run_at: string;
/**
- * Minimum wait after resolution, in minutes. Metric checks also wait for a full post-resolution query window. Null on legacy checks that did not record a soak.
+ * This check's observation window during Monitoring, in minutes. Otherwise the minimum wait after resolution; metric checks also wait for a full post-resolution query window. Null on legacy checks.
* @nullable
*/
readonly soak_minutes: number | null;
/**
- * Gap between runs for a recurring check; null for a one-shot.
+ * Gap between interim Monitoring measurements or recurring verdicts. Null uses the Monitoring executor's default cadence, otherwise denotes a one-shot check.
* @nullable
*/
readonly run_interval_minutes: number | null;
- /** Evaluations still owed before the check retires as passed. */
+ /** Terminal evaluations still owed before the check retires as passed. Interim Monitoring observations do not consume this count. */
readonly runs_remaining: number;
/** Horizon after which the check retires without running again. */
readonly expires_at: string;