:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(signals): describe check scheduling during monitoring (#126589)
Mikayla Thompsonfb3dd1d986db
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.mdindex 924c412c1cb7..439aca836d98 100644--- a/docs/internal/signals-pr-lifecycle.md+++ b/docs/internal/signals-pr-lifecycle.md@@ -62,6 +62,8 @@ Archive and restore preserve the attempt and original start, including expiry re## Follow-up checks+With `signals-report-monitoring` enabled, pending check activity says the check runs during monitoring and describes the wait before final evaluation from the start of monitoring. Interim metric measurements may run during that wait. With the flag disabled, the activity retains the Resolved trigger wording.+Scout and research guidance asks for a verified live observation metric when a central quantitative claim comes from events.A count can justify a metric without a chart or a change over time.The metric must match the finding's filters, population, exclusions, window, and aggregation.diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex c1694727969a..23e9ee04fcb1 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -237,6 +237,7 @@ export const FEATURE_FLAGS = {SIGNALS_PR_REFUNDS: 'signals-pr-refunds', // owner: #team-self-driving, gates the inbox PR refund flow (also checked server-side)SIGNALS_REPORT_CHECKS_REPLACE: 'signals-report-checks-replace', // owner: #team-self-drivingSIGNALS_REPORT_METRICS: 'signals-report-metrics', // owner: #team-self-driving, gates the live impact metrics on inbox report rows and the report detail, and the snapshot refresh calls they make+ SIGNALS_REPORT_MONITORING: 'signals-report-monitoring', // owner: #team-self-drivingSTARTUP_PROGRAM_INTENT: 'startup-program-intent', // owner: @pawel-cebula #team-billingSURVEYS_ACTIONS: 'surveys-actions', // owner: #team-surveysSURVEYS_ADAPTIVE_LIMITS: 'surveys-adaptive-limits', // owner: #team-surveysdiff --git a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsxindex 0ff5110aacd7..c149e37569cd 100644--- a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx+++ b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx@@ -29,6 +29,7 @@ import { LemonCard, LemonTag, type LemonTagType, Link, ProfilePicture, Tooltip }import { CodeSnippet, Language } from 'lib/components/CodeSnippet'import { TZLabel } from 'lib/components/TZLabel'+import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'import { capitalizeFirstLetter } from 'lib/utils/strings'import type { SignalNode } from 'scenes/debug/signals/types'@@ -593,7 +594,7 @@ function RankingScoreBody({ score }: { score: RankingScoreView }): JSX.Element {)}-function renderArtefactSummary(artefact: SignalReportArtefact): JSX.Element | null {+function renderArtefactSummary(artefact: SignalReportArtefact, monitoringEnabled: boolean): JSX.Element | null {const content = artefact.contentswitch (artefact.type) {@@ -674,7 +675,7 @@ function renderArtefactSummary(artefact: SignalReportArtefact): JSX.Element | nucase 'check_scheduled':case 'check_expired':case 'check_cancelled': {- const { tag } = CHECK_LIFECYCLE_ENTRIES[artefact.type](content as CheckLifecycleContent)+ const { tag } = CHECK_LIFECYCLE_ENTRIES[artefact.type](content as CheckLifecycleContent, monitoringEnabled)return (<LemonTag size="small" type={tag.type}>{tag.label}@@ -714,6 +715,7 @@ function renderArtefactSummary(artefact: SignalReportArtefact): JSX.Element | nu}function renderArtefactBody({+ monitoringEnabled,reportId,artefact,knownTasks,@@ -723,6 +725,7 @@ function renderArtefactBody({artefact: SignalReportArtefactknownTasks?: Map<string, Task>knownPullRequests: Map<string, SignalReportPullRequestApi>+ monitoringEnabled: boolean}): JSX.Element | null {const content = artefact.contentconst renderPullRequest = (url: string, outcome?: 'closed' | 'already_closed' | 'skipped'): JSX.Element => {@@ -808,7 +811,7 @@ function renderArtefactBody({<CheckLifecycleBodytitle={c.title}rationale={c.rationale}- detail={CHECK_LIFECYCLE_ENTRIES[artefact.type](c).detail}+ detail={CHECK_LIFECYCLE_ENTRIES[artefact.type](c, monitoringEnabled).detail}/>)}@@ -899,15 +902,16 @@ function ArtefactRow({knownSignals?: Map<string, SignalNode>knownPullRequests: Map<string, SignalReportPullRequestApi>}): JSX.Element {+ const monitoringEnabled = useFeatureFlag('SIGNALS_REPORT_MONITORING')const signalId = artefact.type === 'signal_finding' ? (artefact.content as SignalFindingContent).signal_id : nullconst signal = signalId ? knownSignals?.get(signalId) : undefinedconst location = artefactLocationLabel(artefact)const attribution = artefactAttributionLabel(artefact)- const summary = renderArtefactSummary(artefact)+ const summary = renderArtefactSummary(artefact, monitoringEnabled)const body = signal ? (<SignalFindingBody signal={signal} />) : (- renderArtefactBody({ reportId, artefact, knownTasks, knownPullRequests })+ renderArtefactBody({ reportId, artefact, knownTasks, knownPullRequests, monitoringEnabled }))const bodyHasOwnCard = artefact.type === 'signal_finding' || artefact.type === 'commit'const MarkerIcon =diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.tsindex a77f94c518be..32514d8fa93e 100644--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.test.ts@@ -351,15 +351,18 @@ describe('reportCheckPresentation', () => {})describe('lifecycle log entries', () => {- it('gives a dated check its run date and the scout that answers it', () => {+ it.each([false, true])('gives a dated check its run date with monitoring enabled: %s', (monitoringEnabled) => {expect(- checkScheduledEntry({- kind: 'agent',- next_run_at: '2026-09-27T09:00:00Z',- arms_on_resolve: false,- skill_name: 'signals-scout-error-tracking',- runs: 2,- })+ checkScheduledEntry(+ {+ kind: 'agent',+ next_run_at: '2026-09-27T09:00:00Z',+ arms_on_resolve: false,+ skill_name: 'signals-scout-error-tracking',+ runs: 2,+ },+ monitoringEnabled+ )).toEqual({tag: { label: 'Runs Sep 27', type: 'primary' },detail: 'Error tracking scout runs it · 2 runs',@@ -389,6 +392,21 @@ describe('reportCheckPresentation', () => {})+ it.each([+ ['metric_threshold', 480, 'Final evaluation after 8 hours of monitoring'],+ ['metric_threshold', 720, 'Final evaluation after 12 hours of monitoring'],+ ['metric_threshold', 95, 'Final evaluation after 1 hour 35 minutes of monitoring'],+ ['metric_threshold', 0, 'Final evaluation when monitoring starts'],+ ['metric_threshold', null, 'Final evaluation during monitoring'],+ ['agent', 480, 'Final evaluation after 8 hours of monitoring · The follow-up scout runs it'],+ ['agent', 0, 'Final evaluation when monitoring starts · The follow-up scout runs it'],+ ])('describes final evaluation for a pending %s check (soak_minutes=%s)', (kind, soakMinutes, detail) => {+ expect(checkScheduledEntry({ kind, arms_on_resolve: true, soak_minutes: soakMinutes }, true)).toEqual({+ tag: { label: 'Runs during monitoring', type: 'muted' },+ detail,+ })+ })+it('separates a check that never ran from one that ran and never settled', () => {expect(checkExpiredEntry({}).tag.label).toEqual('Never ran')expect(checkExpiredEntry({ last_run_at: '2026-09-20T09:00:00Z' })).toEqual({diff --git a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.tsindex 2989447cf81f..4d5504deabde 100644--- a/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts+++ b/products/signals/frontend/inbox/components/detail/reportCheckPresentation.ts@@ -371,23 +371,35 @@ const CHECK_CANCELLED_REASONS: Record<string, string> = {monitoring_completed: 'Stopped because this Monitoring attempt ended',}+function pendingCheckTiming(content: CheckScheduledContent, monitoringEnabled: boolean): string {+ if (monitoringEnabled) {+ if (content.soak_minutes == null) {+ return 'Final evaluation during monitoring'+ }+ return content.soak_minutes === 0+ ? 'Final evaluation when monitoring starts'+ : `Final evaluation after ${monitoringPeriodLabel(content.soak_minutes)} of monitoring`+ }+ if (!content.soak_minutes) {+ return 'Starts when this report is resolved'+ }+ return `${content.kind === 'metric_threshold' ? 'At least' : 'Starts'} ${soakLabel(content.soak_minutes)} after this report is resolved`+}+/*** The entry written when a check is attached. A check on an open report has no date to give yet,* so it says what starts the clock instead of naming a day it cannot keep.*/-export function checkScheduledEntry(content: CheckScheduledContent): CheckLifecycleEntry {+export function checkScheduledEntry(content: CheckScheduledContent, monitoringEnabled = false): CheckLifecycleEntry {const lane = laneRunsIt(content.kind, content.skill_name)const runs = content.runs && content.runs > 1 ? `${content.runs} runs` : nullif (content.arms_on_resolve) {- const start = content.soak_minutes- ? `${content.kind === 'metric_threshold' ? 'At least' : 'Starts'} ${soakLabel(content.soak_minutes)} after this report is resolved`- : 'Starts when this report is resolved'return {- tag: { label: 'Waiting for resolve', type: 'muted' },+ tag: { label: monitoringEnabled ? 'Runs during monitoring' : 'Waiting for resolve', type: 'muted' },detail: joinDetail([- start,- content.kind === 'metric_threshold' ? 'Waits for a full query window' : null,+ pendingCheckTiming(content, monitoringEnabled),+ content.kind === 'metric_threshold' && !monitoringEnabled ? 'Waits for a full query window' : null,lane,runs,]),@@ -426,7 +438,10 @@ export function checkCancelledEntry(content: CheckCancelledContent): CheckLifecy}/** Which builder reads each lifecycle entry, so the renderer needs one arm rather than three. */-export const CHECK_LIFECYCLE_ENTRIES: Record<string, (content: CheckLifecycleContent) => CheckLifecycleEntry> = {+export const CHECK_LIFECYCLE_ENTRIES: Record<+ string,+ (content: CheckLifecycleContent, monitoringEnabled?: boolean) => CheckLifecycleEntry+> = {check_scheduled: checkScheduledEntry,check_expired: checkExpiredEntry,check_cancelled: checkCancelledEntry,