Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(signals): document resolved status and validate report status filter (#63520)

posthog[bot]fec44c0b80ee
diff --git a/products/signals/backend/management/commands/list_signal_reports.py b/products/signals/backend/management/commands/list_signal_reports.py
index 360fec77ec14..96138d6d0a90 100644
--- a/products/signals/backend/management/commands/list_signal_reports.py
+++ b/products/signals/backend/management/commands/list_signal_reports.py
@@ -23,7 +23,7 @@ class Command(BaseCommand):
parser.add_argument(
"--status",
type=str,
- help="Filter by status (potential, candidate, in_progress, ready, pending_input, failed)",
+ help="Filter by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed)",
)
parser.add_argument("--report-id", type=str, help="Show a specific report")
parser.add_argument("--signals", action="store_true", help="Include full signal details from ClickHouse")
diff --git a/products/signals/backend/test/test_signal_report_api.py b/products/signals/backend/test/test_signal_report_api.py
index 4285a90c18a1..1e3c8efbb8b9 100644
--- a/products/signals/backend/test/test_signal_report_api.py
+++ b/products/signals/backend/test/test_signal_report_api.py
@@ -266,6 +266,31 @@ class TestSignalReportListAPI(APIBaseTest):
ids = [r["id"] for r in response.json()["results"]]
assert ids == [str(r_p0.id), str(r_p2.id)]
+ # --- status filter ---
+
+ def test_filter_by_resolved_status(self):
+ resolved = self._create_report(title="Resolved", status=SignalReport.Status.RESOLVED)
+ self._create_report(title="Ready", status=SignalReport.Status.READY)
+
+ response = self.client.get(self._list_url(status="resolved"))
+ assert response.status_code == status.HTTP_200_OK
+ ids = {r["id"] for r in response.json()["results"]}
+ assert ids == {str(resolved.id)}
+
+ @parameterized.expand(
+ [
+ ("garbage", "bogus_status"),
+ ("mixed_valid_and_invalid", "ready,bogus_status"),
+ ("deleted_not_filterable", "deleted"),
+ ]
+ )
+ def test_filter_status_invalid_value_returns_400(self, _name, raw):
+ response = self.client.get(self._list_url(status=raw))
+ assert response.status_code == status.HTTP_400_BAD_REQUEST
+ body = response.json()
+ assert body["attr"] == "status"
+ assert body["code"] == "invalid_input"
+
# --- ordering ---
def test_ready_before_candidate_even_if_candidate_has_higher_weight(self):
diff --git a/products/signals/backend/views.py b/products/signals/backend/views.py
index 07b897d43d64..41b63ece6261 100644
--- a/products/signals/backend/views.py
+++ b/products/signals/backend/views.py
@@ -424,10 +424,23 @@ class SignalReportViewSet(
# Deleted reports are terminal -- exclude from all endpoints (detail, list, actions)
return queryset.exclude(status=SignalReport.Status.DELETED)
+ # `deleted` is in the model but always stripped upstream by `_exclude_deleted_signal_reports`,
+ # so it is never a valid filter target.
+ _FILTERABLE_STATUSES = frozenset(SignalReport.Status.values) - {SignalReport.Status.DELETED}
+
def _apply_signal_report_status_filter(self, queryset):
status_filter = self.request.query_params.get("status")
if status_filter:
- return queryset.filter(status__in=[s.strip() for s in status_filter.split(",") if s.strip()])
+ statuses = [s.strip() for s in status_filter.split(",") if s.strip()]
+ invalid = [s for s in statuses if s not in self._FILTERABLE_STATUSES]
+ if invalid:
+ accepted = ", ".join(sorted(self._FILTERABLE_STATUSES))
+ raise serializers.ValidationError(
+ {
+ "status": f"Invalid status value(s): {', '.join(sorted(set(invalid)))}. Accepted values: {accepted}."
+ }
+ )
+ return queryset.filter(status__in=statuses)
# The `state` action reopens dismissed reports, so it must be able to reach a suppressed
# report by ID — otherwise transitioning one back to "potential" would 404. Everywhere
# else suppressed reports stay hidden unless an explicit `status` filter asks for them.
@@ -695,7 +708,7 @@ class SignalReportViewSet(
required=False,
description=(
"Comma-separated list of statuses to include. "
- "Valid values: potential, candidate, in_progress, pending_input, ready, failed, suppressed. "
+ "Valid values: potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed. "
"Defaults to all statuses except suppressed."
),
),
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index aec9cd9872d8..94dc210fb622 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -1257,7 +1257,7 @@ export type SignalsReportsListParams = {
*/
source_product?: string
/**
- * Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, failed, suppressed. Defaults to all statuses except suppressed.
+ * Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed. Defaults to all statuses except suppressed.
*/
status?: string
/**
diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yaml
index 8563e98292ff..d3947a1c79ec 100644
--- a/products/signals/mcp/tools.yaml
+++ b/products/signals/mcp/tools.yaml
@@ -33,10 +33,10 @@ tools:
description: >
List signal reports for the current project. A signal report is a cluster of related observations (signals)
that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering
- by status (potential, candidate, in_progress, pending_input, ready, failed, suppressed), free-text search
- across title and summary, source_product (e.g. error_tracking, session_replay), and suggested_reviewers
- (PostHog user UUIDs). Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by
- default.
+ by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text
+ search across title and summary, source_product (e.g. error_tracking, session_replay), and
+ suggested_reviewers (PostHog user UUIDs). Results are paginated and ordered by
+ '-is_suggested_reviewer,status,-updated_at' by default.
response:
include:
- id
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 52242e575978..931bffb552de 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -2977,7 +2977,7 @@
"feature_flag": "heatmaps-mcp"
},
"inbox-reports-list": {
- "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), and suggested_reviewers (PostHog user UUIDs). Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default.",
+ "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), and suggested_reviewers (PostHog user UUIDs). Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default.",
"category": "Signals",
"feature": "signals",
"summary": "List signal reports",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 18178d11b8ea..e6704430b4b4 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -3231,7 +3231,7 @@
"feature_flag": "heatmaps-mcp"
},
"inbox-reports-list": {
- "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), and suggested_reviewers (PostHog user UUIDs). Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default.",
+ "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), and suggested_reviewers (PostHog user UUIDs). Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default.",
"category": "Signals",
"feature": "signals",
"summary": "List signal reports",
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 12a823643e47..b6836965a3bd 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -54346,7 +54346,7 @@ export namespace Schemas {
*/
source_product?: string;
/**
- * Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, failed, suppressed. Defaults to all statuses except suppressed.
+ * Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed. Defaults to all statuses except suppressed.
*/
status?: string;
/**
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 37faec04c2de..b970e19c00ab 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -42,7 +42,7 @@ export const SignalsReportsListQueryParams = /* @__PURE__ */ zod.object({
.string()
.optional()
.describe(
- 'Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, failed, suppressed. Defaults to all statuses except suppressed.'
+ 'Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed. Defaults to all statuses except suppressed.'
),
suggested_reviewers: zod
.string()
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
index f7f08d2edd40..07092c4c25dd 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
@@ -26,7 +26,7 @@
"type": "string"
},
"status": {
- "description": "Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, failed, suppressed. Defaults to all statuses except suppressed.",
+ "description": "Comma-separated list of statuses to include. Valid values: potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed. Defaults to all statuses except suppressed.",
"type": "string"
},
"suggested_reviewers": {