: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
feat(signals): aggregate frozen monitoring outcomes (#124559)
Mikayla Thompsonb457b667c3a7
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.mdindex 85e039beb5ce..630a89965ce8 100644--- a/docs/internal/signals-pr-lifecycle.md+++ b/docs/internal/signals-pr-lifecycle.md@@ -131,12 +131,22 @@ Each retry uses the original window; competing ticks use the same submission IDInsufficient and unsupported results settle this evaluator's work. Final queries defer until the tick can grant their full 20-second timeout; budget deferrals do not consume a retry.Interim query exhaustion and schedule expiry do not consume the final budget: frozen members remain eligible for final verification without changing their check status, window, or error history.State, flag, definition, and attempt guards apply before querying and again when saving.-Final results leave reports in Monitoring; authored-agent checks, report outcome aggregation, assessment, and follow-up research have separate execution paths.+Final results feed report-level aggregation for the current frozen attempt. A sufficiently evidenced failed check closes the attempt immediately, even when other checks are still waiting. All frozen members passing resolves the report. Historical checks and checks added after the snapshot cannot supply or block an all-pass verdict. Missing members, canceled checks, edited definitions, missing soaks, and stale evidence never count as passes.++Each sufficient final verdict updates its check row and publishes its explanation immediately, even while other members are waiting or the report needs assessment. Repeated aggregation does not duplicate these entries.The **Closed** report state (`closed`) means an implementation attempt ended without proving resolution. It is distinct from processing failure and from Resolved. It preserves the original Monitoring timestamp and attempt evidence. Closed reports remain readable, manually resolvable, reopenable, and archivable, but have no dedicated section in the inbox UI. Restoring an archived Closed report returns it to Closed. A Closed child does not count as successful completion of its parent plan, and child updates do not overwrite a parent's Closed outcome.Closed reports still count as acted-on work for scout engagement and organization adoption. A new matching signal follows the existing recurrence path into a fresh linked report; the Closed attempt stays unchanged and supplies context for that report's research. That context preserves the unproven Closed outcome rather than describing the attempt as fixed. Closed reports are excluded from unclaimed-work selection, and child rollup preserves an archived parent's saved Closed outcome.+When no sufficient failure exists, aggregation waits until every frozen member has a final result or exhausts its technical evaluations. Insufficient or unsupported evidence and exhausted technical errors record one durable assessment request while the report remains Monitoring. Three errored evaluation submissions exhaust the existing metric retry budget; errors are never treated as evidence of implementation failure. A later accepted sufficient failure takes priority over a pending assessment request. Final windows are never extended.++Each attempt stores its aggregation state, explanation, considered result IDs, and assessment/research request timestamps. Closing and recording research intent commit in the same transaction. Result acceptance schedules aggregation after commit; the coordinator recovers missed callbacks by comparing persisted result counts rather than timestamps. Duplicate deliveries do not duplicate requests or activity. Every aggregation rechecks tenant, current attempt, enabled Monitoring, check definitions, and fixed windows before changing report state. Finished attempts stop their remaining open checks.++The Monitoring schema includes both outcome and tracker-delivery metadata. Nullable field additions apply atomically before the pending-completion index is created concurrently. Deploy the completion consumer only after both migrations finish.++This aggregation path persists requests only. The report-level assessment worker and dispatch/execution of follow-up research remain separate work; a research request does not claim that a follow-up report has been created.+With `signals-report-metrics` enabled, research gathers short-window baselines before verification and prefers metric-based follow-up checks. It aims for practical 70-80% confidence in improvement, without claiming a calculated confidence score. Observed volume, recurrence, ingestion delay, and deployment timing justify the shortest useful query and wait. Frequent or high-volume checks can use 4-8 hours, allowing for several hours of deployment delay before the fix reaches users. Around 24 hours or several days require the corresponding activity or rollout evidence. Agent checks remain available when interpretation or unsupported measurements prevent a useful metric check. Missing activity is not success. These prompt preferences do not change execution, schema defaults, or final outcomes.The server refuses new Monitoring definitions when `signals-report-monitoring` is disabled or unavailable and omits the definition from check responses. Stored definitions remain intact. Research carries its definition-visibility decision into reconciliation, so flag recovery during a run does not replace an unchanged check or reset its approval and schedule. Existing definitions, charts, check schedules, and Resolved outcomes otherwise follow their current behavior.diff --git a/playwright/e2e/sql-editor-axis-labels.spec.ts b/playwright/e2e/sql-editor-axis-labels.spec.tsindex 7f871e0d77fe..22230d59131c 100644--- a/playwright/e2e/sql-editor-axis-labels.spec.ts+++ b/playwright/e2e/sql-editor-axis-labels.spec.ts@@ -18,7 +18,7 @@ test.describe('SQL editor axis labels', () => {test.beforeAll(async ({ playwrightSetup }) => {workspace = await playwrightSetup.createWorkspace({- use_current_time: true,+ no_demo_data: true,skip_onboarding: true,insights: [{@@ -27,7 +27,7 @@ test.describe('SQL editor axis labels', () => {kind: NodeKind.DataVisualizationNode,source: {kind: NodeKind.HogQLQuery,- query: 'SELECT event, count() AS events, uniq(distinct_id) AS people FROM events GROUP BY event ORDER BY events DESC LIMIT 5',+ query: "SELECT 'sample' AS event, 10 AS events, 5 AS people",},display: ChartDisplayType.ActionsBar,chartSettings: {diff --git a/products/signals/backend/artefact_schemas.py b/products/signals/backend/artefact_schemas.pyindex d27521d70372..56b3cad82178 100644--- a/products/signals/backend/artefact_schemas.py+++ b/products/signals/backend/artefact_schemas.py@@ -1187,7 +1187,12 @@ class CheckCancelled(CheckLifecycleEntry):"""reason: Literal[- "stopped_by_person", "stopped_by_scout", "replaced_by_research", "replaced_by_request", "no_check_lane"+ "stopped_by_person",+ "stopped_by_scout",+ "replaced_by_research",+ "replaced_by_request",+ "no_check_lane",+ "monitoring_completed",] = Field(description="Which path stopped the check.")diff --git a/products/signals/backend/migrations/0217_monitoring_report_outcomes.py b/products/signals/backend/migrations/0217_monitoring_report_outcomes.pynew file mode 100644index 000000000000..2187d6448c53--- /dev/null+++ b/products/signals/backend/migrations/0217_monitoring_report_outcomes.py@@ -0,0 +1,73 @@+from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [("signals", "0216_signalteamconfig_anomaly_scoring_enabled")]++ operations = [+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="aggregation_checked_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="aggregation_reason",+ field=models.TextField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="aggregation_result_ids",+ field=models.JSONField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="aggregation_state",+ field=models.CharField(+ blank=True,+ choices=[+ ("waiting", "Waiting"),+ ("passed", "Passed"),+ ("failed", "Failed"),+ ("assessment_required", "Assessment Required"),+ ],+ max_length=24,+ null=True,+ ),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="assessment_requested_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="research_requested_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="tracker_issue_close_requested_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="tracker_issue_close_processed_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="tracker_issue_close_next_attempt_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreportmonitoringattempt",+ name="close_pr_on_resolve",+ field=models.BooleanField(blank=True, null=True),+ ),+ migrations.AddField(+ model_name="signalreporttrackerissue",+ name="close_comment_posted_at",+ field=models.DateTimeField(blank=True, null=True),+ ),+ ]diff --git a/products/signals/backend/migrations/0218_monitoring_tracker_close_index.py b/products/signals/backend/migrations/0218_monitoring_tracker_close_index.pynew file mode 100644index 000000000000..57e947cc3c22--- /dev/null+++ b/products/signals/backend/migrations/0218_monitoring_tracker_close_index.py@@ -0,0 +1,24 @@+from django.db import migrations, models++from posthog.migration_helpers import SafeAddIndexConcurrently+++class Migration(migrations.Migration):+ atomic = False++ dependencies = [("signals", "0217_monitoring_report_outcomes")]++ operations = [+ SafeAddIndexConcurrently(+ model_name="signalreportmonitoringattempt",+ index=models.Index(+ models.F("tracker_issue_close_next_attempt_at").asc(nulls_first=True),+ models.F("tracker_issue_close_requested_at"),+ models.F("id"),+ condition=models.Q(+ tracker_issue_close_requested_at__isnull=False, tracker_issue_close_processed_at__isnull=True+ ),+ name="signals_pending_tracker_close",+ ),+ ),+ ]diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txtindex 7c5fcf181d28..98dea87fff13 100644--- a/products/signals/backend/migrations/max_migration.txt+++ b/products/signals/backend/migrations/max_migration.txt@@ -1 +1 @@-0216_signalteamconfig_anomaly_scoring_enabled+0218_monitoring_tracker_close_indexdiff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex 9f31a443b574..d12a25e1af87 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -55,6 +55,7 @@ from products.signals.backend.enums import (signal_source_product_choices,)from products.signals.backend.report_checks import MAX_CHECK_TITLE_LENGTH+from products.signals.backend.report_monitoring_aggregation import MonitoringAggregationlogger = logging.getLogger(__name__)@@ -1235,6 +1236,7 @@ class SignalReportTrackerIssue(TeamScopedRootMixin, UUIDModel):pr_linked_at = models.DateTimeField(null=True, blank=True)# When we closed the issue in the provider, after the report was dismissed.closed_at = models.DateTimeField(null=True, blank=True)+ close_comment_posted_at = models.DateTimeField(null=True, blank=True)created_at = models.DateTimeField(auto_now_add=True)updated_at = models.DateTimeField(auto_now=True)@@ -2657,12 +2659,33 @@ class SignalReportMonitoringAttempt(UUIDModel):report = models.ForeignKey(SignalReport, on_delete=models.CASCADE, related_name="monitoring_attempts")monitoring_started_at = models.DateTimeField()check_versions = models.JSONField(default=dict)+ aggregation_state = models.CharField(max_length=24, choices=MonitoringAggregation, null=True, blank=True)+ aggregation_result_ids = models.JSONField(null=True, blank=True)+ aggregation_reason = models.TextField(null=True, blank=True)+ aggregation_checked_at = models.DateTimeField(null=True, blank=True)+ assessment_requested_at = models.DateTimeField(null=True, blank=True)+ research_requested_at = models.DateTimeField(null=True, blank=True)+ tracker_issue_close_requested_at = models.DateTimeField(null=True, blank=True)+ tracker_issue_close_processed_at = models.DateTimeField(null=True, blank=True)+ tracker_issue_close_next_attempt_at = models.DateTimeField(null=True, blank=True)+ close_pr_on_resolve = models.BooleanField(null=True, blank=True)created_at = models.DateTimeField(auto_now_add=True)class Meta:constraints = [models.UniqueConstraint(fields=["report", "monitoring_started_at"], name="signals_attempt_period_uniq")]+ indexes = [+ models.Index(+ models.F("tracker_issue_close_next_attempt_at").asc(nulls_first=True),+ models.F("tracker_issue_close_requested_at"),+ models.F("id"),+ condition=models.Q(+ tracker_issue_close_requested_at__isnull=False, tracker_issue_close_processed_at__isnull=True+ ),+ name="signals_pending_tracker_close",+ ),+ ]class SignalReportMonitoringResult(UUIDModel):diff --git a/products/signals/backend/report_check_artefacts.py b/products/signals/backend/report_check_artefacts.pyindex 7b2321c5e92e..45442363f03d 100644--- a/products/signals/backend/report_check_artefacts.py+++ b/products/signals/backend/report_check_artefacts.py@@ -104,7 +104,12 @@ def write_check_cancelled(check: SignalReportCheck,*,reason: Literal[- "stopped_by_person", "stopped_by_scout", "replaced_by_research", "replaced_by_request", "no_check_lane"+ "stopped_by_person",+ "stopped_by_scout",+ "replaced_by_research",+ "replaced_by_request",+ "no_check_lane",+ "monitoring_completed",],attribution: ArtefactAttribution,) -> None:diff --git a/products/signals/backend/report_check_authoring.py b/products/signals/backend/report_check_authoring.pyindex 03834f1965dd..c71406c6cce1 100644--- a/products/signals/backend/report_check_authoring.py+++ b/products/signals/backend/report_check_authoring.py@@ -479,7 +479,12 @@ def cancel_check(check: SignalReportCheck,*,reason: Literal[- "stopped_by_person", "stopped_by_scout", "replaced_by_research", "replaced_by_request", "no_check_lane"+ "stopped_by_person",+ "stopped_by_scout",+ "replaced_by_research",+ "replaced_by_request",+ "no_check_lane",+ "monitoring_completed",],attribution: ArtefactAttribution,from_statuses: Sequence[str] = SignalReportCheck.OPEN_STATUSES,diff --git a/products/signals/backend/report_check_execution.py b/products/signals/backend/report_check_execution.pyindex 4b7d6ba0a51e..09f8d1c7613a 100644--- a/products/signals/backend/report_check_execution.py+++ b/products/signals/backend/report_check_execution.py@@ -78,6 +78,7 @@ from products.signals.backend.report_lifecycle import (from products.signals.backend.report_metric_refresh import MetricQueryBudgetExhausted, measure_metricfrom products.signals.backend.report_metrics import validate_live_metric_queryfrom products.signals.backend.report_monitoring_attempts import check_definition_version, current_monitoring_attempt+from products.signals.backend.report_monitoring_outcomes import aggregate_due_monitoring_attemptslogger = structlog.get_logger(__name__)@@ -937,6 +938,7 @@ def run_due_report_checks(*, now: datetime | None = None, limit: int = MAX_CHECK_arm_monitoring_checks(now, disabled_monitoring_organization_ids=disabled_organizations)park_checks_on_unresolved_reports(now, disabled_monitoring_organization_ids=disabled_organizations)deadline = time.monotonic() + CHECK_RUN_TIME_BUDGET_SECONDS+ aggregate_due_monitoring_attempts(deadline=deadline, limit=limit)counts: dict[str, int] = {"observed": 0,"passed": 0,diff --git a/products/signals/backend/report_monitoring_aggregation.py b/products/signals/backend/report_monitoring_aggregation.pynew file mode 100644index 000000000000..ba12e50bbdef--- /dev/null+++ b/products/signals/backend/report_monitoring_aggregation.py@@ -0,0 +1,30 @@+from collections.abc import Collection+from enum import StrEnum++from django.db import models+++class MonitoringMemberState(StrEnum):+ WAITING = "waiting"+ PASSED = "passed"+ FAILED = "failed"+ INCONCLUSIVE = "inconclusive"+ EXHAUSTED = "exhausted"+++class MonitoringAggregation(models.TextChoices):+ WAITING = "waiting"+ PASSED = "passed"+ FAILED = "failed"+ ASSESSMENT_REQUIRED = "assessment_required"+++def aggregate_monitoring_members(members: Collection[MonitoringMemberState]) -> MonitoringAggregation:+ states = frozenset(members)+ if MonitoringMemberState.FAILED in states:+ return MonitoringAggregation.FAILED+ if not states or MonitoringMemberState.WAITING in states:+ return MonitoringAggregation.WAITING+ if states == {MonitoringMemberState.PASSED}:+ return MonitoringAggregation.PASSED+ return MonitoringAggregation.ASSESSMENT_REQUIREDdiff --git a/products/signals/backend/report_monitoring_outcomes.py b/products/signals/backend/report_monitoring_outcomes.pynew file mode 100644index 000000000000..1f97e9fcddcf--- /dev/null+++ b/products/signals/backend/report_monitoring_outcomes.py@@ -0,0 +1,223 @@+from __future__ import annotations++import time+from collections import defaultdict+from datetime import datetime, timedelta+from uuid import UUID++from django.db import transaction+from django.db.models import Count, F, Func, IntegerField, OuterRef, Q, Subquery, Value+from django.db.models.functions import Coalesce+from django.utils import timezone++import structlog++from products.signals.backend.artefact_attribution import ArtefactAttribution+from products.signals.backend.artefact_schemas import CheckResult, NoteArtefact+from products.signals.backend.models import (+ SignalReport,+ SignalReportArtefact,+ SignalReportCheck,+ SignalReportMonitoringAttempt,+ SignalReportMonitoringResult,+)+from products.signals.backend.report_checks import MAX_CONSECUTIVE_CHECK_ERRORS+from products.signals.backend.report_content_gates import team_report_monitoring_enabled+from products.signals.backend.report_lifecycle import disabled_monitoring_organizations+from products.signals.backend.report_monitoring_aggregation import (+ MonitoringAggregation,+ MonitoringMemberState,+ aggregate_monitoring_members,+)+from products.signals.backend.report_monitoring_attempts import check_definition_version, current_monitoring_attempt++logger = structlog.get_logger(__name__)+++def _member_results(+ check: SignalReportCheck | None,+ version: str,+ attempt: SignalReportMonitoringAttempt,+ results: list[SignalReportMonitoringResult],+ now: datetime,+) -> list[SignalReportMonitoringResult]:+ if (+ check is None+ or check.status == SignalReportCheck.Status.CANCELLED+ or check_definition_version(check) != version+ or check.soak_minutes is None+ ):+ return []+ end = attempt.monitoring_started_at + timedelta(minutes=check.soak_minutes)+ if end > now:+ return []+ return [+ result+ for result in results+ if result.definition_version == version+ and result.window_start == attempt.monitoring_started_at+ and result.window_end == end+ and end <= result.evaluated_at <= now+ ]+++def _member_state(results: list[SignalReportMonitoringResult]) -> MonitoringMemberState:+ for result in results:+ if result.evidence_status == "sufficient":+ if result.outcome == "failed" and result.expectation_matches is False:+ return MonitoringMemberState.FAILED+ if result.outcome == "passed" and result.expectation_matches is True:+ return MonitoringMemberState.PASSED+ if any(result.evidence_status in {"insufficient", "unsupported"} for result in results):+ return MonitoringMemberState.INCONCLUSIVE+ if sum(result.evidence_status == "errored" for result in results) >= MAX_CONSECUTIVE_CHECK_ERRORS:+ return MonitoringMemberState.EXHAUSTED+ return MonitoringMemberState.WAITING+++def aggregate_monitoring_attempt(*, team_id: int, report_id: UUID, attempt_id: UUID) -> MonitoringAggregation:+ with transaction.atomic():+ report = SignalReport.objects.select_for_update(no_key=True).filter(team_id=team_id, id=report_id).first()+ if (+ report is None+ or report.status != SignalReport.Status.MONITORING+ or not team_report_monitoring_enabled(team_id)+ ):+ return MonitoringAggregation.WAITING+ attempt = current_monitoring_attempt(report)+ if attempt is None or attempt.id != attempt_id:+ return MonitoringAggregation.WAITING+ checks = {+ str(check.id): check+ for check in SignalReportCheck.objects.for_team(team_id)+ .select_for_update()+ .filter(report_id=report.id)+ .filter(Q(id__in=attempt.check_versions) | Q(status__in=SignalReportCheck.OPEN_STATUSES))+ .order_by("id")+ }+ results = list(+ SignalReportMonitoringResult.objects.for_team(team_id)+ .filter(report_id=report.id, attempt_id=attempt.id, report_check_id__in=attempt.check_versions)+ .order_by("created_at", "id")+ )+ by_check: defaultdict[str, list[SignalReportMonitoringResult]] = defaultdict(list)+ for result in results:+ by_check[str(result.report_check_id)].append(result)+ now = timezone.now()+ member_results = {+ check_id: _member_results(checks.get(check_id), version, attempt, by_check[check_id], now)+ for check_id, version in attempt.check_versions.items()+ }+ states = {check_id: _member_state(valid) for check_id, valid in member_results.items()}+ decision = aggregate_monitoring_members(list(states.values()))+ previous = attempt.aggregation_state+ attempt.aggregation_state = decision+ attempt.aggregation_checked_at = now+ attempt.aggregation_result_ids = [str(result.id) for result in results]+ fields = ["aggregation_state", "aggregation_checked_at", "aggregation_result_ids"]+ reason = {+ MonitoringAggregation.WAITING: "Verification is waiting for the remaining follow-up checks.",+ MonitoringAggregation.PASSED: "All follow-up checks passed with sufficient evidence.",+ MonitoringAggregation.FAILED: "A follow-up check failed with sufficient evidence.",+ MonitoringAggregation.ASSESSMENT_REQUIRED: "Final verification needs a report-level assessment.",+ }[decision]+ attempt.aggregation_reason = reason+ fields.append("aggregation_reason")+ if decision == MonitoringAggregation.ASSESSMENT_REQUIRED and attempt.assessment_requested_at is None:+ attempt.assessment_requested_at = now+ fields.append("assessment_requested_at")+ if decision == MonitoringAggregation.FAILED and attempt.research_requested_at is None:+ attempt.research_requested_at = now+ fields.append("research_requested_at")+ if decision == MonitoringAggregation.PASSED and attempt.tracker_issue_close_requested_at is None:+ attempt.tracker_issue_close_requested_at = now+ fields.append("tracker_issue_close_requested_at")+ attempt.save(update_fields=fields)+ for check_id, state in states.items():+ if state not in {MonitoringMemberState.PASSED, MonitoringMemberState.FAILED}:+ continue+ check = checks[check_id]+ if check.status == state.value:+ continue+ result = next(result for result in member_results[check_id] if result.outcome == state.value)+ SignalReportCheck.objects.for_team(team_id).filter(id=check.id).update(+ status=state.value,+ last_outcome=state.value,+ last_outcome_reason=None,+ last_run_at=result.evaluated_at,+ dispatched_at=None,+ updated_at=now,+ )+ check.status = state.value+ SignalReportArtefact.add_log(+ team_id=team_id,+ report_id=str(report.id),+ content=CheckResult(+ check_id=check_id,+ kind=check.kind,+ title=check.title,+ outcome="passed" if state == MonitoringMemberState.PASSED else "failed",+ explanation=result.explanation,+ ),+ attribution=ArtefactAttribution.system(),+ )+ if decision in {MonitoringAggregation.PASSED, MonitoringAggregation.FAILED}:+ # The authoring module imports the coordinator, which imports this module for recovery.+ from products.signals.backend.report_check_authoring import cancel_check # noqa: PLC0415++ for check in checks.values():+ if check.status in SignalReportCheck.OPEN_STATUSES:+ cancel_check(check, reason="monitoring_completed", attribution=ArtefactAttribution.system())+ target = (+ SignalReport.Status.RESOLVED if decision == MonitoringAggregation.PASSED else SignalReport.Status.CLOSED+ )+ report.save(update_fields=report.transition_to(target))+ if decision != MonitoringAggregation.WAITING and decision != previous:+ SignalReportArtefact.add_log(+ team_id=team_id,+ report_id=str(report.id),+ content=NoteArtefact(note=reason),+ attribution=ArtefactAttribution.system(),+ )+ return decision+++def aggregate_monitoring_attempt_safely(*, team_id: int, report_id: UUID, attempt_id: UUID) -> None:+ try:+ aggregate_monitoring_attempt(team_id=team_id, report_id=report_id, attempt_id=attempt_id)+ except Exception:+ logger.exception("signals.monitoring.aggregation_failed", team_id=team_id, attempt_id=str(attempt_id))+++def aggregate_due_monitoring_attempts(*, deadline: float, limit: int) -> None:+ if limit <= 0 or time.monotonic() >= deadline:+ return+ result_count = (+ SignalReportMonitoringResult.objects.unscoped()+ .filter(team_id=OuterRef("team_id"), report_id=OuterRef("report_id"), attempt_id=OuterRef("id"))+ .order_by()+ .values("attempt_id")+ .annotate(total=Count("id"))+ .values("total")+ )+ candidates = (+ SignalReportMonitoringAttempt.objects.unscoped()+ .filter(report__status=SignalReport.Status.MONITORING, monitoring_started_at=F("report__monitoring_started_at"))+ .annotate(+ _result_count=Coalesce(Subquery(result_count[:1]), Value(0)),+ _seen_count=Coalesce(+ Func(F("aggregation_result_ids"), function="jsonb_array_length", output_field=IntegerField()), Value(0)+ ),+ )+ .filter(_result_count__gt=F("_seen_count"))+ )+ disabled = disabled_monitoring_organizations(+ candidates.values_list("report__team__organization_id", flat=True).distinct()+ )+ candidates = candidates.exclude(report__team__organization_id__in=disabled).order_by(+ F("aggregation_checked_at").asc(nulls_first=True), "created_at", "id"+ )[:limit]+ for attempt in candidates:+ if time.monotonic() >= deadline:+ break+ aggregate_monitoring_attempt_safely(team_id=attempt.team_id, report_id=attempt.report_id, attempt_id=attempt.id)diff --git a/products/signals/backend/report_monitoring_results.py b/products/signals/backend/report_monitoring_results.pyindex 58da9334a463..c0472df33e34 100644--- a/products/signals/backend/report_monitoring_results.py+++ b/products/signals/backend/report_monitoring_results.py@@ -1,6 +1,7 @@from __future__ import annotationsfrom datetime import datetime, timedelta+from functools import partialfrom uuid import UUIDfrom django.db import transaction@@ -12,6 +13,7 @@ from products.signals.backend.models import SignalReport, SignalReportCheck, Sigfrom products.signals.backend.report_check_evidence import EvidenceStatusfrom products.signals.backend.report_content_gates import team_report_monitoring_enabledfrom products.signals.backend.report_monitoring_attempts import check_definition_version, current_monitoring_attempt+from products.signals.backend.report_monitoring_outcomes import aggregate_monitoring_attempt_safelyMONITORING_RESULT_ELIGIBLE_STATUSES = (*SignalReportCheck.OPEN_STATUSES,@@ -143,7 +145,7 @@ def save_monitoring_result(evaluation: MonitoringEvaluation) -> SignalReportMoniraise InvalidMonitoringResult("The soak must finish before evaluation and acceptance.")if results.filter(outcome__in=[SignalReportCheck.Outcome.PASSED, SignalReportCheck.Outcome.FAILED]).exists():raise MonitoringResultConflict("The check already has an accepted verdict for this attempt.")- return results.create(+ result = results.create(team_id=evaluation.team_id,report_id=report.id,attempt_id=attempt.id,@@ -160,3 +162,12 @@ def save_monitoring_result(evaluation: MonitoringEvaluation) -> SignalReportMoniexplanation=evaluation.explanation,evidence_refs=list(evaluation.evidence_refs),)+ transaction.on_commit(+ partial(+ aggregate_monitoring_attempt_safely,+ team_id=evaluation.team_id,+ report_id=evaluation.report_id,+ attempt_id=evaluation.attempt_id,+ )+ )+ return resultdiff --git a/products/signals/backend/test/test_report_check_concurrency.py b/products/signals/backend/test/test_report_check_concurrency.pyindex d9d608246766..e83293a11e42 100644--- a/products/signals/backend/test/test_report_check_concurrency.py+++ b/products/signals/backend/test/test_report_check_concurrency.py@@ -35,6 +35,7 @@ from products.signals.backend.report_check_execution import (from products.signals.backend.report_check_monitoring import MONITORING_ERROR_RETRY_AFTER, record_monitoring_observationfrom products.signals.backend.report_checks import MAX_CHECK_HORIZONfrom products.signals.backend.report_monitoring_attempts import check_definition_version, complete_implementation+from products.signals.backend.report_monitoring_outcomes import aggregate_monitoring_attemptfrom products.signals.backend.report_monitoring_results import (InvalidMonitoringResult,MonitoringEvaluation,@@ -199,7 +200,7 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):assert isinstance(result, SignalReportMonitoringResult)assert result.outcome == "passed"self.check.refresh_from_db()- assert self.check.status == change+ assert self.check.status == SignalReportCheck.Status.PASSEDelse:with self.assertRaises(InvalidMonitoringResult):future.result(timeout=10)@@ -248,7 +249,7 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):self._assert_write_waits(future)accepted = save_monitoring_result(evaluation)if change == "conflict":- with self.assertRaises(MonitoringResultConflict):+ with self.assertRaises((MonitoringResultConflict, InvalidMonitoringResult)):future.result(timeout=10)else:duplicate = future.result(timeout=10)@@ -256,6 +257,75 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):assert duplicate.id == accepted.idassert SignalReportMonitoringResult.objects.for_team(self.team.id).count() == 1+ def test_aggregation_preserves_manual_resolution_after_a_report_lock_wait(self) -> None:+ with (+ patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True),+ ThreadPoolExecutor(max_workers=1) as executor,+ ):+ evaluation = replace(self._final_evaluation(), expectation_matches=False)+ with transaction.atomic():+ report = SignalReport.objects.select_for_update(no_key=True).get(+ id=self.report.id, team_id=self.team.id+ )+ save_monitoring_result(evaluation)+ future = self._start_write(+ executor,+ lambda: aggregate_monitoring_attempt(+ team_id=self.team.id, report_id=self.report.id, attempt_id=evaluation.attempt_id+ ),+ )+ self._assert_write_waits(future)+ report.save(update_fields=report.transition_to(SignalReport.Status.RESOLVED))+ future.result(timeout=10)+ self.report.refresh_from_db()+ attempt = SignalReportMonitoringAttempt.objects.for_team(self.team.id).get(id=evaluation.attempt_id)+ assert self.report.status == SignalReport.Status.RESOLVED+ assert attempt.research_requested_at is None++ def test_aggregation_does_not_wait_for_unrelated_historical_checks(self) -> None:+ with (+ patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True),+ patch("products.signals.backend.tasks.close_report_tracker_issue.delay"),+ ThreadPoolExecutor(max_workers=1) as executor,+ ):+ evaluation = self._final_evaluation()+ SignalReportMonitoringResult.objects.for_team(self.team.id).create(+ team_id=self.team.id,+ report_id=self.report.id,+ attempt_id=evaluation.attempt_id,+ report_check_id=self.check.id,+ submission_id=evaluation.submission_id,+ definition_version=evaluation.definition_version,+ window_start=evaluation.window_start,+ window_end=evaluation.window_end,+ evaluated_at=evaluation.evaluated_at,+ outcome="passed",+ evidence_status="sufficient",+ evidence_reason=evaluation.evidence_reason,+ expectation_matches=True,+ explanation=evaluation.explanation,+ )+ historical = SignalReportCheck.objects.for_team(self.team.id).create(+ team_id=self.team.id,+ report=self.report,+ title="An expired observation",+ kind=SignalReportCheck.Kind.METRIC_THRESHOLD,+ status=SignalReportCheck.Status.EXPIRED,+ next_run_at=timezone.now(),+ expires_at=timezone.now(),+ )+ with transaction.atomic():+ SignalReportCheck.objects.for_team(self.team.id).select_for_update().get(id=historical.id)+ future = self._start_write(+ executor,+ lambda: aggregate_monitoring_attempt(+ team_id=self.team.id, report_id=self.report.id, attempt_id=evaluation.attempt_id+ ),+ )+ assert future.result(timeout=10) == "passed"+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.RESOLVED+@parameterized.expand([("cancelled",), ("extended",)])def test_expiry_sweep_preserves_a_concurrent_change(self, change: str) -> None:now = timezone.now()diff --git a/products/signals/backend/test/test_report_check_final_metrics.py b/products/signals/backend/test/test_report_check_final_metrics.pyindex f8c7c34bdcd2..1a868e5620f2 100644--- a/products/signals/backend/test/test_report_check_final_metrics.py+++ b/products/signals/backend/test/test_report_check_final_metrics.py@@ -155,7 +155,7 @@ class TestFinalMetricExecution(BaseTest):("negative_sum", "sum", -1, "inconclusive"),])- def test_final_results_separate_evidence_from_matching_and_do_not_complete_reports(+ def test_final_results_separate_evidence_from_matching_and_aggregate_report_outcomes(self, _name: str, math: str, value: float, outcome: str) -> None:member = self._member(math=math)@@ -189,8 +189,13 @@ class TestFinalMetricExecution(BaseTest):assert sum([summary.passed, summary.failed, summary.inconclusive]) == 1self.report.refresh_from_db()member.check.refresh_from_db()- assert self.report.status == SignalReport.Status.MONITORING- assert member.check.runs_remaining == 3 and member.check.last_outcome is None+ expected_status = {+ "passed": SignalReport.Status.RESOLVED,+ "failed": SignalReport.Status.CLOSED,+ }.get(outcome, SignalReport.Status.MONITORING)+ assert self.report.status == expected_status+ assert member.check.runs_remaining == 3+ assert member.check.last_outcome == (outcome if outcome in {"passed", "failed"} else None)if value == 0:assert result.evidence_status == "insufficient" and result.evidence_reason == "activity_unavailable"elif value < 0:diff --git a/products/signals/backend/test/test_report_monitoring_aggregation.py b/products/signals/backend/test/test_report_monitoring_aggregation.pynew file mode 100644index 000000000000..11a02135b758--- /dev/null+++ b/products/signals/backend/test/test_report_monitoring_aggregation.py@@ -0,0 +1,291 @@+import json+import time+from datetime import timedelta+from uuid import uuid4++import time_machine+from posthog.test.base import BaseTest+from unittest.mock import patch++from django.db import transaction+from django.test import SimpleTestCase+from django.utils import timezone++from parameterized import parameterized++from posthog.models import Team++from products.signals.backend.artefact_attribution import ArtefactAttribution+from products.signals.backend.artefact_schemas import CheckResult+from products.signals.backend.facade.api import organization_acted_on_report+from products.signals.backend.models import (+ SignalReport,+ SignalReportArtefact,+ SignalReportCheck,+ SignalReportMonitoringResult,+)+from products.signals.backend.report_monitoring_aggregation import (+ MonitoringAggregation,+ MonitoringMemberState,+ aggregate_monitoring_members,+)+from products.signals.backend.report_monitoring_attempts import complete_implementation+from products.signals.backend.report_monitoring_outcomes import (+ aggregate_due_monitoring_attempts,+ aggregate_monitoring_attempt,+)+from products.signals.backend.report_monitoring_results import MonitoringEvaluation, save_monitoring_result+++class TestMonitoringAggregation(SimpleTestCase):+ @parameterized.expand(+ [+ ("empty_snapshot_is_not_success", (), "waiting"),+ ("all_passed", ("passed", "passed"), "passed"),+ ("pass_does_not_hide_pending_member", ("passed", "waiting"), "waiting"),+ ("failure_preempts_pending_members", ("waiting", "failed"), "failed"),+ ("failure_preempts_assessment", ("inconclusive", "failed", "exhausted"), "failed"),+ ("assessment_waits_for_other_checks", ("inconclusive", "waiting"), "waiting"),+ ("insufficient_evidence_needs_assessment", ("passed", "inconclusive"), "assessment_required"),+ ("exhausted_errors_are_not_failure", ("passed", "exhausted"), "assessment_required"),+ ]+ )+ def test_outcome_priority(self, _name: str, members: tuple[str, ...], expected: str) -> None:+ assert aggregate_monitoring_members(tuple(MonitoringMemberState(member) for member in members)) == (+ MonitoringAggregation(expected)+ )+++class TestReportMonitoringAggregation(BaseTest):+ def setUp(self) -> None:+ super().setUp()+ self.now = timezone.now()+ self.enterContext(time_machine.travel(self.now, tick=False))+ self.flag = self.enterContext(+ patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True)+ )+ self.close_tracker = self.enterContext(+ patch("products.signals.backend.tracker_issues.close_tracker_issue_for_report", return_value=True)+ )+ self.report = SignalReport.objects.create(+ team=self.team, status=SignalReport.Status.READY, title="Checkout recovery"+ )+ self.checks = [self._check(), self._check(soak_minutes=120)]+ self.attempt = complete_implementation(+ team_id=self.team.id, report_id=self.report.id, monitoring_started_at=self.now - timedelta(hours=2)+ )+ assert self.attempt is not None+ self.report.refresh_from_db()++ def _check(self, *, soak_minutes: int = 60) -> SignalReportCheck:+ return SignalReportCheck.objects.for_team(self.team.id).create(+ team_id=self.team.id,+ report=self.report,+ title="Successful checkouts",+ kind=SignalReportCheck.Kind.METRIC_THRESHOLD,+ config={},+ soak_minutes=soak_minutes,+ next_run_at=self.now,+ expires_at=self.now + timedelta(days=30),+ runs_remaining=3,+ )++ def _evaluation(self, index: int, outcome: str = "passed") -> MonitoringEvaluation:+ check = self.checks[index]+ assert self.attempt is not None and check.soak_minutes is not None+ sufficient = outcome in {"passed", "failed"}+ return MonitoringEvaluation(+ team_id=self.team.id,+ report_id=self.report.id,+ attempt_id=self.attempt.id,+ check_id=check.id,+ submission_id=uuid4(),+ definition_version=self.attempt.check_versions[str(check.id)],+ window_start=self.attempt.monitoring_started_at,+ window_end=self.attempt.monitoring_started_at + timedelta(minutes=check.soak_minutes),+ evaluated_at=self.now,+ evidence_status="sufficient" if sufficient else "errored" if outcome == "errored" else "insufficient",+ evidence_reason="qualifying_observations" if sufficient else "unavailable_evidence",+ expectation_matches=outcome == "passed" if sufficient else None,+ explanation="The fixed-window observation supports this result.",+ evidence_refs=("observation:example",),+ )++ def _aggregate(self) -> MonitoringAggregation:+ assert self.attempt is not None+ return aggregate_monitoring_attempt(team_id=self.team.id, report_id=self.report.id, attempt_id=self.attempt.id)++ def test_all_members_must_pass_and_unsnapshotted_checks_cannot_hold_completion(self) -> None:+ extra = self._check()+ historical = self._check()+ historical.status = SignalReportCheck.Status.EXPIRED+ historical.save(update_fields=["status"])+ with self.captureOnCommitCallbacks(execute=True):+ first = save_monitoring_result(self._evaluation(0))+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.MONITORING+ self.checks[0].refresh_from_db()+ assert self.checks[0].status == SignalReportCheck.Status.PASSED+ assert SignalReportArtefact.objects.filter(report=self.report, type="check_result").count() == 1+ self._aggregate()+ assert SignalReportArtefact.objects.filter(report=self.report, type="check_result").count() == 1+ final = self._evaluation(1)+ with self.captureOnCommitCallbacks(execute=True):+ second = save_monitoring_result(final)+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.RESOLVED+ assert self.attempt is not None+ self.attempt.refresh_from_db()+ assert self.attempt.aggregation_state == "passed"+ assert self.attempt.aggregation_result_ids is not None+ assert set(self.attempt.aggregation_result_ids) == {str(first.id), str(second.id)}+ assert self.attempt.research_requested_at is None and self.attempt.assessment_requested_at is None+ assert set(+ SignalReportCheck.objects.for_team(self.team.id)+ .filter(id__in=[c.id for c in self.checks])+ .values_list("status", flat=True)+ ) == {"passed"}+ extra.refresh_from_db()+ assert extra.status == "cancelled"+ assert save_monitoring_result(final).id == second.id+ assert SignalReportCheck.objects.for_team(self.team.id).filter(runs_remaining=3).count() == 4+ historical.refresh_from_db()+ assert historical.status == SignalReportCheck.Status.EXPIRED+ self.close_tracker.assert_not_called()++ def test_failure_closes_immediately_and_records_research_intent_atomically(self) -> None:+ earlier = SignalReportArtefact.add_log(+ team_id=self.team.id,+ report_id=str(self.report.id),+ content=CheckResult(+ check_id=str(self.checks[0].id),+ kind=self.checks[0].kind,+ title=self.checks[0].title,+ outcome="passed",+ explanation="An earlier observation passed.",+ ),+ attribution=ArtefactAttribution.system(),+ )+ SignalReportArtefact.objects.filter(id=earlier.id, team_id=self.team.id).update(+ created_at=self.now - timedelta(hours=1)+ )+ self.checks[0].last_run_at = self.now - timedelta(hours=1)+ self.checks[0].save(update_fields=["last_run_at"])+ self.checks[1].soak_minutes = 240+ self.checks[1].save(update_fields=["soak_minutes"])+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(0, "failed"))+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.CLOSED+ assert organization_acted_on_report(self.organization.id)+ assert self.report.error is None+ assert self.attempt is not None+ self.attempt.refresh_from_db()+ assert self.attempt.aggregation_state == "failed"+ assert self.attempt.research_requested_at == self.now+ assert self.attempt.assessment_requested_at is None+ self.checks[1].refresh_from_db()+ assert self.checks[1].status == "cancelled"+ assert self._aggregate() == MonitoringAggregation.WAITING+ assert SignalReportArtefact.objects.filter(report=self.report, type="note").count() == 1+ latest = SignalReportArtefact.objects.filter(report=self.report, type="check_result").latest("created_at")+ content = json.loads(latest.content)+ assert content["outcome"] == "failed"+ assert content["explanation"] == self._evaluation(0, "failed").explanation+ assert SignalReportArtefact.objects.filter(report=self.report, type="check_result").count() == 2+ self.checks[0].refresh_from_db()+ assert self.checks[0].last_run_at == self.now+ self.close_tracker.assert_not_called()++ @parameterized.expand([("insufficient",), ("errored",)])+ def test_assessment_waits_for_settlement_and_is_requested_once(self, outcome: str) -> None:+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(0, outcome))+ assert self.attempt is not None+ self.attempt.refresh_from_db()+ assert self.attempt.assessment_requested_at is None+ if outcome == "errored":+ for _ in range(2):+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(0, outcome))+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(1))+ self.attempt.refresh_from_db()+ self.report.refresh_from_db()+ assert self.attempt.aggregation_state == "assessment_required"+ assert self.attempt.assessment_requested_at == self.now+ assert self.attempt.research_requested_at is None+ assert self.report.status == SignalReport.Status.MONITORING+ self.checks[1].refresh_from_db()+ assert self.checks[1].status == SignalReportCheck.Status.PASSED+ self._aggregate()+ assert SignalReportArtefact.objects.filter(report=self.report, type="note").count() == 1+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(0, "failed"))+ self.attempt.refresh_from_db()+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.CLOSED+ assert self.attempt.assessment_requested_at == self.now+ assert self.attempt.research_requested_at == self.now++ @parameterized.expand(+ [+ ("suppressed",),+ ("resolved",),+ ("reopened",),+ ("disabled",),+ ("changed_definition",),+ ("cancelled",),+ ("missing_member",),+ ]+ )+ def test_recovery_cannot_apply_stale_or_incomplete_evidence(self, change: str) -> None:+ save_monitoring_result(self._evaluation(0))+ save_monitoring_result(self._evaluation(1))+ if change in {"suppressed", "resolved", "reopened"}:+ target = {"suppressed": "suppressed", "resolved": "resolved", "reopened": "ready"}[change]+ self.report.save(update_fields=self.report.transition_to(SignalReport.Status(target)))+ elif change == "disabled":+ self.flag.return_value = False+ elif change == "changed_definition":+ SignalReportCheck.objects.for_team(self.team.id).filter(id=self.checks[1].id).update(+ title="A different expectation"+ )+ elif change == "cancelled":+ SignalReportCheck.objects.for_team(self.team.id).filter(id=self.checks[1].id).update(status="cancelled")+ else:+ self.checks[1].delete()+ prior_status = self.report.status+ aggregate_due_monitoring_attempts(deadline=time.monotonic() + 30, limit=10)+ self.report.refresh_from_db()+ assert self.report.status == prior_status+ assert self.attempt is not None+ self.attempt.refresh_from_db()+ assert self.attempt.assessment_requested_at is None and self.attempt.research_requested_at is None++ def test_lost_callback_is_recovered_and_other_teams_cannot_complete_it(self) -> None:+ with self.captureOnCommitCallbacks(execute=True):+ save_monitoring_result(self._evaluation(0))+ save_monitoring_result(self._evaluation(1, "failed"))+ other = Team.objects.create(organization=self.organization)+ assert self.attempt is not None+ assert (+ aggregate_monitoring_attempt(team_id=other.id, report_id=self.report.id, attempt_id=self.attempt.id)+ == MonitoringAggregation.WAITING+ )+ aggregate_due_monitoring_attempts(deadline=time.monotonic() + 30, limit=10)+ self.report.refresh_from_db()+ assert self.report.status == SignalReport.Status.CLOSED++ def test_rolled_back_result_cannot_leave_a_request_or_transition(self) -> None:+ with self.assertRaises(RuntimeError), self.captureOnCommitCallbacks(execute=True):+ with transaction.atomic():+ save_monitoring_result(self._evaluation(0, "failed"))+ self._aggregate()+ raise RuntimeError("Abort the enclosing write")+ self.report.refresh_from_db()+ assert self.attempt is not None+ self.attempt.refresh_from_db()+ assert self.report.status == SignalReport.Status.MONITORING+ assert self.attempt.research_requested_at is None+ assert not SignalReportMonitoringResult.objects.for_team(self.team.id).exists()diff --git a/products/signals/frontend/inbox/components/detail/artefactTypes.ts b/products/signals/frontend/inbox/components/detail/artefactTypes.tsindex 838fbd0e6f27..06b24735927f 100644--- a/products/signals/frontend/inbox/components/detail/artefactTypes.ts+++ b/products/signals/frontend/inbox/components/detail/artefactTypes.ts@@ -160,7 +160,13 @@ export interface CheckExpiredContent extends CheckLifecycleContent {}export interface CheckCancelledContent extends CheckLifecycleContent {- reason?: 'stopped_by_person' | 'stopped_by_scout' | 'replaced_by_research' | 'replaced_by_request' | 'no_check_lane'+ reason?:+ | 'stopped_by_person'+ | 'stopped_by_scout'+ | 'replaced_by_research'+ | 'replaced_by_request'+ | 'no_check_lane'+ | 'monitoring_completed'}export interface TitleChangeContent {diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.tsindex a106472eed0d..a77f94c518be 100644--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts@@ -85,7 +85,7 @@ describe('reportCheckPresentation', () => {expect(markup).not.toContain('Window end:')})- it.each(['resolved', 'ready', 'suppressed', 'potential'] as const)(+ it.each(['resolved', 'closed', 'ready', 'suppressed', 'potential'] as const)('pauses open checks on a %s report without hiding historical verdicts',(reportStatus) => {const checks = [diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.tsindex 40fa6e6f713e..2989447cf81f 100644--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts@@ -368,6 +368,7 @@ const CHECK_CANCELLED_REASONS: Record<string, string> = {replaced_by_research: 'Replaced when research re-ran on this report and wrote a new check',replaced_by_request: 'Replaced on request by a revised check',no_check_lane: 'Stopped because this project has no scout that can run it',+ monitoring_completed: 'Stopped because this Monitoring attempt ended',}/**