: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
refactor(signals): own signal taxonomy in backend, type it via OpenAPI (#67189)
Julian Bez80b0daf204fb
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 7fe44b99201b..aa425709864c 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -5717,29 +5717,29 @@ snapshots:scenes-app-inbox-cards--skeleton--light:hash: v1.k794b7964.24c19ab5df1e4ccb843b1ad726752e3a98aeadaa08595e66cb4b41aff1a9e9a1.Y3z44tkU4jsAYUyXxfl72fTuZ0MKA6_S6TTNCKt5jSgscenes-app-inbox-detail--pull-request--dark:- hash: v1.k794b7964.6397527bf63e4688ab368f3e559fc799d6b81084b1a47a2e0684cc433f76b4e4.zt-Evqx8nfx6aRh9aVuQp97RaKmXd5VTx1iJaVPSfEQ+ hash: v1.k794b7964.386115011be31707aaf9d16697612459ad1c566f71c8e6cec065ac047d0770de.r_CQ_s1jAIwMXL6qVCyT63AvZK5T2vixwTD3_1J2DW4scenes-app-inbox-detail--pull-request--light:- hash: v1.k794b7964.c150db2ef3fde8cf32cd3e52ffc36f07f5feb3661e73195683f449a5411089f5.XYa9bxIEybpm10ZgabQr20tK-jqj4Z2-n9q6-rugNqk+ hash: v1.k794b7964.2c6998881cc1012f7074e095d51d84f8c74f3d8f04a019a3e7e16c70b544e8f6.H7U2xewUqXIanKxXfMUGkTKQg5IX2JNrIYYs3gbnBewscenes-app-inbox-detail--report--dark:- hash: v1.k794b7964.b29bf7ca316b85983477bfc77e0d1c19409165d650ab07e83759b0f32c5c3971.sAoKhsbJEXAhV7EIv0WNt5l7eAwraV0OiqsfI5_6arY+ hash: v1.k794b7964.af9919d42abe14c590a989816603f2973e8e6a5e272260cf5fe3eedd00b162bc.fEhmjESZwg_Qft3lrg346I9iD4GnPEYT9i2rBum_feEscenes-app-inbox-detail--report--light:- hash: v1.k794b7964.719a969f287e94b8a9f5ef14b86a1fc6d110a2fca1faebd72d0d764bb05aee75.lqW38j9thqtdd3EJLRQI0KnYiKC3yNwCZLF61Z6ys44+ hash: v1.k794b7964.56c75cded955fb2f08c09decfaf23c8ee9d3d14aaaeeffe6e0414454630b1e0c.PNDzFwFf1Dw9QDkkQtSetmZkAAqPkqv4GxnYeL5LV_Mscenes-app-inbox-detail--report-minimal--dark:- hash: v1.k794b7964.81c171840492d01ebbf1196b6635c1fb0b888a2ea438237bc16d9bde8a8bf5dc.l3_h4NO5ignAt3wvzGGPSW3C5dOqnrIpcm1umMs7mMU+ hash: v1.k794b7964.bcc48fa880c9368e1b2f9f544b20cb26ed3b7c703acfd48ee60044651dbc71c0.ttJCHwEflRemFjMlI0TU6rXpUePyI4RC8XRhj8P3TaUscenes-app-inbox-detail--report-minimal--light:- hash: v1.k794b7964.3166706b5f992a2ea5af831abb1fbe96423c834837f457a00f267ad0c654ea35.1C5uI5Z1dZStqf_5_SXW3LV4KE2Dj8GvfGSIcfl7-xo+ hash: v1.k794b7964.71a9fc9ab6e75a29954d860103da9b45a1848ea31b0eda5669e97f343d8db986.S8rycB_MQK2wCPMi0gELuVE6Gc62h0Kbmp0g3fuE7i0scenes-app-inbox-detail--run-failed--dark:- hash: v1.k794b7964.f030afe286ec1e50d142fabb31d0996648e06a0e9e37b12d12f3d44f024302d5.S5vk5nT-BnL1a6oxCqC2CB0qZb1Gg2eNKzTwpws-GvU+ hash: v1.k794b7964.6694c0a4ba6adc4c39564eba480983fef70204296e62367e4d4967d0af76e544.SBnSmqIC6wqOb4FbDhPcxHOecFjXvW6mtg6ucQmh9hsscenes-app-inbox-detail--run-failed--light:- hash: v1.k794b7964.d5a8ecccfc7ef2d82d9f6f82c4a469cdfbfbd3cb026e9265573f12fc7c01a1db.JewGsQ_XT-a_3K95GGquwakw-lMbp87T1Wq_0v1WB0U+ hash: v1.k794b7964.ff57ae7224148abe673e732ec5ce814d52f360268ed923eaf02224678fa7e1d2.DcLYT3obN8dPPg66Lrp_IpWPzOgBZM8FywJyKN9Mu-Qscenes-app-inbox-detail--run-in-progress--dark:- hash: v1.k794b7964.119e43abc38ea9936b4466bfa2c842c62387356bdcf363c41963a21c7fccd259.mpidlJKXct_Rqq-uqXo3A2HYgJvgzyz0Mpudh20KsGI+ hash: v1.k794b7964.6267c7d80c83db5568b966906fb475f1785a5faaaa6297ecb767b0de9a0d3424.vvJNzLnzEWkooT0ktwyR4vhZHYGeggrOnYa-OiF6BQ8scenes-app-inbox-detail--run-in-progress--light:- hash: v1.k794b7964.c5cead871a9e54a53ac343ed937ef934d4636a2c5e26705a133137911e575bb8._PR8W5LmrmMDAXI99NEKeIEVeomaeAq-XG8-ho8FGWM+ hash: v1.k794b7964.20d906154218a9ac6d4352299e907146179d6a84562b3d3d0833543a7ad62c66.54IaeT75iihWgtxjXKoOTmBf3KwCZ5oeFQjTmUCQukoscenes-app-inbox-detail--run-ready--dark:- hash: v1.k794b7964.311a892ae30e42d13f91fd65a5eb37b49332c9538565f8e426b0a6b1b6c2a0c7.80oJsl0bc_H46O8Iq8Qu9lNHAE7M0AGmodsLBNsaUxU+ hash: v1.k794b7964.66d1b7c3fc8d79cb7096bff1fbb60b89df30dbaa5910eb33e9575aafe988873c.vSnBncmDHUqdoqa_VuSEmfv4FjISlrTQl7uSh8AoPXIscenes-app-inbox-detail--run-ready--light:- hash: v1.k794b7964.2cd4b6b367800ad972db53677e95438aeb113fdde6c5792ae1317d68577e8354.U_I8gjw4uaRPFd7KeEcqZKiIUkhqz_ZKGiYLsoxsiYA+ hash: v1.k794b7964.658259818177919f6c3fa1c95c07c2ee7b08ac76e3f2e16dd4fa66f1b918d4b0.vVrc6wtImibKFL3EexOIdaRoayuVV3M5eSsWzs9fJlUscenes-app-inbox-pullrequestdiffview--default--dark:hash: v1.k794b7964.564cd678d9da50089c918c63d37c816257091c6c9d7d2f957dc9c96f596d34dc.8ICzP4d5gRBF0h4CT87lZgk82tCHyXIOsszi6P3JQ-Mscenes-app-inbox-pullrequestdiffview--default--light:diff --git a/frontend/src/generated/core/api.schemas.ts b/frontend/src/generated/core/api.schemas.tsindex da1b1a09f8ac..ec17f1e769d8 100644--- a/frontend/src/generated/core/api.schemas.ts+++ b/frontend/src/generated/core/api.schemas.ts@@ -3218,9 +3218,10 @@ export interface PatchedEnterprisePropertyDefinitionApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -3237,7 +3238,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.tsindex 9d30047adef3..5271b3bcbe51 100644--- a/frontend/src/lib/api.ts+++ b/frontend/src/lib/api.ts@@ -18,7 +18,6 @@ import { toParams } from 'lib/utils/url'import { CohortCalculationHistoryResponse } from 'scenes/cohorts/cohortCalculationHistorySceneLogic'import { EventSchema } from 'scenes/data-management/events/eventDefinitionSchemaLogic'import { SchemaPropertyGroup } from 'scenes/data-management/schema/schemaManagementLogic'-import { SignalNode } from 'scenes/debug/signals/types'import {SignalReport,SignalReportArtefact,@@ -5167,9 +5166,6 @@ const api = {): Promise<SignalReportArtefactResponse> {return await new ApiRequest().signalReport(id).withAction('artefacts').withQueryString(params).get()},- async getReportSignals(reportId: string): Promise<{ report: SignalReport | null; signals: SignalNode[] }> {- return await new ApiRequest().signalReport(reportId).withAction('signals').get()- },async delete(id: SignalReport['id']): Promise<void> {await new ApiRequest().signalReport(id).delete()},diff --git a/frontend/src/lib/signals/signalCardSourceLine.ts b/frontend/src/lib/signals/signalCardSourceLine.tsindex 24959c269a65..2fda6e480624 100644--- a/frontend/src/lib/signals/signalCardSourceLine.ts+++ b/frontend/src/lib/signals/signalCardSourceLine.ts@@ -20,11 +20,7 @@ export function scoutDisplayName(skillName: string | null | undefined): string |}/** Human-readable "Product · Signal type" line for inbox / debug signal cards. */-export function signalCardSourceLine(signal: {- source_product: string- source_type: string- extra?: Record<string, unknown>-}): string {+export function signalCardSourceLine(signal: { source_product: string; source_type: string; extra?: unknown }): string {const { source_product, source_type } = signalif (source_product === 'error_tracking') {@@ -64,7 +60,8 @@ export function signalCardSourceLine(signal: {return 'Health checks · Instrumentation issue'}if (source_product === 'signals_scout') {- const skillName = typeof signal.extra?.skill_name === 'string' ? signal.extra.skill_name : undefined+ const extra = signal.extra as { skill_name?: unknown } | undefined+ const skillName = typeof extra?.skill_name === 'string' ? extra.skill_name : undefinedconst name = scoutDisplayName(skillName)return name ? `Scout · ${name}` : 'Scout · Cross-source finding'}diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.jsonindex f1189e722626..0648188b86b7 100644--- a/frontend/src/queries/schema.json+++ b/frontend/src/queries/schema.json@@ -12986,72 +12986,6 @@}]},- "ConversationsTicketSignalExtra": {- "additionalProperties": false,- "properties": {- "channel_detail": {- "type": ["string", "null"]- },- "channel_source": {- "type": "string"- },- "created_at": {- "type": "string"- },- "email_subject": {- "type": ["string", "null"]- },- "priority": {- "type": ["string", "null"]- },- "status": {- "type": "string"- },- "ticket_number": {- "type": "number"- }- },- "required": [- "ticket_number",- "channel_source",- "channel_detail",- "status",- "priority",- "created_at",- "email_subject"- ],- "type": "object"- },- "ConversationsTicketSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/ConversationsTicketSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "conversations",- "type": "string"- },- "source_type": {- "const": "ticket",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"ConversionGoalFilter": {"anyOf": [{@@ -17148,111 +17082,6 @@},"type": "object"},- "EndpointBreakdownLimitExceededSignalExtra": {- "additionalProperties": false,- "properties": {- "breakdown_limit": {- "type": "number"- },- "endpoint_name": {- "type": "string"- }- },- "required": ["endpoint_name", "breakdown_limit"],- "type": "object"- },- "EndpointBreakdownLimitExceededSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/EndpointBreakdownLimitExceededSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "endpoints",- "type": "string"- },- "source_type": {- "const": "endpoint_breakdown_limit_exceeded",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },- "EndpointExecutionFailedSignalExtra": {- "additionalProperties": false,- "properties": {- "endpoint_name": {- "type": "string"- },- "endpoint_version": {- "type": ["number", "null"]- },- "error_class": {- "type": "string"- },- "error_message": {- "type": "string"- },- "materialized": {- "type": "boolean"- },- "saved_query_id": {- "type": ["string", "null"]- }- },- "required": [- "endpoint_name",- "endpoint_version",- "materialized",- "saved_query_id",- "error_class",- "error_message"- ],- "type": "object"- },- "EndpointExecutionFailedSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/EndpointExecutionFailedSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "endpoints",- "type": "string"- },- "source_type": {- "const": "endpoint_execution_failed",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"EndpointLastExecutionTimesRequest": {"additionalProperties": false,"properties": {@@ -17766,35 +17595,6 @@"required": ["results"],"type": "object"},- "EnrichedReviewer": {- "additionalProperties": false,- "properties": {- "github_login": {- "type": "string"- },- "github_name": {- "type": ["string", "null"]- },- "relevant_commits": {- "items": {- "$ref": "#/definitions/RelevantCommit"- },- "type": "array"- },- "user": {- "anyOf": [- {- "$ref": "#/definitions/SignalReviewerUserInfo"- },- {- "type": "null"- }- ]- }- },- "required": ["github_login", "github_name", "relevant_commits", "user"],- "type": "object"- },"EnsembleDetectorConfig": {"additionalProperties": false,"properties": {@@ -18774,46 +18574,6 @@"required": ["id", "name", "description", "assignee", "status", "first_seen"],"type": "object"},- "ErrorTrackingSignalExtra": {- "additionalProperties": false,- "properties": {- "fingerprint": {- "type": "string"- }- },- "required": ["fingerprint"],- "type": "object"- },- "ErrorTrackingSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/ErrorTrackingSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "error_tracking",- "type": "string"- },- "source_type": {- "enum": ["issue_created", "issue_reopened", "issue_spiking"],- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"ErrorTrackingSimilarIssuesQuery": {"additionalProperties": false,"properties": {@@ -23781,67 +23541,6 @@"required": ["cache_key", "is_cached", "last_refresh", "next_allowed_client_refresh", "timezone"],"type": "object"},- "GithubIssueSignalExtra": {- "additionalProperties": false,- "properties": {- "created_at": {- "type": "string"- },- "html_url": {- "type": "string"- },- "labels": {- "items": {- "type": "string"- },- "type": "array"- },- "locked": {- "type": "boolean"- },- "number": {- "type": "number"- },- "state": {- "type": "string"- },- "updated_at": {- "type": "string"- }- },- "required": ["html_url", "number", "labels", "created_at", "updated_at", "locked", "state"],- "type": "object"- },- "GithubIssueSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/GithubIssueSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "github",- "type": "string"- },- "source_type": {- "const": "issue",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"GoalLine": {"additionalProperties": false,"properties": {@@ -24188,74 +23887,6 @@}]},- "HealthCheckSeverity": {- "enum": ["critical", "warning", "info"],- "type": "string"- },- "HealthCheckSignalExtra": {- "additionalProperties": false,- "properties": {- "issue_id": {- "type": "string"- },- "kind": {- "type": "string"- },- "link": {- "description": "Relative in-app path to the resource, e.g. '/web'.",- "type": "string"- },- "payload": {- "additionalProperties": {},- "type": "object"- },- "severity": {- "$ref": "#/definitions/HealthCheckSeverity"- },- "summary": {- "type": "string"- },- "title": {- "type": "string"- },- "url": {- "description": "Absolute URL ({project.url} + link).",- "type": "string"- }- },- "required": ["kind", "severity", "issue_id", "title", "summary", "link", "url", "payload"],- "type": "object"- },- "HealthCheckSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/HealthCheckSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "health_checks",- "type": "string"- },- "source_type": {- "const": "health_issue",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"HeatMapQuerySource": {"$ref": "#/definitions/EventsNode"},@@ -26576,91 +26207,6 @@"enum": ["new", "resurrecting", "returning", "dormant"],"type": "string"},- "LinearIssueSignalExtra": {- "additionalProperties": false,- "properties": {- "created_at": {- "type": "string"- },- "identifier": {- "type": "string"- },- "labels": {- "items": {- "type": "string"- },- "type": "array"- },- "number": {- "type": "number"- },- "priority": {- "type": "number"- },- "priority_label": {- "type": "string"- },- "state_name": {- "type": ["string", "null"]- },- "state_type": {- "type": ["string", "null"]- },- "team_name": {- "type": ["string", "null"]- },- "updated_at": {- "type": "string"- },- "url": {- "type": "string"- }- },- "required": [- "url",- "identifier",- "number",- "priority",- "priority_label",- "labels",- "state_name",- "state_type",- "team_name",- "created_at",- "updated_at"- ],- "type": "object"- },- "LinearIssueSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/LinearIssueSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "linear",- "type": "string"- },- "source_type": {- "const": "issue",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"LinkedinAdsDefaultSources": {"enum": ["linkedin", "li"],"type": "string"@@ -26673,127 +26219,6 @@"enum": ["campaign_groups"],"type": "string"},- "LlmEvalReportSignalExtra": {- "additionalProperties": false,- "properties": {- "evaluation_description": {- "type": "string"- },- "evaluation_id": {- "type": "string"- },- "evaluation_name": {- "type": "string"- },- "period_end": {- "type": "string"- },- "period_start": {- "type": "string"- },- "report_id": {- "type": "string"- },- "report_run_id": {- "type": "string"- }- },- "required": [- "evaluation_id",- "evaluation_name",- "evaluation_description",- "report_id",- "report_run_id",- "period_start",- "period_end"- ],- "type": "object"- },- "LlmEvalSignalExtra": {- "additionalProperties": false,- "properties": {- "evaluation_id": {- "type": "string"- },- "model": {- "type": "string"- },- "provider": {- "type": "string"- },- "target_event_id": {- "type": "string"- },- "target_event_type": {- "type": "string"- },- "trace_id": {- "type": "string"- }- },- "required": ["evaluation_id", "trace_id"],- "type": "object"- },- "LlmEvaluationReportSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/LlmEvalReportSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "llm_analytics",- "type": "string"- },- "source_type": {- "const": "evaluation_report",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },- "LlmEvaluationSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/LlmEvalSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "llm_analytics",- "type": "string"- },- "source_type": {- "const": "evaluation",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"LoadingBlock": {"additionalProperties": false,"properties": {@@ -27213,87 +26638,6 @@},"type": "object"},- "LogsAlertStateChangeSignalExtra": {- "additionalProperties": false,- "properties": {- "action": {- "enum": ["firing", "broken"],- "type": "string"- },- "alert_id": {- "type": "string"- },- "alert_name": {- "type": "string"- },- "consecutive_failures": {- "type": "number"- },- "filters": {- "additionalProperties": {},- "type": "object"- },- "result_count": {- "type": ["number", "null"]- },- "threshold_count": {- "type": "number"- },- "threshold_operator": {- "enum": ["above", "below"],- "type": "string"- },- "url": {- "type": "string"- },- "window_minutes": {- "type": "number"- }- },- "required": [- "alert_id",- "alert_name",- "action",- "threshold_count",- "threshold_operator",- "window_minutes",- "result_count",- "consecutive_failures",- "filters",- "url"- ],- "type": "object"- },- "LogsAlertStateChangeSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/LogsAlertStateChangeSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "logs",- "type": "string"- },- "source_type": {- "const": "alert_state_change",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"LogsOrderBy": {"enum": ["latest", "earliest"],"title": "LogsOrderBy",@@ -32173,83 +31517,6 @@"required": ["kind"],"type": "object"},- "PgAnalyzeIssueReference": {- "additionalProperties": false,- "properties": {- "kind": {- "type": ["string", "null"]- },- "name": {- "type": ["string", "null"]- },- "queryText": {- "type": ["string", "null"]- },- "url": {- "type": ["string", "null"]- }- },- "required": ["kind", "name", "url", "queryText"],- "type": "object"- },- "PgAnalyzeIssueSignalExtra": {- "additionalProperties": false,- "properties": {- "database_id": {- "type": ["string", "null"]- },- "references": {- "items": {- "$ref": "#/definitions/PgAnalyzeIssueReference"- },- "type": "array"- },- "server_human_id": {- "type": ["string", "null"]- },- "server_name": {- "type": ["string", "null"]- },- "severity": {- "type": ["string", "null"]- },- "synced_at": {- "type": "string"- }- },- "required": ["severity", "references", "database_id", "server_human_id", "server_name", "synced_at"],- "type": "object"- },- "PgAnalyzeIssueSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/PgAnalyzeIssueSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "pganalyze",- "type": "string"- },- "source_type": {- "const": "issue",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"PieChartSettings": {"additionalProperties": false,"properties": {@@ -39947,22 +39214,6 @@],"type": "string"},- "RelevantCommit": {- "additionalProperties": false,- "properties": {- "reason": {- "type": "string"- },- "sha": {- "type": "string"- },- "url": {- "type": "string"- }- },- "required": ["sha", "url", "reason"],- "type": "object"- },"ReplayInactivityPeriod": {"additionalProperties": false,"properties": {@@ -39985,112 +39236,6 @@"required": ["ts_from_s", "active"],"type": "object"},- "ReplayVisionScannerFindingSignalExtra": {- "additionalProperties": false,- "properties": {- "confidence": {- "description": "The model's self-reported confidence in the finding, in [0, 1]. Independent of `weight`.",- "type": "number"- },- "distinct_id": {- "type": "string"- },- "end_time": {- "description": "When the issue ends in the recording, in seconds (the footer's REC_T value).",- "type": "number"- },- "exported_asset_id": {- "description": "The rasterized MP4 asset the scanner analysed.",- "type": "number"- },- "observation_id": {- "type": "string"- },- "problem_type": {- "description": "Issue category: 'bug' / 'crash' / 'design_flaw' / 'ux_friction'. Kept open so new categories don't fail validation.",- "type": "string"- },- "recording_active_seconds": {- "type": "number"- },- "recording_duration": {- "type": "number"- },- "recording_end_time": {- "description": "ISO 8601 recording end.",- "type": "string"- },- "recording_start_time": {- "description": "ISO 8601 recording start (the REC_T=0 anchor).",- "type": "string"- },- "scanner_id": {- "type": "string"- },- "scanner_name": {- "type": "string"- },- "scanner_type": {- "description": "Replay Vision scanner type, e.g. 'monitor' / 'classifier' / 'scorer' / 'summarizer'. Kept open so new scanner types don't fail signal validation.",- "type": "string"- },- "session_id": {- "type": "string"- },- "start_time": {- "description": "When the issue starts in the recording, in seconds from recording start (the footer's REC_T value).",- "type": "number"- },- "url": {- "description": "The page the issue happened on (the footer's URL value).",- "type": "string"- }- },- "required": [- "scanner_id",- "scanner_name",- "scanner_type",- "observation_id",- "session_id",- "confidence",- "problem_type",- "start_time",- "end_time",- "url",- "exported_asset_id"- ],- "type": "object"- },- "ReplayVisionScannerFindingSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/ReplayVisionScannerFindingSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "replay_vision",- "type": "string"- },- "source_type": {- "const": "scanner_finding",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"ResolvedDateRangeResponse": {"additionalProperties": false,"properties": {@@ -42193,105 +41338,6 @@"required": ["session_id", "events"],"type": "object"},- "SessionProblemEventEntry": {- "additionalProperties": false,- "properties": {- "current_url": {- "type": "string"- },- "event": {- "type": "string"- },- "event_type": {- "type": "string"- },- "interaction_text": {- "type": "string"- },- "timestamp": {- "type": "string"- }- },- "required": ["event", "timestamp"],- "type": "object"- },- "SessionProblemSignalExtra": {- "additionalProperties": false,- "properties": {- "distinct_id": {- "type": "string"- },- "end_time": {- "type": "string"- },- "event_history": {- "items": {- "$ref": "#/definitions/SessionProblemEventEntry"- },- "type": "array"- },- "exported_asset_id": {- "type": "number"- },- "problem_type": {- "enum": ["confusion", "abandonment", "blocking_exception", "non_blocking_exception", "failure"],- "type": "string"- },- "segment_title": {- "type": "string"- },- "session_active_seconds": {- "type": "number"- },- "session_duration": {- "type": "number"- },- "session_end_time": {- "type": "string"- },- "session_id": {- "type": "string"- },- "session_start_time": {- "type": "string"- },- "start_time": {- "type": "string"- }- },- "required": ["session_id", "segment_title", "start_time", "end_time", "problem_type", "distinct_id"],- "type": "object"- },- "SessionProblemSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/SessionProblemSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "session_replay",- "type": "string"- },- "source_type": {- "const": "session_problem",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"SessionPropertyFilter": {"additionalProperties": false,"properties": {@@ -42516,97 +41562,6 @@"required": ["type", "session_id", "timestamp_ms"],"type": "object"},- "SessionReplaySegment": {- "additionalProperties": false,- "deprecated": "No longer emitted.",- "properties": {- "content": {- "type": "string"- },- "distinct_id": {- "type": "string"- },- "end_time": {- "type": "string"- },- "session_id": {- "type": "string"- },- "start_time": {- "type": "string"- }- },- "required": ["session_id", "start_time", "end_time", "distinct_id", "content"],- "type": "object"- },- "SessionSegmentClusterMetrics": {- "additionalProperties": false,- "deprecated": "No longer emitted.",- "properties": {- "active_users_in_period": {- "type": "number"- },- "occurrence_count": {- "type": "number"- },- "relevant_user_count": {- "type": "number"- }- },- "required": ["relevant_user_count", "active_users_in_period", "occurrence_count"],- "type": "object"- },- "SessionSegmentClusterSignalExtra": {- "additionalProperties": false,- "deprecated": "No longer emitted.",- "properties": {- "actionable": {- "type": "boolean"- },- "label_title": {- "type": "string"- },- "metrics": {- "$ref": "#/definitions/SessionSegmentClusterMetrics"- },- "segments": {- "items": {- "$ref": "#/definitions/SessionReplaySegment"- },- "type": "array"- }- },- "required": ["label_title", "actionable", "segments", "metrics"],- "type": "object"- },- "SessionSegmentClusterSignalInput": {- "additionalProperties": false,- "deprecated": "No longer emitted.",- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/SessionSegmentClusterSignalExtra"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "session_replay",- "type": "string"- },- "source_type": {- "const": "session_segment_cluster",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["source_type", "source_product", "source_id", "description", "weight", "extra"],- "type": "object"- },"SessionsQuery": {"additionalProperties": false,"properties": {@@ -42896,300 +41851,6 @@},"type": "object"},- "SignalExtraBase": {- "additionalProperties": false,- "type": "object"- },- "SignalInput": {- "anyOf": [- {- "$ref": "#/definitions/SessionProblemSignalInput"- },- {- "$ref": "#/definitions/LlmEvaluationSignalInput"- },- {- "$ref": "#/definitions/LlmEvaluationReportSignalInput"- },- {- "$ref": "#/definitions/ZendeskTicketSignalInput"- },- {- "$ref": "#/definitions/GithubIssueSignalInput"- },- {- "$ref": "#/definitions/LinearIssueSignalInput"- },- {- "$ref": "#/definitions/ConversationsTicketSignalInput"- },- {- "$ref": "#/definitions/ErrorTrackingSignalInput"- },- {- "$ref": "#/definitions/EndpointExecutionFailedSignalInput"- },- {- "$ref": "#/definitions/EndpointBreakdownLimitExceededSignalInput"- },- {- "$ref": "#/definitions/PgAnalyzeIssueSignalInput"- },- {- "$ref": "#/definitions/SignalsScoutSignalInput"- },- {- "$ref": "#/definitions/LogsAlertStateChangeSignalInput"- },- {- "$ref": "#/definitions/HealthCheckSignalInput"- },- {- "$ref": "#/definitions/ReplayVisionScannerFindingSignalInput"- }- ]- },- "SignalInputBase": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/SignalExtraBase"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "type": "string"- },- "source_type": {- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["source_type", "source_product", "source_id", "description", "weight", "extra"],- "type": "object"- },- "SignalRemediation": {- "additionalProperties": false,- "properties": {- "agent": {- "description": "Agent-facing guidance: how to investigate (which MCP tools to call) and, where the fix lives in the user's codebase, how to apply it. The research agent treats this as authoritative — it still investigates and produces findings, but follows this instead of starting cold.",- "type": "string"- },- "human": {- "description": "Human-facing fix steps (PostHog UI / alert destinations). Surfaced in the report for the reader.",- "type": "string"- },- "priority": {- "description": "Suggested report priority; advisory, the research agent may override.",- "enum": ["P0", "P1", "P2", "P3", "P4"],- "type": "string"- }- },- "required": ["human", "agent"],- "type": "object"- },- "SignalReviewerUserInfo": {- "additionalProperties": false,- "properties": {- "email": {- "type": "string"- },- "first_name": {- "type": "string"- },- "id": {- "type": "number"- },- "last_name": {- "type": "string"- },- "uuid": {- "type": "string"- }- },- "required": ["id", "uuid", "first_name", "last_name", "email"],- "type": "object"- },- "SignalSourceProduct": {- "enum": [- "session_replay",- "llm_analytics",- "github",- "linear",- "zendesk",- "conversations",- "error_tracking",- "endpoints",- "pganalyze",- "signals_scout",- "logs",- "health_checks",- "replay_vision"- ],- "type": "string"- },- "SignalSourceType": {- "enum": [- "session_analysis_cluster",- "session_problem",- "evaluation",- "evaluation_report",- "issue",- "ticket",- "issue_created",- "issue_reopened",- "issue_spiking",- "endpoint_execution_failed",- "endpoint_breakdown_limit_exceeded",- "cross_source_issue",- "alert_state_change",- "health_issue",- "scanner_finding"- ],- "type": "string"- },- "SignalsScoutEvidenceEntry": {- "additionalProperties": false,- "properties": {- "entity_id": {- "description": "Optional entity id within that product, e.g. an issue id or session id.",- "type": "string"- },- "source_product": {- "description": "The product the evidence came from, e.g. 'error_tracking', 'logs', 'session_replay'.",- "type": "string"- },- "summary": {- "description": "One-line summary of the evidence the scout used.",- "type": "string"- }- },- "required": ["source_product", "summary"],- "type": "object"- },- "SignalsScoutSignalExtra": {- "additionalProperties": false,- "properties": {- "confidence": {- "description": "Scout's self-reported confidence in [0, 1]. Independent of the top-level `weight`.",- "type": "number"- },- "dedupe_keys": {- "description": "Free-form short keys the harness can use for cross-run dedupe.",- "items": {- "type": "string"- },- "type": "array"- },- "evidence": {- "items": {- "$ref": "#/definitions/SignalsScoutEvidenceEntry"- },- "type": "array"- },- "finding_id": {- "type": "string"- },- "hypothesis": {- "type": "string"- },- "mcp_trace_id": {- "description": "Trace id from the LLM analytics span for the scout run, when available.",- "type": "string"- },- "scout_run_id": {- "type": "string"- },- "severity": {- "enum": ["P0", "P1", "P2", "P3", "P4"],- "type": "string"- },- "skill_name": {- "type": "string"- },- "skill_version": {- "type": "number"- },- "tags": {- "description": "Lowercase kebab-case slug tags (e.g. `cost-spike`) categorizing the finding. Each scout maintains and evolves its own vocabulary over time; the harness normalizes and caps these at emit.",- "items": {- "type": "string"- },- "type": "array"- },- "task_id": {- "description": "The `tasks.Task` id owning `task_run_id`. Pairs with it to deep-link the inbox card to the run in the Tasks UI. Absent on emissions made before this linkage was captured.",- "type": "string"- },- "task_run_id": {- "description": "The `tasks.TaskRun` id the scout span ran inside. Join key into the `signals_scouts_runs` LLM-analytics view, which is keyed on `task_run_id` (the `scout_run_id` bridge row is not).",- "type": "string"- },- "time_range": {- "additionalProperties": false,- "description": "Optional time window the finding refers to.",- "properties": {- "date_from": {- "type": "string"- },- "date_to": {- "type": "string"- }- },- "required": ["date_from", "date_to"],- "type": "object"- }- },- "required": [- "scout_run_id",- "task_run_id",- "finding_id",- "skill_name",- "skill_version",- "confidence",- "evidence"- ],- "type": "object"- },- "SignalsScoutSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/SignalsScoutSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "signals_scout",- "type": "string"- },- "source_type": {- "const": "cross_source_issue",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"SimilarIssue": {"additionalProperties": false,"properties": {@@ -48938,64 +47599,6 @@"required": ["type"],"type": "object"},- "ZendeskTicketSignalExtra": {- "additionalProperties": false,- "properties": {- "created_at": {- "type": "string"- },- "priority": {- "type": ["string", "null"]- },- "status": {- "type": "string"- },- "tags": {- "items": {- "type": "string"- },- "type": "array"- },- "type": {- "type": ["string", "null"]- },- "url": {- "type": "string"- }- },- "required": ["url", "type", "tags", "created_at", "priority", "status"],- "type": "object"- },- "ZendeskTicketSignalInput": {- "additionalProperties": false,- "properties": {- "description": {- "type": "string"- },- "extra": {- "$ref": "#/definitions/ZendeskTicketSignalExtra"- },- "remediation": {- "$ref": "#/definitions/SignalRemediation"- },- "source_id": {- "type": "string"- },- "source_product": {- "const": "zendesk",- "type": "string"- },- "source_type": {- "const": "ticket",- "type": "string"- },- "weight": {- "type": "number"- }- },- "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],- "type": "object"- },"getEffectiveExcludedColumns": {"$comment": "(\n level: MarketingAnalyticsDrillDownLevel) => Set<MarketingAnalyticsBaseColumns>","properties": {diff --git a/frontend/src/queries/schema/index.ts b/frontend/src/queries/schema/index.tsindex 430083815f65..23c812753707 100644--- a/frontend/src/queries/schema/index.ts+++ b/frontend/src/queries/schema/index.ts@@ -4,6 +4,10 @@// For some reason Webpack (Storybook) and Sucrase (Jest) don't correctly process enums exported via `export * from ...`// (even though our actual app's esbuild setup compiles perfectly well.)+// ⚠️ Before adding a new schema-*.ts file here: this pipeline is for frontend-AUTHORED query types only.+// Backend-owned shapes (API responses, contracts the backend validates or emits) do NOT belong here -+// declare them in a serializer or Pydantic model and let the backend -> frontend OpenAPI/Orval pipeline+// generate the TS. See docs/published/handbook/engineering/type-system.md.// sort-imports-ignoreexport * from './schema-assistant-artifacts'export * from './schema-assistant-error-tracking'@@ -12,7 +16,6 @@ export * from './schema-assistant-replay'export * from './schema-assistant-revenue-analytics'export * from './schema-assistant-web-analytics'export * from './schema-general'-export * from './schema-signals'export * from './schema-surveys'// Must be kept after schema-general.export * from './schema-assistant-messages'diff --git a/frontend/src/queries/schema/schema-signals.ts b/frontend/src/queries/schema/schema-signals.tsdeleted file mode 100644index 29d20fcefc28..000000000000--- a/frontend/src/queries/schema/schema-signals.ts+++ /dev/null@@ -1,493 +0,0 @@-// Signal taxonomy types - shared contract between emitters and consumers--// ── Source taxonomy enums ───────────────────────────────────────────────────────--export enum SignalSourceProduct {- SESSION_REPLAY = 'session_replay',- LLM_ANALYTICS = 'llm_analytics',- GITHUB = 'github',- LINEAR = 'linear',- ZENDESK = 'zendesk',- CONVERSATIONS = 'conversations',- ERROR_TRACKING = 'error_tracking',- ENDPOINTS = 'endpoints',- PGANALYZE = 'pganalyze',- SIGNALS_SCOUT = 'signals_scout',- LOGS = 'logs',- HEALTH_CHECKS = 'health_checks',- REPLAY_VISION = 'replay_vision',-}--export enum SignalSourceType {- SESSION_ANALYSIS_CLUSTER = 'session_analysis_cluster',- SESSION_PROBLEM = 'session_problem',- EVALUATION = 'evaluation',- EVALUATION_REPORT = 'evaluation_report',- ISSUE = 'issue',- TICKET = 'ticket',- ISSUE_CREATED = 'issue_created',- ISSUE_REOPENED = 'issue_reopened',- ISSUE_SPIKING = 'issue_spiking',- ENDPOINT_EXECUTION_FAILED = 'endpoint_execution_failed',- ENDPOINT_BREAKDOWN_LIMIT_EXCEEDED = 'endpoint_breakdown_limit_exceeded',- CROSS_SOURCE_ISSUE = 'cross_source_issue',- ALERT_STATE_CHANGE = 'alert_state_change',- HEALTH_ISSUE = 'health_issue',- SCANNER_FINDING = 'scanner_finding',-}--// ── Shared optional remediation ──────────────────────────────────────────────────-// A known fix attached to a signal. Optional and separate from `extra`: `extra` is product-specific-// evidence; `remediation` is the fix guidance. Mirrors the health-checks `Remediation(human, agent)`-// constant so a check's remediation maps straight onto a signal. When present, the signal is treated-// as actionable: the research agent follows the `agent` guidance rather than investigating from-// scratch — it still runs, produces findings, and writes the human-facing report. Every variant may-// carry it.--export interface SignalRemediation {- /** Human-facing fix steps (PostHog UI / alert destinations). Surfaced in the report for the reader. */- human: string- /** Agent-facing guidance: how to investigate (which MCP tools to call) and, where the fix lives- * in the user's codebase, how to apply it. The research agent treats this as authoritative — it- * still investigates and produces findings, but follows this instead of starting cold. */- agent: string- /** Suggested report priority; advisory, the research agent may override. */- priority?: 'P0' | 'P1' | 'P2' | 'P3' | 'P4'-}--// ── Shared signal extra & input base ───────────────────────────────────────────────-// Marker base every per-source `extra` payload extends. Empty today: it gives the input base a-// single `extra` type to reference and is where any future cross-source extra field would live.-export interface SignalExtraBase {}--// Top-level fields every variant carries. Concrete variants narrow `source_type`, `source_product`,-// and `extra` to their specific literal/payload types (those narrowings discriminate the union).-// `remediation` is source-agnostic: any signal may carry it, even though only some sources emit it today.-export interface SignalInputBase {- source_type: string- source_product: string- source_id: string- description: string- weight: number- extra: SignalExtraBase- remediation?: SignalRemediation-}--// ── Per-product signal extras & inputs ──────────────────────────────────────────--// Session replay problem (emitted per-session for problem-indicating segments)--export interface SessionProblemEventEntry {- event: string- timestamp: string- current_url?: string- event_type?: string- interaction_text?: string-}--export interface SessionProblemSignalExtra extends SignalExtraBase {- session_id: string- segment_title: string- start_time: string- end_time: string- problem_type: 'confusion' | 'abandonment' | 'blocking_exception' | 'non_blocking_exception' | 'failure'- distinct_id: string- session_start_time?: string- session_end_time?: string- session_duration?: number- session_active_seconds?: number- exported_asset_id?: number- event_history?: SessionProblemEventEntry[]-}--export interface SessionProblemSignalInput extends SignalInputBase {- source_type: 'session_problem'- source_product: 'session_replay'- extra: SessionProblemSignalExtra-}--/** @deprecated No longer emitted. */-export interface SessionReplaySegment {- session_id: string- start_time: string- end_time: string- distinct_id: string- content: string-}--/** @deprecated No longer emitted. */-export interface SessionSegmentClusterMetrics {- relevant_user_count: number- active_users_in_period: number- occurrence_count: number-}--/** @deprecated No longer emitted. */-export interface SessionSegmentClusterSignalExtra extends SignalExtraBase {- label_title: string- actionable: boolean- segments: SessionReplaySegment[]- metrics: SessionSegmentClusterMetrics-}--/** @deprecated No longer emitted. */-export interface SessionSegmentClusterSignalInput {- source_type: 'session_segment_cluster'- source_product: 'session_replay'- source_id: string- description: string- weight: number- extra: SessionSegmentClusterSignalExtra-}--// LLM evaluation--export interface LlmEvalSignalExtra extends SignalExtraBase {- evaluation_id: string- target_event_id?: string- target_event_type?: string- trace_id: string- model?: string- provider?: string-}--export interface LlmEvaluationSignalInput extends SignalInputBase {- source_type: 'evaluation'- source_product: 'llm_analytics'- extra: LlmEvalSignalExtra-}--// LLM evaluation report (one signal per report run, distilled from many results)--export interface LlmEvalReportSignalExtra extends SignalExtraBase {- evaluation_id: string- evaluation_name: string- evaluation_description: string- report_id: string- report_run_id: string- period_start: string- period_end: string-}--export interface LlmEvaluationReportSignalInput extends SignalInputBase {- source_type: 'evaluation_report'- source_product: 'llm_analytics'- extra: LlmEvalReportSignalExtra-}--// Zendesk ticket--export interface ZendeskTicketSignalExtra extends SignalExtraBase {- url: string- type: string | null- tags: string[]- created_at: string- priority: string | null- status: string-}--export interface ZendeskTicketSignalInput extends SignalInputBase {- source_type: 'ticket'- source_product: 'zendesk'- extra: ZendeskTicketSignalExtra-}--// GitHub issue--export interface GithubIssueSignalExtra extends SignalExtraBase {- html_url: string- number: number- labels: string[]- created_at: string- updated_at: string- locked: boolean- state: string-}--export interface GithubIssueSignalInput extends SignalInputBase {- source_type: 'issue'- source_product: 'github'- extra: GithubIssueSignalExtra-}--// Linear issue--export interface LinearIssueSignalExtra extends SignalExtraBase {- url: string- identifier: string- number: number- priority: number- priority_label: string- labels: string[]- state_name: string | null- state_type: string | null- team_name: string | null- created_at: string- updated_at: string-}--export interface LinearIssueSignalInput extends SignalInputBase {- source_type: 'issue'- source_product: 'linear'- extra: LinearIssueSignalExtra-}--// Conversations ticket--export interface ConversationsTicketSignalExtra extends SignalExtraBase {- ticket_number: number- channel_source: string- channel_detail: string | null- status: string- priority: string | null- created_at: string- email_subject: string | null-}--export interface ConversationsTicketSignalInput extends SignalInputBase {- source_type: 'ticket'- source_product: 'conversations'- extra: ConversationsTicketSignalExtra-}--// Error tracking--export interface ErrorTrackingSignalExtra extends SignalExtraBase {- fingerprint: string-}--export interface ErrorTrackingSignalInput extends SignalInputBase {- source_type: 'issue_created' | 'issue_reopened' | 'issue_spiking'- source_product: 'error_tracking'- extra: ErrorTrackingSignalExtra-}--// pganalyze issue (database performance finding)--export interface PgAnalyzeIssueReference {- kind: string | null- name: string | null- url: string | null- queryText: string | null-}--export interface PgAnalyzeIssueSignalExtra extends SignalExtraBase {- severity: string | null- references: PgAnalyzeIssueReference[]- database_id: string | null- server_human_id: string | null- server_name: string | null- synced_at: string-}--export interface PgAnalyzeIssueSignalInput extends SignalInputBase {- source_type: 'issue'- source_product: 'pganalyze'- extra: PgAnalyzeIssueSignalExtra-}--// Endpoint execution failure--export interface EndpointExecutionFailedSignalExtra extends SignalExtraBase {- endpoint_name: string- endpoint_version: number | null- materialized: boolean- saved_query_id: string | null- error_class: string- error_message: string-}--export interface EndpointExecutionFailedSignalInput extends SignalInputBase {- source_type: 'endpoint_execution_failed'- source_product: 'endpoints'- extra: EndpointExecutionFailedSignalExtra-}--// Endpoint breakdown limit exceeded — the 'Other' bucket appeared in results--export interface EndpointBreakdownLimitExceededSignalExtra extends SignalExtraBase {- endpoint_name: string- breakdown_limit: number-}--export interface EndpointBreakdownLimitExceededSignalInput extends SignalInputBase {- source_type: 'endpoint_breakdown_limit_exceeded'- source_product: 'endpoints'- extra: EndpointBreakdownLimitExceededSignalExtra-}--// Signals scout — cross-source findings emitted by the headless Signals scout harness.--export interface SignalsScoutEvidenceEntry {- /** The product the evidence came from, e.g. 'error_tracking', 'logs', 'session_replay'. */- source_product: string- /** Optional entity id within that product, e.g. an issue id or session id. */- entity_id?: string- /** One-line summary of the evidence the scout used. */- summary: string-}--export interface SignalsScoutSignalExtra extends SignalExtraBase {- scout_run_id: string- /** The `tasks.TaskRun` id the scout span ran inside. Join key into the `signals_scouts_runs`- * LLM-analytics view, which is keyed on `task_run_id` (the `scout_run_id` bridge row is not). */- task_run_id: string- /** The `tasks.Task` id owning `task_run_id`. Pairs with it to deep-link the inbox card to the- * run in the Tasks UI. Absent on emissions made before this linkage was captured. */- task_id?: string- finding_id: string- skill_name: string- skill_version: number- /** Scout's self-reported confidence in [0, 1]. Independent of the top-level `weight`. */- confidence: number- severity?: 'P0' | 'P1' | 'P2' | 'P3' | 'P4'- hypothesis?: string- evidence: SignalsScoutEvidenceEntry[]- /** Free-form short keys the harness can use for cross-run dedupe. */- dedupe_keys?: string[]- /** Lowercase kebab-case slug tags (e.g. `cost-spike`) categorizing the finding. Each scout- * maintains and evolves its own vocabulary over time; the harness normalizes and caps these at emit. */- tags?: string[]- /** Optional time window the finding refers to. */- time_range?: {- date_from: string- date_to: string- }- /** Trace id from the LLM analytics span for the scout run, when available. */- mcp_trace_id?: string-}--export interface SignalsScoutSignalInput extends SignalInputBase {- source_type: 'cross_source_issue'- source_product: 'signals_scout'- extra: SignalsScoutSignalExtra-}--// Logs alert notification (firing / broken)--export interface LogsAlertStateChangeSignalExtra extends SignalExtraBase {- alert_id: string- alert_name: string- action: 'firing' | 'broken'- threshold_count: number- threshold_operator: 'above' | 'below'- window_minutes: number- result_count: number | null- consecutive_failures: number- filters: Record<string, unknown>- url: string-}--export interface LogsAlertStateChangeSignalInput extends SignalInputBase {- source_type: 'alert_state_change'- source_product: 'logs'- extra: LogsAlertStateChangeSignalExtra-}--// Replay Vision scanner finding — the optional "side mission" finding a scanner's LLM pass-// may attach to an observation when the scanner has `emits_signals` enabled.--export interface ReplayVisionScannerFindingSignalExtra extends SignalExtraBase {- scanner_id: string- scanner_name: string- /** Replay Vision scanner type, e.g. 'monitor' / 'classifier' / 'scorer' / 'summarizer'. Kept open so new scanner types don't fail signal validation. */- scanner_type: string- observation_id: string- session_id: string- /** The model's self-reported confidence in the finding, in [0, 1]. Independent of `weight`. */- confidence: number- /** Issue category: 'bug' / 'crash' / 'design_flaw' / 'ux_friction'. Kept open so new categories don't fail validation. */- problem_type: string- /** When the issue starts in the recording, in seconds from recording start (the footer's REC_T value). */- start_time: number- /** When the issue ends in the recording, in seconds (the footer's REC_T value). */- end_time: number- /** The page the issue happened on (the footer's URL value). */- url: string- /** The rasterized MP4 asset the scanner analysed. */- exported_asset_id: number- // Recording-level metadata, present when recording metadata is available. These are the *recording*- // (snapshot) bounds, which can begin well after the session does depending on customer config —- // `recording_start_time` is the REC_T=0 anchor for `start_time`/`end_time`.- distinct_id?: string- /** ISO 8601 recording start (the REC_T=0 anchor). */- recording_start_time?: string- /** ISO 8601 recording end. */- recording_end_time?: string- recording_duration?: number- recording_active_seconds?: number-}--export interface ReplayVisionScannerFindingSignalInput extends SignalInputBase {- source_type: 'scanner_finding'- source_product: 'replay_vision'- extra: ReplayVisionScannerFindingSignalExtra-}--// Health-check issue (instrumentation problem detected by a HealthCheck)--export type HealthCheckSeverity = 'critical' | 'warning' | 'info'--export interface HealthCheckSignalExtra extends SignalExtraBase {- kind: string- severity: HealthCheckSeverity- issue_id: string- title: string- summary: string- /** Relative in-app path to the resource, e.g. '/web'. */- link: string- /** Absolute URL ({project.url} + link). */- url: string- payload: Record<string, unknown>-}--export interface HealthCheckSignalInput extends SignalInputBase {- source_type: 'health_issue'- source_product: 'health_checks'- extra: HealthCheckSignalExtra-}--// ── Report reviewer types ────────────────────────────────────────────────────────--export interface RelevantCommit {- sha: string- url: string- reason: string-}--export interface SignalReviewerUserInfo {- id: number- uuid: string- first_name: string- last_name: string- email: string-}--export interface EnrichedReviewer {- github_login: string- github_name: string | null- relevant_commits: RelevantCommit[]- user: SignalReviewerUserInfo | null-}--// ── Union over all signal variants ─────────────────────────────────-// Discrimination is handled at the application layer via a (source_product, source_type)-// lookup in products/signals/backend/api.py — see _SIGNAL_VARIANT_LOOKUP. We can't use a-// Pydantic discriminator here because some products (llm_analytics) have multiple variants.--export type SignalInput =- | SessionProblemSignalInput- | LlmEvaluationSignalInput- | LlmEvaluationReportSignalInput- | ZendeskTicketSignalInput- | GithubIssueSignalInput- | LinearIssueSignalInput- | ConversationsTicketSignalInput- | ErrorTrackingSignalInput- | EndpointExecutionFailedSignalInput- | EndpointBreakdownLimitExceededSignalInput- | PgAnalyzeIssueSignalInput- | SignalsScoutSignalInput- | LogsAlertStateChangeSignalInput- | HealthCheckSignalInput- | ReplayVisionScannerFindingSignalInputdiff --git a/frontend/src/scenes/debug/signals/DetailPanel.tsx b/frontend/src/scenes/debug/signals/DetailPanel.tsxindex 5d83109bade2..5e59d4b3963f 100644--- a/frontend/src/scenes/debug/signals/DetailPanel.tsx+++ b/frontend/src/scenes/debug/signals/DetailPanel.tsx@@ -6,6 +6,8 @@ import { LemonButton, Link } from '@posthog/lemon-ui'import { signalCardSourceLine } from 'lib/signals/signalCardSourceLine'import { urls } from 'scenes/urls'+import type { ErrorTrackingSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'+import { ResizeGripDots, sourceProductColor } from './helpers'import { SignalNode, isMatchedMetadata } from './types'@@ -233,10 +235,11 @@ export function DetailPanel({<div className="flex flex-col gap-2"><code className="text-xs select-all">{signal.source_id}</code>{signal.source_product === 'error_tracking' &&- typeof signal.extra?.fingerprint === 'string' && (+ typeof (signal.extra as Partial<ErrorTrackingSignalExtraApi>).fingerprint ===+ 'string' && (<Linkto={urls.errorTrackingIssue(signal.source_id, {- fingerprint: signal.extra.fingerprint as string,+ fingerprint: (signal.extra as ErrorTrackingSignalExtraApi).fingerprint,})}className="inline-flex items-center gap-1 text-xs font-medium">diff --git a/frontend/src/scenes/debug/signals/types.ts b/frontend/src/scenes/debug/signals/types.tsindex c1744113833b..273249b58807 100644--- a/frontend/src/scenes/debug/signals/types.ts+++ b/frontend/src/scenes/debug/signals/types.ts@@ -1,36 +1,23 @@import type * as d3 from 'd3'-// ── Signal data types ──────────────────────────────────────────────────────────+import type {+ MatchedMetadataApi,+ NoMatchMetadataApi,+ SignalMatchMetadataApi,+ SignalNodeApi,+} from 'products/signals/frontend/generated/api.schemas'-export interface MatchedMetadata {- parent_signal_id: string- match_query: string- reason: string-}--export interface NoMatchMetadata {- reason: string- rejected_signal_ids: string[]-}+// ── Signal data types (aliases of the OpenAPI-generated shapes) ────────────────-export type SignalMatchMetadata = MatchedMetadata | NoMatchMetadata+export type MatchedMetadata = MatchedMetadataApi+export type NoMatchMetadata = NoMatchMetadataApi+export type SignalMatchMetadata = SignalMatchMetadataApi+export type SignalNode = SignalNodeApiexport function isMatchedMetadata(m: SignalMatchMetadata): m is MatchedMetadata {return 'parent_signal_id' in m}-export interface SignalNode {- signal_id: string- content: string- source_product: string- source_type: string- source_id: string- weight: number- timestamp: string- extra: Record<string, unknown>- match_metadata?: SignalMatchMetadata | null-}-// ── Layout / graph types ───────────────────────────────────────────────────────export interface LayoutPosition {diff --git a/frontend/src/scenes/inbox/__mocks__/inboxMocks.ts b/frontend/src/scenes/inbox/__mocks__/inboxMocks.tsindex b97efeabfe56..c9f407f2b771 100644--- a/frontend/src/scenes/inbox/__mocks__/inboxMocks.ts+++ b/frontend/src/scenes/inbox/__mocks__/inboxMocks.ts@@ -5,7 +5,7 @@import { SignalNode } from 'scenes/debug/signals/types'-import { SignalReport, SignalReportStatus } from '../types'+import { SignalReport, SignalReportStatus, SignalSourceProduct } from '../types'const BASE_DATE = '2026-06-10T12:00:00Z'@@ -257,12 +257,19 @@ export function mockSignals(reportId: string, count = 4): SignalNode[] {'Error fingerprint `2c6be0b` first seen 2026-05-26, now recurring ~12×/day.','Support ticket references the same flow: "I keep getting an error when inviting my team".',][i % 4],- source_product: ['error_tracking', 'session_replay', 'error_tracking', 'zendesk'][i % 4],+ source_product: (+ [+ SignalSourceProduct.ErrorTracking,+ SignalSourceProduct.SessionReplay,+ SignalSourceProduct.ErrorTracking,+ SignalSourceProduct.Zendesk,+ ] as const+ )[i % 4],source_type: 'issue',source_id: `${reportId}-src-${i}`,weight: Number((1.5 - i * 0.2).toFixed(1)),timestamp: BASE_DATE,- extra: {},+ extra: { fingerprint: `${reportId}-fp-${i}` },}))}diff --git a/frontend/src/scenes/inbox/components/badges/sourceProductIcons.tsx b/frontend/src/scenes/inbox/components/badges/sourceProductIcons.tsxindex 0bedac506fc9..6ee79aad5aa9 100644--- a/frontend/src/scenes/inbox/components/badges/sourceProductIcons.tsx+++ b/frontend/src/scenes/inbox/components/badges/sourceProductIcons.tsx@@ -32,62 +32,62 @@ interface SourceProductMeta {* `getSourceProductMeta`, which returns `null` for unknown keys.*/export const SOURCE_PRODUCT_META: Partial<Record<SignalSourceProduct, SourceProductMeta>> = {- [SignalSourceProduct.SESSION_REPLAY]: {+ [SignalSourceProduct.SessionReplay]: {Icon: IconRewindPlay,color: 'var(--warning)',label: 'Session replay',},- [SignalSourceProduct.ERROR_TRACKING]: {+ [SignalSourceProduct.ErrorTracking]: {Icon: IconBug,color: 'var(--danger)',label: 'Error tracking',},- [SignalSourceProduct.LLM_ANALYTICS]: {+ [SignalSourceProduct.LlmAnalytics]: {Icon: IconBrain,color: 'var(--purple)',label: 'AI observability',},- [SignalSourceProduct.GITHUB]: {+ [SignalSourceProduct.Github]: {Icon: IconGithub,color: 'var(--text-secondary)',label: 'GitHub',},- [SignalSourceProduct.LINEAR]: {+ [SignalSourceProduct.Linear]: {Icon: IconStack,color: 'var(--blue)',label: 'Linear',},- [SignalSourceProduct.ZENDESK]: {+ [SignalSourceProduct.Zendesk]: {Icon: IconReceipt,color: 'var(--success)',label: 'Zendesk',},- [SignalSourceProduct.CONVERSATIONS]: {+ [SignalSourceProduct.Conversations]: {Icon: IconSupport,color: 'var(--blue)',label: 'Conversations',},- [SignalSourceProduct.PGANALYZE]: {+ [SignalSourceProduct.Pganalyze]: {Icon: IconDatabase,color: 'var(--text-primary)',label: 'pganalyze',},- [SignalSourceProduct.SIGNALS_SCOUT]: {+ [SignalSourceProduct.SignalsScout]: {Icon: IconCompass,color: 'var(--purple)',label: 'Scout',},- [SignalSourceProduct.ENDPOINTS]: {+ [SignalSourceProduct.Endpoints]: {Icon: IconBolt,color: 'var(--warning)',label: 'Endpoints',},- [SignalSourceProduct.LOGS]: {+ [SignalSourceProduct.Logs]: {Icon: IconList,color: 'var(--text-secondary)',label: 'Logs',},- [SignalSourceProduct.HEALTH_CHECKS]: {+ [SignalSourceProduct.HealthChecks]: {Icon: IconHeartPlus,color: 'var(--danger)',label: 'Health checks',diff --git a/frontend/src/scenes/inbox/components/cards/ReportCard.tsx b/frontend/src/scenes/inbox/components/cards/ReportCard.tsxindex d15186903751..ae6d6a1e4cea 100644--- a/frontend/src/scenes/inbox/components/cards/ReportCard.tsx+++ b/frontend/src/scenes/inbox/components/cards/ReportCard.tsx@@ -58,7 +58,7 @@ export function InboxCardSourceMeta({}// Name the authoring scout on a scout-authored report so it's clear at a glance who wrote it.const primaryLabel =- primary.key === SignalSourceProduct.SIGNALS_SCOUT && scoutName+ primary.key === SignalSourceProduct.SignalsScout && scoutName? `${primary.meta.label} · ${scoutName}`: primary.meta.labelreturn (diff --git a/frontend/src/scenes/inbox/components/config/agentRosterMeta.ts b/frontend/src/scenes/inbox/components/config/agentRosterMeta.tsindex 5aac34ed487c..c6c5eb6090e5 100644--- a/frontend/src/scenes/inbox/components/config/agentRosterMeta.ts+++ b/frontend/src/scenes/inbox/components/config/agentRosterMeta.ts@@ -1,6 +1,5 @@-import { SignalSourceProduct } from '~/queries/schema/schema-signals'-import { DataWarehouseSource } from '../../signalSourcesLogic'+import { SignalSourceProduct } from '../../types'/*** Stable string keys for the agent roster, aligned with the source-product@@ -45,7 +44,7 @@ export const AGENT_ROSTER_GROUPS: AgentRosterGroup[] = [agents: [{source: 'error_tracking',- sourceProduct: SignalSourceProduct.ERROR_TRACKING,+ sourceProduct: SignalSourceProduct.ErrorTracking,label: 'Error tracking',description: 'Bugs surfaced as new errors, regressions, and spikes.',docsUrl: 'https://posthog.com/docs/error-tracking',@@ -53,7 +52,7 @@ export const AGENT_ROSTER_GROUPS: AgentRosterGroup[] = [},{source: 'conversations',- sourceProduct: SignalSourceProduct.CONVERSATIONS,+ sourceProduct: SignalSourceProduct.Conversations,label: 'Support',description: 'Problems customers raise in support.',docsUrl: 'https://posthog.com/docs/support',@@ -61,7 +60,7 @@ export const AGENT_ROSTER_GROUPS: AgentRosterGroup[] = [},{source: 'session_replay',- sourceProduct: SignalSourceProduct.SESSION_REPLAY,+ sourceProduct: SignalSourceProduct.SessionReplay,label: 'Session replay',description: 'UX problems found in session recordings.',docsUrl: 'https://posthog.com/docs/session-replay',@@ -70,7 +69,7 @@ export const AGENT_ROSTER_GROUPS: AgentRosterGroup[] = [},{source: 'llm_analytics',- sourceProduct: SignalSourceProduct.LLM_ANALYTICS,+ sourceProduct: SignalSourceProduct.LlmAnalytics,label: 'AI observability',description: 'Findings from evaluation reports on your LLM traffic.',docsUrl: 'https://posthog.com/docs/ai-evals/evaluations',@@ -83,28 +82,28 @@ export const AGENT_ROSTER_GROUPS: AgentRosterGroup[] = [agents: [{source: 'github',- sourceProduct: SignalSourceProduct.GITHUB,+ sourceProduct: SignalSourceProduct.Github,label: 'GitHub Issues',description: 'Issues filed in GitHub.',dataWarehouseSource: 'Github',},{source: 'linear',- sourceProduct: SignalSourceProduct.LINEAR,+ sourceProduct: SignalSourceProduct.Linear,label: 'Linear',description: 'Issues tracked in Linear.',dataWarehouseSource: 'Linear',},{source: 'zendesk',- sourceProduct: SignalSourceProduct.ZENDESK,+ sourceProduct: SignalSourceProduct.Zendesk,label: 'Zendesk',description: 'Incoming Zendesk tickets.',dataWarehouseSource: 'Zendesk',},{source: 'pganalyze',- sourceProduct: SignalSourceProduct.PGANALYZE,+ sourceProduct: SignalSourceProduct.Pganalyze,label: 'pganalyze',description: 'Postgres performance problems – slow queries and bad indexes.',dataWarehouseSource: 'PgAnalyze',diff --git a/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx b/frontend/src/scenes/inbox/components/detail/ReportDetail.tsxindex 364869b4efac..9d483b12b96f 100644--- a/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx+++ b/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx@@ -154,7 +154,7 @@ function MetaSourceStack({}// Name the authoring scout on a scout-authored report so it's clear at a glance who wrote it.const primaryLabel =- primary.key === SignalSourceProduct.SIGNALS_SCOUT && scoutName+ primary.key === SignalSourceProduct.SignalsScout && scoutName? `${primary.meta.label} · ${scoutName}`: primary.meta.labelreturn (diff --git a/frontend/src/scenes/inbox/components/signalCards/ConversationsTicketSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/ConversationsTicketSignalCard.tsxindex bd44f9c0e524..5ee7e441455a 100644--- a/frontend/src/scenes/inbox/components/signalCards/ConversationsTicketSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/ConversationsTicketSignalCard.tsx@@ -7,15 +7,19 @@ import { LemonTag, type LemonTagType } from 'lib/lemon-ui/LemonTag'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'import { urls } from 'scenes/urls'-import type { ConversationsTicketSignalExtra } from '~/queries/schema/schema-signals'+import type { ConversationsTicketSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'/** Guard for Conversations ticket extras. Keys on the ticket number + channel source unique to this source. */export function isConversationsTicketExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & ConversationsTicketSignalExtra {+ value: unknown+): value is Record<string, unknown> & ConversationsTicketSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'ticket_number' in extra && 'channel_source' in extra}@@ -77,7 +81,7 @@ export function conversationsChannelIcon(source: string): JSX.Element | null {}export function ConversationsTicketSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & ConversationsTicketSignalExtra+ const extra = signal.extra as Record<string, unknown> & ConversationsTicketSignalExtraApiconst channelIcon = conversationsChannelIcon(extra.channel_source)return (diff --git a/frontend/src/scenes/inbox/components/signalCards/EndpointExecutionFailedSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/EndpointExecutionFailedSignalCard.tsxindex 73eee3b3c433..16102abb05f0 100644--- a/frontend/src/scenes/inbox/components/signalCards/EndpointExecutionFailedSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/EndpointExecutionFailedSignalCard.tsx@@ -8,21 +8,25 @@ import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'import type { SignalNode } from 'scenes/debug/signals/types'import { urls } from 'scenes/urls'-import type { EndpointExecutionFailedSignalExtra } from '~/queries/schema/schema-signals'+import type { EndpointExecutionFailedSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'/** Narrows a signal's `extra` to the endpoint execution failure shape. */export function isEndpointExecutionFailedExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & EndpointExecutionFailedSignalExtra {+ value: unknown+): value is Record<string, unknown> & EndpointExecutionFailedSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return typeof extra.endpoint_name === 'string' && typeof extra.error_class === 'string'}/** Inbox signal card for a failed endpoint execution: endpoint identity, error class, and the error message. */export function EndpointExecutionFailedSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra: EndpointExecutionFailedSignalExtra | null = isEndpointExecutionFailedExtra(signal.extra)+ const extra: EndpointExecutionFailedSignalExtraApi | null = isEndpointExecutionFailedExtra(signal.extra)? signal.extra: nulldiff --git a/frontend/src/scenes/inbox/components/signalCards/ErrorTrackingSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/ErrorTrackingSignalCard.tsxindex d292b809c27e..2d7a4037cf1f 100644--- a/frontend/src/scenes/inbox/components/signalCards/ErrorTrackingSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/ErrorTrackingSignalCard.tsx@@ -7,9 +7,8 @@ import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'import type { SignalNode } from 'scenes/debug/signals/types'import { urls } from 'scenes/urls'-import type { ErrorTrackingSignalExtra } from '~/queries/schema/schema-signals'-import { ErrorTrackingIssueListRow } from 'products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList'+import type { ErrorTrackingSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import {inboxErrorTrackingIssueLogic,@@ -20,9 +19,11 @@ import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'/** Narrows a signal's `extra` to the error tracking shape (a string `fingerprint`). */-export function isErrorTrackingExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & ErrorTrackingSignalExtra {+export function isErrorTrackingExtra(value: unknown): value is Record<string, unknown> & ErrorTrackingSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return typeof extra.fingerprint === 'string'}diff --git a/frontend/src/scenes/inbox/components/signalCards/GithubIssueSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/GithubIssueSignalCard.tsxindex 08c5f4de8cff..41ba9bd7aca1 100644--- a/frontend/src/scenes/inbox/components/signalCards/GithubIssueSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/GithubIssueSignalCard.tsx@@ -3,15 +3,17 @@ import { IconLock } from '@posthog/icons'import { LemonTag } from 'lib/lemon-ui/LemonTag'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'-import type { GithubIssueSignalExtra } from '~/queries/schema/schema-signals'+import type { GithubIssueSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { ExternalSignalCard, type StatePill } from './ExternalSignalCard'import type { SignalCardEntry, SignalCardProps } from './types'/** Narrows a signal's `extra` to a GitHub issue payload. */-export function isGithubIssueExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & GithubIssueSignalExtra {+export function isGithubIssueExtra(value: unknown): value is Record<string, unknown> & GithubIssueSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'html_url' in extra && 'number' in extra}@@ -32,7 +34,7 @@ function statePillFromState(state: string): StatePill {}export function GithubIssueSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & GithubIssueSignalExtra+ const extra = signal.extra as Record<string, unknown> & GithubIssueSignalExtraApiconst labels = Array.isArray(extra.labels) ? extra.labels : []diff --git a/frontend/src/scenes/inbox/components/signalCards/HealthCheckSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/HealthCheckSignalCard.tsxindex a8c7fde7e360..e4d81c598442 100644--- a/frontend/src/scenes/inbox/components/signalCards/HealthCheckSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/HealthCheckSignalCard.tsx@@ -6,7 +6,10 @@ import type { LemonTagType } from '@posthog/lemon-ui'import { TZLabel } from 'lib/components/TZLabel'import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'-import type { HealthCheckSeverity, HealthCheckSignalExtra } from '~/queries/schema/schema-signals'+import type {+ HealthCheckSignalExtraSeverityEnumApi,+ HealthCheckSignalExtraApi,+} from 'products/signals/frontend/generated/api.schemas'import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'@@ -15,14 +18,16 @@ import type { SignalCardEntry, SignalCardProps } from './types'* Health-check signals are PostHog-native instrumentation issues. They always carry a `kind`,* a `severity`, and an `issue_id`, which together distinguish them from other native sources.*/-export function isHealthCheckExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & HealthCheckSignalExtra {+export function isHealthCheckExtra(value: unknown): value is Record<string, unknown> & HealthCheckSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'kind' in extra && 'severity' in extra && 'issue_id' in extra}/** Severity → LemonTag tone for the header right slot. */-const SEVERITY_TAG_TYPE: Record<HealthCheckSeverity, LemonTagType> = {+const SEVERITY_TAG_TYPE: Record<HealthCheckSignalExtraSeverityEnumApi, LemonTagType> = {critical: 'danger',warning: 'warning',info: 'muted',@@ -157,7 +162,7 @@ function PayloadRenderer({ kind, payload }: { kind: string; payload: Record<stri}export function HealthCheckSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & HealthCheckSignalExtra+ const extra = signal.extra as Record<string, unknown> & HealthCheckSignalExtraApiconst severityTag = (<LemonTag size="small" type={SEVERITY_TAG_TYPE[extra.severity]}>diff --git a/frontend/src/scenes/inbox/components/signalCards/LinearIssueSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/LinearIssueSignalCard.tsxindex f94892b24dff..36b3efd63504 100644--- a/frontend/src/scenes/inbox/components/signalCards/LinearIssueSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/LinearIssueSignalCard.tsx@@ -4,7 +4,7 @@ import { LemonTag } from '@posthog/lemon-ui'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'-import type { LinearIssueSignalExtra } from '~/queries/schema/schema-signals'+import type { LinearIssueSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { ExternalSignalCard, type StatePill } from './ExternalSignalCard'import type { SignalCardEntry, SignalCardProps } from './types'@@ -13,14 +13,16 @@ import type { SignalCardEntry, SignalCardProps } from './types'* Linear has `url` + `priority` + `number`, but unlike GitHub it carries no `html_url`.* Requiring `identifier` and `priority_label` keeps this narrow enough not to match other issue sources.*/-export function isLinearIssueExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & LinearIssueSignalExtra {+export function isLinearIssueExtra(value: unknown): value is Record<string, unknown> & LinearIssueSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'identifier' in extra && 'priority_label' in extra && typeof extra.url === 'string'}/** Linear workflow state types → state pill tone. */-function statePillForState(extra: LinearIssueSignalExtra): StatePill | undefined {+function statePillForState(extra: LinearIssueSignalExtraApi): StatePill | undefined {if (!extra.state_name) {return undefined}@@ -43,7 +45,7 @@ const PRIORITY_DOT_CLASS: Record<number, string> = {4: 'text-muted',}-function PriorityIndicator({ extra }: { extra: LinearIssueSignalExtra }): JSX.Element {+function PriorityIndicator({ extra }: { extra: LinearIssueSignalExtraApi }): JSX.Element {const dotClass = PRIORITY_DOT_CLASS[extra.priority] ?? 'text-muted'const label = extra.priority === 0 ? extra.priority_label || 'No priority' : extra.priority_labelreturn (@@ -55,7 +57,7 @@ function PriorityIndicator({ extra }: { extra: LinearIssueSignalExtra }): JSX.El}export function LinearIssueSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & LinearIssueSignalExtra+ const extra = signal.extra as Record<string, unknown> & LinearIssueSignalExtraApiconst title = extra.identifier || `#${extra.number}`const labels = Array.isArray(extra.labels) ? extra.labels : []diff --git a/frontend/src/scenes/inbox/components/signalCards/LlmAnalyticsSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/LlmAnalyticsSignalCard.tsxindex 1fe2d882f389..a2ea0bdbd09d 100644--- a/frontend/src/scenes/inbox/components/signalCards/LlmAnalyticsSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/LlmAnalyticsSignalCard.tsx@@ -8,11 +8,13 @@ import { humanFriendlyDetailedTime } from 'lib/utils/datetime'import type { SignalNode } from 'scenes/debug/signals/types'import { urls } from 'scenes/urls'-import type { LlmEvalReportSignalExtra, LlmEvalSignalExtra } from '~/queries/schema/schema-signals'-import { LLMProviderIcon } from 'products/ai_observability/frontend/LLMProviderIcon'import { normalizeLLMProvider } from 'products/ai_observability/frontend/settings/llmProviderKeysLogic'import { formatLLMCost, formatLLMLatency, formatTokens } from 'products/ai_observability/frontend/utils'+import type {+ LlmEvalReportSignalExtraApi,+ LlmEvalSignalExtraApi,+} from 'products/signals/frontend/generated/api.schemas'import { inboxLlmTraceLogic } from './inboxLlmTraceLogic'import { SignalCardShell } from './SignalCardShell'@@ -20,15 +22,19 @@ import type { SignalCardEntry, SignalCardProps } from './types'// ── Type guards ──────────────────────────────────────────────────────────────────-export function isLlmEvalTraceExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & LlmEvalSignalExtra {+export function isLlmEvalTraceExtra(value: unknown): value is Record<string, unknown> & LlmEvalSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'evaluation_id' in extra && 'trace_id' in extra}-export function isLlmEvalReportExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & LlmEvalReportSignalExtra {+export function isLlmEvalReportExtra(value: unknown): value is Record<string, unknown> & LlmEvalReportSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'evaluation_id' in extra && 'report_run_id' in extra}@@ -54,7 +60,7 @@ function ModelProviderLine({ model, provider }: { model?: string; provider?: str// ── Trace card (source_type: evaluation) ──────────────────────────────────────────/** Metric strip rendered once the trace loads. Each metric is guarded — missing fields are skipped. */-function TraceMetricStrip({ extra }: { extra: LlmEvalSignalExtra }): JSX.Element | null {+function TraceMetricStrip({ extra }: { extra: LlmEvalSignalExtraApi }): JSX.Element | null {const { trace, traceLoading } = useValues(inboxLlmTraceLogic)if (traceLoading) {@@ -62,10 +68,10 @@ function TraceMetricStrip({ extra }: { extra: LlmEvalSignalExtra }): JSX.Element}if (!trace) {- return <ModelProviderLine model={extra.model} provider={extra.provider} />+ return <ModelProviderLine model={extra.model ?? undefined} provider={extra.provider ?? undefined} />}- const provider = normalizeLLMProvider(extra.provider)+ const provider = normalizeLLMProvider(extra.provider ?? undefined)const metrics: React.ReactNode[] = []if (typeof trace.totalLatency === 'number') {@@ -143,7 +149,13 @@ function stringifyState(state: unknown): string {}}-function LlmEvalTraceSignalCardBody({ signal, extra }: { signal: SignalNode; extra: LlmEvalSignalExtra }): JSX.Element {+function LlmEvalTraceSignalCardBody({+ signal,+ extra,+}: {+ signal: SignalNode+ extra: LlmEvalSignalExtraApi+}): JSX.Element {return (<SignalCardShell signal={signal}>{signal.content && (@@ -157,7 +169,7 @@ function LlmEvalTraceSignalCardBody({ signal, extra }: { signal: SignalNode; ext<div className="flex items-center gap-3 mt-2"><ExternalSignalLink- to={urls.aiObservabilityTrace(extra.trace_id, { event: extra.target_event_id })}+ to={urls.aiObservabilityTrace(extra.trace_id, { event: extra.target_event_id ?? undefined })}label="View trace"/><ExternalSignalLink to={urls.aiObservabilityEvaluation(extra.evaluation_id)} label="View evaluation" />@@ -167,7 +179,7 @@ function LlmEvalTraceSignalCardBody({ signal, extra }: { signal: SignalNode; ext}export function LlmEvalTraceSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as unknown as LlmEvalSignalExtra+ const extra = signal.extra as unknown as LlmEvalSignalExtraApireturn (<BindLogic logic={inboxLlmTraceLogic} props={{ traceId: extra.trace_id }}><LlmEvalTraceSignalCardBody signal={signal} extra={extra} />@@ -178,7 +190,7 @@ export function LlmEvalTraceSignalCard({ signal }: SignalCardProps): JSX.Element// ── Report card (source_type: evaluation_report) ──────────────────────────────────export function LlmEvalReportSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as unknown as LlmEvalReportSignalExtra+ const extra = signal.extra as unknown as LlmEvalReportSignalExtraApireturn (<SignalCardShell signal={signal}>diff --git a/frontend/src/scenes/inbox/components/signalCards/LogsAlertSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/LogsAlertSignalCard.tsxindex 31e2d2b5816b..3a8223ab3e98 100644--- a/frontend/src/scenes/inbox/components/signalCards/LogsAlertSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/LogsAlertSignalCard.tsx@@ -4,15 +4,19 @@ import { LemonTag, Link } from '@posthog/lemon-ui'import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'import { urls } from 'scenes/urls'-import type { LogsAlertStateChangeSignalExtra } from '~/queries/schema/schema-signals'+import type { LogsAlertStateChangeSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'/** Narrows a signal's `extra` to the logs alert state-change shape. */export function isLogsAlertStateChangeExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & LogsAlertStateChangeSignalExtra {+ value: unknown+): value is Record<string, unknown> & LogsAlertStateChangeSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return (typeof extra.alert_id === 'string' &&(extra.action === 'firing' || extra.action === 'broken') &&@@ -78,7 +82,7 @@ function FiltersBlock({ filters }: { filters: Record<string, unknown> }): JSX.El}/** Firing body: threshold sentence plus a compact observed / threshold pair. */-function FiringBody({ extra }: { extra: LogsAlertStateChangeSignalExtra }): JSX.Element {+function FiringBody({ extra }: { extra: LogsAlertStateChangeSignalExtraApi }): JSX.Element {const observed = extra.result_count === null ? 'No result' : extra.result_countreturn (@@ -100,7 +104,7 @@ function FiringBody({ extra }: { extra: LogsAlertStateChangeSignalExtra }): JSX.}/** Broken body: auto-disable sentence plus a muted line describing what was being checked. */-function BrokenBody({ extra }: { extra: LogsAlertStateChangeSignalExtra }): JSX.Element {+function BrokenBody({ extra }: { extra: LogsAlertStateChangeSignalExtraApi }): JSX.Element {return (<div className="flex flex-col gap-1"><p className="text-sm m-0">diff --git a/frontend/src/scenes/inbox/components/signalCards/PgAnalyzeSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/PgAnalyzeSignalCard.tsxindex 8d7a811dcad1..f7a909425ce5 100644--- a/frontend/src/scenes/inbox/components/signalCards/PgAnalyzeSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/PgAnalyzeSignalCard.tsx@@ -7,15 +7,20 @@ import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'import { LemonTag, type LemonTagType } from 'lib/lemon-ui/LemonTag'import { safeHttpUrl } from 'scenes/inbox/utils/reportPresentation'-import type { PgAnalyzeIssueReference, PgAnalyzeIssueSignalExtra } from '~/queries/schema/schema-signals'+import type {+ PgAnalyzeIssueReferenceApi,+ PgAnalyzeIssueSignalExtraApi,+} from 'products/signals/frontend/generated/api.schemas'import { ExternalSignalCard } from './ExternalSignalCard'import type { SignalCardEntry, SignalCardProps } from './types'/** Narrows a signal's `extra` to a pganalyze issue payload. */-export function isPgAnalyzeExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & PgAnalyzeIssueSignalExtra {+export function isPgAnalyzeExtra(value: unknown): value is Record<string, unknown> & PgAnalyzeIssueSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return 'references' in extra && Array.isArray(extra.references) && 'synced_at' in extra}@@ -42,7 +47,7 @@ function sentenceCase(value: string): string {return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase()}-function ReferenceRow({ reference }: { reference: PgAnalyzeIssueReference }): JSX.Element | null {+function ReferenceRow({ reference }: { reference: PgAnalyzeIssueReferenceApi }): JSX.Element | null {if (reference.name === null && reference.url === null && reference.queryText === null) {return null}@@ -75,7 +80,7 @@ function ReferenceRow({ reference }: { reference: PgAnalyzeIssueReference }): JS}export function PgAnalyzeSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & PgAnalyzeIssueSignalExtra+ const extra = signal.extra as Record<string, unknown> & PgAnalyzeIssueSignalExtraApiconst serverLabel = extra.server_name ?? extra.server_human_idconst metaChips = (diff --git a/frontend/src/scenes/inbox/components/signalCards/SessionReplaySignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/SessionReplaySignalCard.tsxindex 75a2296f519a..b764aa3f71fa 100644--- a/frontend/src/scenes/inbox/components/signalCards/SessionReplaySignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/SessionReplaySignalCard.tsx@@ -17,7 +17,11 @@ import { humanFriendlyDuration, reverseColonDelimitedDuration } from 'lib/utils/import { teamLogic } from 'scenes/teamLogic'import { getExportsContentRetrieveUrl } from '~/generated/core/api'-import type { SessionProblemEventEntry, SessionProblemSignalExtra } from '~/queries/schema/schema-signals'++import type {+ SessionProblemEventEntryApi,+ SessionProblemSignalExtraApi,+} from 'products/signals/frontend/generated/api.schemas'import { SignalCardShell } from './SignalCardShell'import type { SignalCardEntry, SignalCardProps } from './types'@@ -25,7 +29,7 @@ import type { SignalCardEntry, SignalCardProps } from './types'/** How many timeline events to show before collapsing the rest behind a toggle. */const TIMELINE_PREVIEW_COUNT = 4-const PROBLEM_TYPE_TAG: Record<SessionProblemSignalExtra['problem_type'], { label: string; type: LemonTagType }> = {+const PROBLEM_TYPE_TAG: Record<SessionProblemSignalExtraApi['problem_type'], { label: string; type: LemonTagType }> = {blocking_exception: { label: 'Blocking exception', type: 'danger' },failure: { label: 'Failure', type: 'danger' },non_blocking_exception: { label: 'Exception', type: 'warning' },@@ -34,9 +38,11 @@ const PROBLEM_TYPE_TAG: Record<SessionProblemSignalExtra['problem_type'], { labe}/** Narrows a raw `extra` payload to the live session-problem shape. */-export function isSessionProblemExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & SessionProblemSignalExtra {+export function isSessionProblemExtra(value: unknown): value is Record<string, unknown> & SessionProblemSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return typeof extra.session_id === 'string' && 'problem_type' in extra}@@ -53,7 +59,7 @@ function recordingSeekTime(sessionStartTime: string | undefined, offset: string}/** Picks a glyph for a timeline event based on its interaction type. */-function EventGlyph({ entry }: { entry: SessionProblemEventEntry }): JSX.Element {+function EventGlyph({ entry }: { entry: SessionProblemEventEntryApi }): JSX.Element {const className = 'size-3.5 shrink-0 text-tertiary'switch (entry.event_type) {case 'click':@@ -77,7 +83,7 @@ function TimelineRow({sessionId,sessionStartTime,}: {- entry: SessionProblemEventEntry+ entry: SessionProblemEventEntryApisessionId: stringsessionStartTime: string | undefined}): JSX.Element {@@ -109,7 +115,7 @@ export function SessionReplaySignalCard({ signal }: SignalCardProps): JSX.Elemenconst [showAllEvents, setShowAllEvents] = useState(false)const [thumbnailFailed, setThumbnailFailed] = useState(false)- const extra = signal.extra as Record<string, unknown> & SessionProblemSignalExtra+ const extra = signal.extra as Record<string, unknown> & SessionProblemSignalExtraApiconst problemTag = PROBLEM_TYPE_TAG[extra.problem_type]const hasThumbnail = extra.exported_asset_id !== undefined && currentTeamId !== null && !thumbnailFailed@@ -117,7 +123,7 @@ export function SessionReplaySignalCard({ signal }: SignalCardProps): JSX.Elemen? getExportsContentRetrieveUrl(String(currentTeamId), extra.exported_asset_id as number): undefined- const segmentSeekTime = recordingSeekTime(extra.session_start_time, extra.start_time)+ const segmentSeekTime = recordingSeekTime(extra.session_start_time ?? undefined, extra.start_time)// Mirror ViewRecordingButton's `checkRecordingExists`: batch-check the recording so the play// affordance disables (rather than opening an empty player) when the recording wasn't captured.@@ -219,7 +225,7 @@ export function SessionReplaySignalCard({ signal }: SignalCardProps): JSX.Elemenkey={`${entry.timestamp}-${index}`}entry={entry}sessionId={extra.session_id}- sessionStartTime={extra.session_start_time}+ sessionStartTime={extra.session_start_time ?? undefined}/>))}</ul>diff --git a/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsxindex e4c96895fd56..940e2469309c 100644--- a/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx@@ -9,7 +9,10 @@ import { LemonProgress } from 'lib/lemon-ui/LemonProgress/LemonProgress'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'import { urls } from 'scenes/urls'-import type { SignalsScoutEvidenceEntry, SignalsScoutSignalExtra } from '~/queries/schema/schema-signals'+import type {+ SignalsScoutEvidenceEntryApi,+ SignalsScoutSignalExtraApi,+} from 'products/signals/frontend/generated/api.schemas'import { INBOX_SOURCE_OPTIONS } from '../../filterOptions'import { SignalReportPriorityBadge } from '../badges/SignalReportPriorityBadge'@@ -25,9 +28,11 @@ const SOURCE_BY_VALUE: Record<string, { label: string; icon: JSX.Element }> = Ob)/** Narrows a raw `extra` payload to the live Signals scout shape. */-export function isSignalsScoutExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & SignalsScoutSignalExtra {+export function isSignalsScoutExtra(value: unknown): value is Record<string, unknown> & SignalsScoutSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return Array.isArray(extra.evidence) && typeof extra.skill_name === 'string' && typeof extra.confidence === 'number'}@@ -51,9 +56,9 @@ export function scoutEvidenceUrl(sourceProduct: string, entityId?: string): stri}/** A single evidence row: source icon + eyebrow, the summary, and an optional deep link. */-function EvidenceRow({ entry }: { entry: SignalsScoutEvidenceEntry }): JSX.Element {+function EvidenceRow({ entry }: { entry: SignalsScoutEvidenceEntryApi }): JSX.Element {const meta = SOURCE_BY_VALUE[entry.source_product]- const url = scoutEvidenceUrl(entry.source_product, entry.entity_id)+ const url = scoutEvidenceUrl(entry.source_product, entry.entity_id ?? undefined)return (<li className="flex items-start gap-2 py-0.5"><span className="inline-flex shrink-0 items-center text-tertiary mt-0.5" aria-hidden>@@ -96,7 +101,7 @@ function MonoId({ label, value, to }: { label: string; value: string; to?: strinexport function SignalsScoutSignalCard({ signal }: SignalCardProps): JSX.Element {const [showAllEvidence, setShowAllEvidence] = useState(false)- const extra = signal.extra as Record<string, unknown> & SignalsScoutSignalExtra+ const extra = signal.extra as Record<string, unknown> & SignalsScoutSignalExtraApiconst confidencePercent = Math.round(extra.confidence * 100)const hypothesis = extra.hypothesis?.trim() || signal.contentdiff --git a/frontend/src/scenes/inbox/components/signalCards/ZendeskTicketSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/ZendeskTicketSignalCard.tsxindex 11d73457e7e5..427105783565 100644--- a/frontend/src/scenes/inbox/components/signalCards/ZendeskTicketSignalCard.tsx+++ b/frontend/src/scenes/inbox/components/signalCards/ZendeskTicketSignalCard.tsx@@ -1,7 +1,7 @@import { LemonTag, type LemonTagType } from 'lib/lemon-ui/LemonTag'import { humanFriendlyDetailedTime } from 'lib/utils/datetime'-import type { ZendeskTicketSignalExtra } from '~/queries/schema/schema-signals'+import type { ZendeskTicketSignalExtraApi } from 'products/signals/frontend/generated/api.schemas'import { ExternalSignalCard, type StatePill } from './ExternalSignalCard'import type { SignalCardEntry, SignalCardProps } from './types'@@ -9,9 +9,11 @@ import type { SignalCardEntry, SignalCardProps } from './types'const MAX_VISIBLE_TAGS = 6/** Guard for Zendesk ticket extras. Keys on `status` + `tags` so it doesn't collide with Linear, which also carries `url` + `priority`. */-export function isZendeskTicketExtra(- extra: Record<string, unknown>-): extra is Record<string, unknown> & ZendeskTicketSignalExtra {+export function isZendeskTicketExtra(value: unknown): value is Record<string, unknown> & ZendeskTicketSignalExtraApi {+ if (typeof value !== 'object' || value === null) {+ return false+ }+ const extra = value as Record<string, unknown>return typeof extra.url === 'string' && 'status' in extra && 'tags' in extra}@@ -58,7 +60,7 @@ function cleanZendeskUrl(url: string): string {}export function ZendeskTicketSignalCard({ signal }: SignalCardProps): JSX.Element {- const extra = signal.extra as Record<string, unknown> & ZendeskTicketSignalExtra+ const extra = signal.extra as Record<string, unknown> & ZendeskTicketSignalExtraApiconst statePill: StatePill = {label: sentenceCase(extra.status),diff --git a/frontend/src/scenes/inbox/logics/inboxReportDetailLogic.ts b/frontend/src/scenes/inbox/logics/inboxReportDetailLogic.tsindex 9f64aa3bfb93..d24877389c10 100644--- a/frontend/src/scenes/inbox/logics/inboxReportDetailLogic.ts+++ b/frontend/src/scenes/inbox/logics/inboxReportDetailLogic.ts@@ -9,6 +9,7 @@ import { teamLogic } from 'scenes/teamLogic'import { userLogic } from 'scenes/userLogic'import { Task, TaskRunStatus } from 'products/posthog_ai/frontend/types/taskTypes'+import { signalsReportsSignalsRetrieve } from 'products/signals/frontend/generated/api'import { signalsReportArtefactsDiff } from 'products/signals/frontend/generated/api'import type { CommitDiffResponseApi } from 'products/signals/frontend/generated/api.schemas'@@ -131,7 +132,10 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([null as SignalNode[] | null,{loadReportSignals: async () => {- const response = await api.signalReports.getReportSignals(props.reportId)+ const response = await signalsReportsSignalsRetrieve(+ String(teamLogic.values.currentTeamId),+ props.reportId+ )return response.signals},},diff --git a/frontend/src/scenes/inbox/signalSourcesLogic.ts b/frontend/src/scenes/inbox/signalSourcesLogic.tsindex 9b01a0ae7dd7..436d83f5666a 100644--- a/frontend/src/scenes/inbox/signalSourcesLogic.ts+++ b/frontend/src/scenes/inbox/signalSourcesLogic.ts@@ -6,9 +6,9 @@ import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'import { FEATURE_FLAGS } from 'lib/constants'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'+import { SignalSourceProduct, SignalSourceType } from 'scenes/inbox/types'import { ExternalDataSourceType } from '~/queries/schema/schema-general'-import { SignalSourceProduct, SignalSourceType } from '~/queries/schema/schema-signals'import { ExternalDataSource, ExternalDataSourceSchema, RecordingUniversalFilters } from '~/types'import { sourcesDataLogic } from 'products/data_warehouse/frontend/shared/logics/sourcesDataLogic'@@ -21,9 +21,9 @@ export type DataWarehouseSource = 'Linear' | 'Zendesk' | 'Github' | 'PgAnalyze'/** Matches Cymbal `EmitSignalRequest.source_type` + `products.signals.backend.api.emit_signal` checks. */export const ERROR_TRACKING_SIGNAL_SOURCE_TYPES: SignalSourceType[] = [- SignalSourceType.ISSUE_CREATED,- SignalSourceType.ISSUE_REOPENED,- SignalSourceType.ISSUE_SPIKING,+ SignalSourceType.IssueCreated,+ SignalSourceType.IssueReopened,+ SignalSourceType.IssueSpiking,]const DATA_WAREHOUSE_SOURCE_CONFIG: Record<@@ -36,26 +36,26 @@ const DATA_WAREHOUSE_SOURCE_CONFIG: Record<}> = {Github: {- sourceProduct: SignalSourceProduct.GITHUB,- sourceType: SignalSourceType.ISSUE,+ sourceProduct: SignalSourceProduct.Github,+ sourceType: SignalSourceType.Issue,requiredTable: 'issues',enableErrorMessage: 'Failed to enable GitHub Issues',},Linear: {- sourceProduct: SignalSourceProduct.LINEAR,- sourceType: SignalSourceType.ISSUE,+ sourceProduct: SignalSourceProduct.Linear,+ sourceType: SignalSourceType.Issue,requiredTable: 'issues',enableErrorMessage: 'Failed to enable Linear Issues',},Zendesk: {- sourceProduct: SignalSourceProduct.ZENDESK,- sourceType: SignalSourceType.TICKET,+ sourceProduct: SignalSourceProduct.Zendesk,+ sourceType: SignalSourceType.Ticket,requiredTable: 'tickets',enableErrorMessage: 'Failed to enable Zendesk Tickets',},PgAnalyze: {- sourceProduct: SignalSourceProduct.PGANALYZE,- sourceType: SignalSourceType.ISSUE,+ sourceProduct: SignalSourceProduct.Pganalyze,+ sourceType: SignalSourceType.Issue,requiredTable: 'issues',enableErrorMessage: 'Failed to enable pganalyze',},@@ -190,19 +190,19 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([toggleSessionAnalysis: (state: SignalSourceConfig[] | null) =>toggleSourceConfigState(state,- SignalSourceProduct.SESSION_REPLAY,- SignalSourceType.SESSION_ANALYSIS_CLUSTER+ SignalSourceProduct.SessionReplay,+ SignalSourceType.SessionAnalysisCluster),toggleDataWarehouseSource: (state: SignalSourceConfig[] | null, { dwSource }) => {const { sourceProduct, sourceType } = DATA_WAREHOUSE_SOURCE_CONFIG[dwSource]return toggleSourceConfigState(state, sourceProduct, sourceType)},toggleHealthChecks: (state: SignalSourceConfig[] | null) =>- toggleSourceConfigState(state, SignalSourceProduct.HEALTH_CHECKS, SignalSourceType.HEALTH_ISSUE),+ toggleSourceConfigState(state, SignalSourceProduct.HealthChecks, SignalSourceType.HealthIssue),toggleEvalReports: (state: SignalSourceConfig[] | null) =>- toggleSourceConfigState(state, SignalSourceProduct.LLM_ANALYTICS, SignalSourceType.EVALUATION_REPORT),+ toggleSourceConfigState(state, SignalSourceProduct.LlmAnalytics, SignalSourceType.EvaluationReport),toggleConversations: (state: SignalSourceConfig[] | null) =>- toggleSourceConfigState(state, SignalSourceProduct.CONVERSATIONS, SignalSourceType.TICKET),+ toggleSourceConfigState(state, SignalSourceProduct.Conversations, SignalSourceType.Ticket),},togglingSourceKeys: [new Set<string>(),@@ -242,29 +242,29 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find((c) =>- c.source_product === SignalSourceProduct.SESSION_REPLAY &&- c.source_type === SignalSourceType.SESSION_ANALYSIS_CLUSTER+ c.source_product === SignalSourceProduct.SessionReplay &&+ c.source_type === SignalSourceType.SessionAnalysisCluster) ?? null,],githubIssuesConfig: [(s) => [s.sourceConfigs],(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find(- (c) => c.source_product === SignalSourceProduct.GITHUB && c.source_type === SignalSourceType.ISSUE+ (c) => c.source_product === SignalSourceProduct.Github && c.source_type === SignalSourceType.Issue) ?? null,],linearIssuesConfig: [(s) => [s.sourceConfigs],(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find(- (c) => c.source_product === SignalSourceProduct.LINEAR && c.source_type === SignalSourceType.ISSUE+ (c) => c.source_product === SignalSourceProduct.Linear && c.source_type === SignalSourceType.Issue) ?? null,],zendeskTicketsConfig: [(s) => [s.sourceConfigs],(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find(- (c) => c.source_product === SignalSourceProduct.ZENDESK && c.source_type === SignalSourceType.TICKET+ (c) => c.source_product === SignalSourceProduct.Zendesk && c.source_type === SignalSourceType.Ticket) ?? null,],pgAnalyzeIssuesConfig: [@@ -272,7 +272,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find((c) =>- c.source_product === SignalSourceProduct.PGANALYZE && c.source_type === SignalSourceType.ISSUE+ c.source_product === SignalSourceProduct.Pganalyze && c.source_type === SignalSourceType.Issue) ?? null,],conversationsConfig: [@@ -280,34 +280,34 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find((c) =>- c.source_product === SignalSourceProduct.CONVERSATIONS &&- c.source_type === SignalSourceType.TICKET+ c.source_product === SignalSourceProduct.Conversations &&+ c.source_type === SignalSourceType.Ticket) ?? null,],isSessionAnalysisToggling: [(s) => [s.togglingSourceKeys],(keys: Set<string>): boolean =>- keys.has(`${SignalSourceProduct.SESSION_REPLAY}_${SignalSourceType.SESSION_ANALYSIS_CLUSTER}`),+ keys.has(`${SignalSourceProduct.SessionReplay}_${SignalSourceType.SessionAnalysisCluster}`),],isConversationsToggling: [(s) => [s.togglingSourceKeys],- (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.CONVERSATIONS}_${SignalSourceType.TICKET}`),+ (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.Conversations}_${SignalSourceType.Ticket}`),],isGithubIssuesToggling: [(s) => [s.togglingSourceKeys],- (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.GITHUB}_${SignalSourceType.ISSUE}`),+ (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.Github}_${SignalSourceType.Issue}`),],isLinearIssuesToggling: [(s) => [s.togglingSourceKeys],- (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.LINEAR}_${SignalSourceType.ISSUE}`),+ (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.Linear}_${SignalSourceType.Issue}`),],isZendeskTicketsToggling: [(s) => [s.togglingSourceKeys],- (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.ZENDESK}_${SignalSourceType.TICKET}`),+ (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.Zendesk}_${SignalSourceType.Ticket}`),],isPgAnalyzeIssuesToggling: [(s) => [s.togglingSourceKeys],- (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.PGANALYZE}_${SignalSourceType.ISSUE}`),+ (keys: Set<string>): boolean => keys.has(`${SignalSourceProduct.Pganalyze}_${SignalSourceType.Issue}`),],isErrorTrackingToggling: [(s) => [s.togglingSourceKeys],@@ -318,28 +318,28 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find((c) =>- c.source_product === SignalSourceProduct.HEALTH_CHECKS &&- c.source_type === SignalSourceType.HEALTH_ISSUE+ c.source_product === SignalSourceProduct.HealthChecks &&+ c.source_type === SignalSourceType.HealthIssue) ?? null,],isHealthChecksToggling: [(s) => [s.togglingSourceKeys],(keys: Set<string>): boolean =>- keys.has(`${SignalSourceProduct.HEALTH_CHECKS}_${SignalSourceType.HEALTH_ISSUE}`),+ keys.has(`${SignalSourceProduct.HealthChecks}_${SignalSourceType.HealthIssue}`),],evalReportsConfig: [(s) => [s.sourceConfigs],(sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>sourceConfigs?.find((c) =>- c.source_product === SignalSourceProduct.LLM_ANALYTICS &&- c.source_type === SignalSourceType.EVALUATION_REPORT+ c.source_product === SignalSourceProduct.LlmAnalytics &&+ c.source_type === SignalSourceType.EvaluationReport) ?? null,],isEvalReportsToggling: [(s) => [s.togglingSourceKeys],(keys: Set<string>): boolean =>- keys.has(`${SignalSourceProduct.LLM_ANALYTICS}_${SignalSourceType.EVALUATION_REPORT}`),+ keys.has(`${SignalSourceProduct.LlmAnalytics}_${SignalSourceType.EvaluationReport}`),],errorTrackingIsFullyEnabled: [(s) => [s.sourceConfigs],@@ -350,7 +350,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([return ERROR_TRACKING_SIGNAL_SOURCE_TYPES.every((sourceType) => {const c = sourceConfigs.find((row) =>- row.source_product === SignalSourceProduct.ERROR_TRACKING && row.source_type === sourceType+ row.source_product === SignalSourceProduct.ErrorTracking && row.source_type === sourceType)return c?.enabled === true})@@ -370,8 +370,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(c) =>c.enabled &&!(- c.source_product === SignalSourceProduct.SIGNALS_SCOUT &&- c.source_type === SignalSourceType.CROSS_SOURCE_ISSUE+ c.source_product === SignalSourceProduct.SignalsScout &&+ c.source_type === SignalSourceType.CrossSourceIssue)).length ?? 0,],@@ -429,10 +429,10 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const mapping: Partial<Record<ExternalDataSourceType, { sourceProduct: SignalSourceProduct; sourceType: SignalSourceType }>> = {- Github: { sourceProduct: SignalSourceProduct.GITHUB, sourceType: SignalSourceType.ISSUE },- Linear: { sourceProduct: SignalSourceProduct.LINEAR, sourceType: SignalSourceType.ISSUE },- Zendesk: { sourceProduct: SignalSourceProduct.ZENDESK, sourceType: SignalSourceType.TICKET },- PgAnalyze: { sourceProduct: SignalSourceProduct.PGANALYZE, sourceType: SignalSourceType.ISSUE },+ Github: { sourceProduct: SignalSourceProduct.Github, sourceType: SignalSourceType.Issue },+ Linear: { sourceProduct: SignalSourceProduct.Linear, sourceType: SignalSourceType.Issue },+ Zendesk: { sourceProduct: SignalSourceProduct.Zendesk, sourceType: SignalSourceType.Ticket },+ PgAnalyze: { sourceProduct: SignalSourceProduct.Pganalyze, sourceType: SignalSourceType.Issue },}const mapped = mapping[product]if (mapped) {@@ -488,19 +488,19 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const configs = values.sourceConfigs ?? []// First connection when no persisted error-tracking config existed before this enable.const wasConnected = configs.some(- (c) => c.source_product === SignalSourceProduct.ERROR_TRACKING && !c.id.startsWith('new_')+ (c) => c.source_product === SignalSourceProduct.ErrorTracking && !c.id.startsWith('new_'))try {for (const sourceType of ERROR_TRACKING_SIGNAL_SOURCE_TYPES) {const existing = configs.find((c) =>- c.source_product === SignalSourceProduct.ERROR_TRACKING && c.source_type === sourceType+ c.source_product === SignalSourceProduct.ErrorTracking && c.source_type === sourceType)if (existing && !existing.id.startsWith('new_')) {await api.signalSourceConfigs.update(existing.id, { enabled: desiredEnabled })} else if (desiredEnabled) {await api.signalSourceConfigs.create({- source_product: SignalSourceProduct.ERROR_TRACKING,+ source_product: SignalSourceProduct.ErrorTracking,source_type: sourceType,enabled: true,config: {},@@ -511,8 +511,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([actions.toggleErrorTrackingComplete()if (desiredEnabled) {captureSignalSourceConnected({- sourceProduct: SignalSourceProduct.ERROR_TRACKING,- sourceType: SignalSourceType.ISSUE_CREATED,+ sourceProduct: SignalSourceProduct.ErrorTracking,+ sourceType: SignalSourceType.IssueCreated,isFirstConnection: !wasConnected,viaSetupWizard: false,})@@ -530,8 +530,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const config = values.sessionAnalysisConfigconst desiredEnabled = config?.enabled ?? trueactions.toggleSignalSource({- sourceProduct: SignalSourceProduct.SESSION_REPLAY,- sourceType: SignalSourceType.SESSION_ANALYSIS_CLUSTER,+ sourceProduct: SignalSourceProduct.SessionReplay,+ sourceType: SignalSourceType.SessionAnalysisCluster,enabled: desiredEnabled,})},@@ -541,8 +541,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const config = values.healthChecksConfigconst desiredEnabled = config?.enabled ?? trueactions.toggleSignalSource({- sourceProduct: SignalSourceProduct.HEALTH_CHECKS,- sourceType: SignalSourceType.HEALTH_ISSUE,+ sourceProduct: SignalSourceProduct.HealthChecks,+ sourceType: SignalSourceType.HealthIssue,enabled: desiredEnabled,})},@@ -552,8 +552,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const config = values.evalReportsConfigconst desiredEnabled = config?.enabled ?? trueactions.toggleSignalSource({- sourceProduct: SignalSourceProduct.LLM_ANALYTICS,- sourceType: SignalSourceType.EVALUATION_REPORT,+ sourceProduct: SignalSourceProduct.LlmAnalytics,+ sourceType: SignalSourceType.EvaluationReport,enabled: desiredEnabled,})},@@ -562,8 +562,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([// Send the flipped target state. A missing config row means "off", so first toggle enables.const desiredEnabled = !(config?.enabled ?? false)actions.toggleSignalSource({- sourceProduct: SignalSourceProduct.CONVERSATIONS,- sourceType: SignalSourceType.TICKET,+ sourceProduct: SignalSourceProduct.Conversations,+ sourceType: SignalSourceType.Ticket,enabled: desiredEnabled,})},@@ -587,8 +587,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([})} else {await api.signalSourceConfigs.create({- source_product: SignalSourceProduct.SESSION_REPLAY,- source_type: SignalSourceType.SESSION_ANALYSIS_CLUSTER,+ source_product: SignalSourceProduct.SessionReplay,+ source_type: SignalSourceType.SessionAnalysisCluster,config: { recording_filters: filters },enabled: true,})@@ -607,7 +607,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([if (existing &&existing.id !==- `new_${SignalSourceProduct.SESSION_REPLAY}_${SignalSourceType.SESSION_ANALYSIS_CLUSTER}`+ `new_${SignalSourceProduct.SessionReplay}_${SignalSourceType.SessionAnalysisCluster}`) {await api.signalSourceConfigs.update(existing.id, { config: {}, enabled: true })lemonToast.success('Session analysis filters cleared')diff --git a/frontend/src/scenes/inbox/types.ts b/frontend/src/scenes/inbox/types.tsindex f944dd134646..2114c2cdaf92 100644--- a/frontend/src/scenes/inbox/types.ts+++ b/frontend/src/scenes/inbox/types.ts@@ -1,16 +1,38 @@-// Canonical definitions live in schema-signals.ts (synced between TS and Python).-// Re-exported here so existing consumers keep working.-import {- EnrichedReviewer,- RelevantCommit,- SignalSourceProduct,- SignalSourceType,-} from '~/queries/schema/schema-signals'import type { UserBasicType } from '~/types'-export type { EnrichedReviewer, RelevantCommit }+import {+ SignalSourceProductApi as SignalSourceProduct,+ SignalSourceTypeApi as SignalSourceType,+} from 'products/signals/frontend/generated/api.schemas'++// The canonical signal taxonomy, generated from the backend enums via OpenAPI/Orval.+// Re-exported under the domain names so consumers don't carry the `Api` suffix around.export { SignalSourceProduct, SignalSourceType }+// Suggested-reviewer shapes, read from `suggested_reviewers` artefact content (a polymorphic JSON+// field with no per-type OpenAPI schema). Mirrors EnrichedReviewer/RelevantCommit in+// products/signals/backend/contracts.py.+export interface RelevantCommit {+ sha: string+ url: string+ reason: string+}++export interface SignalReviewerUserInfo {+ id: number+ uuid: string+ first_name: string+ last_name: string+ email: string+}++export interface EnrichedReviewer {+ github_login: string+ github_name: string | null+ relevant_commits: RelevantCommit[]+ user: SignalReviewerUserInfo | null+}+/** P0 (highest) – P4 (lowest). Mirrors desktop `SignalReportPriority`. */export type SignalReportPriority = 'P0' | 'P1' | 'P2' | 'P3' | 'P4'diff --git a/posthog/schema.py b/posthog/schema.pyindex d3b0f7493cb0..8dab2f727cf0 100644--- a/posthog/schema.py+++ b/posthog/schema.py@@ -12,7 +12,6 @@ from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel, confrom posthog.schema_enums import (AccessControlLevel as AccessControlLevel,Action as Action,- Action1 as Action1,AgentMode as AgentMode,AggregationAxisFormat as AggregationAxisFormat,AggregationPropertyType as AggregationPropertyType,@@ -118,7 +117,6 @@ from posthog.schema_enums import (GoogleAdsTableExclusions as GoogleAdsTableExclusions,GoogleAdsTableKeywords as GoogleAdsTableKeywords,GradientScaleMode as GradientScaleMode,- HealthCheckSeverity as HealthCheckSeverity,HeatmapSortOrder as HeatmapSortOrder,HedgehogActorAccessoryOption as HedgehogActorAccessoryOption,HedgehogActorColorOption as HedgehogActorColorOption,@@ -200,8 +198,6 @@ from posthog.schema_enums import (PlanningStepStatus as PlanningStepStatus,Position as Position,PrecomputationMode as PrecomputationMode,- Priority as Priority,- ProblemType as ProblemType,ProductIntentContext as ProductIntentContext,ProductItemCategory as ProductItemCategory,ProductKey as ProductKey,@@ -232,9 +228,6 @@ from posthog.schema_enums import (SessionAttributionGroupBy as SessionAttributionGroupBy,SessionsV2JoinMode as SessionsV2JoinMode,SessionTableVersion as SessionTableVersion,- Severity as Severity,- SignalSourceProduct as SignalSourceProduct,- SignalSourceType as SignalSourceType,SimpleIntervalType as SimpleIntervalType,SlackIntegrationScope as SlackIntegrationScope,SlackIntegrationScopeInReview as SlackIntegrationScopeInReview,@@ -248,7 +241,6 @@ from posthog.schema_enums import (SnapshotSource as SnapshotSource,SourceFieldInputConfigType as SourceFieldInputConfigType,SourceFieldSelectConfigConverter as SourceFieldSelectConfigConverter,- SourceType as SourceType,SpanPropertyFilterType as SpanPropertyFilterType,StartHandling as StartHandling,Status as Status,@@ -271,7 +263,6 @@ from posthog.schema_enums import (TaxonomicFilterGroupType as TaxonomicFilterGroupType,TextMatching as TextMatching,Theme as Theme,- ThresholdOperator as ThresholdOperator,TikTokAdsDefaultSources as TikTokAdsDefaultSources,TikTokAdsTableExclusions as TikTokAdsTableExclusions,TikTokAdsTableKeywords as TikTokAdsTableKeywords,@@ -875,19 +866,6 @@ class ConditionalFormattingRule(BaseModel):templateId: str-class ConversationsTicketSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- channel_detail: str | None = None- channel_source: str- created_at: str- email_subject: str | None = None- priority: str | None = None- status: str- ticket_number: float--class CustomEventConversionGoal(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1045,26 +1023,6 @@ class EmptyPropertyFilter(BaseModel):type: Literal["empty"] = "empty"-class EndpointBreakdownLimitExceededSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- breakdown_limit: float- endpoint_name: str---class EndpointExecutionFailedSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- endpoint_name: str- endpoint_version: float | None = None- error_class: str- error_message: str- materialized: bool- saved_query_id: str | None = None--class EndpointLastExecutionTimesRequest(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1148,13 +1106,6 @@ class ErrorTrackingIssueImpactToolOutput(BaseModel):events: list[str]-class ErrorTrackingSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- fingerprint: str--class EventDefinition(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1460,19 +1411,6 @@ class FunnelTrendsResults(RootModel[list[dict[str, Any]]]):root: list[dict[str, Any]]-class GithubIssueSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- created_at: str- html_url: str- labels: list[str]- locked: bool- number: float- state: str- updated_at: str--class GoalLine(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1485,20 +1423,6 @@ class GoalLine(BaseModel):value: float-class HealthCheckSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- issue_id: str- kind: str- link: str = Field(..., description="Relative in-app path to the resource, e.g. '/web'.")- payload: dict[str, Any]- severity: HealthCheckSeverity- summary: str- title: str- url: str = Field(..., description="Absolute URL ({project.url} + link).")--class HeatmapGradientStop(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1594,48 +1518,6 @@ class LLMTracePerson(BaseModel):uuid: str-class LinearIssueSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- created_at: str- identifier: str- labels: list[str]- number: float- priority: float- priority_label: str- state_name: str | None = None- state_type: str | None = None- team_name: str | None = None- updated_at: str- url: str---class LlmEvalReportSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- evaluation_description: str- evaluation_id: str- evaluation_name: str- period_end: str- period_start: str- report_id: str- report_run_id: str---class LlmEvalSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- evaluation_id: str- model: str | None = None- provider: str | None = None- target_event_id: str | None = None- target_event_type: str | None = None- trace_id: str--class LoadingBlock(BaseModel):model_config = ConfigDict(extra="forbid",@@ -1660,22 +1542,6 @@ class LogAttributeResult(BaseModel):propertyFilterType: str = Field(..., description="Either 'log_attribute' or 'log_resource_attribute'.")-class LogsAlertStateChangeSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- action: Action1- alert_id: str- alert_name: str- consecutive_failures: float- filters: dict[str, Any]- result_count: float | None = None- threshold_count: float- threshold_operator: ThresholdOperator- url: str- window_minutes: float--class MCPToolDescriptionItem(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2196,28 +2062,6 @@ class PersonType(BaseModel):uuid: str | None = None-class PgAnalyzeIssueReference(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- kind: str | None = None- name: str | None = None- queryText: str | None = None- url: str | None = None---class PgAnalyzeIssueSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- database_id: str | None = None- references: list[PgAnalyzeIssueReference]- server_human_id: str | None = None- server_name: str | None = None- severity: str | None = None- synced_at: str--class PieChartSettings(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2337,15 +2181,6 @@ class RecordingPropertyFilter(BaseModel):value: list[str | float | bool] | str | float | bool | None = None-class RelevantCommit(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- reason: str- sha: str- url: str--class ReplayInactivityPeriod(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2357,52 +2192,6 @@ class ReplayInactivityPeriod(BaseModel):ts_to_s: float | None = None-class ReplayVisionScannerFindingSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- confidence: float = Field(- ...,- description=("The model's self-reported confidence in the finding, in [0, 1]. Independent of `weight`."),- )- distinct_id: str | None = None- end_time: float = Field(- ...,- description=("When the issue ends in the recording, in seconds (the footer's REC_T value)."),- )- exported_asset_id: float = Field(..., description="The rasterized MP4 asset the scanner analysed.")- observation_id: str- problem_type: str = Field(- ...,- description=(- "Issue category: 'bug' / 'crash' / 'design_flaw' / 'ux_friction'. Kept open"- " so new categories don't fail validation."- ),- )- recording_active_seconds: float | None = None- recording_duration: float | None = None- recording_end_time: str | None = Field(default=None, description="ISO 8601 recording end.")- recording_start_time: str | None = Field(default=None, description="ISO 8601 recording start (the REC_T=0 anchor).")- scanner_id: str- scanner_name: str- scanner_type: str = Field(- ...,- description=(- "Replay Vision scanner type, e.g. 'monitor' / 'classifier' / 'scorer' /"- " 'summarizer'. Kept open so new scanner types don't fail signal"- " validation."- ),- )- session_id: str- start_time: float = Field(- ...,- description=(- "When the issue starts in the recording, in seconds from recording start (the footer's REC_T value)."- ),- )- url: str = Field(..., description="The page the issue happened on (the footer's URL value).")--class ResolvedDateRangeResponse(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2533,35 +2322,6 @@ class SessionEventsItem(BaseModel):session_id: str = Field(..., description="Session ID these events belong to")-class SessionProblemEventEntry(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- current_url: str | None = None- event: str- event_type: str | None = None- interaction_text: str | None = None- timestamp: str---class SessionProblemSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- distinct_id: str- end_time: str- event_history: list[SessionProblemEventEntry] | None = None- exported_asset_id: float | None = None- problem_type: ProblemType- segment_title: str- session_active_seconds: float | None = None- session_duration: float | None = None- session_end_time: str | None = None- session_id: str- session_start_time: str | None = None- start_time: str--class SessionPropertyFilter(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2612,48 +2372,6 @@ class SessionReplayBlock(BaseModel):type: Literal["session_replay"] = "session_replay"-class SessionReplaySegment(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- content: str- distinct_id: str- end_time: str- session_id: str- start_time: str---class SessionSegmentClusterMetrics(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- active_users_in_period: float- occurrence_count: float- relevant_user_count: float---class SessionSegmentClusterSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- actionable: bool- label_title: str- metrics: SessionSegmentClusterMetrics- segments: list[SessionReplaySegment]---class SessionSegmentClusterSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: SessionSegmentClusterSignalExtra- source_id: str- source_product: Literal["session_replay"] = "session_replay"- source_type: Literal["session_segment_cluster"] = "session_segment_cluster"- weight: float--class SharingConfigurationSettings(BaseModel):model_config = ConfigDict(extra="forbid",@@ -2667,135 +2385,6 @@ class SharingConfigurationSettings(BaseModel):whitelabel: bool | None = None-class SignalExtraBase(BaseModel):- pass- model_config = ConfigDict(- extra="forbid",- )---class SignalRemediation(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- agent: str = Field(- ...,- description=(- "Agent-facing guidance: how to investigate (which MCP tools to call) and,"- " where the fix lives in the user's codebase, how to apply it. The research"- " agent treats this as authoritative — it still investigates and produces"- " findings, but follows this instead of starting cold."- ),- )- human: str = Field(- ...,- description=(- "Human-facing fix steps (PostHog UI / alert destinations). Surfaced in the report for the reader."- ),- )- priority: Priority | None = Field(- default=None,- description=("Suggested report priority; advisory, the research agent may override."),- )---class SignalReviewerUserInfo(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- email: str- first_name: str- id: float- last_name: str- uuid: str---class SignalsScoutEvidenceEntry(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- entity_id: str | None = Field(- default=None,- description=("Optional entity id within that product, e.g. an issue id or session id."),- )- source_product: str = Field(- ...,- description=("The product the evidence came from, e.g. 'error_tracking', 'logs', 'session_replay'."),- )- summary: str = Field(..., description="One-line summary of the evidence the scout used.")---class TimeRange(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- date_from: str- date_to: str---class SignalsScoutSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- confidence: float = Field(- ...,- description=("Scout's self-reported confidence in [0, 1]. Independent of the top-level `weight`."),- )- dedupe_keys: list[str] | None = Field(- default=None,- description="Free-form short keys the harness can use for cross-run dedupe.",- )- evidence: list[SignalsScoutEvidenceEntry]- finding_id: str- hypothesis: str | None = None- mcp_trace_id: str | None = Field(- default=None,- description=("Trace id from the LLM analytics span for the scout run, when available."),- )- scout_run_id: str- severity: Severity | None = None- skill_name: str- skill_version: float- tags: list[str] | None = Field(- default=None,- description=(- "Lowercase kebab-case slug tags (e.g. `cost-spike`) categorizing the"- " finding. Each scout maintains and evolves its own vocabulary over time;"- " the harness normalizes and caps these at emit."- ),- )- task_id: str | None = Field(- default=None,- description=(- "The `tasks.Task` id owning `task_run_id`. Pairs with it to deep-link the"- " inbox card to the run in the Tasks UI. Absent on emissions made before"- " this linkage was captured."- ),- )- task_run_id: str = Field(- ...,- description=(- "The `tasks.TaskRun` id the scout span ran inside. Join key into the"- " `signals_scouts_runs` LLM-analytics view, which is keyed on `task_run_id`"- " (the `scout_run_id` bridge row is not)."- ),- )- time_range: TimeRange | None = Field(default=None, description="Optional time window the finding refers to.")---class SignalsScoutSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: SignalsScoutSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["signals_scout"] = "signals_scout"- source_type: Literal["cross_source_issue"] = "cross_source_issue"- weight: float--class SimilarIssue(BaseModel):model_config = ConfigDict(extra="forbid",@@ -3128,31 +2717,6 @@ class YAxisSettings(BaseModel):startAtZero: bool | None = Field(default=None, description="Whether the Y axis should start at zero")-class ZendeskTicketSignalExtra(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- created_at: str- priority: str | None = None- status: str- tags: list[str]- type: str | None = None- url: str---class ZendeskTicketSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: ZendeskTicketSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["zendesk"] = "zendesk"- source_type: Literal["ticket"] = "ticket"- weight: float--class NamedArgs(BaseModel):model_config = ConfigDict(extra="forbid",@@ -4575,19 +4139,6 @@ class CohortPropertyFilter(BaseModel):value: int-class ConversationsTicketSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: ConversationsTicketSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["conversations"] = "conversations"- source_type: Literal["ticket"] = "ticket"- weight: float--class CustomChannelCondition(BaseModel):model_config = ConfigDict(extra="forbid",@@ -4733,32 +4284,6 @@ class EmbeddingDistance(BaseModel):result: EmbeddingRecord-class EndpointBreakdownLimitExceededSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: EndpointBreakdownLimitExceededSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["endpoints"] = "endpoints"- source_type: Literal["endpoint_breakdown_limit_exceeded"] = "endpoint_breakdown_limit_exceeded"- weight: float---class EndpointExecutionFailedSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: EndpointExecutionFailedSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["endpoints"] = "endpoints"- source_type: Literal["endpoint_execution_failed"] = "endpoint_execution_failed"- weight: float--class EndpointsUsageOverviewItem(BaseModel):model_config = ConfigDict(extra="forbid",@@ -4769,16 +4294,6 @@ class EndpointsUsageOverviewItem(BaseModel):value: float | None = None-class EnrichedReviewer(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- github_login: str- github_name: str | None = None- relevant_commits: list[RelevantCommit]- user: SignalReviewerUserInfo | None = None--class ErrorTrackingExternalReferenceIntegration(BaseModel):model_config = ConfigDict(extra="forbid",@@ -4826,19 +4341,6 @@ class ErrorTrackingPendingFingerprintIssueStateUpdate(BaseModel):)-class ErrorTrackingSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: ErrorTrackingSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["error_tracking"] = "error_tracking"- source_type: SourceType- weight: float--class EventMetadataPropertyFilter(BaseModel):model_config = ConfigDict(extra="forbid",@@ -5337,19 +4839,6 @@ class FunnelsFilterLegacy(BaseModel):layout: FunnelLayout | None = None-class GithubIssueSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: GithubIssueSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["github"] = "github"- source_type: Literal["issue"] = "issue"- weight: float--class GroupPropertyFilter(BaseModel):model_config = ConfigDict(extra="forbid",@@ -5363,19 +4852,6 @@ class GroupPropertyFilter(BaseModel):value: list[str | float | bool] | str | float | bool | None = None-class HealthCheckSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: HealthCheckSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["health_checks"] = "health_checks"- source_type: Literal["health_issue"] = "health_issue"- weight: float--class HeatmapSettings(BaseModel):model_config = ConfigDict(extra="forbid",@@ -5612,45 +5088,6 @@ class LifecycleFilterLegacy(BaseModel):toggledLifecycles: list[LifecycleToggle] | None = None-class LinearIssueSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: LinearIssueSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["linear"] = "linear"- source_type: Literal["issue"] = "issue"- weight: float---class LlmEvaluationReportSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: LlmEvalReportSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["llm_analytics"] = "llm_analytics"- source_type: Literal["evaluation_report"] = "evaluation_report"- weight: float---class LlmEvaluationSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: LlmEvalSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["llm_analytics"] = "llm_analytics"- source_type: Literal["evaluation"] = "evaluation"- weight: float--class LogEntryPropertyFilter(BaseModel):model_config = ConfigDict(extra="forbid",@@ -5709,19 +5146,6 @@ class LogValueResult(BaseModel):name: str-class LogsAlertStateChangeSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: LogsAlertStateChangeSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["logs"] = "logs"- source_type: Literal["alert_state_change"] = "alert_state_change"- weight: float--class MCPHarnessBreakdownItem(BaseModel):model_config = ConfigDict(extra="forbid",@@ -6040,19 +5464,6 @@ class PersonPropertyFilter(BaseModel):value: list[str | float | bool] | str | float | bool | None = None-class PgAnalyzeIssueSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: PgAnalyzeIssueSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["pganalyze"] = "pganalyze"- source_type: Literal["issue"] = "issue"- weight: float--class PlanningStep(BaseModel):model_config = ConfigDict(extra="forbid",@@ -6228,19 +5639,6 @@ class QueryStatusResponse(BaseModel):query_status: QueryStatus-class ReplayVisionScannerFindingSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: ReplayVisionScannerFindingSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["replay_vision"] = "replay_vision"- source_type: Literal["scanner_finding"] = "scanner_finding"- weight: float--class ResultCustomization(RootModel[ResultCustomizationByValue | ResultCustomizationByPosition]):root: ResultCustomizationByValue | ResultCustomizationByPosition@@ -6857,19 +6255,6 @@ class SessionBatchEventsQueryResponse(BaseModel):)-class SessionProblemSignalInput(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: SessionProblemSignalExtra- remediation: SignalRemediation | None = None- source_id: str- source_product: Literal["session_replay"] = "session_replay"- source_type: Literal["session_problem"] = "session_problem"- weight: float--class SessionRecordingType(BaseModel):model_config = ConfigDict(extra="forbid",@@ -7017,57 +6402,6 @@ class SessionsTimelineQueryResponse(BaseModel):)-class SignalInput(- RootModel[- SessionProblemSignalInput- | LlmEvaluationSignalInput- | LlmEvaluationReportSignalInput- | ZendeskTicketSignalInput- | GithubIssueSignalInput- | LinearIssueSignalInput- | ConversationsTicketSignalInput- | ErrorTrackingSignalInput- | EndpointExecutionFailedSignalInput- | EndpointBreakdownLimitExceededSignalInput- | PgAnalyzeIssueSignalInput- | SignalsScoutSignalInput- | LogsAlertStateChangeSignalInput- | HealthCheckSignalInput- | ReplayVisionScannerFindingSignalInput- ]-):- root: (- SessionProblemSignalInput- | LlmEvaluationSignalInput- | LlmEvaluationReportSignalInput- | ZendeskTicketSignalInput- | GithubIssueSignalInput- | LinearIssueSignalInput- | ConversationsTicketSignalInput- | ErrorTrackingSignalInput- | EndpointExecutionFailedSignalInput- | EndpointBreakdownLimitExceededSignalInput- | PgAnalyzeIssueSignalInput- | SignalsScoutSignalInput- | LogsAlertStateChangeSignalInput- | HealthCheckSignalInput- | ReplayVisionScannerFindingSignalInput- )---class SignalInputBase(BaseModel):- model_config = ConfigDict(- extra="forbid",- )- description: str- extra: SignalExtraBase- remediation: SignalRemediation | None = None- source_id: str- source_product: str- source_type: str- weight: float--class SourceFieldFileUploadConfig(BaseModel):model_config = ConfigDict(extra="forbid",diff --git a/posthog/schema_enums.py b/posthog/schema_enums.pyindex 6bababbfb721..ae3c493840fc 100644--- a/posthog/schema_enums.py+++ b/posthog/schema_enums.py@@ -1048,12 +1048,6 @@ class ErrorTrackingOrderBy(StrEnum):SESSIONS = "sessions"-class SourceType(StrEnum):- ISSUE_CREATED = "issue_created"- ISSUE_REOPENED = "issue_reopened"- ISSUE_SPIKING = "issue_spiking"--class EvaluationRuntime(StrEnum):HOG = "hog"LLM_JUDGE = "llm_judge"@@ -2017,12 +2011,6 @@ class GoogleAdsTableKeywords(StrEnum):CAMPAIGN = "campaign"-class HealthCheckSeverity(StrEnum):- CRITICAL = "critical"- WARNING = "warning"- INFO = "info"--class GradientScaleMode(StrEnum):ABSOLUTE = "absolute"RELATIVE = "relative"@@ -2291,16 +2279,6 @@ class LogSeverityLevel(StrEnum):FATAL = "fatal"-class Action1(StrEnum):- FIRING = "firing"- BROKEN = "broken"---class ThresholdOperator(StrEnum):- ABOVE = "above"- BELOW = "below"--class LogsOrderBy(StrEnum):LATEST = "latest"EARLIEST = "earliest"@@ -3013,14 +2991,6 @@ class SessionAttributionGroupBy(StrEnum):INITIAL_URL = "InitialURL"-class ProblemType(StrEnum):- CONFUSION = "confusion"- ABANDONMENT = "abandonment"- BLOCKING_EXCEPTION = "blocking_exception"- NON_BLOCKING_EXCEPTION = "non_blocking_exception"- FAILURE = "failure"--class SnapshotSource(StrEnum):WEB = "web"MOBILE = "mobile"@@ -3033,56 +3003,6 @@ class Theme(StrEnum):SYSTEM = "system"-class Priority(StrEnum):- P0 = "P0"- P1 = "P1"- P2 = "P2"- P3 = "P3"- P4 = "P4"---class SignalSourceProduct(StrEnum):- SESSION_REPLAY = "session_replay"- LLM_ANALYTICS = "llm_analytics"- GITHUB = "github"- LINEAR = "linear"- ZENDESK = "zendesk"- CONVERSATIONS = "conversations"- ERROR_TRACKING = "error_tracking"- ENDPOINTS = "endpoints"- PGANALYZE = "pganalyze"- SIGNALS_SCOUT = "signals_scout"- LOGS = "logs"- HEALTH_CHECKS = "health_checks"- REPLAY_VISION = "replay_vision"---class SignalSourceType(StrEnum):- SESSION_ANALYSIS_CLUSTER = "session_analysis_cluster"- SESSION_PROBLEM = "session_problem"- EVALUATION = "evaluation"- EVALUATION_REPORT = "evaluation_report"- ISSUE = "issue"- TICKET = "ticket"- ISSUE_CREATED = "issue_created"- ISSUE_REOPENED = "issue_reopened"- ISSUE_SPIKING = "issue_spiking"- ENDPOINT_EXECUTION_FAILED = "endpoint_execution_failed"- ENDPOINT_BREAKDOWN_LIMIT_EXCEEDED = "endpoint_breakdown_limit_exceeded"- CROSS_SOURCE_ISSUE = "cross_source_issue"- ALERT_STATE_CHANGE = "alert_state_change"- HEALTH_ISSUE = "health_issue"- SCANNER_FINDING = "scanner_finding"---class Severity(StrEnum):- P0 = "P0"- P1 = "P1"- P2 = "P2"- P3 = "P3"- P4 = "P4"--class SimpleIntervalType(StrEnum):DAY = "day"MONTH = "month"diff --git a/posthog/settings/web.py b/posthog/settings/web.pyindex 488f352829bf..1c5818a394d8 100644--- a/posthog/settings/web.py+++ b/posthog/settings/web.py@@ -494,6 +494,8 @@ SPECTACULAR_SETTINGS = {"TicketStatusEnum": "products.conversations.backend.models.constants.Status","HealthIssueStatusEnum": "posthog.models.health_issue.HealthIssue.Status","HealthIssueSeverityEnum": "posthog.models.health_issue.HealthIssue.Severity",+ # Disambiguates from the same-valued inline enum on the signals LogsAlertStateChangeSignalExtra contract.+ "LogsAlertThresholdOperatorEnum": "products.logs.backend.models.LogsAlertConfiguration.ThresholdOperator","LLMProviderEnum": "products.ai_observability.backend.models.provider_keys.LLMProvider","HogFlowStatusEnum": "products.workflows.backend.models.hog_flow.hog_flow.HogFlow.State","MCPAuthTypeEnum": "products.mcp_store.backend.models.AUTH_TYPE_CHOICES",@@ -514,6 +516,10 @@ SPECTACULAR_SETTINGS = {"HeatmapType": "products.web_analytics.backend.models.heatmap_saved.SavedHeatmap.Type",# --- Inline value lists (type-hint enums, no x-spec-enum-id) ---"PropertyGroupOperator": ["AND", "OR"],+ # Full signal taxonomy on the report `signals` endpoint; the source-config serializer's+ # subset enums keep their own auto-resolved names.+ "SignalSourceProduct": "products.signals.backend.enums.SIGNAL_SOURCE_PRODUCT_VALUES",+ "SignalSourceType": "products.signals.backend.enums.SIGNAL_SOURCE_TYPE_VALUES","CustomPropertyDisplayTypeEnum": ["text","number",diff --git a/posthog/temporal/ai_observability/eval_reports/test/test_emit_signal.py b/posthog/temporal/ai_observability/eval_reports/test/test_emit_signal.pyindex ce4b908c7055..fb6888414cd7 100644--- a/posthog/temporal/ai_observability/eval_reports/test/test_emit_signal.py+++ b/posthog/temporal/ai_observability/eval_reports/test/test_emit_signal.py@@ -241,14 +241,14 @@ class TestEvalReportSignalSchemaContract:Mocking emit_signal in activity tests hides schema mismatches — the original reviewcycle caught one only because the bots ran static checks. This exercises the same- dispatch path emit_signal uses (`_SIGNAL_VARIANT_LOOKUP`) so any drift between the+ dispatch path emit_signal uses (`SIGNAL_VARIANT_LOOKUP`) so any drift between theschema source and the activity's payload shape will fail in unit tests."""def test_evaluation_report_variant_is_registered(self):- from products.signals.backend.facade.api import _SIGNAL_VARIANT_LOOKUP+ from products.signals.backend.facade.api import SIGNAL_VARIANT_LOOKUP- variant = _SIGNAL_VARIANT_LOOKUP.get(("llm_analytics", "evaluation_report"))+ variant = SIGNAL_VARIANT_LOOKUP.get(("llm_analytics", "evaluation_report"))assert variant is not None, ("No SignalInput variant for (llm_analytics, evaluation_report). ""Did the schema source drift? Re-run `pnpm run schema:build`."@@ -256,9 +256,9 @@ class TestEvalReportSignalSchemaContract:def test_activity_payload_validates_against_variant(self):"""Construct the exact emit_signal kwargs the activity sends and validate them."""- from products.signals.backend.facade.api import _SIGNAL_VARIANT_LOOKUP+ from products.signals.backend.facade.api import SIGNAL_VARIANT_LOOKUP- variant = _SIGNAL_VARIANT_LOOKUP[("llm_analytics", "evaluation_report")]+ variant = SIGNAL_VARIANT_LOOKUP[("llm_analytics", "evaluation_report")]payload = {"source_product": "llm_analytics","source_type": "evaluation_report",diff --git a/posthog/temporal/health_checks/framework.py b/posthog/temporal/health_checks/framework.pyindex 62be1f12f129..0717c6ec2713 100644--- a/posthog/temporal/health_checks/framework.py+++ b/posthog/temporal/health_checks/framework.py@@ -6,8 +6,6 @@ from typing import Anyfrom django.conf import settings-from posthog.schema import Priority-from posthog.clickhouse.query_tagging import Productfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssue@@ -15,6 +13,8 @@ from posthog.temporal.health_checks.detectors import DEFAULT_EXECUTION_POLICY, Hfrom posthog.temporal.health_checks.models import DEFAULT_ACTIVE_SINCE_DAYS, HealthCheckResultfrom posthog.temporal.health_checks.registry import _DETECT_FNS, HEALTH_CHECKS, ensure_registry_loaded+from products.signals.backend.enums import ReportPriority+# Severity → signal weight. Critical issues hit weight 1.0, which triggers the# Signals summary pipeline; lower severities rank below in the inbox feed._SEVERITY_WEIGHT: dict[str, float] = {@@ -25,10 +25,10 @@ _SEVERITY_WEIGHT: dict[str, float] = {# Severity → suggested report priority, carried on a signal's remediation. Kept beside# `_SEVERITY_WEIGHT` so the two severity mappings stay in sync.-_SEVERITY_PRIORITY: dict[str, Priority] = {- HealthIssue.Severity.CRITICAL: Priority.P1,- HealthIssue.Severity.WARNING: Priority.P2,- HealthIssue.Severity.INFO: Priority.P3,+_SEVERITY_PRIORITY: dict[str, ReportPriority] = {+ HealthIssue.Severity.CRITICAL: ReportPriority.P1,+ HealthIssue.Severity.WARNING: ReportPriority.P2,+ HealthIssue.Severity.INFO: ReportPriority.P3,}diff --git a/posthog/temporal/health_checks/signal_emitter.py b/posthog/temporal/health_checks/signal_emitter.pyindex fbf0b9cb78ef..32251a1dc700 100644--- a/posthog/temporal/health_checks/signal_emitter.py+++ b/posthog/temporal/health_checks/signal_emitter.py@@ -4,14 +4,14 @@ from dataclasses import dataclassimport structlogfrom asgiref.sync import async_to_sync-from posthog.schema import SignalRemediation-from posthog.exceptions_capture import capture_exceptionfrom posthog.models import Teamfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.alerts import _check_class_for_kindfrom posthog.temporal.health_checks.framework import _SEVERITY_PRIORITY+from products.signals.backend.contracts import SignalRemediation+logger = structlog.get_logger(__name__)SOURCE_PRODUCT = "health_checks"diff --git a/posthog/temporal/health_checks/tests/test_signal_emitter.py b/posthog/temporal/health_checks/tests/test_signal_emitter.pyindex 50869fd6d866..8e86634341d8 100644--- a/posthog/temporal/health_checks/tests/test_signal_emitter.py+++ b/posthog/temporal/health_checks/tests/test_signal_emitter.py@@ -4,8 +4,6 @@ from django.test import SimpleTestCasefrom parameterized import parameterized-from posthog.schema import HealthCheckSignalExtra, Priority, SignalRemediation-from posthog.models import Teamfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.framework import (@@ -18,6 +16,9 @@ from posthog.temporal.health_checks.framework import (from posthog.temporal.health_checks.processing import _process_batch_detectionfrom posthog.temporal.health_checks.signal_emitter import emit_health_check_signals+from products.signals.backend.contracts import HealthCheckSignalExtra, SignalRemediation+from products.signals.backend.enums import ReportPriority+class _SignalCheck(HealthCheck):# No name/kind -> __init_subclass__ skips auto-registration.@@ -115,7 +116,7 @@ class TestEmitHealthCheckSignals(SimpleTestCase):assert kwargs["remediation"] == SignalRemediation(human="Open the health page and set your authorized URLs.",agent="Call `project-settings-update` to set app_urls; verify with `project-get`.",- priority=Priority.P2, # derived from the issue's "warning" severity+ priority=ReportPriority.P2, # derived from the issue's "warning" severity)def test_emits_for_every_issue_in_the_batch(self):diff --git a/products/actions/frontend/generated/api.schemas.ts b/products/actions/frontend/generated/api.schemas.tsindex 0e7fb5ac841a..b06d73137bbc 100644--- a/products/actions/frontend/generated/api.schemas.ts+++ b/products/actions/frontend/generated/api.schemas.ts@@ -647,9 +647,10 @@ export interface ActionReferenceApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -666,7 +667,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/ai_observability/frontend/evaluations/llmEvaluationLogic.ts b/products/ai_observability/frontend/evaluations/llmEvaluationLogic.tsindex e3d8c6fd935c..bed3b8175e1c 100644--- a/products/ai_observability/frontend/evaluations/llmEvaluationLogic.ts+++ b/products/ai_observability/frontend/evaluations/llmEvaluationLogic.ts@@ -653,8 +653,8 @@ export const llmEvaluationLogic = kea<llmEvaluationLogicType>([const configs: SignalSourceConfig[] = values.sourceConfigs ?? []const existing = configs.find((c) =>- c.source_product === SignalSourceProduct.LLM_ANALYTICS &&- c.source_type === SignalSourceType.EVALUATION+ c.source_product === SignalSourceProduct.LlmAnalytics &&+ c.source_type === SignalSourceType.Evaluation)const currentIds: string[] = existing?.config?.evaluation_ids ?? []@@ -663,8 +663,8 @@ export const llmEvaluationLogic = kea<llmEvaluationLogicType>([: currentIds.filter((id: string) => id !== props.evaluationId)actions.toggleSignalSource({- sourceProduct: SignalSourceProduct.LLM_ANALYTICS,- sourceType: SignalSourceType.EVALUATION,+ sourceProduct: SignalSourceProduct.LlmAnalytics,+ sourceType: SignalSourceType.Evaluation,enabled: true,config: { ...existing?.config, evaluation_ids: newIds },})@@ -762,8 +762,8 @@ export const llmEvaluationLogic = kea<llmEvaluationLogicType>([}const llmEvalConfig = sourceConfigs.find((c) =>- c.source_product === SignalSourceProduct.LLM_ANALYTICS &&- c.source_type === SignalSourceType.EVALUATION+ c.source_product === SignalSourceProduct.LlmAnalytics &&+ c.source_type === SignalSourceType.Evaluation)const ids: string[] = llmEvalConfig?.config?.evaluation_ids ?? []return !!llmEvalConfig?.enabled && ids.includes(evaluationId)diff --git a/products/conversations/frontend/generated/api.schemas.ts b/products/conversations/frontend/generated/api.schemas.tsindex d238e490d3e4..51a847f6031c 100644--- a/products/conversations/frontend/generated/api.schemas.ts+++ b/products/conversations/frontend/generated/api.schemas.ts@@ -901,9 +901,10 @@ export interface BulkUpdateStatusResponseApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -920,7 +921,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex b15adf34d0c9..fa85f78c3559 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -8684,9 +8684,10 @@ export interface UpdateDashboardWidgetsBatchResponseApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -8703,7 +8704,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/event_definitions/frontend/generated/api.schemas.ts b/products/event_definitions/frontend/generated/api.schemas.tsindex 65d53f5f2687..ec1665ae0376 100644--- a/products/event_definitions/frontend/generated/api.schemas.ts+++ b/products/event_definitions/frontend/generated/api.schemas.ts@@ -171,9 +171,10 @@ export interface PatchedEnterpriseEventDefinitionApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -190,7 +191,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/feature_flags/frontend/generated/api.schemas.ts b/products/feature_flags/frontend/generated/api.schemas.tsindex 0ad1fdaba0ea..87f511b5b1bb 100644--- a/products/feature_flags/frontend/generated/api.schemas.ts+++ b/products/feature_flags/frontend/generated/api.schemas.ts@@ -1190,9 +1190,10 @@ export interface BulkKeysResponseApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -1209,7 +1210,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/logs/backend/test/test_alert_signal_emitter.py b/products/logs/backend/test/test_alert_signal_emitter.pyindex a0ed6b695571..0bc404a9ccac 100644--- a/products/logs/backend/test/test_alert_signal_emitter.py+++ b/products/logs/backend/test/test_alert_signal_emitter.py@@ -3,8 +3,6 @@ from unittest.mock import AsyncMock, MagicMock, patchfrom parameterized import parameterized-from posthog.schema import LogsAlertStateChangeSignalExtra-from posthog.models import Teamfrom products.logs.backend.alert_signal_emitter import (@@ -15,6 +13,7 @@ from products.logs.backend.alert_signal_emitter import (signal_action_and_weight,)from products.logs.backend.alert_state_machine import NotificationAction+from products.signals.backend.contracts import LogsAlertStateChangeSignalExtradef _notified(action: str = "firing") -> NotifiedAlert:diff --git a/products/logs/frontend/components/LogsAlerting/LogsAlertForm.tsx b/products/logs/frontend/components/LogsAlerting/LogsAlertForm.tsxindex c2d179a9cab7..aacdd3ca8885 100644--- a/products/logs/frontend/components/LogsAlerting/LogsAlertForm.tsx+++ b/products/logs/frontend/components/LogsAlerting/LogsAlertForm.tsx@@ -18,7 +18,7 @@ import { AnyPropertyFilter, PropertyFilterType, PropertyOperator, UniversalFilteimport { ServiceFilter } from 'products/logs/frontend/components/LogsViewer/Filters/ServiceFilter'import { SeverityLevelsFilter } from 'products/logs/frontend/components/LogsViewer/Filters/SeverityLevelsFilter'-import { ThresholdOperatorEnumApi } from 'products/logs/frontend/generated/api.schemas'+import { LogsAlertThresholdOperatorEnumApi } from 'products/logs/frontend/generated/api.schemas'import { logsAlertFormLogic } from './logsAlertFormLogic'@@ -139,8 +139,8 @@ export function LogsAlertForm(): JSX.Element {value={alertForm.thresholdOperator}onChange={(value) => setAlertFormValue('thresholdOperator', value)}options={[- { value: ThresholdOperatorEnumApi.Above, label: 'above' },- { value: ThresholdOperatorEnumApi.Below, label: 'below' },+ { value: LogsAlertThresholdOperatorEnumApi.Above, label: 'above' },+ { value: LogsAlertThresholdOperatorEnumApi.Below, label: 'below' },]}size="small"/>diff --git a/products/logs/frontend/components/LogsAlerting/LogsAlertList.tsx b/products/logs/frontend/components/LogsAlerting/LogsAlertList.tsxindex 9d2bc6e394de..f8f2e7c1cf2d 100644--- a/products/logs/frontend/components/LogsAlerting/LogsAlertList.tsx+++ b/products/logs/frontend/components/LogsAlerting/LogsAlertList.tsx@@ -25,7 +25,7 @@ import {NotificationDestinationTypeEnumApi,LogsAlertConfigurationApi,LogsAlertConfigurationStateEnumApi,- ThresholdOperatorEnumApi,+ LogsAlertThresholdOperatorEnumApi,} from 'products/logs/frontend/generated/api.schemas'import { logsAlertingLogic } from './logsAlertingLogic'@@ -34,7 +34,7 @@ import { LogsAlertStateTimeline } from './LogsAlertStateTimeline'import { SNOOZE_DURATIONS } from './logsAlertUtils'function formatThreshold(alert: LogsAlertConfigurationApi): string {- const operator = alert.threshold_operator === ThresholdOperatorEnumApi.Below ? '<' : '>'+ const operator = alert.threshold_operator === LogsAlertThresholdOperatorEnumApi.Below ? '<' : '>'return `${operator} ${alert.threshold_count} in ${alert.window_minutes}m`}diff --git a/products/logs/frontend/components/LogsAlerting/__tests__/logsAlertUtils.test.ts b/products/logs/frontend/components/LogsAlerting/__tests__/logsAlertUtils.test.tsindex ebb358401e51..e70c17284f2e 100644--- a/products/logs/frontend/components/LogsAlerting/__tests__/logsAlertUtils.test.ts+++ b/products/logs/frontend/components/LogsAlerting/__tests__/logsAlertUtils.test.ts@@ -1,6 +1,9 @@import { FilterLogicalOperator, HogFunctionType, PropertyFilterType, PropertyOperator } from '~/types'-import { LogsAlertConfigurationApi, ThresholdOperatorEnumApi } from 'products/logs/frontend/generated/api.schemas'+import {+ LogsAlertConfigurationApi,+ LogsAlertThresholdOperatorEnumApi,+} from 'products/logs/frontend/generated/api.schemas'import { LogsAlertFormType } from '../logsAlertFormLogic'import { buildLogsAlertFilterConfig, groupLogsAlertDestinations, runPreEnableChecks } from '../logsAlertUtils'@@ -17,7 +20,7 @@ const baseForm = (overrides: Partial<LogsAlertFormType> = {}): LogsAlertFormTypeseverityLevels: ['error'],serviceNames: [],filterGroup: { type: FilterLogicalOperator.And, values: [] },- thresholdOperator: ThresholdOperatorEnumApi.Above,+ thresholdOperator: LogsAlertThresholdOperatorEnumApi.Above,thresholdCount: 1,windowMinutes: 5,evaluationPeriods: 1,diff --git a/products/logs/frontend/components/LogsAlerting/logsAlertFormLogic.ts b/products/logs/frontend/components/LogsAlerting/logsAlertFormLogic.tsindex a23d0f0a4497..0bcc0086cecd 100644--- a/products/logs/frontend/components/LogsAlerting/logsAlertFormLogic.ts+++ b/products/logs/frontend/components/LogsAlerting/logsAlertFormLogic.ts@@ -18,7 +18,7 @@ import {LogsAlertConfigurationApi,LogsAlertSimulateResponseApi,PatchedLogsAlertConfigurationApi,- ThresholdOperatorEnumApi,+ LogsAlertThresholdOperatorEnumApi,} from 'products/logs/frontend/generated/api.schemas'import type { logsAlertFormLogicType } from './logsAlertFormLogicType'@@ -36,7 +36,7 @@ export interface LogsAlertFormType {severityLevels: LogMessage['severity_text'][]serviceNames: string[]filterGroup: UniversalFiltersGroup- thresholdOperator: ThresholdOperatorEnumApi+ thresholdOperator: LogsAlertThresholdOperatorEnumApithresholdCount: numberwindowMinutes: numberevaluationPeriods: number@@ -67,7 +67,7 @@ export function buildFormDefaults(alert: LogsAlertConfigurationApi | null): Logs((alert?.filters as Record<string, unknown>)?.severityLevels as LogMessage['severity_text'][]) ?? [],serviceNames: ((alert?.filters as Record<string, unknown>)?.serviceNames as string[]) ?? [],filterGroup: extractFilterGroup(alert),- thresholdOperator: alert?.threshold_operator ?? ThresholdOperatorEnumApi.Above,+ thresholdOperator: alert?.threshold_operator ?? LogsAlertThresholdOperatorEnumApi.Above,thresholdCount: alert?.threshold_count ?? 100,windowMinutes: alert?.window_minutes ?? 10,evaluationPeriods: alert?.evaluation_periods ?? 1,diff --git a/products/logs/frontend/generated/api.schemas.ts b/products/logs/frontend/generated/api.schemas.tsindex dab9475f6845..33fe0a6ffd14 100644--- a/products/logs/frontend/generated/api.schemas.ts+++ b/products/logs/frontend/generated/api.schemas.ts@@ -317,9 +317,10 @@ export interface LogsAlertFiltersApi {* * `above` - Above* * `below` - Below*/-export type ThresholdOperatorEnumApi = (typeof ThresholdOperatorEnumApi)[keyof typeof ThresholdOperatorEnumApi]+export type LogsAlertThresholdOperatorEnumApi =+ (typeof LogsAlertThresholdOperatorEnumApi)[keyof typeof LogsAlertThresholdOperatorEnumApi]-export const ThresholdOperatorEnumApi = {+export const LogsAlertThresholdOperatorEnumApi = {Above: 'above',Below: 'below',} as const@@ -452,7 +453,7 @@ export interface LogsAlertConfigurationApi {** * `above` - Above* * `below` - Below */- threshold_operator?: ThresholdOperatorEnumApi+ threshold_operator?: LogsAlertThresholdOperatorEnumApi/** Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60. */window_minutes?: number/** How often the alert is evaluated, in minutes. Server-managed. */@@ -559,7 +560,7 @@ export interface PatchedLogsAlertConfigurationApi {** * `above` - Above* * `below` - Below */- threshold_operator?: ThresholdOperatorEnumApi+ threshold_operator?: LogsAlertThresholdOperatorEnumApi/** Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60. */window_minutes?: number/** How often the alert is evaluated, in minutes. Server-managed. */@@ -724,7 +725,7 @@ export interface LogsAlertSimulateRequestApi {** * `above` - Above* * `below` - Below */- threshold_operator: ThresholdOperatorEnumApi+ threshold_operator: LogsAlertThresholdOperatorEnumApi/** Window size in minutes — determines bucket interval. */window_minutes: number/**diff --git a/products/product_analytics/frontend/generated/api.schemas.ts b/products/product_analytics/frontend/generated/api.schemas.tsindex 44e539960ee6..42bfa6a7f30a 100644--- a/products/product_analytics/frontend/generated/api.schemas.ts+++ b/products/product_analytics/frontend/generated/api.schemas.ts@@ -7668,9 +7668,10 @@ export interface ActivityLogPaginatedResponseApi {* * `remove` - remove* * `set` - set*/-export type ActionEnumApi = (typeof ActionEnumApi)[keyof typeof ActionEnumApi]+export type BulkUpdateTagsRequestActionEnumApi =+ (typeof BulkUpdateTagsRequestActionEnumApi)[keyof typeof BulkUpdateTagsRequestActionEnumApi]-export const ActionEnumApi = {+export const BulkUpdateTagsRequestActionEnumApi = {Add: 'add',Remove: 'remove',Set: 'set',@@ -7687,7 +7688,7 @@ export interface BulkUpdateTagsRequestApi {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnumApi+ action: BulkUpdateTagsRequestActionEnumApi/** Tag names to add, remove, or set. */tags: string[]}diff --git a/products/replay_vision/backend/tests/test_temporal.py b/products/replay_vision/backend/tests/test_temporal.pyindex ab71549a5b03..6e7fe0230e97 100644--- a/products/replay_vision/backend/tests/test_temporal.py+++ b/products/replay_vision/backend/tests/test_temporal.py@@ -22,8 +22,6 @@ from temporalio.exceptions import (TimeoutType,)-from posthog.schema import ReplayVisionScannerFindingSignalInput-from posthog.models import Organization, Teamfrom posthog.models.user import Userfrom posthog.redis import get_async_client@@ -115,6 +113,7 @@ from products.replay_vision.backend.temporal.workflow import (_root_cause_message,)from products.replay_vision.backend.tests.helpers import snapshot_for as _snapshot_for+from products.signals.backend.contracts import ReplayVisionScannerFindingSignalInputfrom products.signals.backend.models import SignalSourceConfigdiff --git a/products/signals/backend/artefact_schemas.py b/products/signals/backend/artefact_schemas.pyindex 423cebaedd3b..5901f30a83a1 100644--- a/products/signals/backend/artefact_schemas.py+++ b/products/signals/backend/artefact_schemas.py@@ -25,6 +25,7 @@ from typing import Any, castfrom pydantic import BaseModel, ConfigDict, Field, RootModel, ValidationError, field_validator, model_validator+from products.signals.backend.enums import ReportPriorityfrom products.tasks.backend.facade.repo_selection_types import RepoSelectionResult# Product / type identifier parts must be routing-safe — mirrors the custom-agent identifier@@ -51,12 +52,9 @@ class ActionabilityChoice(str, Enum):NOT_ACTIONABLE = "not_actionable"-class Priority(str, Enum):- P0 = "P0"- P1 = "P1"- P2 = "P2"- P3 = "P3"- P4 = "P4"+# Report priority scale (P0–P4). Aliased to the shared signal taxonomy enum so the product has a+# single P0–P4 source; kept under the `Priority` name for existing callers.+Priority = ReportPriorityclass SignalFinding(BaseModel):diff --git a/products/signals/backend/contracts.py b/products/signals/backend/contracts.pynew file mode 100644index 000000000000..b45a575fdf90--- /dev/null+++ b/products/signals/backend/contracts.py@@ -0,0 +1,450 @@+# Source of truth for the signal payload taxonomy — the shared contract between backend emitters,+# the facade's validation, and the inbox cards. The frontend TypeScript equivalents are generated+# from these models: the extras are declared on the `signals`-endpoint serializer (see+# `SignalNodeSerializer` in `serializers.py`), so they flow through the standard OpenAPI/Orval pipeline.++import enum+from typing import Annotated, Literal, get_args++from pydantic import BaseModel, ConfigDict, Field+from pydantic.fields import FieldInfo++from products.signals.backend.enums import ReportPriority, SignalSourceProduct, SignalSourceType+++class ContractModel(BaseModel):+ # Emitted payloads are validated against these models at the emit boundary; unknown fields are+ # rejected rather than silently written to signal metadata (parity with the generated schema.py+ # models these replaced, which all carried extra="forbid").+ model_config = ConfigDict(extra="forbid")+++class SignalRemediation(ContractModel):+ human: str+ agent: str+ priority: ReportPriority | None = None+++class SignalExtraBase(ContractModel):+ pass+++class SignalInputBase(ContractModel):+ source_id: str+ description: str+ weight: float+ remediation: SignalRemediation | None = None+++# ── Session replay ──────────────────────────────────────────────────────────────+++class SessionProblemEventEntry(ContractModel):+ event: str+ timestamp: str+ current_url: str | None = None+ event_type: str | None = None+ interaction_text: str | None = None+++class SessionProblemSignalExtra(SignalExtraBase):+ session_id: str+ segment_title: str+ start_time: str+ end_time: str+ problem_type: Literal["confusion", "abandonment", "blocking_exception", "non_blocking_exception", "failure"]+ distinct_id: str+ session_start_time: str | None = None+ session_end_time: str | None = None+ session_duration: float | None = None+ session_active_seconds: float | None = None+ exported_asset_id: int | None = None+ event_history: list[SessionProblemEventEntry] | None = None+++class SessionProblemSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.SESSION_PROBLEM]+ source_product: Literal[SignalSourceProduct.SESSION_REPLAY]+ extra: SessionProblemSignalExtra+++# ── LLM analytics ───────────────────────────────────────────────────────────────+++class LlmEvalSignalExtra(SignalExtraBase):+ evaluation_id: str+ target_event_id: str | None = None+ target_event_type: str | None = None+ trace_id: str+ model: str | None = None+ provider: str | None = None+++class LlmEvaluationSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.EVALUATION]+ source_product: Literal[SignalSourceProduct.LLM_ANALYTICS]+ extra: LlmEvalSignalExtra+++class LlmEvalReportSignalExtra(SignalExtraBase):+ evaluation_id: str+ evaluation_name: str+ evaluation_description: str+ report_id: str+ report_run_id: str+ period_start: str+ period_end: str+++class LlmEvaluationReportSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.EVALUATION_REPORT]+ source_product: Literal[SignalSourceProduct.LLM_ANALYTICS]+ extra: LlmEvalReportSignalExtra+++# ── Zendesk ─────────────────────────────────────────────────────────────────────+++class ZendeskTicketSignalExtra(SignalExtraBase):+ url: str+ type: str | None+ tags: list[str]+ created_at: str+ priority: str | None+ status: str+++class ZendeskTicketSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.TICKET]+ source_product: Literal[SignalSourceProduct.ZENDESK]+ extra: ZendeskTicketSignalExtra+++# ── GitHub ──────────────────────────────────────────────────────────────────────+++class GithubIssueSignalExtra(SignalExtraBase):+ html_url: str+ number: int+ labels: list[str]+ created_at: str+ updated_at: str+ locked: bool+ state: str+++class GithubIssueSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ISSUE]+ source_product: Literal[SignalSourceProduct.GITHUB]+ extra: GithubIssueSignalExtra+++# ── Linear ──────────────────────────────────────────────────────────────────────+++class LinearIssueSignalExtra(SignalExtraBase):+ url: str+ identifier: str+ number: int+ priority: int+ priority_label: str+ labels: list[str]+ state_name: str | None+ state_type: str | None+ team_name: str | None+ created_at: str+ updated_at: str+++class LinearIssueSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ISSUE]+ source_product: Literal[SignalSourceProduct.LINEAR]+ extra: LinearIssueSignalExtra+++# ── Conversations ───────────────────────────────────────────────────────────────+++class ConversationsTicketSignalExtra(SignalExtraBase):+ ticket_number: int+ channel_source: str+ channel_detail: str | None+ status: str+ priority: str | None+ created_at: str+ email_subject: str | None+++class ConversationsTicketSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.TICKET]+ source_product: Literal[SignalSourceProduct.CONVERSATIONS]+ extra: ConversationsTicketSignalExtra+++# ── Error tracking ──────────────────────────────────────────────────────────────+++class ErrorTrackingSignalExtra(SignalExtraBase):+ fingerprint: str+++class ErrorTrackingSignalInput(SignalInputBase):+ source_type: Literal[+ SignalSourceType.ISSUE_CREATED, SignalSourceType.ISSUE_REOPENED, SignalSourceType.ISSUE_SPIKING+ ]+ source_product: Literal[SignalSourceProduct.ERROR_TRACKING]+ extra: ErrorTrackingSignalExtra+++# ── pganalyze ───────────────────────────────────────────────────────────────────+++class PgAnalyzeIssueReference(ContractModel):+ # pganalyze reference objects omit nullable keys entirely (e.g. index/table refs+ # carry no queryText), so these need defaults to keep such refs valid.+ kind: str | None = None+ name: str | None = None+ url: str | None = None+ queryText: str | None = None+++class PgAnalyzeIssueSignalExtra(SignalExtraBase):+ severity: str | None+ references: list[PgAnalyzeIssueReference]+ database_id: str | None+ server_human_id: str | None+ server_name: str | None+ synced_at: str+++class PgAnalyzeIssueSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ISSUE]+ source_product: Literal[SignalSourceProduct.PGANALYZE]+ extra: PgAnalyzeIssueSignalExtra+++# ── Endpoints ───────────────────────────────────────────────────────────────────+++class EndpointExecutionFailedSignalExtra(SignalExtraBase):+ endpoint_name: str+ endpoint_version: int | None+ materialized: bool+ saved_query_id: str | None+ error_class: str+ error_message: str+++class EndpointExecutionFailedSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ENDPOINT_EXECUTION_FAILED]+ source_product: Literal[SignalSourceProduct.ENDPOINTS]+ extra: EndpointExecutionFailedSignalExtra+++class EndpointBreakdownLimitExceededSignalExtra(SignalExtraBase):+ endpoint_name: str+ breakdown_limit: int+++class EndpointBreakdownLimitExceededSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ENDPOINT_BREAKDOWN_LIMIT_EXCEEDED]+ source_product: Literal[SignalSourceProduct.ENDPOINTS]+ extra: EndpointBreakdownLimitExceededSignalExtra+++# ── Signals scout ───────────────────────────────────────────────────────────────+++class SignalsScoutEvidenceEntry(ContractModel):+ source_product: str+ entity_id: str | None = None+ summary: str+++class SignalsScoutTimeRange(ContractModel):+ date_from: str+ date_to: str+++class SignalsScoutSignalExtra(SignalExtraBase):+ scout_run_id: str+ task_run_id: str+ task_id: str | None = None+ finding_id: str+ skill_name: str+ skill_version: int+ confidence: float+ severity: ReportPriority | None = None+ hypothesis: str | None = None+ evidence: list[SignalsScoutEvidenceEntry]+ dedupe_keys: list[str] | None = None+ tags: list[str] | None = None+ time_range: SignalsScoutTimeRange | None = None+ mcp_trace_id: str | None = None+++class SignalsScoutSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.CROSS_SOURCE_ISSUE]+ source_product: Literal[SignalSourceProduct.SIGNALS_SCOUT]+ extra: SignalsScoutSignalExtra+++# ── Logs ────────────────────────────────────────────────────────────────────────+++class LogsAlertStateChangeSignalExtra(SignalExtraBase):+ alert_id: str+ alert_name: str+ action: Literal["firing", "broken"]+ threshold_count: int+ threshold_operator: Literal["above", "below"]+ window_minutes: int+ result_count: int | None+ consecutive_failures: int+ filters: dict[str, object]+ url: str+++class LogsAlertStateChangeSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.ALERT_STATE_CHANGE]+ source_product: Literal[SignalSourceProduct.LOGS]+ extra: LogsAlertStateChangeSignalExtra+++# ── Replay vision ───────────────────────────────────────────────────────────────+++class ReplayVisionScannerFindingSignalExtra(SignalExtraBase):+ scanner_id: str+ scanner_name: str+ scanner_type: str+ observation_id: str+ session_id: str+ confidence: float+ problem_type: str+ start_time: float+ end_time: float+ url: str+ exported_asset_id: int+ distinct_id: str | None = None+ recording_start_time: str | None = None+ recording_end_time: str | None = None+ recording_duration: float | None = None+ recording_active_seconds: float | None = None+++class ReplayVisionScannerFindingSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.SCANNER_FINDING]+ source_product: Literal[SignalSourceProduct.REPLAY_VISION]+ extra: ReplayVisionScannerFindingSignalExtra+++# ── Health checks ───────────────────────────────────────────────────────────────++HealthCheckSeverity = Literal["critical", "warning", "info"]+++class HealthCheckSignalExtra(SignalExtraBase):+ kind: str+ severity: HealthCheckSeverity+ issue_id: str+ title: str+ summary: str+ link: str+ url: str+ payload: dict[str, object]+++class HealthCheckSignalInput(SignalInputBase):+ source_type: Literal[SignalSourceType.HEALTH_ISSUE]+ source_product: Literal[SignalSourceProduct.HEALTH_CHECKS]+ extra: HealthCheckSignalExtra+++# ── Report reviewer types ───────────────────────────────────────────────────────+++class RelevantCommit(ContractModel):+ sha: str+ url: str+ reason: str+++class SignalReviewerUserInfo(ContractModel):+ id: int+ uuid: str+ first_name: str+ last_name: str+ email: str+++class EnrichedReviewer(ContractModel):+ github_login: str+ github_name: str | None+ relevant_commits: list[RelevantCommit]+ user: SignalReviewerUserInfo | None+++# ── Union over all signal variants ──────────────────────────────────────────────+# Discrimination is by the composite (source_product, source_type) pair, resolved via+# SIGNAL_VARIANT_LOOKUP below — a single-field pydantic discriminator can't express it+# because llm_analytics/error_tracking map several (product, type) pairs to one variant and+# github/linear/pganalyze share source_type="issue".++SignalInput = Annotated[+ SessionProblemSignalInput+ | LlmEvaluationSignalInput+ | LlmEvaluationReportSignalInput+ | ZendeskTicketSignalInput+ | GithubIssueSignalInput+ | LinearIssueSignalInput+ | ConversationsTicketSignalInput+ | ErrorTrackingSignalInput+ | EndpointExecutionFailedSignalInput+ | EndpointBreakdownLimitExceededSignalInput+ | PgAnalyzeIssueSignalInput+ | SignalsScoutSignalInput+ | LogsAlertStateChangeSignalInput+ | HealthCheckSignalInput+ | ReplayVisionScannerFindingSignalInput,+ Field(union_mode="left_to_right"),+]++SIGNAL_INPUT_VARIANTS: tuple[type[SignalInputBase], ...] = (+ SessionProblemSignalInput,+ LlmEvaluationSignalInput,+ LlmEvaluationReportSignalInput,+ ZendeskTicketSignalInput,+ GithubIssueSignalInput,+ LinearIssueSignalInput,+ ConversationsTicketSignalInput,+ ErrorTrackingSignalInput,+ EndpointExecutionFailedSignalInput,+ EndpointBreakdownLimitExceededSignalInput,+ PgAnalyzeIssueSignalInput,+ SignalsScoutSignalInput,+ LogsAlertStateChangeSignalInput,+ HealthCheckSignalInput,+ ReplayVisionScannerFindingSignalInput,+)+++def _literal_values(field: FieldInfo) -> tuple[str, ...]:+ """The accepted string values for a variant's `source_product` / `source_type` Literal field."""+ args = get_args(field.annotation)+ return tuple(arg.value if isinstance(arg, enum.Enum) else arg for arg in args)+++# (source_product, source_type) -> variant model. The pair is the discriminator: several products+# share a source_type ("issue", "ticket") and error_tracking maps three types to one variant, so a+# single-field discriminator can't express it. Built once at import.+def _build_variant_lookup() -> dict[tuple[str, str], type[SignalInputBase]]:+ lookup: dict[tuple[str, str], type[SignalInputBase]] = {}+ for variant in SIGNAL_INPUT_VARIANTS:+ for product in _literal_values(variant.model_fields["source_product"]):+ for source_type in _literal_values(variant.model_fields["source_type"]):+ lookup[(product, source_type)] = variant+ return lookup+++SIGNAL_VARIANT_LOOKUP: dict[tuple[str, str], type[SignalInputBase]] = _build_variant_lookup()diff --git a/products/signals/backend/custom_agent/schemas.py b/products/signals/backend/custom_agent/schemas.pyindex ac007a16ecaa..9e2deb094c87 100644--- a/products/signals/backend/custom_agent/schemas.py+++ b/products/signals/backend/custom_agent/schemas.py@@ -6,8 +6,7 @@ from typing import TYPE_CHECKINGfrom pydantic import BaseModel, Field, field_validator-from posthog.schema import RelevantCommit-+from products.signals.backend.contracts import RelevantCommitfrom products.signals.backend.report_generation.research import ActionabilityAssessment, PriorityAssessmentif TYPE_CHECKING:diff --git a/products/signals/backend/emission/tests/test_schema_validation.py b/products/signals/backend/emission/tests/test_schema_validation.pyindex 50c08536c118..779f26ccb250 100644--- a/products/signals/backend/emission/tests/test_schema_validation.py+++ b/products/signals/backend/emission/tests/test_schema_validation.py@@ -1,15 +1,14 @@import jsonimport dataclassesfrom pathlib import Path-from typing import get_argsimport pytest-from posthog.schema import SignalInput-+from products.signals.backend.contracts import SIGNAL_VARIANT_LOOKUPfrom products.signals.backend.emission.conversations_tickets import conversations_ticket_emitterfrom products.signals.backend.emission.github_issues import github_issue_emitterfrom products.signals.backend.emission.linear_issues import linear_issue_emitter+from products.signals.backend.emission.pganalyze_issues import pganalyze_issue_emitterfrom products.signals.backend.emission.zendesk_tickets import zendesk_ticket_emitterFIXTURES_DIR = Path(__file__).resolve().parents[5] / "products" / "signals" / "eval" / "fixtures"@@ -22,21 +21,17 @@ def _load_fixture(filename: str) -> list[dict]:def _validate_output(output):data = dataclasses.asdict(output)- for variant_type in get_args(SignalInput.model_fields["root"].annotation):- fields = variant_type.model_fields- if (- fields["source_product"].default == output.source_product- and fields["source_type"].default == output.source_type- ):- variant_type.model_validate(data)- return- raise ValueError(f"No SignalInput variant for ({output.source_product}, {output.source_type})")+ variant_type = SIGNAL_VARIANT_LOOKUP.get((output.source_product, output.source_type))+ if variant_type is None:+ raise ValueError(f"No SignalInput variant for ({output.source_product}, {output.source_type})")+ variant_type.model_validate(data)GITHUB_RECORDS = _load_fixture("github_issues.json")ZENDESK_RECORDS = _load_fixture("zendesk_tickets.json")LINEAR_RECORDS = _load_fixture("linear_issues.json")CONVERSATIONS_RECORDS = _load_fixture("conversations_tickets.json")+PGANALYZE_RECORDS = _load_fixture("pganalyze_issues.json")class TestGithubFixtureSchemaValidation:@@ -75,6 +70,18 @@ class TestLinearFixtureSchemaValidation:_validate_output(output)+class TestPgAnalyzeFixtureSchemaValidation:+ @pytest.mark.parametrize(+ "record",+ PGANALYZE_RECORDS,+ ids=[r["id"] for r in PGANALYZE_RECORDS],+ )+ def test_emitter_output_matches_schema(self, record):+ output = pganalyze_issue_emitter(team_id=1, record=record)+ if output is not None:+ _validate_output(output)++class TestConversationsFixtureSchemaValidation:@pytest.mark.parametrize("record",diff --git a/products/signals/backend/enums.py b/products/signals/backend/enums.pynew file mode 100644index 000000000000..93c7ae5989a7--- /dev/null+++ b/products/signals/backend/enums.py@@ -0,0 +1,81 @@+from enum import StrEnum++# Source-of-truth taxonomy for signals. Django-free (plain StrEnum) so it stays cheap to import+# from contracts.py, the model layer, and the frontend-types codegen alike. StrEnum members compare+# equal to their string value, so they drop into `==` checks and ORM filters unchanged.+++class ReportPriority(StrEnum):+ # P0–P4 importance/urgency scale shared by signal remediations, scout findings, and report+ # priority assessments. One scale, one enum: replaces the codegen-synthesized schema.Priority /+ # schema.Severity that used to leak out of the old TS-first pipeline.+ P0 = "P0"+ P1 = "P1"+ P2 = "P2"+ P3 = "P3"+ P4 = "P4"+++class SignalSourceProduct(StrEnum):+ SESSION_REPLAY = "session_replay"+ LLM_ANALYTICS = "llm_analytics"+ GITHUB = "github"+ LINEAR = "linear"+ ZENDESK = "zendesk"+ CONVERSATIONS = "conversations"+ ERROR_TRACKING = "error_tracking"+ ENDPOINTS = "endpoints"+ PGANALYZE = "pganalyze"+ SIGNALS_SCOUT = "signals_scout"+ LOGS = "logs"+ HEALTH_CHECKS = "health_checks"+ REPLAY_VISION = "replay_vision"+++class SignalSourceType(StrEnum):+ SESSION_ANALYSIS_CLUSTER = "session_analysis_cluster"+ SESSION_PROBLEM = "session_problem"+ EVALUATION = "evaluation"+ EVALUATION_REPORT = "evaluation_report"+ ISSUE = "issue"+ TICKET = "ticket"+ ISSUE_CREATED = "issue_created"+ ISSUE_REOPENED = "issue_reopened"+ ISSUE_SPIKING = "issue_spiking"+ ENDPOINT_EXECUTION_FAILED = "endpoint_execution_failed"+ ENDPOINT_BREAKDOWN_LIMIT_EXCEEDED = "endpoint_breakdown_limit_exceeded"+ CROSS_SOURCE_ISSUE = "cross_source_issue"+ ALERT_STATE_CHANGE = "alert_state_change"+ HEALTH_ISSUE = "health_issue"+ SCANNER_FINDING = "scanner_finding"+++# Plain value lists for ENUM_NAME_OVERRIDES in web.py — drf-spectacular hashes ChoiceField+# choices as (value, value) pairs, which an Enum class path doesn't normalize to.+SIGNAL_SOURCE_PRODUCT_VALUES: list[str] = [product.value for product in SignalSourceProduct]+SIGNAL_SOURCE_TYPE_VALUES: list[str] = [source_type.value for source_type in SignalSourceType]++# Human-facing labels for the model's `source_product` choices. Kept beside the enum so a new+# source is a one-file change; values/labels must stay identical to the migration-frozen choices.+SIGNAL_SOURCE_PRODUCT_LABELS: dict[SignalSourceProduct, str] = {+ SignalSourceProduct.SESSION_REPLAY: "Session replay",+ SignalSourceProduct.LLM_ANALYTICS: "LLM analytics",+ SignalSourceProduct.GITHUB: "GitHub",+ SignalSourceProduct.LINEAR: "Linear",+ SignalSourceProduct.ZENDESK: "Zendesk",+ SignalSourceProduct.CONVERSATIONS: "Conversations",+ SignalSourceProduct.ERROR_TRACKING: "Error tracking",+ SignalSourceProduct.PGANALYZE: "pganalyze",+ SignalSourceProduct.SIGNALS_SCOUT: "Signals scout",+ SignalSourceProduct.LOGS: "Logs",+ SignalSourceProduct.HEALTH_CHECKS: "Health checks",+ SignalSourceProduct.ENDPOINTS: "Endpoints",+ SignalSourceProduct.REPLAY_VISION: "Replay Vision",+}++# The Django model's `source_product` choices, frozen-equivalent to the prior nested TextChoices so+# no migration is generated. Plain `str` values (not enum members) keep migration state stable; order+# follows SIGNAL_SOURCE_PRODUCT_LABELS, which matches the original declaration order.+SIGNAL_SOURCE_PRODUCT_CHOICES: list[tuple[str, str]] = [+ (product.value, label) for product, label in SIGNAL_SOURCE_PRODUCT_LABELS.items()+]diff --git a/products/signals/backend/facade/api.py b/products/signals/backend/facade/api.pyindex f65cc06eeb58..6e3d0866da19 100644--- a/products/signals/backend/facade/api.py+++ b/products/signals/backend/facade/api.py@@ -1,7 +1,5 @@-import enumimport dataclassesfrom datetime import timedelta-from typing import get_argsfrom django.conf import settings@@ -10,14 +8,13 @@ import structlogimport temporalioimport posthoganalytics-from posthog.schema import SignalInput, SignalRemediation-from posthog.event_usage import groupsfrom posthog.helpers.tiktoken_encoding import LLM_TOKEN_COUNT_PROXY_MODEL, get_tiktoken_encoding_for_modelfrom posthog.models import Teamfrom posthog.sync import database_sync_to_asyncfrom posthog.temporal.common.client import async_connect+from products.signals.backend.contracts import SIGNAL_VARIANT_LOOKUP, SignalRemediationfrom products.signals.backend.models import SignalSourceConfiglogger = structlog.get_logger(__name__)@@ -175,31 +172,6 @@ def set_sources(team_id: int, user_id: int | None, selected_keys: list[str]) ->return blocked-def _get_field_values(field: pydantic.fields.FieldInfo) -> tuple[str, ...]:- """Extract all possible values for a Pydantic field (Literal, StrEnum, or default)."""- args = get_args(field.annotation)- if args:- return args- if isinstance(field.annotation, type) and issubclass(field.annotation, enum.Enum):- return tuple(m.value for m in field.annotation)- if field.default is not pydantic.fields.PydanticUndefined:- return (field.default,)- return ()---# Build a lookup from (source_product, source_type) -> variant model class-# so we can validate signals without needing the synthetic discriminator tag.-_SIGNAL_VARIANT_LOOKUP: dict[tuple[str, str], type[pydantic.BaseModel]] = {}-for _variant_type in get_args(SignalInput.model_fields["root"].annotation):- _product_field = _variant_type.model_fields.get("source_product")- _type_field = _variant_type.model_fields.get("source_type")- if _product_field is None or _type_field is None:- continue- for _product in _get_field_values(_product_field):- for _source_type in _get_field_values(_type_field):- _SIGNAL_VARIANT_LOOKUP[(_product, _source_type)] = _variant_type--# The signal channel's generic `extra` passthrough only forwards top-level *scalar* values,# each truncated — never nested lists/dicts. Source `extra` payloads nest *uncurated*# customer-derived content (pganalyze `references[].queryText` raw SQL, session-replay@@ -304,7 +276,7 @@ async def emit_signal()# Validate the signal against the matching schema variant- variant_model = _SIGNAL_VARIANT_LOOKUP.get((source_product, source_type))+ variant_model = SIGNAL_VARIANT_LOOKUP.get((source_product, source_type))if variant_model is None:raise pydantic.ValidationError.from_exception_data(title="SignalInput",diff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex 09ea2e09ae98..7606a5a085dd 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -30,26 +30,20 @@ from products.signals.backend.artefact_schemas import (parse_artefact_content,task_run_identifier_for_legacy_relationship,)+from products.signals.backend.enums import SIGNAL_SOURCE_PRODUCT_CHOICES, SignalSourceProductlogger = logging.getLogger(__name__)class SignalSourceConfig(UUIDModel):- class SourceProduct(models.TextChoices):- SESSION_REPLAY = "session_replay", "Session replay"- LLM_ANALYTICS = "llm_analytics", "LLM analytics"- GITHUB = "github", "GitHub"- LINEAR = "linear", "Linear"- ZENDESK = "zendesk", "Zendesk"- CONVERSATIONS = "conversations", "Conversations"- ERROR_TRACKING = "error_tracking", "Error tracking"- PGANALYZE = "pganalyze", "pganalyze"- SIGNALS_SCOUT = "signals_scout", "Signals scout"- LOGS = "logs", "Logs"- HEALTH_CHECKS = "health_checks", "Health checks"- ENDPOINTS = "endpoints", "Endpoints"- REPLAY_VISION = "replay_vision", "Replay Vision"-+ # Source-product taxonomy is owned by products.signals.backend.enums (the same StrEnum the payload+ # contracts and frontend codegen use). Aliased here so `SignalSourceConfig.SourceProduct.X` keeps+ # working; choices are frozen-equivalent to the prior nested TextChoices, so no migration is needed.+ SourceProduct = SignalSourceProduct++ # Source-type choices are intentionally a *subset* of the full SignalSourceType taxonomy: only the+ # types that carry a per-team config row live here (e.g. session_problem / evaluation_report gate via+ # other configs and are deliberately absent).class SourceType(models.TextChoices):SESSION_ANALYSIS_CLUSTER = "session_analysis_cluster", "Session analysis cluster"EVALUATION = "evaluation", "Evaluation"@@ -67,7 +61,7 @@ class SignalSourceConfig(UUIDModel):SCANNER_FINDING = "scanner_finding", "Scanner finding"team = models.ForeignKey("posthog.Team", on_delete=models.CASCADE, related_name="signal_source_configs")- source_product = models.CharField(max_length=100, choices=SourceProduct)+ source_product = models.CharField(max_length=100, choices=SIGNAL_SOURCE_PRODUCT_CHOICES)source_type = models.CharField(max_length=100, choices=SourceType)enabled = models.BooleanField(default=True)config = models.JSONField(default=dict)diff --git a/products/signals/backend/report_generation/resolve_reviewers.py b/products/signals/backend/report_generation/resolve_reviewers.pyindex 14ae64d0b0eb..b8f950bc3da7 100644--- a/products/signals/backend/report_generation/resolve_reviewers.py+++ b/products/signals/backend/report_generation/resolve_reviewers.py@@ -14,8 +14,6 @@ from django.db.models.functions import Concat, Lowerfrom social_django.models import UserSocialAuth-from posthog.schema import RelevantCommit-from posthog.egress.github.transport import GitHubRateLimitErrorfrom posthog.models.integration import GitHubIntegration, Integrationfrom posthog.models.organization import OrganizationMembership@@ -23,6 +21,8 @@ from posthog.models.team.team import Teamfrom posthog.models.user import Userfrom posthog.models.user_integration import UserIntegration+from products.signals.backend.contracts import RelevantCommit+from ..models import SignalReportArtefactlogger = logging.getLogger(__name__)diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex d4c9a36d81f3..d32075c37df7 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -12,8 +12,6 @@ from drf_spectacular.types import OpenApiTypesfrom drf_spectacular.utils import extend_schema_fieldfrom rest_framework import serializers-from posthog.schema import Severity-from products.signals.backend.artefact_schemas import ActionabilityChoice, Priorityfrom products.signals.backend.models import SignalScoutConfig, SignalScoutEmissionfrom products.signals.backend.scout_harness.skill_loader import SIGNALS_SCOUT_SKILL_PREFIX@@ -162,7 +160,7 @@ class SignalScoutEmissionSerializer(serializers.ModelSerializer):help_text="Agent's confidence the finding is real in [0, 1].",)severity = serializers.ChoiceField(- choices=[(s.value, s.value) for s in Severity],+ choices=[(p.value, p.value) for p in Priority],allow_null=True,help_text="Optional severity tag — one of P0, P1, P2, P3, P4 — or null if the run didn't set one.",)@@ -525,7 +523,7 @@ class EmitFindingRequestSerializer(serializers.Serializer):help_text="Optional one-line hypothesis the finding tests.",)severity = serializers.ChoiceField(- choices=[(s.value, s.value) for s in Severity],+ choices=[(p.value, p.value) for p in Priority],required=False,allow_null=True,help_text="Optional severity tag — one of P0, P1, P2, P3, P4. Informational only.",diff --git a/products/signals/backend/scout_harness/tools/emit.py b/products/signals/backend/scout_harness/tools/emit.pyindex f665418f5bb0..66fd264c5d99 100644--- a/products/signals/backend/scout_harness/tools/emit.py+++ b/products/signals/backend/scout_harness/tools/emit.py@@ -19,8 +19,8 @@ Attribution (`scout_run_id`, `task_run_id`, `finding_id`, `skill_name`, `skill_vis read off the run row so the agent never has to plumb it through. `task_run_id` is thejoin key into the `signals_scouts_runs` LLM-analytics view (the `scout_run_id` bridge rowis not on that view). The `SignalsScoutSignalExtra`-shape (defined in `posthog.schema`) is what the existing `_SIGNAL_VARIANT_LOOKUP`-in `products/signals/backend/api.py` validates against.+shape (defined in `products/signals/backend/contracts.py`) is what `SIGNAL_VARIANT_LOOKUP`+validates against."""from __future__ import annotationsdiff --git a/products/signals/backend/serializers.py b/products/signals/backend/serializers.pyindex c4666d4d5281..8ac093c8eade 100644--- a/products/signals/backend/serializers.py+++ b/products/signals/backend/serializers.py@@ -4,6 +4,7 @@ from collections.abc import Mappingfrom typing import castfrom asgiref.sync import async_to_sync+from drf_spectacular.utils import PolymorphicProxySerializer, extend_schema_fieldfrom opentelemetry import tracefrom opentelemetry.trace import Status, StatusCodefrom rest_framework import serializers@@ -11,6 +12,9 @@ from rest_framework import serializersfrom posthog.models import Userfrom posthog.temporal.common.client import sync_connect+from products.signals.backend import contracts+from products.signals.backend.enums import SignalSourceProduct, SignalSourceType+from .artefact_schemas import NON_WRITABLE_ARTEFACT_TYPESfrom .models import (AutonomyPriority,@@ -424,6 +428,101 @@ class SignalReportSerializer(serializers.ModelSerializer):return value if isinstance(value, str) else None+# ── Report `signals` action ─────────────────────────────────────────────────────+#+# A signal's `extra` blob is one of the Pydantic `*SignalExtra` shapes from `contracts.py`. Those+# models are passed straight to `PolymorphicProxySerializer` — drf-spectacular's built-in+# `PydanticExtension` turns each into a named OpenAPI component (nested models included), so the+# frontend types flow through the standard OpenAPI/Orval pipeline without re-declaring the shapes.++# All `extra` payload shapes. They're discriminated at runtime by the (source_product, source_type)+# pair on the signal row, not by a field inside `extra`, so the OpenAPI union carries no discriminator.+SIGNAL_EXTRA_MODELS = list(contracts.SignalExtraBase.__subclasses__())+++@extend_schema_field(+ PolymorphicProxySerializer(+ component_name="SignalExtra",+ # drf-spectacular's built-in PydanticExtension resolves the Pydantic models at schema-build+ # time; the stubs only know about DRF serializers, hence the cast.+ serializers=cast(list, SIGNAL_EXTRA_MODELS),+ resource_type_field_name=None,+ )+)+class SignalExtraField(serializers.JSONField):+ """Product-specific `extra` payload — one of the *SignalExtra shapes."""+++# Mirrors of the clustering dataclasses in `temporal/types.py` (SpecificityMetadata,+# MatchedMetadata, NoMatchMetadata). Those are plain dataclasses, which spectacular's+# PydanticExtension can't consume directly, so the shape is declared here as DRF serializers.+++class SpecificityMetadataSerializer(serializers.Serializer):+ pr_title = serializers.CharField(help_text="Title of the PR the specificity gate evaluated.")+ specific_enough = serializers.BooleanField(help_text="Whether the report passed the PR-specificity gate.")+ reason = serializers.CharField(help_text="The gate's reasoning.")+++class MatchedMetadataSerializer(serializers.Serializer):+ parent_signal_id = serializers.CharField(help_text="Signal already in the report that this one matched.")+ match_query = serializers.CharField(help_text="Query used to find the parent signal.")+ reason = serializers.CharField(help_text="Why the signals were judged to describe the same issue.")+ specificity = SpecificityMetadataSerializer(+ required=False, allow_null=True, help_text="PR-specificity gate result, when the gate ran."+ )+++class NoMatchMetadataSerializer(serializers.Serializer):+ reason = serializers.CharField(help_text="Why no existing report matched.")+ rejected_signal_ids = serializers.ListField(+ child=serializers.CharField(), help_text="Candidate signals that were considered and rejected."+ )+ specificity_rejection = SpecificityMetadataSerializer(+ required=False, allow_null=True, help_text="PR-specificity gate result that caused a rejection, when present."+ )+++@extend_schema_field(+ PolymorphicProxySerializer(+ component_name="SignalMatchMetadata",+ serializers=[MatchedMetadataSerializer, NoMatchMetadataSerializer],+ resource_type_field_name=None,+ )+)+class SignalMatchMetadataField(serializers.JSONField):+ """Why the signal matched (or didn't) into its report cluster."""+++class SignalNodeSerializer(serializers.Serializer):+ signal_id = serializers.CharField(help_text="ClickHouse document id of the signal.")+ content = serializers.CharField(help_text="The signal's human-readable description.")+ source_product = serializers.ChoiceField(+ choices=[(p.value, p.value) for p in SignalSourceProduct],+ help_text="Product that emitted the signal.",+ )+ source_type = serializers.ChoiceField(+ choices=[(t.value, t.value) for t in SignalSourceType],+ help_text="Signal type within the source product.",+ )+ source_id = serializers.CharField(help_text="Emitter-scoped id of the underlying object (issue, ticket, ...).")+ weight = serializers.FloatField(help_text="Signal weight in [0, 1]; drives report ranking.")+ timestamp = serializers.DateTimeField(help_text="Emission timestamp.")+ extra = SignalExtraField(help_text="Product-specific payload; shape depends on (source_product, source_type).")+ match_metadata = SignalMatchMetadataField(+ required=False,+ allow_null=True,+ help_text="Clustering match/no-match metadata, when present.",+ )+++class ReportSignalsResponseSerializer(serializers.Serializer):+ """Response body for GET /api/projects/:id/signals/reports/:id/signals/."""++ report = SignalReportSerializer(help_text="The report these signals were clustered into.")+ signals = SignalNodeSerializer(many=True, help_text="All signals contributing to the report.")++class SignalReportArtefactSerializer(serializers.ModelSerializer):content = serializers.SerializerMethodField()created_by = _UserSerializer(diff --git a/products/signals/backend/slack_inbox_notifications.py b/products/signals/backend/slack_inbox_notifications.pyindex d99ebab38931..28e13545277d 100644--- a/products/signals/backend/slack_inbox_notifications.py+++ b/products/signals/backend/slack_inbox_notifications.py@@ -23,12 +23,12 @@ from slack_sdk.errors import SlackApiErrorfrom posthog.models import Userfrom posthog.models.integration import Integration, SlackIntegration+from products.signals.backend.enums import SIGNAL_SOURCE_PRODUCT_LABELSfrom products.signals.backend.implementation_pr import fetch_implementation_pr_urls_for_reportsfrom products.signals.backend.models import (AutonomyPriority,SignalReport,SignalReportArtefact,- SignalSourceConfig,SignalTeamConfig,SignalUserAutonomyConfig,)@@ -79,7 +79,7 @@ _SLACK_PRIORITY_LABELS: dict[str, str] = {}_SOURCE_PRODUCT_LABELS: dict[str, str] = {- choice.value: str(choice.label) for choice in SignalSourceConfig.SourceProduct+ product.value: label for product, label in SIGNAL_SOURCE_PRODUCT_LABELS.items()}diff --git a/products/signals/backend/test/test_api.py b/products/signals/backend/test/test_api.pyindex 411a1678fcd1..416733fe3012 100644--- a/products/signals/backend/test/test_api.py+++ b/products/signals/backend/test/test_api.py@@ -6,8 +6,7 @@ from unittest.mock import AsyncMock, MagicMock, patchimport pydanticimport temporalio.exceptions-from posthog.schema import SignalRemediation-+from products.signals.backend.contracts import SignalRemediationfrom products.signals.backend.facade.api import (_MAX_TELEMETRY_STR_LEN,MAX_SIGNAL_REMEDIATION_TOKENS,diff --git a/products/signals/backend/test/test_scout_harness_tools.py b/products/signals/backend/test/test_scout_harness_tools.pyindex 6ef9cdcdf9b1..a93724db4bfb 100644--- a/products/signals/backend/test/test_scout_harness_tools.py+++ b/products/signals/backend/test/test_scout_harness_tools.py@@ -673,8 +673,8 @@ class TestBuildEmitExtra:def test_built_extra_validates_against_schema_variant(self) -> None:"""Round-trip: the extra we build must pass `SignalsScoutSignalInput` validation- — this is the contract `emit_signal` checks via `_SIGNAL_VARIANT_LOOKUP`."""- from posthog.schema import SignalsScoutSignalInput+ — this is the contract `emit_signal` checks via `SIGNAL_VARIANT_LOOKUP`."""+ from products.signals.backend.contracts import SignalsScoutSignalInputextra = self._minimal()extra["tags"] = ["cost-spike"]diff --git a/products/signals/backend/views.py b/products/signals/backend/views.pyindex 2a86d596896e..fb8eee7e6d1f 100644--- a/products/signals/backend/views.py+++ b/products/signals/backend/views.py@@ -87,6 +87,7 @@ from products.signals.backend.report_generation.resolve_reviewers import ()from products.signals.backend.serializers import (CommitDiffResponseSerializer,+ ReportSignalsResponseSerializer,SignalReportArtefactLogCreateSerializer,SignalReportArtefactLogUpdateSerializer,SignalReportArtefactSerializer,@@ -1312,7 +1313,11 @@ class SignalReportViewSet(return Response({"status": "deletion_started", "report_id": report_id}, status=status.HTTP_202_ACCEPTED)- @extend_schema(exclude=True)+ @extend_schema(+ summary="List a report's signals",+ description="Fetch all signals for a report from ClickHouse, including full metadata.",+ responses={200: ReportSignalsResponseSerializer},+ )@action(detail=True, methods=["get"], url_path="signals", required_scopes=["task:read"])def signals(self, request, pk=None, **kwargs):"""Fetch all signals for a report from ClickHouse, including full metadata."""diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex e7ef327219ef..9f9b7eb1a726 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -145,6 +145,424 @@ export interface PatchedSignalReportContentUpdateApi {summary?: string}+/**+ * * `session_replay` - session_replay+ * * `llm_analytics` - llm_analytics+ * * `github` - github+ * * `linear` - linear+ * * `zendesk` - zendesk+ * * `conversations` - conversations+ * * `error_tracking` - error_tracking+ * * `endpoints` - endpoints+ * * `pganalyze` - pganalyze+ * * `signals_scout` - signals_scout+ * * `logs` - logs+ * * `health_checks` - health_checks+ * * `replay_vision` - replay_vision+ */+export type SignalSourceProductApi = (typeof SignalSourceProductApi)[keyof typeof SignalSourceProductApi]++export const SignalSourceProductApi = {+ SessionReplay: 'session_replay',+ LlmAnalytics: 'llm_analytics',+ Github: 'github',+ Linear: 'linear',+ Zendesk: 'zendesk',+ Conversations: 'conversations',+ ErrorTracking: 'error_tracking',+ Endpoints: 'endpoints',+ Pganalyze: 'pganalyze',+ SignalsScout: 'signals_scout',+ Logs: 'logs',+ HealthChecks: 'health_checks',+ ReplayVision: 'replay_vision',+} as const++/**+ * * `session_analysis_cluster` - session_analysis_cluster+ * * `session_problem` - session_problem+ * * `evaluation` - evaluation+ * * `evaluation_report` - evaluation_report+ * * `issue` - issue+ * * `ticket` - ticket+ * * `issue_created` - issue_created+ * * `issue_reopened` - issue_reopened+ * * `issue_spiking` - issue_spiking+ * * `endpoint_execution_failed` - endpoint_execution_failed+ * * `endpoint_breakdown_limit_exceeded` - endpoint_breakdown_limit_exceeded+ * * `cross_source_issue` - cross_source_issue+ * * `alert_state_change` - alert_state_change+ * * `health_issue` - health_issue+ * * `scanner_finding` - scanner_finding+ */+export type SignalSourceTypeApi = (typeof SignalSourceTypeApi)[keyof typeof SignalSourceTypeApi]++export const SignalSourceTypeApi = {+ SessionAnalysisCluster: 'session_analysis_cluster',+ SessionProblem: 'session_problem',+ Evaluation: 'evaluation',+ EvaluationReport: 'evaluation_report',+ Issue: 'issue',+ Ticket: 'ticket',+ IssueCreated: 'issue_created',+ IssueReopened: 'issue_reopened',+ IssueSpiking: 'issue_spiking',+ EndpointExecutionFailed: 'endpoint_execution_failed',+ EndpointBreakdownLimitExceeded: 'endpoint_breakdown_limit_exceeded',+ CrossSourceIssue: 'cross_source_issue',+ AlertStateChange: 'alert_state_change',+ HealthIssue: 'health_issue',+ ScannerFinding: 'scanner_finding',+} as const++export type ProblemTypeEnumApi = (typeof ProblemTypeEnumApi)[keyof typeof ProblemTypeEnumApi]++export const ProblemTypeEnumApi = {+ Confusion: 'confusion',+ Abandonment: 'abandonment',+ BlockingException: 'blocking_exception',+ NonBlockingException: 'non_blocking_exception',+ Failure: 'failure',+} as const++export interface SessionProblemEventEntryApi {+ event: string+ timestamp: string+ current_url?: string | null+ event_type?: string | null+ interaction_text?: string | null+}++export interface SessionProblemSignalExtraApi {+ session_id: string+ segment_title: string+ start_time: string+ end_time: string+ problem_type: ProblemTypeEnumApi+ distinct_id: string+ session_start_time?: string | null+ session_end_time?: string | null+ session_duration?: number | null+ session_active_seconds?: number | null+ exported_asset_id?: number | null+ event_history?: SessionProblemEventEntryApi[] | null+}++export interface LlmEvalSignalExtraApi {+ evaluation_id: string+ target_event_id?: string | null+ target_event_type?: string | null+ trace_id: string+ model?: string | null+ provider?: string | null+}++export interface LlmEvalReportSignalExtraApi {+ evaluation_id: string+ evaluation_name: string+ evaluation_description: string+ report_id: string+ report_run_id: string+ period_start: string+ period_end: string+}++export interface ZendeskTicketSignalExtraApi {+ url: string+ type: string | null+ tags: string[]+ created_at: string+ priority: string | null+ status: string+}++export interface GithubIssueSignalExtraApi {+ html_url: string+ number: number+ labels: string[]+ created_at: string+ updated_at: string+ locked: boolean+ state: string+}++export interface LinearIssueSignalExtraApi {+ url: string+ identifier: string+ number: number+ priority: number+ priority_label: string+ labels: string[]+ state_name: string | null+ state_type: string | null+ team_name: string | null+ created_at: string+ updated_at: string+}++export interface ConversationsTicketSignalExtraApi {+ ticket_number: number+ channel_source: string+ channel_detail: string | null+ status: string+ priority: string | null+ created_at: string+ email_subject: string | null+}++export interface ErrorTrackingSignalExtraApi {+ fingerprint: string+}++export interface PgAnalyzeIssueReferenceApi {+ kind?: string | null+ name?: string | null+ url?: string | null+ queryText?: string | null+}++export interface PgAnalyzeIssueSignalExtraApi {+ severity: string | null+ references: PgAnalyzeIssueReferenceApi[]+ database_id: string | null+ server_human_id: string | null+ server_name: string | null+ synced_at: string+}++export interface EndpointExecutionFailedSignalExtraApi {+ endpoint_name: string+ endpoint_version: number | null+ materialized: boolean+ saved_query_id: string | null+ error_class: string+ error_message: string+}++export interface EndpointBreakdownLimitExceededSignalExtraApi {+ endpoint_name: string+ breakdown_limit: number+}++export type ReportPriorityApi = (typeof ReportPriorityApi)[keyof typeof ReportPriorityApi]++export const ReportPriorityApi = {+ P0: 'P0',+ P1: 'P1',+ P2: 'P2',+ P3: 'P3',+ P4: 'P4',+} as const++export interface SignalsScoutEvidenceEntryApi {+ source_product: string+ entity_id?: string | null+ summary: string+}++export interface SignalsScoutTimeRangeApi {+ date_from: string+ date_to: string+}++export interface SignalsScoutSignalExtraApi {+ scout_run_id: string+ task_run_id: string+ task_id?: string | null+ finding_id: string+ skill_name: string+ skill_version: number+ confidence: number+ severity?: ReportPriorityApi | null+ hypothesis?: string | null+ evidence: SignalsScoutEvidenceEntryApi[]+ dedupe_keys?: string[] | null+ tags?: string[] | null+ time_range?: SignalsScoutTimeRangeApi | null+ mcp_trace_id?: string | null+}++export type LogsAlertStateChangeSignalExtraActionEnumApi =+ (typeof LogsAlertStateChangeSignalExtraActionEnumApi)[keyof typeof LogsAlertStateChangeSignalExtraActionEnumApi]++export const LogsAlertStateChangeSignalExtraActionEnumApi = {+ Firing: 'firing',+ Broken: 'broken',+} as const++export type LogsAlertStateChangeSignalExtraThresholdOperatorEnumApi =+ (typeof LogsAlertStateChangeSignalExtraThresholdOperatorEnumApi)[keyof typeof LogsAlertStateChangeSignalExtraThresholdOperatorEnumApi]++export const LogsAlertStateChangeSignalExtraThresholdOperatorEnumApi = {+ Above: 'above',+ Below: 'below',+} as const++export type LogsAlertStateChangeSignalExtraApiFilters = { [key: string]: unknown }++export interface LogsAlertStateChangeSignalExtraApi {+ alert_id: string+ alert_name: string+ action: LogsAlertStateChangeSignalExtraActionEnumApi+ threshold_count: number+ threshold_operator: LogsAlertStateChangeSignalExtraThresholdOperatorEnumApi+ window_minutes: number+ result_count: number | null+ consecutive_failures: number+ filters: LogsAlertStateChangeSignalExtraApiFilters+ url: string+}++export interface ReplayVisionScannerFindingSignalExtraApi {+ scanner_id: string+ scanner_name: string+ scanner_type: string+ observation_id: string+ session_id: string+ confidence: number+ problem_type: string+ start_time: number+ end_time: number+ url: string+ exported_asset_id: number+ distinct_id?: string | null+ recording_start_time?: string | null+ recording_end_time?: string | null+ recording_duration?: number | null+ recording_active_seconds?: number | null+}++export type HealthCheckSignalExtraSeverityEnumApi =+ (typeof HealthCheckSignalExtraSeverityEnumApi)[keyof typeof HealthCheckSignalExtraSeverityEnumApi]++export const HealthCheckSignalExtraSeverityEnumApi = {+ Critical: 'critical',+ Warning: 'warning',+ Info: 'info',+} as const++export type HealthCheckSignalExtraApiPayload = { [key: string]: unknown }++export interface HealthCheckSignalExtraApi {+ kind: string+ severity: HealthCheckSignalExtraSeverityEnumApi+ issue_id: string+ title: string+ summary: string+ link: string+ url: string+ payload: HealthCheckSignalExtraApiPayload+}++export type SignalExtraApi =+ | SessionProblemSignalExtraApi+ | LlmEvalSignalExtraApi+ | LlmEvalReportSignalExtraApi+ | ZendeskTicketSignalExtraApi+ | GithubIssueSignalExtraApi+ | LinearIssueSignalExtraApi+ | ConversationsTicketSignalExtraApi+ | ErrorTrackingSignalExtraApi+ | PgAnalyzeIssueSignalExtraApi+ | EndpointExecutionFailedSignalExtraApi+ | EndpointBreakdownLimitExceededSignalExtraApi+ | SignalsScoutSignalExtraApi+ | LogsAlertStateChangeSignalExtraApi+ | ReplayVisionScannerFindingSignalExtraApi+ | HealthCheckSignalExtraApi++export interface SpecificityMetadataApi {+ /** Title of the PR the specificity gate evaluated. */+ pr_title: string+ /** Whether the report passed the PR-specificity gate. */+ specific_enough: boolean+ /** The gate's reasoning. */+ reason: string+}++export interface MatchedMetadataApi {+ /** Signal already in the report that this one matched. */+ parent_signal_id: string+ /** Query used to find the parent signal. */+ match_query: string+ /** Why the signals were judged to describe the same issue. */+ reason: string+ /** PR-specificity gate result, when the gate ran. */+ specificity?: SpecificityMetadataApi | null+}++export interface NoMatchMetadataApi {+ /** Why no existing report matched. */+ reason: string+ /** Candidate signals that were considered and rejected. */+ rejected_signal_ids: string[]+ /** PR-specificity gate result that caused a rejection, when present. */+ specificity_rejection?: SpecificityMetadataApi | null+}++export type SignalMatchMetadataApi = MatchedMetadataApi | NoMatchMetadataApi++export interface SignalNodeApi {+ /** ClickHouse document id of the signal. */+ signal_id: string+ /** The signal's human-readable description. */+ content: string+ /** Product that emitted the signal.+ *+ * * `session_replay` - session_replay+ * * `llm_analytics` - llm_analytics+ * * `github` - github+ * * `linear` - linear+ * * `zendesk` - zendesk+ * * `conversations` - conversations+ * * `error_tracking` - error_tracking+ * * `endpoints` - endpoints+ * * `pganalyze` - pganalyze+ * * `signals_scout` - signals_scout+ * * `logs` - logs+ * * `health_checks` - health_checks+ * * `replay_vision` - replay_vision */+ source_product: SignalSourceProductApi+ /** Signal type within the source product.+ *+ * * `session_analysis_cluster` - session_analysis_cluster+ * * `session_problem` - session_problem+ * * `evaluation` - evaluation+ * * `evaluation_report` - evaluation_report+ * * `issue` - issue+ * * `ticket` - ticket+ * * `issue_created` - issue_created+ * * `issue_reopened` - issue_reopened+ * * `issue_spiking` - issue_spiking+ * * `endpoint_execution_failed` - endpoint_execution_failed+ * * `endpoint_breakdown_limit_exceeded` - endpoint_breakdown_limit_exceeded+ * * `cross_source_issue` - cross_source_issue+ * * `alert_state_change` - alert_state_change+ * * `health_issue` - health_issue+ * * `scanner_finding` - scanner_finding */+ source_type: SignalSourceTypeApi+ /** Emitter-scoped id of the underlying object (issue, ticket, ...). */+ source_id: string+ /** Signal weight in [0, 1]; drives report ranking. */+ weight: number+ /** Emission timestamp. */+ timestamp: string+ /** Product-specific payload; shape depends on (source_product, source_type). */+ extra: SignalExtraApi+ /** Clustering match/no-match metadata, when present. */+ match_metadata?: SignalMatchMetadataApi | null+}++/**+ * Response body for GET /api/projects/:id/signals/reports/:id/signals/.+ */+export interface ReportSignalsResponseApi {+ /** The report these signals were clustered into. */+ report: SignalReportApi+ /** All signals contributing to the report. */+ signals: SignalNodeApi[]+}+/*** * `suppressed` - suppressed* * `potential` - potential@@ -1760,9 +2178,10 @@ export interface ForgetResponseApi {* * `endpoints` - Endpoints* * `replay_vision` - Replay Vision*/-export type SourceProductEnumApi = (typeof SourceProductEnumApi)[keyof typeof SourceProductEnumApi]+export type SignalSourceConfigSourceProductEnumApi =+ (typeof SignalSourceConfigSourceProductEnumApi)[keyof typeof SignalSourceConfigSourceProductEnumApi]-export const SourceProductEnumApi = {+export const SignalSourceConfigSourceProductEnumApi = {SessionReplay: 'session_replay',LlmAnalytics: 'llm_analytics',Github: 'github',@@ -1816,7 +2235,7 @@ export const SignalSourceConfigSourceTypeEnumApi = {export interface SignalSourceConfigApi {readonly id: string- source_product: SourceProductEnumApi+ source_product: SignalSourceConfigSourceProductEnumApisource_type: SignalSourceConfigSourceTypeEnumApienabled?: booleanconfig?: unknown@@ -1837,7 +2256,7 @@ export interface PaginatedSignalSourceConfigListApi {export interface PatchedSignalSourceConfigApi {readonly id?: string- source_product?: SourceProductEnumApi+ source_product?: SignalSourceConfigSourceProductEnumApisource_type?: SignalSourceConfigSourceTypeEnumApienabled?: booleanconfig?: unknowndiff --git a/products/signals/frontend/generated/api.ts b/products/signals/frontend/generated/api.tsindex 3fba66e963b5..1696d3776bb9 100644--- a/products/signals/frontend/generated/api.ts+++ b/products/signals/frontend/generated/api.ts@@ -31,6 +31,7 @@ import type {PauseUntilRequestApi,ProjectProfileApi,RememberRequestApi,+ ReportSignalsResponseApi,ScoutEmissionReportLinkApi,ScoutMemberApi,ScoutMetadataApi,@@ -211,6 +212,25 @@ export const signalsReportsPartialUpdate = async (})}+export const getSignalsReportsSignalsRetrieveUrl = (projectId: string, id: string) => {+ return `/api/projects/${projectId}/signals/reports/${id}/signals/`+}++/**+ * Fetch all signals for a report from ClickHouse, including full metadata.+ * @summary List a report's signals+ */+export const signalsReportsSignalsRetrieve = async (+ projectId: string,+ id: string,+ options?: RequestInit+): Promise<ReportSignalsResponseApi> => {+ return apiMutator<ReportSignalsResponseApi>(getSignalsReportsSignalsRetrieveUrl(projectId, id), {+ ...options,+ method: 'GET',+ })+}+export const getSignalsReportsStateCreateUrl = (projectId: string, id: string) => {return `/api/projects/${projectId}/signals/reports/${id}/state/`}diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 0d7d839c053e..5651012e835e 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -344,6 +344,9 @@ tools:signals-report-artefacts-diff:operation: signals_report_artefacts_diffenabled: false+ signals-reports-signals-retrieve:+ operation: signals_reports_signals_retrieve+ enabled: falsesignals-scout-config-create:operation: signals_scout_config_createenabled: truediff --git a/pyproject.toml b/pyproject.tomlindex cd165f700c4c..bd72d5daeecd 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -67,7 +67,7 @@ dependencies = ["grimp~=3.14","grpcio~=1.71.0","gspread==6.2.1",- "hogql-parser==1.3.75",+ "hogql-parser==1.3.76","hogql-parser-rs==1.3.106", # built from rust/hogql/parser via the build-hogql-parser-rs workflow + published to PyPI; rebuild locally with `uv pip install -e rust/hogql/parser` when iterating"humanize~=4.12.3","infi-clickhouse-orm",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 67689d3fed0c..003a0c2446d0 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -1172,20 +1172,6 @@ export namespace Schemas {actionId: number;}- /**- * * `add` - add- * * `remove` - remove- * * `set` - set- */- export type ActionEnum = typeof ActionEnum[keyof typeof ActionEnum];--- export const ActionEnum = {- Add: 'add',- Remove: 'remove',- Set: 'set',- } as const;-export interface ActionReference {/** Resource type: insight, experiment, cohort, or hog_function */type: string;@@ -11892,6 +11878,20 @@ export namespace Schemas {tags: string[];}+ /**+ * * `add` - add+ * * `remove` - remove+ * * `set` - set+ */+ export type BulkUpdateTagsRequestActionEnum = typeof BulkUpdateTagsRequestActionEnum[keyof typeof BulkUpdateTagsRequestActionEnum];+++ export const BulkUpdateTagsRequestActionEnum = {+ Add: 'add',+ Remove: 'remove',+ Set: 'set',+ } as const;+export interface BulkUpdateTagsRequest {/*** List of object IDs to update tags on.@@ -11903,7 +11903,7 @@ export namespace Schemas {* * `add` - add* * `remove` - remove* * `set` - set */- action: ActionEnum;+ action: BulkUpdateTagsRequestActionEnum;/** Tag names to add, remove, or set. */tags: string[];}@@ -13650,6 +13650,16 @@ export namespace Schemas {readonly task: TaskDetailDTO | null;}+ export interface ConversationsTicketSignalExtra {+ ticket_number: number;+ channel_source: string;+ channel_detail: string | null;+ status: string;+ priority: string | null;+ created_at: string;+ email_subject: string | null;+ }+export interface ConversionGoalSummary {/** Unique id of the goal (event name, action id, or DW goal id) */id: string;@@ -18743,6 +18753,11 @@ export namespace Schemas {conclusion_comment?: string | null;}+ export interface EndpointBreakdownLimitExceededSignalExtra {+ endpoint_name: string;+ breakdown_limit: number;+ }+/*** A column in the endpoint's query result.*/@@ -18753,6 +18768,15 @@ export namespace Schemas {type: string;}+ export interface EndpointExecutionFailedSignalExtra {+ endpoint_name: string;+ endpoint_version: number | null;+ materialized: boolean;+ saved_query_id: string | null;+ error_class: string;+ error_message: string;+ }+export interface EndpointLastExecutionTimesRequest {names: string[];}@@ -20287,6 +20311,10 @@ export namespace Schemas {per_issue_rate_limit_bucket_size_minutes?: number | null;}+ export interface ErrorTrackingSignalExtra {+ fingerprint: string;+ }+export interface SimilarIssue {description: string;distance: number;@@ -24522,6 +24550,16 @@ export namespace Schemas {error?: string;}+ export interface GithubIssueSignalExtra {+ html_url: string;+ number: number;+ labels: string[];+ created_at: string;+ updated_at: string;+ locked: boolean;+ state: string;+ }+export interface Goal {/** Goal name (action name). */name: string;@@ -24762,6 +24800,28 @@ export namespace Schemas {math_property?: string | null;}+ export type HealthCheckSignalExtraPayload = { [key: string]: unknown };++ export type HealthCheckSignalExtraSeverityEnum = typeof HealthCheckSignalExtraSeverityEnum[keyof typeof HealthCheckSignalExtraSeverityEnum];+++ export const HealthCheckSignalExtraSeverityEnum = {+ Critical: 'critical',+ Warning: 'warning',+ Info: 'info',+ } as const;++ export interface HealthCheckSignalExtra {+ kind: string;+ severity: HealthCheckSignalExtraSeverityEnum;+ issue_id: string;+ title: string;+ summary: string;+ link: string;+ url: string;+ payload: HealthCheckSignalExtraPayload;+ }+/*** * `success` - success* * `warning` - warning@@ -28840,6 +28900,20 @@ export namespace Schemas {Sustained: 'sustained',} as const;+ export interface LinearIssueSignalExtra {+ url: string;+ identifier: string;+ number: number;+ priority: number;+ priority_label: string;+ labels: string[];+ state_name: string | null;+ state_type: string | null;+ team_name: string | null;+ created_at: string;+ updated_at: string;+ }+export interface LinearTeam {/** Linear team ID to pass as error tracking config.team_id. */id: string;@@ -28907,6 +28981,25 @@ export namespace Schemas {readonly updated_at: string;}+ export interface LlmEvalReportSignalExtra {+ evaluation_id: string;+ evaluation_name: string;+ evaluation_description: string;+ report_id: string;+ report_run_id: string;+ period_start: string;+ period_end: string;+ }++ export interface LlmEvalSignalExtra {+ evaluation_id: string;+ target_event_id?: string | null;+ target_event_type?: string | null;+ trace_id: string;+ model?: string | null;+ provider?: string | null;+ }+export interface LogsAlertFilters {filterGroup?: PropertyGroupFilter | null;serviceNames?: string[] | null;@@ -28917,10 +29010,10 @@ export namespace Schemas {* * `above` - Above* * `below` - Below*/- export type ThresholdOperatorEnum = typeof ThresholdOperatorEnum[keyof typeof ThresholdOperatorEnum];+ export type LogsAlertThresholdOperatorEnum = typeof LogsAlertThresholdOperatorEnum[keyof typeof LogsAlertThresholdOperatorEnum];- export const ThresholdOperatorEnum = {+ export const LogsAlertThresholdOperatorEnum = {Above: 'above',Below: 'below',} as const;@@ -28998,7 +29091,7 @@ export namespace Schemas {** * `above` - Above* * `below` - Below */- threshold_operator?: ThresholdOperatorEnum;+ threshold_operator?: LogsAlertThresholdOperatorEnum;/** Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60. */window_minutes?: number;/** How often the alert is evaluated, in minutes. Server-managed. */@@ -29170,7 +29263,7 @@ export namespace Schemas {** * `above` - Above* * `below` - Below */- threshold_operator: ThresholdOperatorEnum;+ threshold_operator: LogsAlertThresholdOperatorEnum;/** Window size in minutes — determines bucket interval. */window_minutes: number;/**@@ -29215,6 +29308,37 @@ export namespace Schemas {threshold_operator: string;}+ export type LogsAlertStateChangeSignalExtraFilters = { [key: string]: unknown };++ export type LogsAlertStateChangeSignalExtraActionEnum = typeof LogsAlertStateChangeSignalExtraActionEnum[keyof typeof LogsAlertStateChangeSignalExtraActionEnum];+++ export const LogsAlertStateChangeSignalExtraActionEnum = {+ Firing: 'firing',+ Broken: 'broken',+ } as const;++ export type LogsAlertStateChangeSignalExtraThresholdOperatorEnum = typeof LogsAlertStateChangeSignalExtraThresholdOperatorEnum[keyof typeof LogsAlertStateChangeSignalExtraThresholdOperatorEnum];+++ export const LogsAlertStateChangeSignalExtraThresholdOperatorEnum = {+ Above: 'above',+ Below: 'below',+ } as const;++ export interface LogsAlertStateChangeSignalExtra {+ alert_id: string;+ alert_name: string;+ action: LogsAlertStateChangeSignalExtraActionEnum;+ threshold_count: number;+ threshold_operator: LogsAlertStateChangeSignalExtraThresholdOperatorEnum;+ window_minutes: number;+ result_count: number | null;+ consecutive_failures: number;+ filters: LogsAlertStateChangeSignalExtraFilters;+ url: string;+ }+export type LogsListWidgetCatalogEntryOpenApiWidgetType = typeof LogsListWidgetCatalogEntryOpenApiWidgetType[keyof typeof LogsListWidgetCatalogEntryOpenApiWidgetType];@@ -29840,6 +29964,26 @@ export namespace Schemas {latest_run_id: number;}+ export interface SpecificityMetadata {+ /** Title of the PR the specificity gate evaluated. */+ pr_title: string;+ /** Whether the report passed the PR-specificity gate. */+ specific_enough: boolean;+ /** The gate's reasoning. */+ reason: string;+ }++ export interface MatchedMetadata {+ /** Signal already in the report that this one matched. */+ parent_signal_id: string;+ /** Query used to find the parent signal. */+ match_query: string;+ /** Why the signals were judged to describe the same issue. */+ reason: string;+ /** PR-specificity gate result, when the gate ran. */+ specificity?: SpecificityMetadata | null;+ }+/*** * `key` - key* * `value` - value@@ -30261,6 +30405,15 @@ export namespace Schemas {source_revision_id: string;}+ export interface NoMatchMetadata {+ /** Why no existing report matched. */+ reason: string;+ /** Candidate signals that were considered and rejected. */+ rejected_signal_ids: string[];+ /** PR-specificity gate result that caused a rejection, when present. */+ specificity_rejection?: SpecificityMetadata | null;+ }+/*** * `table` - Table* * `view` - View@@ -33734,10 +33887,10 @@ export namespace Schemas {* * `endpoints` - Endpoints* * `replay_vision` - Replay Vision*/- export type SourceProductEnum = typeof SourceProductEnum[keyof typeof SourceProductEnum];+ export type SignalSourceConfigSourceProductEnum = typeof SignalSourceConfigSourceProductEnum[keyof typeof SignalSourceConfigSourceProductEnum];- export const SourceProductEnum = {+ export const SignalSourceConfigSourceProductEnum = {SessionReplay: 'session_replay',LlmAnalytics: 'llm_analytics',Github: 'github',@@ -33791,7 +33944,7 @@ export namespace Schemas {export interface SignalSourceConfig {readonly id: string;- source_product: SourceProductEnum;+ source_product: SignalSourceConfigSourceProductEnum;source_type: SignalSourceConfigSourceTypeEnum;enabled?: boolean;config?: unknown;@@ -38986,7 +39139,7 @@ export namespace Schemas {** * `above` - Above* * `below` - Below */- threshold_operator?: ThresholdOperatorEnum;+ threshold_operator?: LogsAlertThresholdOperatorEnum;/** Time window in minutes over which log entries are counted. Allowed values: 5, 10, 15, 30, 60. */window_minutes?: number;/** How often the alert is evaluated, in minutes. Server-managed. */@@ -41147,7 +41300,7 @@ export namespace Schemas {export interface PatchedSignalSourceConfig {readonly id?: string;- source_product?: SourceProductEnum;+ source_product?: SignalSourceConfigSourceProductEnum;source_type?: SignalSourceConfigSourceTypeEnum;enabled?: boolean;config?: unknown;@@ -43241,6 +43394,22 @@ export namespace Schemas {top_traces: _TopTraces;}+ export interface PgAnalyzeIssueReference {+ kind?: string | null;+ name?: string | null;+ url?: string | null;+ queryText?: string | null;+ }++ export interface PgAnalyzeIssueSignalExtra {+ severity: string | null;+ references: PgAnalyzeIssueReference[];+ database_id: string | null;+ server_human_id: string | null;+ server_name: string | null;+ synced_at: string;+ }+export interface PinnedSceneTabs {/** Ordered list of pinned navigation tabs shown in the sidebar for the authenticated user within the current team. Send the full list to replace the existing pins; omit to leave them unchanged. */tabs?: PinnedSceneTab[];@@ -43316,6 +43485,17 @@ export namespace Schemas {primary_properties: PrimaryPropertiesResponsePrimaryProperties;}+ export type ProblemTypeEnum = typeof ProblemTypeEnum[keyof typeof ProblemTypeEnum];+++ export const ProblemTypeEnum = {+ Confusion: 'confusion',+ Abandonment: 'abandonment',+ BlockingException: 'blocking_exception',+ NonBlockingException: 'non_blocking_exception',+ Failure: 'failure',+ } as const;+/*** * `conversations` - conversations* * `error_tracking` - error_tracking@@ -47725,6 +47905,25 @@ export namespace Schemas {layout?: LayoutEnum;}+ export interface ReplayVisionScannerFindingSignalExtra {+ scanner_id: string;+ scanner_name: string;+ scanner_type: string;+ observation_id: string;+ session_id: string;+ confidence: number;+ problem_type: string;+ start_time: number;+ end_time: number;+ url: string;+ exported_asset_id: number;+ distinct_id?: string | null;+ recording_start_time?: string | null;+ recording_end_time?: string | null;+ recording_duration?: number | null;+ recording_active_seconds?: number | null;+ }+export interface RepoOverview {/** CI cost per merged PR across the window, oldest first, zero-filled, bucketed by cost_series_granularity. Empty when the job-level source isn't synced. */cost_series: CostPerMergeBucket[];@@ -47784,6 +47983,214 @@ export namespace Schemas {cost_series_granularity: string;}+ export type ReportPriority = typeof ReportPriority[keyof typeof ReportPriority];+++ export const ReportPriority = {+ P0: 'P0',+ P1: 'P1',+ P2: 'P2',+ P3: 'P3',+ P4: 'P4',+ } as const;++ /**+ * * `session_replay` - session_replay+ * * `llm_analytics` - llm_analytics+ * * `github` - github+ * * `linear` - linear+ * * `zendesk` - zendesk+ * * `conversations` - conversations+ * * `error_tracking` - error_tracking+ * * `endpoints` - endpoints+ * * `pganalyze` - pganalyze+ * * `signals_scout` - signals_scout+ * * `logs` - logs+ * * `health_checks` - health_checks+ * * `replay_vision` - replay_vision+ */+ export type SignalSourceProduct = typeof SignalSourceProduct[keyof typeof SignalSourceProduct];+++ export const SignalSourceProduct = {+ SessionReplay: 'session_replay',+ LlmAnalytics: 'llm_analytics',+ Github: 'github',+ Linear: 'linear',+ Zendesk: 'zendesk',+ Conversations: 'conversations',+ ErrorTracking: 'error_tracking',+ Endpoints: 'endpoints',+ Pganalyze: 'pganalyze',+ SignalsScout: 'signals_scout',+ Logs: 'logs',+ HealthChecks: 'health_checks',+ ReplayVision: 'replay_vision',+ } as const;++ /**+ * * `session_analysis_cluster` - session_analysis_cluster+ * * `session_problem` - session_problem+ * * `evaluation` - evaluation+ * * `evaluation_report` - evaluation_report+ * * `issue` - issue+ * * `ticket` - ticket+ * * `issue_created` - issue_created+ * * `issue_reopened` - issue_reopened+ * * `issue_spiking` - issue_spiking+ * * `endpoint_execution_failed` - endpoint_execution_failed+ * * `endpoint_breakdown_limit_exceeded` - endpoint_breakdown_limit_exceeded+ * * `cross_source_issue` - cross_source_issue+ * * `alert_state_change` - alert_state_change+ * * `health_issue` - health_issue+ * * `scanner_finding` - scanner_finding+ */+ export type SignalSourceType = typeof SignalSourceType[keyof typeof SignalSourceType];+++ export const SignalSourceType = {+ SessionAnalysisCluster: 'session_analysis_cluster',+ SessionProblem: 'session_problem',+ Evaluation: 'evaluation',+ EvaluationReport: 'evaluation_report',+ Issue: 'issue',+ Ticket: 'ticket',+ IssueCreated: 'issue_created',+ IssueReopened: 'issue_reopened',+ IssueSpiking: 'issue_spiking',+ EndpointExecutionFailed: 'endpoint_execution_failed',+ EndpointBreakdownLimitExceeded: 'endpoint_breakdown_limit_exceeded',+ CrossSourceIssue: 'cross_source_issue',+ AlertStateChange: 'alert_state_change',+ HealthIssue: 'health_issue',+ ScannerFinding: 'scanner_finding',+ } as const;++ export interface SessionProblemEventEntry {+ event: string;+ timestamp: string;+ current_url?: string | null;+ event_type?: string | null;+ interaction_text?: string | null;+ }++ export interface SessionProblemSignalExtra {+ session_id: string;+ segment_title: string;+ start_time: string;+ end_time: string;+ problem_type: ProblemTypeEnum;+ distinct_id: string;+ session_start_time?: string | null;+ session_end_time?: string | null;+ session_duration?: number | null;+ session_active_seconds?: number | null;+ exported_asset_id?: number | null;+ event_history?: SessionProblemEventEntry[] | null;+ }++ export interface ZendeskTicketSignalExtra {+ url: string;+ type: string | null;+ tags: string[];+ created_at: string;+ priority: string | null;+ status: string;+ }++ export interface SignalsScoutEvidenceEntry {+ source_product: string;+ entity_id?: string | null;+ summary: string;+ }++ export interface SignalsScoutTimeRange {+ date_from: string;+ date_to: string;+ }++ export interface SignalsScoutSignalExtra {+ scout_run_id: string;+ task_run_id: string;+ task_id?: string | null;+ finding_id: string;+ skill_name: string;+ skill_version: number;+ confidence: number;+ severity?: ReportPriority | null;+ hypothesis?: string | null;+ evidence: SignalsScoutEvidenceEntry[];+ dedupe_keys?: string[] | null;+ tags?: string[] | null;+ time_range?: SignalsScoutTimeRange | null;+ mcp_trace_id?: string | null;+ }++ export type SignalExtra = SessionProblemSignalExtra | LlmEvalSignalExtra | LlmEvalReportSignalExtra | ZendeskTicketSignalExtra | GithubIssueSignalExtra | LinearIssueSignalExtra | ConversationsTicketSignalExtra | ErrorTrackingSignalExtra | PgAnalyzeIssueSignalExtra | EndpointExecutionFailedSignalExtra | EndpointBreakdownLimitExceededSignalExtra | SignalsScoutSignalExtra | LogsAlertStateChangeSignalExtra | ReplayVisionScannerFindingSignalExtra | HealthCheckSignalExtra;++ export type SignalMatchMetadata = MatchedMetadata | NoMatchMetadata;++ export interface SignalNode {+ /** ClickHouse document id of the signal. */+ signal_id: string;+ /** The signal's human-readable description. */+ content: string;+ /** Product that emitted the signal.+ *+ * * `session_replay` - session_replay+ * * `llm_analytics` - llm_analytics+ * * `github` - github+ * * `linear` - linear+ * * `zendesk` - zendesk+ * * `conversations` - conversations+ * * `error_tracking` - error_tracking+ * * `endpoints` - endpoints+ * * `pganalyze` - pganalyze+ * * `signals_scout` - signals_scout+ * * `logs` - logs+ * * `health_checks` - health_checks+ * * `replay_vision` - replay_vision */+ source_product: SignalSourceProduct;+ /** Signal type within the source product.+ *+ * * `session_analysis_cluster` - session_analysis_cluster+ * * `session_problem` - session_problem+ * * `evaluation` - evaluation+ * * `evaluation_report` - evaluation_report+ * * `issue` - issue+ * * `ticket` - ticket+ * * `issue_created` - issue_created+ * * `issue_reopened` - issue_reopened+ * * `issue_spiking` - issue_spiking+ * * `endpoint_execution_failed` - endpoint_execution_failed+ * * `endpoint_breakdown_limit_exceeded` - endpoint_breakdown_limit_exceeded+ * * `cross_source_issue` - cross_source_issue+ * * `alert_state_change` - alert_state_change+ * * `health_issue` - health_issue+ * * `scanner_finding` - scanner_finding */+ source_type: SignalSourceType;+ /** Emitter-scoped id of the underlying object (issue, ticket, ...). */+ source_id: string;+ /** Signal weight in [0, 1]; drives report ranking. */+ weight: number;+ /** Emission timestamp. */+ timestamp: string;+ /** Product-specific payload; shape depends on (source_product, source_type). */+ extra: SignalExtra;+ /** Clustering match/no-match metadata, when present. */+ match_metadata?: SignalMatchMetadata | null;+ }++ /**+ * Response body for GET /api/projects/:id/signals/reports/:id/signals/.+ */+ export interface ReportSignalsResponse {+ /** The report these signals were clustered into. */+ report: SignalReport;+ /** All signals contributing to the report. */+ signals: SignalNode[];+ }+export interface ScanEvidence {/** Number of files scanned */filesScanned: number;diff --git a/uv.lock b/uv.lockindex 9476dbd1ff20..4743c944a26c 100644--- a/uv.lock+++ b/uv.lock@@ -3136,14 +3136,14 @@ provides-extras = ["dev"][[package]]name = "hogql-parser"-version = "1.3.75"+version = "1.3.76"source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/e8/10/20388a0121c0c74578ed84dc038234e476c5e02e79bd38e1b8634516cdde/hogql_parser-1.3.75.tar.gz", hash = "sha256:75a0659864276bc32241af6d55e7521654598a5e950265ace095bab239bd6c76", size = 92415, upload-time = "2026-06-29T11:06:56.774Z" }+sdist = { url = "https://files.pythonhosted.org/packages/57/4e/a599bf350a6e61d28d7da09ebe90699ea5f8a27629d523e1ca1da21602ab/hogql_parser-1.3.76.tar.gz", hash = "sha256:3a81abbe45097ac89ee03c2dd26c502ff6b30520a316b5752823dfae3b98a296", size = 92405, upload-time = "2026-06-30T10:16:40.777Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/f5/27/88e28a44da703c326a4f1ad71bf09adae666e338e3234bec01b7130f90e6/hogql_parser-1.3.75-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f204115d79eb38f2965aefdeb4b1a4b0f6b49f08443aabe79f3b3ec42512707a", size = 655879, upload-time = "2026-06-29T11:06:50.397Z" },- { url = "https://files.pythonhosted.org/packages/df/3a/0acc7ebad37dd6e501396f74b5e75d78d3a3ea4ba04a702b6dad11622505/hogql_parser-1.3.75-cp313-cp313-macosx_15_0_x86_64.whl", hash = "sha256:cf0a41135034813b6b06865ccdd9a421bc3c560abfeb57616cd9f8676ac77a72", size = 665051, upload-time = "2026-06-29T11:06:51.716Z" },- { url = "https://files.pythonhosted.org/packages/04/4d/9a2a78a2560866836078813638db3f5f9c5eeaa2e955803eff0b334bc31f/hogql_parser-1.3.75-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:f78e6f013f4d738e3095690c8472837af8f79c49ecb140302ba591df47d89fa9", size = 5084029, upload-time = "2026-06-29T11:06:53.362Z" },- { url = "https://files.pythonhosted.org/packages/7c/fb/818cd2e8c34e588651e3a62bac4f60618926b860a03081a9b15f600896f3/hogql_parser-1.3.75-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:7b55c19c4533ee17261d00d9322fdd2b998dfa4af135f885e25db576d7642435", size = 5190293, upload-time = "2026-06-29T11:06:55.334Z" },+ { url = "https://files.pythonhosted.org/packages/92/38/a41a3fcbd027d79d84352b8858612277512539deb6abe988c9e895fd46e5/hogql_parser-1.3.76-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:142b9c3c600a21d1d97d85d735350bb28a5a09268f45f2e583b50f9eda9ae2a6", size = 656785, upload-time = "2026-06-30T10:16:34.53Z" },+ { url = "https://files.pythonhosted.org/packages/8c/ce/42d0985ebcf4fbe903330e8d11d169902ad84d8397c810a87bc1eac2e7d1/hogql_parser-1.3.76-cp313-cp313-macosx_15_0_x86_64.whl", hash = "sha256:0e1f774b142d925a4f6b4bdb3eac6cc142e2006d753d3b445aea312f92312854", size = 666564, upload-time = "2026-06-30T10:16:35.831Z" },+ { url = "https://files.pythonhosted.org/packages/4c/a6/c70a36d92f48a861a5bddc60ef242fda505d0c268d8b76eb343600860816/hogql_parser-1.3.76-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:d58146f9aee7e09bce6ef906ebf3226ccc36a04c4de79d4392200e50070a12ed", size = 5096079, upload-time = "2026-06-30T10:16:37.291Z" },+ { url = "https://files.pythonhosted.org/packages/3c/5c/9788492b5d2f9feac6b601814935bc1d645c642874b1126cde32abb189dc/hogql_parser-1.3.76-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:17ce2de5d3c739fcb9b60bb4d373d79e778467be08aad571b75f174c6a5e2571", size = 5203305, upload-time = "2026-06-30T10:16:38.941Z" },][[package]]@@ -5881,7 +5881,7 @@ requires-dist = [{ name = "grimp", specifier = "~=3.14" },{ name = "grpcio", specifier = "~=1.71.0" },{ name = "gspread", specifier = "==6.2.1" },- { name = "hogql-parser", specifier = "==1.3.75" },+ { name = "hogql-parser", specifier = "==1.3.76" },{ name = "hogql-parser-rs", specifier = "==1.3.106" },{ name = "humanize", specifier = "~=4.12.3" },{ name = "infi-clickhouse-orm", git = "https://github.com/PostHog/infi.clickhouse_orm?rev=4e3996becf66bf5c26580aff12a80425d9d56fe5" },