:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): add manual monitoring controls (#122301)
Mikayla Thompson4643391fa660
diff --git a/docs/internal/signals-pr-lifecycle.md b/docs/internal/signals-pr-lifecycle.mdindex 829e80e79e99..f0e62495f970 100644--- a/docs/internal/signals-pr-lifecycle.md+++ b/docs/internal/signals-pr-lifecycle.md@@ -14,9 +14,9 @@ Monitoring means implementation is complete and outcome verification is pending.A Monitoring period begins with an explicit, timezone-aware implementation-complete timestamp supplied by the server. Merge-driven entry can use the linked PR's recorded `merged_at`, even when its webhook arrives later. The lifecycle never substitutes receipt time for a missing implementation timestamp. Repeated entry preserves the original period; archive and restore preserve it too. Reopening implementation clears the start so a later implementation creates a new period. Resolving after verification keeps the implementation timestamp for history.-The backend `complete_implementation` service records a durable attempt and freezes this report's pending or active, unexpired check IDs and authored-definition versions in the same transaction as Monitoring entry. Kind, approval, missing configuration, and missing or zero soak do not remove a check from this selection. Stale checks receive expiry records before selection. No applicable checks, or a disabled Monitoring flag, resolve directly without a verification attempt. Carried-over checks lose their earlier evidence and dispatch claims while keeping their remaining runs. Duplicate completion and archive/restore retain the snapshot; reopening creates a new attempt when implementation completes again. Existing state APIs and PR-merge handlers do not call this service yet.+The backend `complete_implementation` service records a durable attempt and freezes this report's pending or active, unexpired check IDs and authored-definition versions in the same transaction as Monitoring entry. Kind, approval, missing configuration, and missing or zero soak do not remove a check from this selection. Stale checks receive expiry records before selection. No applicable checks, or a disabled Monitoring flag, resolve directly without a verification attempt. Carried-over checks lose their earlier evidence and dispatch claims while keeping their remaining runs. Duplicate completion and archive/restore retain the snapshot; reopening creates a new attempt when implementation completes again. The single and bulk state APIs share this service. PR-merge handlers still resolve directly.-Monitoring keeps the researched report available for verification and new matching signals, without starting another implementation. Enabled responses expose the server-owned start time, and implementation work is done while the report itself remains unfinished. A Monitoring child keeps its parent plan open, and child rollups cannot finish a Monitoring parent. The single and bulk state APIs still accept only suppressed, potential, and resolved targets; neither manual entry controls nor automatic PR-merge entry are available.+Monitoring keeps the researched report available for verification and new matching signals, without starting another implementation. Enabled responses expose the server-owned start time, and implementation work is done while the report itself remains unfinished. A Monitoring child keeps its parent plan open, and child rollups cannot finish a Monitoring parent. The single and bulk state APIs accept the Monitoring target. Start monitoring appears after follow-up checks load and at least one exists; the service decides whether any remain applicable when the request runs. Existing Monitoring reports can be finished manually, reopened, or archived. Manual completion records caller attribution and explicitly states that automatic verification and an evidence amendment were not performed. PR merges continue to resolve reports.Disabled organizations treat stored Monitoring reports as Resolved across reads, filters, counts, sorting, actions, recurrence handling, work state, plan rollups, and background checks. Responses omit the Monitoring start field and the inbox offers no Monitoring controls. Monitoring entry is refused. Restoring a report archived from Monitoring returns it to Resolved while disabled. Reads preserve the stored status.@@ -44,6 +44,14 @@ A `part_of` link written on a step that already closed runs the check as well, bIt continues up a plan of plans, and skips a plan that is waiting on a replacement.It also skips a plan that carries its own open, draft, or unknown PR, because that plan's own work decides its status.+## Manual implementation-completion integration++Manual entry calls `complete_implementation` from `SignalReportViewSet._transition_report_state`, shared by single and bulk writes, after the report is locked and refund and merge-survivor restrictions have passed. The service receives the literal `team_id`, `report_id`, server-owned `monitoring_started_at`, caller `attribution`, `actor_user`, and `close_pr_on_resolve=True`. The outer report lock uses `select_for_update(no_key=True)` so concurrent check activity can write its report foreign key. Both APIs refresh the caller's report after the service saves its separately loaded instance and return the resulting status.++The service records stale expiries before selecting this report's pending or active, unexpired checks, independently of kind and approval. Historical terminal checks, standalone metrics, and related reports' checks do not qualify. No applicable checks resolve directly without a verified-success claim. Applicable checks enter Monitoring with the current attempt's durable membership and version snapshot. Missing Monitoring configuration or soak blocks verification; zero soak is valid. Carried-over active checks require fresh evidence.++Archive and restore preserve the attempt and original start, including expiry recovery and saved interim observations. Reopening implementation clears the period; completing implementation again creates a fresh attempt. Disabled or unavailable evaluations refuse new manual entry and use the existing Resolved fallback. Final evaluation, automatic completion, amendments, and PR-merge entry remain separate work.+## Follow-up checksScout and research guidance asks for a verified live observation metric when a central quantitative claim comes from events.@@ -72,6 +80,10 @@ Protected research runs require analytics access before a person can resume or w## Monitoring metric definitions+The report detail action is **Start monitoring**, with the tooltip “PostHog watches to make sure the fix works”. It is hidden until follow-up checks have loaded and when none are set. The implementation-completion service remains responsible for selecting applicable checks and deciding whether entry creates a Monitoring attempt or resolves directly.++**Resolve** on a Monitoring report resolves it manually and cancels its remaining pending and active follow-up checks in the same transaction. Historical terminal checks and other reports' checks are preserved. Results already in flight cannot revive canceled checks. Its reasons are **Verified manually**, **No action needed**, **Was already fixed before this report**, and **Something else…**. The `verified_manually` reason is separate from `fixed_outside_posthog`, requires an enabled Monitoring period, and is preserved with caller attribution. A separate attributed log entry records that automatic verification and an evidence amendment were not performed, preserving the full 4,000-character limit for the user's feedback note.+Open checks on Monitoring reports expose a server-derived `monitoring_timing` field when `signals-report-monitoring` is enabled. The field separates a scheduled or due interim measurement from the end of that check's soak window, and identifies paused, archived, unarmed, expired, or incomplete timing. It is omitted for other checks and when the flag is disabled or unavailable. Timing reads do not arm checks, change their schedules, or decide outcomes.The Follow-up checks rail and Expected impact details show the next interim measurement separately from the check's observation-window end. A closed window reads as awaiting verification, without advertising its deadline as another run. Interim measurements do not spend remaining verification runs. Agent checks and metric checks without a Monitoring definition remain paused during Monitoring. Final evaluation and automatic report completion remain separate work.diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex cc3c71898c07..c55915ccaeb3 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -11621,9 +11621,9 @@ snapshots:scenes-app-inbox-agent-steering--empty--light:hash: v1.k794b7964.8adf1aa893baffeccf09c959ceb43997a3d0dd7b802f915f683721bb3178811c.yiCitLDCxycb1PBAgQTZ4xqjtSr02cPmmNj0VOb8bu8scenes-app-inbox-badges--all-badges--dark:- hash: v1.k794b7964.53905d82a430d879b42b90781915bc47ada17d1634f6145b5b141d0e6e6204bc.oEkMuoSWfz-n8QLBO2OpyTDUxhKzVOi9Tvb0erHRKi8+ hash: v1.k794b7964.af6738a012eb72f4b04fd8cf8b4d261890dbd7e648ccb07faeb60bdcccafda08.EsSExwgbanifoakADPew_MY6G2Rc-EXXw-8tw5XSai4scenes-app-inbox-badges--all-badges--light:- hash: v1.k794b7964.8f8b7a732548437aa428fd82a69d073a2f4024848b5a770881530a68b98125ed.9JUpBWsRhQtAmOwnqlJhPbBL6oR4K2-b9pDd646bmWc+ hash: v1.k794b7964.d061576c8c9fc51bf45a3634c11e927d69e7e2735283cf0c80d33b74fc6dbbdc._NV0FtnOe4QLvFAhZxiQsA3pmnSEkZmNTgd5U-gSyl4scenes-app-inbox-cards--agent-run-cards--dark:hash: v1.k794b7964.7cc4dbc1b4a83c8bf268f09c3d00e8b7603c512cdd0c3cc0d75f4b981e5dc5ab.wTpmY_L9kXga6yhoZsATY70EN3UhqZAs-YdxGBCZBWQscenes-app-inbox-cards--agent-run-cards--light:diff --git a/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts b/packages/agent/packages/agent-contracts/src/dismissal-reasons.tsindex 4fa948e2c9f9..336ce73b86f7 100644--- a/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts+++ b/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts@@ -48,6 +48,7 @@ export type ResolveReasonOptionValue =export type ReportStateReason =| DismissalReasonOptionValue| ResolveReasonOptionValue+ | "verified_manually"| "pr_merged";/** Whether the given reason snoozes the report (temporarily) instead of permanently dismissing it. */@@ -71,6 +72,7 @@ export function dismissalReasonLabel(value: string): string {return (DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)?.label ??RESOLVE_REASON_OPTIONS.find((o) => o.value === value)?.label ??+ (value === "verified_manually" ? "Verified manually" : undefined) ??(value === "pr_merged" ? "PR already merged" : value));}diff --git a/products/signals/backend/test/test_report_check_concurrency.py b/products/signals/backend/test/test_report_check_concurrency.pyindex 604fbb1c1f71..fd0076491dcf 100644--- a/products/signals/backend/test/test_report_check_concurrency.py+++ b/products/signals/backend/test/test_report_check_concurrency.py@@ -12,6 +12,7 @@ from django.db import connection, transactionfrom django.utils import timezonefrom parameterized import parameterized+from rest_framework.test import APIClientfrom products.signals.backend.artefact_attribution import ArtefactAttributionfrom products.signals.backend.artefact_schemas import CheckObservation@@ -22,7 +23,12 @@ from products.signals.backend.models import (SignalReportMonitoringAttempt,)from products.signals.backend.report_check_authoring import cancel_check-from products.signals.backend.report_check_execution import expire_overdue_checks, run_due_report_checks+from products.signals.backend.report_check_evaluation import CheckVerdict+from products.signals.backend.report_check_execution import (+ expire_overdue_checks,+ record_check_verdict,+ run_due_report_checks,+)from products.signals.backend.report_check_monitoring import MONITORING_ERROR_RETRY_AFTER, record_monitoring_observationfrom products.signals.backend.report_checks import MAX_CHECK_HORIZONfrom products.signals.backend.report_monitoring_attempts import complete_implementation@@ -82,6 +88,52 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):returnself.fail("The competing write did not wait for the holder transaction")+ @parameterized.expand([(False,), (True,)])+ def test_stopping_monitoring_rejects_a_verdict_waiting_for_the_report_lock(self, bulk: bool) -> None:+ now = timezone.now()+ self.report.status = SignalReport.Status.MONITORING+ self.report.monitoring_started_at = now - timedelta(days=1)+ self.report.save(update_fields=["status", "monitoring_started_at"])+ self.check.expires_at = now + timedelta(days=30)+ self.check.save(update_fields=["expires_at"])+ client = APIClient()+ client.force_authenticate(self.user)+ url = (+ f"/api/projects/{self.team.id}/signals/reports/bulk-state/"+ if bulk+ else f"/api/projects/{self.team.id}/signals/reports/{self.report.id}/state/"+ )+ with (+ patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True),+ ThreadPoolExecutor(max_workers=1) as executor,+ ):+ with transaction.atomic():+ SignalReport.objects.select_for_update().get(id=self.report.id, team_id=self.team.id)+ future = self._start_write(+ executor,+ lambda: record_check_verdict(+ self.check, CheckVerdict(outcome="passed", explanation="Late query result", observed_value=1)+ ),+ )+ self._assert_write_waits(future)+ response = client.post(+ url,+ {+ "state": "resolved",+ "dismissal_reason": "verified_manually",+ **({"ids": [str(self.report.id)]} if bulk else {}),+ },+ format="json",+ )+ assert response.status_code == 200, response.json()+ future.result(timeout=10)+ self.report.refresh_from_db()+ self.check.refresh_from_db()+ assert self.report.status == SignalReport.Status.RESOLVED+ assert self.check.status == SignalReportCheck.Status.CANCELLED+ assert self.check.last_outcome is None+ assert not SignalReportArtefact.objects.filter(report=self.report, type="check_result").exists()+@parameterized.expand([("cancelled",), ("extended",)])def test_expiry_sweep_preserves_a_concurrent_change(self, change: str) -> None:now = timezone.now()@@ -110,12 +162,37 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):team_id=self.team.id, report=self.report, type=SignalReportArtefact.ArtefactType.CHECK_EXPIRED).exists()- @parameterized.expand([("cancelled",), ("expired",)])- def test_monitoring_entry_rechecks_eligibility_after_a_lock_wait(self, outcome: str) -> None:+ @parameterized.expand(+ [(outcome, entry) for outcome in ("cancelled", "expired") for entry in ("service", "single", "bulk")]+ )+ def test_monitoring_entry_rechecks_eligibility_after_a_lock_wait(self, outcome: str, entry: str) -> None:now = timezone.now()SignalReport.objects.filter(id=self.report.id, team_id=self.team.id).update(status=SignalReport.Status.READY)checks = SignalReportCheck.objects.for_team(self.team.id).filter(id=self.check.id)checks.update(expires_at=now + timedelta(days=1))++ def enter_monitoring() -> object:+ if entry == "service":+ return complete_implementation(+ team_id=self.team.id, report_id=self.report.id, monitoring_started_at=now+ )+ client = APIClient()+ client.force_authenticate(self.user)+ url = (+ f"/api/projects/{self.team.id}/signals/reports/bulk-state/"+ if entry == "bulk"+ else f"/api/projects/{self.team.id}/signals/reports/{self.report.id}/state/"+ )+ response = client.post(+ url,+ {"state": "monitoring", **({"ids": [str(self.report.id)]} if entry == "bulk" else {})},+ format="json",+ )+ assert response.status_code == 200, response.json()+ result = response.json()["results"][0] if entry == "bulk" else response.json()+ assert result["status"] == SignalReport.Status.RESOLVED+ return None+with (patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True),ThreadPoolExecutor(max_workers=1) as executor,@@ -123,12 +200,7 @@ class TestReportCheckConcurrency(NonAtomicBaseTest):):with transaction.atomic():checks.select_for_update().get()- future = self._start_write(- executor,- lambda: complete_implementation(- team_id=self.team.id, report_id=self.report.id, monitoring_started_at=now- ),- )+ future = self._start_write(executor, enter_monitoring)self._assert_write_waits(future)if outcome == "cancelled":assert cancel_check(diff --git a/products/signals/backend/test/test_signal_report_api.py b/products/signals/backend/test/test_signal_report_api.pyindex 6bd396b2f27b..0d45f8defb46 100644--- a/products/signals/backend/test/test_signal_report_api.py+++ b/products/signals/backend/test/test_signal_report_api.py@@ -64,6 +64,7 @@ from products.signals.backend.models import (SignalReport,SignalReportArtefact,SignalReportAssignment,+ SignalReportCheck,SignalReportPullRequest,SignalReportTask,SignalScoutConfig,@@ -74,6 +75,7 @@ from products.signals.backend.models import (from products.signals.backend.report_assignments import create_claimfrom products.signals.backend.report_claims import get_active_claimfrom products.signals.backend.report_merge import MERGE_DISMISSAL_REASON+from products.signals.backend.report_monitoring_attempts import current_monitoring_attemptfrom products.signals.backend.signal_metadata import REASSIGN_SIGNAL_ROW_CAP, ReportSignalMetafrom products.signals.backend.task_run_artefacts import (TASK_RUN_TYPE_IMPLEMENTATION,@@ -1324,6 +1326,16 @@ class TestSignalReportListAPI(APIBaseTest):return distinct_id == str(other_organization.id)with patch("products.signals.backend.report_content_gates.feature_enabled_or_false", side_effect=evaluate):+ entered = self.client.post(+ f"/api/projects/{other_team.id}/signals/reports/{other_monitoring.id}/state/",+ {"state": "monitoring"},+ )+ assert entered.status_code == status.HTTP_200_OK, entered.json()+ rejected = self.client.post(+ f"/api/projects/{self.team.id}/signals/reports/{monitoring.id}/state/",+ {"state": "monitoring"},+ )+ assert rejected.status_code == status.HTTP_409_CONFLICTdisabled = self.client.get(self._list_url(status="resolved"))enabled = self.client.get(f"/api/projects/{other_team.id}/signals/reports/?status=resolved")enabled_detail = self.client.get(f"/api/projects/{other_team.id}/signals/reports/{other_monitoring.id}/")@@ -2961,14 +2973,214 @@ class TestAssociatedTaskRunsForReports(APIBaseTest):class TestSignalReportSuppressionAPI(APIBaseTest):+ @parameterized.expand(+ [+ (f"{bulk}_{case}", bulk, case)+ for bulk in (False, True)+ for case in ("none", "terminal", "expired", "agent", "metric", "mixed", "child_agent")+ ]+ )+ def test_manual_completion_uses_attempt_service(self, _name: str, bulk: bool, case: str) -> None:+ team = (+ Team.objects.create(organization=self.organization, parent_team=self.team, name="Verification environment")+ if case == "child_agent"+ else self.team+ )+ report = SignalReport.objects.create(team=team, status=SignalReport.Status.READY, title="Verify the fix")+ check = None+ if case != "none":+ check = SignalReportCheck.objects.for_team(team.id).create(+ team_id=team.id,+ report=report,+ title="Outcome remains healthy",+ kind=SignalReportCheck.Kind.METRIC_THRESHOLD if case == "metric" else SignalReportCheck.Kind.AGENT,+ config={},+ soak_minutes=0 if case == "agent" else None,+ status=SignalReportCheck.Status.PASSED if case == "terminal" else SignalReportCheck.Status.ACTIVE,+ next_run_at=timezone.now(),+ expires_at=timezone.now() + timedelta(days=-1 if case == "expired" else 30),+ last_outcome="pass",+ measurement_start_at=timezone.now() - timedelta(days=3),+ )+ applicable_ids = {str(check.id)} if check is not None else set()+ if case == "mixed":+ metric = SignalReportCheck.objects.for_team(team.id).create(+ team_id=team.id,+ report=report,+ title="Measure the fix",+ next_run_at=timezone.now(),+ kind=SignalReportCheck.Kind.METRIC_THRESHOLD,+ config={},+ soak_minutes=None,+ status=SignalReportCheck.Status.PENDING,+ expires_at=timezone.now() + timedelta(days=30),+ )+ applicable_ids.add(str(metric.id))+ url = (+ f"/api/projects/{team.id}/signals/reports/bulk-state/"+ if bulk+ else f"/api/projects/{team.id}/signals/reports/{report.id}/state/"+ )+ body = {"state": "monitoring", **({"ids": [str(report.id)]} if bulk else {})}+ with patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True):+ response = self.client.post(url, body, format="json")+ assert response.status_code == status.HTTP_200_OK, response.json()+ report.refresh_from_db()+ expected_status = (+ SignalReport.Status.MONITORING+ if case in {"agent", "metric", "mixed", "child_agent"}+ else SignalReport.Status.RESOLVED+ )+ result = response.json()["results"][0] if bulk else response.json()+ assert result["status"] == expected_status+ if bulk:+ assert result["outcome"] == "transitioned"+ attempt = current_monitoring_attempt(report)+ if case in {"agent", "metric", "mixed", "child_agent"}:+ assert report.status == SignalReport.Status.MONITORING+ assert attempt is not None and check is not None+ assert set(attempt.check_versions) == applicable_ids+ assert attempt.team_id == team.id+ check.refresh_from_db()+ assert check.last_outcome is None+ assert check.measurement_start_at is None+ assert self.client.post(url, body, format="json").status_code == status.HTTP_200_OK+ repeated_attempt = current_monitoring_attempt(report)+ assert repeated_attempt is not None and repeated_attempt.id == attempt.id+ for target in ("suppressed", "potential"):+ assert (+ self.client.post(url, {**body, "state": target}, format="json").status_code+ == status.HTTP_200_OK+ )+ report.refresh_from_db()+ restored_attempt = current_monitoring_attempt(report)+ assert restored_attempt is not None and restored_attempt.id == attempt.id+ assert report.monitoring_started_at == attempt.monitoring_started_at+ assert (+ self.client.post(url, {**body, "state": "potential"}, format="json").status_code+ == status.HTTP_200_OK+ )+ report.refresh_from_db()+ assert current_monitoring_attempt(report) is None+ report.status = SignalReport.Status.READY+ report.save(update_fields=["status"])+ assert self.client.post(url, body, format="json").status_code == status.HTTP_200_OK+ report.refresh_from_db()+ reopened_attempt = current_monitoring_attempt(report)+ assert reopened_attempt is not None and reopened_attempt.id != attempt.id+ else:+ assert report.status == SignalReport.Status.RESOLVED+ assert attempt is None+ assert report.monitoring_started_at is None+ if case == "expired":+ assert check is not None+ check.refresh_from_db()+ assert check.status == SignalReportCheck.Status.EXPIRED++ @parameterized.expand(+ [+ (bulk, reason, 0)+ for bulk in (False, True)+ for reason in (None, "verified_manually", "no_action_needed", "already_fixed", "other")+ ]+ + [(bulk, "verified_manually", note_length) for bulk in (False, True) for note_length in (4000, 4001)]+ )+ def test_manual_monitoring_preserves_period_and_records_completion(+ self, bulk: bool, reason: str | None, note_length: int+ ) -> None:+ report = self._create_report()+ with patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True):+ report.save(+ update_fields=report.transition_to(SignalReport.Status.MONITORING, monitoring_started_at=timezone.now())+ )+ original_start = report.monitoring_started_at+ for target in ("monitoring", "suppressed", "potential"):+ response = self.client.post(self._state_url(str(report.id)), {"state": target})+ assert response.status_code == status.HTTP_200_OK, response.json()+ report.refresh_from_db()+ assert report.status == SignalReport.Status.MONITORING+ assert report.monitoring_started_at == original_start+ checks = [+ SignalReportCheck.objects.for_team(self.team.id).create(+ team_id=self.team.id,+ report=report,+ title="Check the synthetic fix",+ kind=kind,+ status=check_status,+ config={},+ expires_at=timezone.now() + timedelta(days=30),+ next_run_at=timezone.now() + timedelta(hours=6),+ )+ for kind, check_status in [+ (SignalReportCheck.Kind.AGENT, SignalReportCheck.Status.PENDING),+ (SignalReportCheck.Kind.METRIC_THRESHOLD, SignalReportCheck.Status.ACTIVE),+ (SignalReportCheck.Kind.AGENT, SignalReportCheck.Status.PASSED),+ ]+ ]+ url = (+ f"/api/projects/{self.team.id}/signals/reports/bulk-state/" if bulk else self._state_url(str(report.id))+ )+ body = {+ "state": "resolved",+ **({"ids": [str(report.id)]} if bulk else {}),+ **({"dismissal_reason": reason} if reason else {}),+ **({"dismissal_note": "x" * note_length} if note_length else {}),+ }+ finished = self.client.post(url, body, format="json")+ if note_length > 4000:+ assert finished.status_code == status.HTTP_400_BAD_REQUEST, finished.json()+ report.refresh_from_db()+ assert report.status == SignalReport.Status.MONITORING+ for check in checks:+ check.refresh_from_db()+ assert [check.status for check in checks] == [+ SignalReportCheck.Status.PENDING,+ SignalReportCheck.Status.ACTIVE,+ SignalReportCheck.Status.PASSED,+ ]+ assert not SignalReportArtefact.objects.filter(+ report=report, type__in=["note", "check_cancelled"]+ ).exists()+ assert SignalReportArtefact.objects.filter(report=report, type="dismissal").count() == 1+ return+ assert finished.status_code == status.HTTP_200_OK, finished.json()+ report.refresh_from_db()+ assert report.status == SignalReport.Status.RESOLVED+ assert report.monitoring_started_at == original_start+ feedback = SignalReportArtefact.objects.filter(report=report, type="dismissal").latest("created_at")+ content = json.loads(feedback.content)+ assert content["state"] == "resolved"+ assert content["reason"] == reason+ assert content["note"] == ("x" * note_length if note_length else None)+ for check in checks:+ check.refresh_from_db()+ assert [check.status for check in checks] == [+ SignalReportCheck.Status.CANCELLED,+ SignalReportCheck.Status.CANCELLED,+ SignalReportCheck.Status.PASSED,+ ]+ cancellations = SignalReportArtefact.objects.filter(report=report, type="check_cancelled")+ assert cancellations.count() == 2+ assert set(cancellations.values_list("created_by_id", flat=True)) == {self.user.id}+ assert content["user_id"] == self.user.id+ assert feedback.created_by_id == self.user.id+ annotation = SignalReportArtefact.objects.get(report=report, type="note")+ assert annotation.created_by_id == self.user.id+ assert (+ json.loads(annotation.content)["note"]+ == "Monitoring stopped manually. Automatic verification and an evidence amendment were not performed."+ )+ assert self.client.post(url, body, format="json").status_code == status.HTTP_200_OK+ assert SignalReportArtefact.objects.filter(report=report, type="dismissal").count() == (3 if reason else 2)+ assert cancellations.count() == 2+ assert SignalReportArtefact.objects.filter(report=report, type="note").count() == 1+@parameterized.expand([("disabled", False), ("unavailable", RuntimeError("flag service unavailable"))])def test_monitoring_entry_fails_closed_and_existing_rows_use_resolved_actions(self, _name: str, flag_result: bool | Exception) -> None:report = self._create_report()with patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True):- rejected = self.client.post(self._state_url(str(report.id)), {"state": "monitoring"})- assert rejected.status_code == status.HTTP_400_BAD_REQUESTreport.save(update_fields=report.transition_to(SignalReport.Status.MONITORING, monitoring_started_at=timezone.now()))@@ -2980,7 +3192,11 @@ class TestSignalReportSuppressionAPI(APIBaseTest):side_effect=flag_result if isinstance(flag_result, Exception) else None,):rejected = self.client.post(self._state_url(str(report.id)), {"state": "monitoring"})- assert rejected.status_code == status.HTTP_400_BAD_REQUEST+ assert rejected.status_code == status.HTTP_409_CONFLICT+ verification = self.client.post(+ self._state_url(str(report.id)), {"state": "resolved", "dismissal_reason": "verified_manually"}+ )+ assert verification.status_code == status.HTTP_409_CONFLICTrepeated = self.client.post(self._state_url(str(report.id)), {"state": "resolved"})assert repeated.status_code == status.HTTP_200_OKassert repeated.json()["status"] == "resolved"@@ -2998,6 +3214,45 @@ class TestSignalReportSuppressionAPI(APIBaseTest):assert report.monitoring_started_at is Noneassert original_start is not None+ def test_manual_verification_skips_reports_without_a_monitoring_period_in_bulk(self) -> None:+ monitoring = self._create_report()+ ready = self._create_report()+ unrelated_check = SignalReportCheck.objects.for_team(self.team.id).create(+ team_id=self.team.id,+ report=ready,+ title="Keep another report's check",+ kind=SignalReportCheck.Kind.AGENT,+ status=SignalReportCheck.Status.PENDING,+ config={},+ expires_at=timezone.now() + timedelta(days=30),+ next_run_at=timezone.now() + timedelta(hours=6),+ )+ with patch("products.signals.backend.report_content_gates.feature_enabled_or_false", return_value=True):+ monitoring.save(+ update_fields=monitoring.transition_to(+ SignalReport.Status.MONITORING, monitoring_started_at=timezone.now()+ )+ )+ response = self.client.post(+ f"/api/projects/{self.team.id}/signals/reports/bulk-state/",+ {+ "ids": [str(monitoring.id), str(ready.id)],+ "state": "resolved",+ "dismissal_reason": "verified_manually",+ },+ format="json",+ )+ assert response.status_code == status.HTTP_200_OK, response.json()+ assert {row["id"]: row["outcome"] for row in response.json()["results"]} == {+ str(monitoring.id): "transitioned",+ str(ready.id): "skipped",+ }+ ready.refresh_from_db()+ unrelated_check.refresh_from_db()+ assert ready.status == SignalReport.Status.READY+ assert unrelated_check.status == SignalReportCheck.Status.PENDING+ assert not SignalReportArtefact.objects.filter(report=ready, type="dismissal").exists()+def _state_url(self, report_id: str) -> str:return f"/api/projects/{self.team.id}/signals/reports/{report_id}/state/"@@ -3920,7 +4175,7 @@ class TestSignalReportMergeAPI(APIBaseTest):@parameterized.expand([(f"{target}_{bulk}_{dismiss_again}", target, bulk, dismiss_again)- for target in ["potential", "resolved"]+ for target in ["potential", "resolved", "monitoring"]for bulk in [False, True]for dismiss_again in [False, True]]@@ -4110,6 +4365,38 @@ class TestAvailableReviewersAPI(APIBaseTest):class TestSignalReportBulkStateAPI(APIBaseTest):+ @parameterized.expand(+ [("enabled", True), ("disabled", False), ("unavailable", RuntimeError("flag service unavailable"))]+ )+ def test_bulk_monitoring_respects_the_gate_and_individual_transition_guards(+ self, _name: str, flag_result: bool | Exception+ ) -> None:+ ready = self._create_report()+ researching = self._create_report(report_status=SignalReport.Status.IN_PROGRESS)+ with patch(+ "products.signals.backend.report_content_gates.feature_enabled_or_false",+ return_value=flag_result if isinstance(flag_result, bool) else False,+ side_effect=flag_result if isinstance(flag_result, Exception) else None,+ ):+ single = self.client.post(+ f"/api/projects/{self.team.id}/signals/reports/{ready.id}/state/", {"state": "monitoring"}+ )+ assert single.status_code == (status.HTTP_200_OK if flag_result is True else status.HTTP_409_CONFLICT), (+ single.json()+ )+ response = self.client.post(+ self._bulk_url(), {"ids": [str(ready.id), str(researching.id)], "state": "monitoring"}, format="json"+ )+ assert response.status_code == status.HTTP_200_OK, response.json()+ assert [row["outcome"] for row in response.json()["results"]] == [+ "transitioned" if flag_result is True else "skipped",+ "skipped",+ ]+ ready.refresh_from_db()+ researching.refresh_from_db()+ assert ready.status == (SignalReport.Status.RESOLVED if flag_result is True else SignalReport.Status.READY)+ assert researching.status == SignalReport.Status.IN_PROGRESS+def _bulk_url(self) -> str:return f"/api/projects/{self.team.id}/signals/reports/bulk-state/"@@ -4270,7 +4557,6 @@ class TestSignalReportBulkStateAPI(APIBaseTest):{"ids": ["00000000-0000-0000-0000-000000000001"], "state": "suppressed", "dismissal_reason": "made_up"},),("invalid_state", {"ids": ["00000000-0000-0000-0000-000000000001"], "state": "ready"}),- ("monitoring_not_available", {"ids": ["00000000-0000-0000-0000-000000000001"], "state": "monitoring"}),("non_uuid_id", {"ids": ["not-a-uuid"], "state": "suppressed"}),])diff --git a/products/signals/backend/views.py b/products/signals/backend/views.pyindex 5f876840a466..60804c3306b4 100644--- a/products/signals/backend/views.py+++ b/products/signals/backend/views.py@@ -93,6 +93,7 @@ from products.signals.backend.artefact_schemas import (ArtefactContentValidationError,ChannelAssignment,Dismissal,+ NoteArtefact,RelevantCommit,ReviewerEdit,ReviewerProposal,@@ -204,6 +205,7 @@ from products.signals.backend.report_merge import ()from products.signals.backend.report_metric_access import ReportMetricAccessPolicyfrom products.signals.backend.report_metric_refresh import CURRENT_REPORT_STATUSES, refresh_report_metric_snapshots+from products.signals.backend.report_monitoring_attempts import complete_implementationfrom products.signals.backend.report_plan import report_planfrom products.signals.backend.report_priority import update_report_priorityfrom products.signals.backend.report_read_state import (@@ -705,6 +707,7 @@ SIGNAL_REPORT_DISMISSAL_REASON_CHOICES = [("wontfix_intentional", "Won't fix - intentional behavior"),("wontfix_irrelevant", "Not relevant to this project"),("fixed_outside_posthog", "Fixed outside PostHog"),+ ("verified_manually", "Verified manually"),("no_action_needed", "No action needed"),("pr_merged", "PR was merged"),("other", "Something else…"),@@ -713,7 +716,7 @@ SIGNAL_REPORT_DISMISSAL_REASON_CHOICES = [_DISMISSAL_REASON_HELP_TEXT = ("Optional canonical reason code recorded with the transition. Must be one of: already_fixed, ""report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, "- "fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a "+ "fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a ""labelled chip rather than a raw code. When the work this report asked for is done, the honest ""transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), ""'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), "@@ -727,6 +730,9 @@ _DISMISSAL_REASON_HELP_TEXT = ("'wrong_assignee' when the report was routed to the wrong person or team. ""'wrong_repo' when the agent picked the wrong repository for this report, ideally with ""corrected_repository naming the right one. "+ "Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. "+ "It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic "+ "verification result or evidence amendment. ""Use 'other' together with a dismissal_note for anything that doesn't fit a code.")@@ -765,6 +771,7 @@ class SignalReportState(models.TextChoices):SUPPRESSED = "suppressed", "suppressed"POTENTIAL = "potential", "potential"RESOLVED = "resolved", "resolved"+ MONITORING = "monitoring", "monitoring"class SignalReportStateRequestSerializer(serializers.Serializer):@@ -772,11 +779,15 @@ class SignalReportStateRequestSerializer(serializers.Serializer):choices=SignalReportState.choices,help_text=("Target state for the report. Use 'suppressed' to dismiss the report from the inbox, "- "'potential' to snooze/reopen it for later review, or 'resolved' when the work this report "- "asked for has been done. Resolving is allowed from ready, pending_input, or failed, "+ "'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. "+ "Resolving is allowed from ready, pending_input, failed, or monitoring, ""or from a suppressed report that previously held one of those statuses or resolved. ""Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). "- "Dismissing or resolving closes the report's open implementation PR, if it has one."+ "Dismissing or resolving closes the report's open implementation PR, if it has one. "+ "Use 'monitoring' when implementation is complete and outcome verification is pending. "+ "Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. "+ "Without applicable checks the report resolves directly. Manual completion records caller "+ "attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment."),)dismissal_reason = serializers.ChoiceField(@@ -825,6 +836,8 @@ class SignalReportStateRequestSerializer(serializers.Serializer):return valuedef validate(self, attrs: dict) -> dict:+ if attrs.get("dismissal_reason") == "verified_manually" and attrs.get("state") != SignalReportState.RESOLVED:+ raise serializers.ValidationError({"dismissal_reason": "Verified manually requires state 'resolved'."})if attrs.get("dismissal_reason") == "no_action_needed" and attrs.get("state") != SignalReportState.RESOLVED:raise serializers.ValidationError({"dismissal_reason": "No action needed requires state 'resolved'."})if (@@ -3645,6 +3658,8 @@ class SignalReportViewSet(`_apply_wrong_repo_selection`."""target_status = SignalReport.Status(target)+ if target_status == SignalReport.Status.MONITORING and not self._report_monitoring_enabled:+ return SignalReportBulkStateOutcome.SKIPPED, "Monitoring is unavailable for this organization."with transaction.atomic():# Lock the report row for the whole guard + transition so it serializes with the refund@@ -3652,8 +3667,26 @@ class SignalReportViewSet(# lock: a resolve/restore that raced a refund must observe the refund's SUPPRESSED status# and refund row and refuse, instead of overwriting the suppression and re-opening# already-refunded work.- if SignalReport.objects.select_for_update().filter(id=report.id, team_id=self.team.id).first() is not None:+ if (+ SignalReport.objects.select_for_update(no_key=True).filter(id=report.id, team_id=self.team.id).first()+ is not None+ ):report.refresh_from_db()+ if dismissal_reason == "verified_manually" and (+ not self._report_monitoring_enabled+ or report.monitoring_started_at is None+ or not (+ report.status in {SignalReport.Status.MONITORING, SignalReport.Status.RESOLVED}+ or (+ report.status == SignalReport.Status.SUPPRESSED+ and report.status_before_suppression == SignalReport.Status.MONITORING+ )+ )+ ):+ return (+ SignalReportBulkStateOutcome.SKIPPED,+ "Manual verification requires an enabled Monitoring period.",+ )is_refunded = SignalReportRefund.objects.filter(report_id=report.id).exists()# Refund guard: a refunded report can never be billed again (see billing.py), so putting@@ -3720,6 +3753,21 @@ class SignalReportViewSet()effective_target = report.restore_target_status()+ if target_status == SignalReport.Status.MONITORING and report.status != SignalReport.Status.MONITORING:+ try:+ complete_implementation(+ team_id=self.team.id,+ report_id=report.id,+ monitoring_started_at=timezone.now(),+ attribution=self._request_attribution(),+ actor_user=self.request.user if isinstance(self.request.user, User) else None,+ close_pr_on_resolve=True,+ )+ except (InvalidStatusTransition, ValueError):+ return SignalReportBulkStateOutcome.SKIPPED, None+ report.refresh_from_db()+ return SignalReportBulkStateOutcome.TRANSITIONED, None+effective_snooze_for = snooze_for if target == "potential" else None# A verdict the report already holds is honoured, not refused: the open detail view lags@@ -3732,8 +3780,20 @@ class SignalReportViewSet(SignalReport.Status.MONITORING,)+ stopping_monitoring = (+ target_status == SignalReport.Status.RESOLVED+ and not already_holds_verdict+ and self._report_monitoring_enabled+ and (+ report.status == SignalReport.Status.MONITORING+ or (+ report.status == SignalReport.Status.SUPPRESSED+ and report.status_before_suppression == SignalReport.Status.MONITORING+ )+ )+ )writes_dismissal_feedback = target in ("suppressed", "potential", "resolved") and bool(- dismissal_reason or dismissal_note+ dismissal_reason or dismissal_note or stopping_monitoring)feedback_state = (None@@ -3751,6 +3811,14 @@ class SignalReportViewSet(logger.warning("Invalid data when transitioning SignalReport %s: %s", report.id, e, exc_info=True)return SignalReportBulkStateOutcome.FAILED, None+ if stopping_monitoring:+ for check in (+ SignalReportCheck.objects.for_team(self.team.id)+ .filter(report_id=report.id, status__in=SignalReportCheck.OPEN_STATUSES)+ .order_by("id")+ ):+ cancel_check(check, reason="stopped_by_person", attribution=self._request_attribution())+# Tell the status-changed receiver that this transition carries caller-supplied feedback,# so the label picks up the artefact written just below. Set before the save because the# post_save receiver snapshots it there. Matters most for resolve: a resolve driven by@@ -3770,6 +3838,16 @@ class SignalReportViewSet(report.save(update_fields=updated_fields)+ if stopping_monitoring:+ SignalReportArtefact.add_log(+ team_id=self.team.id,+ report_id=str(report.id),+ content=NoteArtefact(+ note="Monitoring stopped manually. Automatic verification and an evidence amendment were not performed."+ ),+ attribution=self._request_attribution(),+ )+# Persist the dismissal feedback as its own artefact so it survives status changes# and so multiple dismissals (with different rationales) can stack over time.# Captured for suppress, snooze (transition to potential), and resolve flows — on adiff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex 251b2d9353f0..9653ea7a254b 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -4287,6 +4287,7 @@ export interface ReportSignalsResponseApi {* * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved+ * * `monitoring` - monitoring*/export type SignalReportStateEnumApi = (typeof SignalReportStateEnumApi)[keyof typeof SignalReportStateEnumApi]@@ -4294,6 +4295,7 @@ export const SignalReportStateEnumApi = {Suppressed: 'suppressed',Potential: 'potential',Resolved: 'resolved',+ Monitoring: 'monitoring',} as const/**@@ -4305,6 +4307,7 @@ export const SignalReportStateEnumApi = {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else…@@ -4320,19 +4323,21 @@ export const DismissalReasonEnumApi = {WontfixIntentional: 'wontfix_intentional',WontfixIrrelevant: 'wontfix_irrelevant',FixedOutsidePosthog: 'fixed_outside_posthog',+ VerifiedManually: 'verified_manually',NoActionNeeded: 'no_action_needed',PrMerged: 'pr_merged',Other: 'other',} as constexport interface SignalReportStateRequestApi {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.** * `suppressed` - suppressed* * `potential` - potential- * * `resolved` - resolved */+ * * `resolved` - resolved+ * * `monitoring` - monitoring */state: SignalReportStateEnumApi- /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me@@ -4342,6 +4347,7 @@ export interface SignalReportStateRequestApi {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else… */@@ -4959,13 +4965,14 @@ export interface SignalReportCheckReplacementApi {}export interface SignalReportBulkStateRequestApi {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.** * `suppressed` - suppressed* * `potential` - potential- * * `resolved` - resolved */+ * * `resolved` - resolved+ * * `monitoring` - monitoring */state: SignalReportStateEnumApi- /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me@@ -4975,6 +4982,7 @@ export interface SignalReportBulkStateRequestApi {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else… */diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 4a00ee0838a5..6db3eb8d9340 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -1010,10 +1010,12 @@ export const signalsReportsStateCreateBodySnoozeForMax = 100000export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({state: zod- .enum(['suppressed', 'potential', 'resolved'])- .describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')+ .enum(['suppressed', 'potential', 'resolved', 'monitoring']).describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ '\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring'+ )+ .describe(+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring"),dismissal_reason: zod.enum([@@ -1025,16 +1027,17 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({'wontfix_intentional','wontfix_irrelevant','fixed_outside_posthog',+ 'verified_manually','no_action_needed','pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()@@ -1284,10 +1287,12 @@ export const signalsReportsBulkStateCreateBodyIdsMax = 100export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({state: zod- .enum(['suppressed', 'potential', 'resolved'])- .describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')+ .enum(['suppressed', 'potential', 'resolved', 'monitoring'])+ .describe(+ '\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring'+ ).describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring"),dismissal_reason: zod.enum([@@ -1299,16 +1304,17 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({'wontfix_intentional','wontfix_irrelevant','fixed_outside_posthog',+ 'verified_manually','no_action_needed','pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()diff --git a/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx b/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsxindex 063492eebf57..807a3d021e63 100644--- a/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx+++ b/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx@@ -30,6 +30,7 @@ export const STATUS_TOOLTIPS: Partial<Record<SignalReportStatus, string>> = {[SignalReportStatus.CANDIDATE]: 'Queued for research. An agent will pick this up shortly.',[SignalReportStatus.POTENTIAL]: 'Gathering signals. The report will be queued once enough evidence accumulates.',[SignalReportStatus.RESOLVED]: 'This report has been resolved.',+ [SignalReportStatus.MONITORING]: 'Implementation is complete. Outcome verification is pending.',[SignalReportStatus.FAILED]: 'Research failed. The report may be retried automatically.',[SignalReportStatus.SUPPRESSED]: 'This report was dismissed and is out of your inbox.',[SignalReportStatus.DELETED]: 'This report has been deleted.',@@ -42,6 +43,7 @@ export const STATUS_LABELS: Partial<Record<SignalReportStatus, string>> = {[SignalReportStatus.CANDIDATE]: 'Queued',[SignalReportStatus.POTENTIAL]: 'Gathering',[SignalReportStatus.RESOLVED]: 'Resolved',+ [SignalReportStatus.MONITORING]: 'Monitoring',[SignalReportStatus.FAILED]: 'Failed',[SignalReportStatus.SUPPRESSED]: 'Dismissed',[SignalReportStatus.DELETED]: 'Deleted',@@ -55,6 +57,7 @@ function inboxStatusBadgeType(status: SignalReportStatus): LemonTagType {case SignalReportStatus.RESOLVED:return 'completion'case SignalReportStatus.PENDING_INPUT:+ case SignalReportStatus.MONITORING:return 'caution'case SignalReportStatus.IN_PROGRESS:return 'warning'diff --git a/products/signals/frontend/inbox/components/cards/ReportContextMenu.tsx b/products/signals/frontend/inbox/components/cards/ReportContextMenu.tsxindex cdc13b5bc3b9..ae7c14244f01 100644--- a/products/signals/frontend/inbox/components/cards/ReportContextMenu.tsx+++ b/products/signals/frontend/inbox/components/cards/ReportContextMenu.tsx@@ -38,6 +38,7 @@ import {DismissalFeedback,DismissalReasonValue,RESOLVE_REASON_OPTIONS,+ STOP_MONITORING_REASON_OPTIONS,ResolveReasonValue,} from '../../utils/dismissalReasons'import { inboxReportDetailUrl } from '../../utils/inboxReportUrls'@@ -188,6 +189,7 @@ function ReportContextMenuItems({openResolveReportDialog({reportTitle,hasOpenPr,+ isMonitoring: report.status === SignalReportStatus.MONITORING,initialReason,onConfirm: ({ reason, note }) => resolveWith(reason, note),})@@ -323,7 +325,11 @@ function ReportContextMenuItems({buttons' fixed height. */}<ContextMenuSubContent className="max-w-80"><ReasonSubmenuItems- options={RESOLVE_REASON_OPTIONS}+ options={+ report.status === SignalReportStatus.MONITORING+ ? STOP_MONITORING_REASON_OPTIONS+ : RESOLVE_REASON_OPTIONS+ }noteTooltip="Resolve and write a note"dataAttrPrefix="inbox-report-context-menu-resolve"onPick={pickResolveReason}diff --git a/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx b/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsxindex 0c5a5afa050e..b44506d6a9cf 100644--- a/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx+++ b/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx@@ -2,7 +2,7 @@ import { useActions, useValues } from 'kea'import { router } from 'kea-router'import { type MouseEvent, useState } from 'react'-import { IconCheckCircle, IconHide, IconReceipt, IconUndo } from '@posthog/icons'+import { IconCheckCircle, IconHide, IconReceipt, IconUndo, IconClock } from '@posthog/icons'import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'@@ -11,9 +11,10 @@ import { urls } from 'scenes/urls'import { captureInboxReportAction } from '../../inboxAnalytics'import { inboxSceneLogic } from '../../inboxSceneLogic'import { inboxBulkActionsLogic } from '../../logics/inboxBulkActionsLogic'+import { inboxReportDetailLogic } from '../../logics/inboxReportDetailLogic'import { INBOX_REPORT_SECTION_LIST_PARAMS, reportListLogic } from '../../logics/reportListLogic'import { SignalReport, SignalReportStatus } from '../../types'-import { canResolveReport } from '../../utils/reportActions'+import { canMonitorReport, canResolveReport } from '../../utils/reportActions'import { hasMergedReportPullRequest } from '../../utils/reportPullRequests'import { useReportDismiss } from '../cards/useReportDismiss'import { useReportRefund } from '../cards/useReportRefund'@@ -38,6 +39,9 @@ export interface ReportDetailAction {}export function useReportDetailActions(report: SignalReport): ReportDetailAction[] {+ const detailLogic = inboxReportDetailLogic({ reportId: report.id, report })+ const { changeReportState } = useActions(detailLogic)+ const { reportStateSaving, reportChecks } = useValues(detailLogic)const { reportStateChanged } = useActions(inboxBulkActionsLogic)const { activeTab } = useValues(inboxSceneLogic)const { loadSelectedReport } = useActions(inboxSceneLogic)@@ -167,7 +171,10 @@ export function useReportDetailActions(report: SignalReport): ReportDetailActionlabel: 'Resolve',icon: <IconCheckCircle />,loading: isResolving,- tooltip: 'Mark this report as done',+ tooltip:+ report.status === SignalReportStatus.MONITORING+ ? 'Resolve manually without automatic verification or an evidence amendment'+ : 'Mark this report as done',// The judge found the fix already in flight, so Create PR is withheld and closing the// report is the step it waits on.primary: report.already_addressed === true,@@ -175,6 +182,29 @@ export function useReportDetailActions(report: SignalReport): ReportDetailAction}const actions: ReportDetailAction[] = [+ ...(canMonitorReport(report, (reportChecks?.length ?? 0) > 0)+ ? [+ {+ key: 'monitor',+ label: 'Start monitoring',+ icon: <IconClock />,+ loading: reportStateSaving,+ tooltip: 'PostHog watches to make sure the fix works',+ onClick: () => changeReportState('monitoring'),+ },+ ]+ : []),+ ...(report.status === SignalReportStatus.MONITORING+ ? [+ {+ key: 'reopen',+ label: 'Reopen',+ icon: <IconUndo />,+ loading: reportStateSaving,+ onClick: () => changeReportState('potential'),+ },+ ]+ : []),...(canResolve ? [resolve] : []),{key: 'dismiss',@@ -187,5 +217,9 @@ export function useReportDetailActions(report: SignalReport): ReportDetailAction...(canRefund ? [refund] : []),]- return actions+ const updating = reportStateSaving || isResolving || isDismissing || isRefunding+ return actions.map((action) => ({+ ...action,+ disabledReason: action.disabledReason ?? (updating ? 'Updating report…' : undefined),+ }))}diff --git a/products/signals/frontend/inbox/components/detail/useReportResolve.ts b/products/signals/frontend/inbox/components/detail/useReportResolve.tsindex 99bbd5dd46f5..085abfb75d16 100644--- a/products/signals/frontend/inbox/components/detail/useReportResolve.ts+++ b/products/signals/frontend/inbox/components/detail/useReportResolve.ts@@ -5,7 +5,7 @@ import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'import { captureInboxReportAction, InboxReportActionSurface } from '../../inboxAnalytics'-import { SignalReport } from '../../types'+import { SignalReport, SignalReportStatus } from '../../types'import { hasOpenImplementationPr } from '../../utils/reportActions'import { openResolveReportDialog } from '../shell/ResolveReportDialog'@@ -35,6 +35,7 @@ export function useReportResolve({openResolveReportDialog({reportTitle: report.title ?? 'Untitled report',hasOpenPr,+ isMonitoring: report.status === SignalReportStatus.MONITORING,onConfirm: async ({ reason, note }) => {// pinned: `dismissal_reason` is the persisted field the reason lands in, for both// verdicts, so one breakdown reads dismissals and resolves alike.diff --git a/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx b/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsxindex f76ca0e6ca04..716267cdce93 100644--- a/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx+++ b/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx@@ -5,7 +5,7 @@ import { LemonButton } from '@posthog/lemon-ui'import { inboxBulkActionsLogic } from '../../logics/inboxBulkActionsLogic'import { inboxFiltersLogic } from '../../logics/inboxFiltersLogic'-import type { SignalReport } from '../../types'+import { SignalReport, SignalReportStatus } from '../../types'import { canUnassignMe, hasOpenImplementationPr } from '../../utils/reportActions'import { openDismissReportDialog } from './DismissReportDialog'import { openResolveReportDialog } from './ResolveReportDialog'@@ -27,6 +27,10 @@ export function InboxBulkSelectionBar({ reports }: { reports: SignalReport[] }):}const busy = isDismissing || isResolving || isUnassigningconst selectedIds = new Set(selectedReportIds)+ const selectedReports = reports.filter((report) => selectedIds.has(report.id))+ const isMonitoring =+ selectedReports.length === selectedCount &&+ selectedReports.every((report) => report.status === SignalReportStatus.MONITORING)const hasOpenPr = reports.some((report) => selectedIds.has(report.id) && hasOpenImplementationPr(report))const unassignableIds = reports.filter((report) => selectedIds.has(report.id) && canUnassignMe(report, isScopedToMe))@@ -50,6 +54,7 @@ export function InboxBulkSelectionBar({ reports }: { reports: SignalReport[] }):openResolveReportDialog({selectedCount,hasOpenPr,+ isMonitoring,onConfirm: ({ reason, note }) => bulkResolve(reason, note),})}diff --git a/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsx b/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsxindex e6373fa2bcd8..283a181feba8 100644--- a/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsx+++ b/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsx@@ -1,9 +1,13 @@import { LemonDialog } from 'lib/lemon-ui/LemonDialog'import { LemonField } from 'lib/lemon-ui/LemonField'-import { LemonRadio, LemonRadioOption } from 'lib/lemon-ui/LemonRadio'+import { LemonRadio } from 'lib/lemon-ui/LemonRadio'import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea'-import { RESOLVE_REASON_OPTIONS, ResolveReasonValue } from '../../utils/dismissalReasons'+import {+ RESOLVE_REASON_OPTIONS,+ STOP_MONITORING_REASON_OPTIONS,+ ResolveReasonValue,+} from '../../utils/dismissalReasons'import { HotkeyRadio } from './HotkeyRadio'export interface ResolveReportDialogResult {@@ -18,6 +22,7 @@ interface OpenResolveReportDialogParams {selectedCount?: number/** Whether the report has an implementation PR that is still open. Resolving closes it, so the copy says so. */hasOpenPr?: boolean+ isMonitoring?: booleansubmitDataAttr?: stringonAfterClose?: () => void/** Show a digit keycap on each reason and let 1..9 pick it. On for triage mode, where the whole flow is keyboard-driven. */@@ -32,11 +37,6 @@ interface OpenResolveReportDialogParams {onConfirm: (result: ResolveReportDialogResult) => void | Promise<void>}-const REASON_RADIO_OPTIONS: LemonRadioOption<ResolveReasonValue>[] = RESOLVE_REASON_OPTIONS.map((option) => ({- value: option.value,- label: option.label,-}))-/*** Opens the resolve dialog: pick why the report is done (canonical {@link RESOLVE_REASON_OPTIONS})* plus an optional note, then mark it resolved with Enter or the button. Same shape as@@ -48,6 +48,7 @@ export function openResolveReportDialog({reportTitle,selectedCount,hasOpenPr = false,+ isMonitoring = false,submitDataAttr,onAfterClose,hotkeys = false,@@ -59,14 +60,17 @@ export function openResolveReportDialog({// report is selected. Every other caller names the report instead.const isSelection = selectedCount !== undefinedconst isPlural = (selectedCount ?? 1) > 1+ const reasonOptions = isMonitoring ? STOP_MONITORING_REASON_OPTIONS : RESOLVE_REASON_OPTIONSconst title = isSelection? `Resolve ${selectedCount} ${isPlural ? 'reports' : 'report'}?`: `Resolve report "${reportTitle?.trim() ? reportTitle : 'Untitled report'}"?`- const description = isPlural- ? `Mark these useful reports as done. If an issue comes back, you get a new report linked to the old one.${hasOpenPr ? ' Any open pull request for these reports will be closed.' : ''}`- : `This marks a useful report as done. If the issue comes back, you get a new report linked to this one.${- hasOpenPr ? ' The pull request opened for this report will be closed.' : ''- }`+ const description = isMonitoring+ ? `This stops remaining follow-up checks and resolves the report. PostHog will not record an automatic verification result or update the report's evidence.${hasOpenPr ? ' The pull request opened for this report will be closed.' : ''}`+ : isPlural+ ? `Mark these useful reports as done. If an issue comes back, you get a new report linked to the old one.${hasOpenPr ? ' Any open pull request for these reports will be closed.' : ''}`+ : `This marks a useful report as done. If the issue comes back, you get a new report linked to this one.${+ hasOpenPr ? ' The pull request opened for this report will be closed.' : ''+ }`const primaryButtonProps = {children:copy?.submitLabel ?? (hasOpenPr ? 'Resolve and close PR' : isPlural ? 'Resolve reports' : 'Resolve report'),@@ -85,13 +89,21 @@ export function openResolveReportDialog({<LemonField name="reason" label="How was this report handled?">{({ value, onChange }) =>hotkeys ? (- <HotkeyRadio value={value} onChange={onChange} options={RESOLVE_REASON_OPTIONS} />+ <HotkeyRadio value={value} onChange={onChange} options={reasonOptions} />) : (- <LemonRadio value={value} onChange={onChange} options={REASON_RADIO_OPTIONS} />+ <LemonRadio value={value} onChange={onChange} options={[...reasonOptions]} />)}</LemonField>- <LemonField name="note" label="Details (optional)" info="Add context or a link to the implementation.">+ <LemonField+ name="note"+ label="Details (optional)"+ info={+ isMonitoring+ ? 'Add context or a link to supporting evidence.'+ : 'Add context or a link to the implementation.'+ }+ ><LemonTextArea// stopPropagation keeps Enter in this multi-line note from reaching the dialog// form and resolving the report (and closing its PR) mid-sentence.@@ -99,7 +111,11 @@ export function openResolveReportDialog({// With the reason already chosen, the note is the only thing left to type.// Never focus otherwise: the hotkey flow reads digits as reason picks.autoFocus={initialReason != null}- placeholder="Add context or a link to the implementation"+ placeholder={+ isMonitoring+ ? 'Add context or a link to supporting evidence'+ : 'Add context or a link to the implementation'+ }maxLength={4000}minRows={3}maxRows={8}diff --git a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.tsindex 129fe8522fc1..6e85a4c3d777 100644--- a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts+++ b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.test.ts@@ -6,8 +6,11 @@ import posthog from 'posthog-js'import { lemonToast } from '@posthog/lemon-ui'+import { ApiConfig } from 'lib/api'+import { resumeKeaLoadersErrors, silenceKeaLoadersErrors } from '~/initKea'import { useMocks } from '~/mocks/jest'+import type { MockResolverInfo } from '~/mocks/utils'import { initKeaTests } from '~/test/init'import { TaskRunStatus } from 'products/posthog_ai/frontend/types/taskTypes'@@ -75,7 +78,7 @@ describe('inboxReportDetailLogic', () => {}})- describe('priority editing', () => {+ describe('report editing', () => {let logic: ReturnType<typeof inboxReportDetailLogic.build>beforeEach(async () => {@@ -174,6 +177,37 @@ describe('inboxReportDetailLogic', () => {expect(save).toHaveBeenCalledTimes(1)})+ it.each([200, 500])(+ 'guards Monitoring submissions and releases the guard after response %s',+ async (responseStatus) => {+ let completeSave: () => void = () => {}+ const pendingSave = new Promise<void>((resolve) => {+ completeSave = resolve+ })+ const save = jest.fn(async (request: MockResolverInfo): Promise<[number, SignalReport]> => {+ expect(request.params.team_id).toBe(String(ApiConfig.getCurrentProjectId()))+ await pendingSave+ return [responseStatus, { ...REPORT, status: SignalReportStatus.POTENTIAL }]+ })+ const originalProjectId = ApiConfig.getCurrentProjectId()+ ApiConfig.setCurrentProjectId(456)+ try {+ useMocks({ post: { '/api/projects/:team_id/signals/reports/:id/state/': save } })+ logic.actions.changeReportState('potential')+ await waitFor(() => expect(save).toHaveBeenCalledTimes(1))+ expect(logic.values.reportStateSaving).toBe(true)+ logic.actions.changeReportState('potential')+ completeSave()+ await expectLogic(logic).toFinishAllListeners()+ expect(save).toHaveBeenCalledTimes(1)+ expect(logic.values.reportStateSaving).toBe(false)+ } finally {+ completeSave()+ ApiConfig.setCurrentProjectId(originalProjectId)+ }+ }+ )+it('keeps the saved priority after a failure and allows retrying', async () => {useMocks({ put: { '/api/projects/:team_id/signals/reports/:id/priority/': () => [500, {}] } })logic.actions.updatePriority('P2')diff --git a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.tsindex 2fde5e36c71a..2fe2ce6c8eaa 100644--- a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts@@ -44,6 +44,7 @@ import {signalsReportsFeedbackStateRetrieve,signalsReportsSignalsRetrieve,signalsReportsPriorityUpdate,+ signalsReportsStateCreate,signalsReportsReviewersUpdate,} from 'products/signals/frontend/generated/api'import type {@@ -58,11 +59,13 @@ import type {SignalReportCheckApi,SignalReportFeedbackStateApi,SignalReportApi,+ SignalReportStateRequestApi,_UserApi,} from 'products/signals/frontend/generated/api.schemas'import type { SignalNodeApi } from 'products/signals/frontend/generated/api.schemas'import type { SignalReportFeedbackSentimentEnumApi } from '../../generated/api.schemas'+import type { SignalReportStateEnumApi } from '../../generated/api.schemas'import { deriveTaskPurpose, ReportTaskPurpose, TaskRunArtefactContent } from '../components/detail/artefactTypes'import {AvailableReviewerOption,@@ -358,6 +361,7 @@ export interface inboxReportDetailLogicValues {reportReviewers: EnrichedReviewer[] | nullreportSignals: SignalNode[] | nullreportSignalsLoading: boolean+ reportStateSaving: booleanreportSummary: string | nullreportTaskToOpen: ReportTaskEntry | nullreportTasks: ReportTaskEntry[] | null@@ -392,6 +396,9 @@ export interface inboxReportDetailLogicActions {cancelReportCheckDone: (checkId: string) => {checkId: string}+ changeReportState: (state: SignalReportStateRequestApi['state']) => {+ state: SignalReportStateEnumApi+ }closeDraftThread: () => {value: true}@@ -638,6 +645,9 @@ export interface inboxReportDetailLogicActions {setReportClaimed: (claimed: boolean) => {claimed: boolean}+ setReportStateSaving: (saving: boolean) => {+ saving: boolean+ }setSelectedTaskId: (taskId: string | null) => {taskId: string | null}@@ -790,6 +800,8 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([setReport: (report: SignalReport | null) => ({ report }),updatePriority: (priority: ReportPriorityApi) => ({ priority }),setPrioritySaving: (saving: boolean) => ({ saving }),+ changeReportState: (state: SignalReportStateRequestApi['state']) => ({ state }),+ setReportStateSaving: (saving: boolean) => ({ saving }),setReportClaimed: (claimed: boolean) => ({ claimed }),setClaimSaving: (saving: boolean) => ({ saving }),// Optimistically replace the reviewer list while the PUT is in flight, then reload from the server.@@ -1058,6 +1070,7 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([],evidenceExpanded: [false, { expandEvidence: () => true, collapseEvidence: () => false }],prioritySaving: [false, { setPrioritySaving: (_, { saving }) => saving }],+ reportStateSaving: [false, { setReportStateSaving: (_, { saving }) => saving }],claimSaving: [false, { setClaimSaving: (_, { saving }) => saving }],report: [null as SignalReport | null,@@ -1535,6 +1548,24 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([}),listeners(({ actions, asyncActions, values, props, selectors, cache }) => ({+ changeReportState: async ({ state }) => {+ if (values.reportStateSaving) {+ return+ }+ actions.setReportStateSaving(true)+ try {+ await signalsReportsStateCreate(String(ApiConfig.getCurrentProjectId()), props.reportId, { state })+ inboxBulkActionsLogic.findMounted()?.actions.reportStateChanged()+ const scene = inboxSceneLogic.findMounted()+ if (scene?.values.selectedReportId === props.reportId) {+ scene.actions.loadSelectedReport({ id: props.reportId })+ }+ } catch {+ lemonToast.error("Couldn't update this report. Refresh it and try again.")+ } finally {+ actions.setReportStateSaving(false)+ }+ },updatePriority: async ({ priority }) => {const teamId = teamLogic.values.currentTeamIdconst currentReport = values.reportdiff --git a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts b/products/signals/frontend/inbox/logics/inboxTriageLogic.tsindex 36c3880ca830..cdfd77f5b8d8 100644--- a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxTriageLogic.ts@@ -8,7 +8,7 @@ import { openResolveReportDialog } from '../components/shell/ResolveReportDialogimport { captureInboxReportAction } from '../inboxAnalytics'import { inboxSceneLogic } from '../inboxSceneLogic'import { inboxTaskKickoffLogic } from '../inboxTaskKickoffLogic'-import { INBOX_PRIMARY_REPORT_SECTION_KEY, InboxReportSectionKey, SignalReport } from '../types'+import { INBOX_PRIMARY_REPORT_SECTION_KEY, InboxReportSectionKey, SignalReport, SignalReportStatus } from '../types'import { canCreateImplementationPr, canUnassignMe, hasOpenImplementationPr } from '../utils/reportActions'import { displayConventionalCommitTitle } from '../utils/reportPresentation'import { INBOX_REPORT_SECTION_LIST_PARAMS, reportListLogic } from './reportListLogic'@@ -450,6 +450,7 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([}openResolveReportDialog({reportTitle: displayConventionalCommitTitle(report.title, 'Untitled report'),+ isMonitoring: report.status === SignalReportStatus.MONITORING,hasOpenPr: hasOpenImplementationPr(report),hotkeys: true,onConfirm: ({ reason, note }) => {diff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.tsindex bb94728053dc..515e9a0712d2 100644--- a/products/signals/frontend/inbox/types.ts+++ b/products/signals/frontend/inbox/types.ts@@ -164,6 +164,7 @@ export enum SignalReportStatus {IN_PROGRESS = 'in_progress',PENDING_INPUT = 'pending_input',READY = 'ready',+ MONITORING = 'monitoring',RESOLVED = 'resolved',FAILED = 'failed',// Out-of-inbox terminal states (backend: SignalReport.Status). Excluded from every tab.diff --git a/products/signals/frontend/inbox/utils/dismissalReasons.ts b/products/signals/frontend/inbox/utils/dismissalReasons.tsindex 52a11b639cf7..e8ffae10c342 100644--- a/products/signals/frontend/inbox/utils/dismissalReasons.ts+++ b/products/signals/frontend/inbox/utils/dismissalReasons.ts@@ -30,11 +30,21 @@ export const RESOLVE_REASON_OPTIONS = [{ value: 'other', label: 'Something else…' },] as const+export const STOP_MONITORING_REASON_OPTIONS = [+ { value: 'verified_manually', label: 'Verified manually' },+ { value: 'no_action_needed', label: 'No action needed' },+ { value: 'already_fixed', label: 'Was already fixed before this report' },+ { value: 'other', label: 'Something else…' },+] as const+/** Persisted dismiss reason (values match {@link DISMISSAL_REASON_OPTIONS}). */export type DismissalReasonValue = (typeof DISMISSAL_REASON_OPTIONS)[number]['value']/** Persisted feedback can include reasons that are no longer selectable in the dialog. */-export type ResolveReasonValue = (typeof RESOLVE_REASON_OPTIONS)[number]['value'] | 'pr_merged'+export type ResolveReasonValue =+ | (typeof RESOLVE_REASON_OPTIONS)[number]['value']+ | (typeof STOP_MONITORING_REASON_OPTIONS)[number]['value']+ | 'pr_merged'/*** Whether a persisted reason describes a resolve rather than a dismissal. A resolved row only shows@@ -44,6 +54,7 @@ export type ResolveReasonValue = (typeof RESOLVE_REASON_OPTIONS)[number]['value'export function isResolveReason(value: string | null | undefined): boolean {return (value === 'fixed_outside_posthog' ||+ value === 'verified_manually' ||value === 'no_action_needed' ||value === 'pr_merged' ||value === 'already_fixed'@@ -111,6 +122,7 @@ export function dismissalReasonLabel(value: string | null | undefined): string |return (DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)?.label ??RESOLVE_REASON_OPTIONS.find((o) => o.value === value)?.label ??+ STOP_MONITORING_REASON_OPTIONS.find((o) => o.value === value)?.label ??EXTRA_DISMISSAL_REASON_LABELS[value] ??value)diff --git a/products/signals/frontend/inbox/utils/reportActions.test.ts b/products/signals/frontend/inbox/utils/reportActions.test.tsindex 7e93ef2e7a11..bdde8c96c8f5 100644--- a/products/signals/frontend/inbox/utils/reportActions.test.ts+++ b/products/signals/frontend/inbox/utils/reportActions.test.ts@@ -1,11 +1,12 @@import { SignalReport, SignalReportStatus } from '../types'-import { canResolveReport } from './reportActions'+import { canMonitorReport, canResolveReport } from './reportActions'describe('canResolveReport', () => {it.each([[SignalReportStatus.READY, true],[SignalReportStatus.PENDING_INPUT, true],[SignalReportStatus.FAILED, true],+ [SignalReportStatus.MONITORING, true],[SignalReportStatus.POTENTIAL, false],[SignalReportStatus.CANDIDATE, false],[SignalReportStatus.IN_PROGRESS, false],@@ -14,4 +15,27 @@ describe('canResolveReport', () => {] as const)('allows resolution for %s: %s', (status, expected) => {expect(canResolveReport({ status } as SignalReport)).toBe(expected)})++ it.each([+ [SignalReportStatus.READY, true, true],+ [SignalReportStatus.READY, false, false],+ [SignalReportStatus.PENDING_INPUT, true, true],+ [SignalReportStatus.FAILED, true, true],+ [SignalReportStatus.MONITORING, true, false],+ [SignalReportStatus.RESOLVED, true, false],+ [SignalReportStatus.SUPPRESSED, true, false],+ ] as const)('gates manual Monitoring for %s with server capability %s: %s', (status, enabled, expected) => {+ expect(+ canMonitorReport({ status, ...(enabled ? { monitoring_started_at: null } : {}) } as SignalReport, true)+ ).toBe(expected)+ })++ it.each([false, true])('offers Monitoring only with follow-up checks: %s', (hasFollowUpChecks) => {+ expect(+ canMonitorReport(+ { status: SignalReportStatus.READY, monitoring_started_at: null } as SignalReport,+ hasFollowUpChecks+ )+ ).toBe(hasFollowUpChecks)+ })})diff --git a/products/signals/frontend/inbox/utils/reportActions.ts b/products/signals/frontend/inbox/utils/reportActions.tsindex 840a9082aeb2..cd63313fb4e2 100644--- a/products/signals/frontend/inbox/utils/reportActions.ts+++ b/products/signals/frontend/inbox/utils/reportActions.ts@@ -36,7 +36,17 @@ export function canResolveReport(report: SignalReport): boolean {return (report.status === SignalReportStatus.READY ||report.status === SignalReportStatus.PENDING_INPUT ||- report.status === SignalReportStatus.FAILED+ report.status === SignalReportStatus.FAILED ||+ report.status === SignalReportStatus.MONITORING+ )+}++export function canMonitorReport(report: SignalReport, hasFollowUpChecks: boolean): boolean {+ return (+ hasFollowUpChecks &&+ 'monitoring_started_at' in report &&+ canResolveReport(report) &&+ report.status !== SignalReportStatus.MONITORING)}diff --git a/products/signals/frontend/inbox/utils/reportOrdering.ts b/products/signals/frontend/inbox/utils/reportOrdering.tsindex 04f2ab65ae94..fe402caa6c98 100644--- a/products/signals/frontend/inbox/utils/reportOrdering.ts+++ b/products/signals/frontend/inbox/utils/reportOrdering.ts@@ -18,6 +18,7 @@ const STATUS_RANK: Record<SignalReportStatus, number> = {[SignalReportStatus.CANDIDATE]: 4,[SignalReportStatus.POTENTIAL]: 5,[SignalReportStatus.FAILED]: 6,+ [SignalReportStatus.MONITORING]: 6,[SignalReportStatus.RESOLVED]: 7,[SignalReportStatus.SUPPRESSED]: 8,[SignalReportStatus.DELETED]: 9,diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 6889f8e453d4..3f868bb8472e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -38609,6 +38609,7 @@ export namespace Schemas {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else…@@ -38625,6 +38626,7 @@ export namespace Schemas {WontfixIntentional: 'wontfix_intentional',WontfixIrrelevant: 'wontfix_irrelevant',FixedOutsidePosthog: 'fixed_outside_posthog',+ VerifiedManually: 'verified_manually',NoActionNeeded: 'no_action_needed',PrMerged: 'pr_merged',Other: 'other',@@ -106570,6 +106572,7 @@ export namespace Schemas {* * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved+ * * `monitoring` - monitoring*/export type SignalReportStateEnum = typeof SignalReportStateEnum[keyof typeof SignalReportStateEnum];@@ -106578,16 +106581,18 @@ export namespace Schemas {Suppressed: 'suppressed',Potential: 'potential',Resolved: 'resolved',+ Monitoring: 'monitoring',} as const;export interface SignalReportBulkStateRequest {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.** * `suppressed` - suppressed* * `potential` - potential- * * `resolved` - resolved */+ * * `resolved` - resolved+ * * `monitoring` - monitoring */state: SignalReportStateEnum;- /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me@@ -106597,6 +106602,7 @@ export namespace Schemas {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else… */@@ -106932,13 +106938,14 @@ export namespace Schemas {}export interface SignalReportStateRequest {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.** * `suppressed` - suppressed* * `potential` - potential- * * `resolved` - resolved */+ * * `resolved` - resolved+ * * `monitoring` - monitoring */state: SignalReportStateEnum;- /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me@@ -106948,6 +106955,7 @@ export namespace Schemas {* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Not relevant to this project* * `fixed_outside_posthog` - Fixed outside PostHog+ * * `verified_manually` - Verified manually* * `no_action_needed` - No action needed* * `pr_merged` - PR was merged* * `other` - Something else… */diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 86ab142113c7..88b072a72d94 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -606,10 +606,12 @@ export const signalsReportsStateCreateBodySnoozeForMax = 100000export const SignalsReportsStateCreateBody = () => zod.object({state: zod- .enum(['suppressed', 'potential', 'resolved'])- .describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')+ .enum(['suppressed', 'potential', 'resolved', 'monitoring']).describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ '\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring'+ )+ .describe(+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring"),dismissal_reason: zod.enum([@@ -621,16 +623,17 @@ export const SignalsReportsStateCreateBody = () => zod.object({'wontfix_intentional','wontfix_irrelevant','fixed_outside_posthog',+ 'verified_manually','no_action_needed','pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()@@ -1042,10 +1045,12 @@ export const signalsReportsBulkStateCreateBodyIdsMax = 100export const SignalsReportsBulkStateCreateBody = () => zod.object({state: zod- .enum(['suppressed', 'potential', 'resolved'])- .describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved')+ .enum(['suppressed', 'potential', 'resolved', 'monitoring'])+ .describe(+ '\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring'+ ).describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved\n\* `monitoring` - monitoring"),dismissal_reason: zod.enum([@@ -1057,16 +1062,17 @@ export const SignalsReportsBulkStateCreateBody = () => zod.object({'wontfix_intentional','wontfix_irrelevant','fixed_outside_posthog',+ 'verified_manually','no_action_needed','pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_\*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wrong_assignee` - Wrong assignee\n\* `wrong_repo` - Agent picked the wrong repository\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Not relevant to this project\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `verified_manually` - Verified manually\n\* `no_action_needed` - No action needed\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.jsonindex 2ad6a06af93f..0c9075d45d20 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json@@ -13,7 +13,7 @@"type": "string"},"dismissal_reason": {- "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wrong_assignee` - Wrong assignee\n* `wrong_repo` - Agent picked the wrong repository\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Not relevant to this project\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `no_action_needed` - No action needed\n* `pr_merged` - PR was merged\n* `other` - Something else…",+ "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wrong_assignee` - Wrong assignee\n* `wrong_repo` - Agent picked the wrong repository\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Not relevant to this project\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `verified_manually` - Verified manually\n* `no_action_needed` - No action needed\n* `pr_merged` - PR was merged\n* `other` - Something else…","enum": ["already_fixed","report_unclear",@@ -23,6 +23,7 @@"wontfix_intentional","wontfix_irrelevant","fixed_outside_posthog",+ "verified_manually","no_action_needed","pr_merged","other"@@ -44,8 +45,8 @@"type": "number"},"state": {- "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved",- "enum": ["suppressed", "potential", "resolved"],+ "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved\n* `monitoring` - monitoring",+ "enum": ["suppressed", "potential", "resolved", "monitoring"],"type": "string"}},diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.jsonindex 6e3e685321a4..3eeebcba86cb 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json@@ -13,7 +13,7 @@"type": "string"},"dismissal_reason": {- "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wrong_assignee` - Wrong assignee\n* `wrong_repo` - Agent picked the wrong repository\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Not relevant to this project\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `no_action_needed` - No action needed\n* `pr_merged` - PR was merged\n* `other` - Something else…",+ "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, verified_manually, no_action_needed, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). Use 'no_action_needed' with state='resolved' when the report was useful but needs no implementation. A report that failed in processing resolves too, so a fix that landed is recorded as a fix rather than as a dismissal. These three codes claim the issue is gone, so a later signal about the same issue starts a fresh report linked to this one. Fixed reason codes require state='suppressed' or state='resolved', not 'potential'. The dismissal codes (report_unclear, analysis_wrong, wrong_assignee, wrong_repo, wontfix_*) go with state='suppressed' and absorb later signals silently. Use 'wrong_assignee' when the report was routed to the wrong person or team. 'wrong_repo' when the agent picked the wrong repository for this report, ideally with corrected_repository naming the right one. Use 'verified_manually' with state='resolved' to stop Monitoring after manual verification. It requires Monitoring to be enabled and a report with a Monitoring period, and records no automatic verification result or evidence amendment. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wrong_assignee` - Wrong assignee\n* `wrong_repo` - Agent picked the wrong repository\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Not relevant to this project\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `verified_manually` - Verified manually\n* `no_action_needed` - No action needed\n* `pr_merged` - PR was merged\n* `other` - Something else…","enum": ["already_fixed","report_unclear",@@ -23,6 +23,7 @@"wontfix_intentional","wontfix_irrelevant","fixed_outside_posthog",+ "verified_manually","no_action_needed","pr_merged","other"@@ -40,8 +41,8 @@"type": "number"},"state": {- "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is allowed from ready, pending_input, or failed, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved",- "enum": ["suppressed", "potential", "resolved"],+ "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the report is finished. Resolving is allowed from ready, pending_input, failed, or monitoring, or from a suppressed report that previously held one of those statuses or resolved. Resolving an already resolved report succeeds. Other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one. Use 'monitoring' when implementation is complete and outcome verification is pending. Entry requires the organization rollout and snapshots this report's pending or active, unexpired checks. Without applicable checks the report resolves directly. Manual completion records caller attribution, stops remaining follow-up checks, and does not claim automatic verification or an evidence amendment.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved\n* `monitoring` - monitoring",+ "enum": ["suppressed", "potential", "resolved", "monitoring"],"type": "string"}},