Skip to content

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

fix(replay-vision): drop vestigial scanner_type from VisionAction selection (#64737)

Kim Svatos Dugan9e059a9723e2
diff --git a/products/replay_vision/backend/migrations/0016_alter_visionaction_selection.py b/products/replay_vision/backend/migrations/0016_alter_visionaction_selection.py
new file mode 100644
index 000000000000..f9b600ee2fa6
--- /dev/null
+++ b/products/replay_vision/backend/migrations/0016_alter_visionaction_selection.py
@@ -0,0 +1,22 @@
+# Generated by Django 5.2.14 on 2026-06-18 23:04
+
+from django.db import migrations, models
+
+import products.replay_vision.backend.models.vision_action
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("replay_vision", "0015_alter_visionaction_selection"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="visionaction",
+ name="selection",
+ field=models.JSONField(
+ default=products.replay_vision.backend.models.vision_action.default_selection,
+ help_text="Observation filter applied at synthesis time, over the action's bound `scanner` (one action per scanner). Supported keys: scanner_ids (list[str], to override the bound scanner), verdict, tags, scores, status, window_days.",
+ ),
+ ),
+ ]
diff --git a/products/replay_vision/backend/migrations/max_migration.txt b/products/replay_vision/backend/migrations/max_migration.txt
index 7299a7e54aed..e6d194dfffc6 100644
--- a/products/replay_vision/backend/migrations/max_migration.txt
+++ b/products/replay_vision/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0015_alter_visionaction_selection
+0016_alter_visionaction_selection
diff --git a/products/replay_vision/backend/models/vision_action.py b/products/replay_vision/backend/models/vision_action.py
index 06ebae8fc8e2..691d12e77e76 100644
--- a/products/replay_vision/backend/models/vision_action.py
+++ b/products/replay_vision/backend/models/vision_action.py
@@ -10,8 +10,8 @@ from products.replay_vision.backend.rrule import compute_next_occurrences
def default_selection() -> dict[str, Any]:
- # Past-day summarizer observations — the most common "and then" group summary.
- return {"scanner_type": "summarizer", "window_days": 1}
+ # Past day's observations from the bound scanner — the most common "and then" group summary.
+ return {"window_days": 1}
class TriggerType(models.TextChoices):
@@ -70,10 +70,9 @@ class VisionAction(TeamScopedRootMixin, UUIDModel):
selection = models.JSONField(
default=default_selection,
help_text=(
- "Observation filter applied at synthesis time. "
- "Supported keys: scanner_type (string — filters observations by scanner type, "
- "independent of the bound `scanner` FK which scopes scheduling), "
- "scanner_ids (list[str]), verdict, tags, scores, status, window_days."
+ "Observation filter applied at synthesis time, over the action's bound `scanner` "
+ "(one action per scanner). Supported keys: scanner_ids (list[str], to override the bound "
+ "scanner), verdict, tags, scores, status, window_days."
),
)
synthesis_config = models.JSONField(default=dict, help_text="Synthesis options, e.g. {prompt_guide}.")
diff --git a/products/replay_vision/backend/tests/test_vision_action_models.py b/products/replay_vision/backend/tests/test_vision_action_models.py
index 44c34a329da4..f367cab34a41 100644
--- a/products/replay_vision/backend/tests/test_vision_action_models.py
+++ b/products/replay_vision/backend/tests/test_vision_action_models.py
@@ -53,7 +53,7 @@ class TestVisionActionModel(BaseTest):
self.assertEqual(action.enabled, True)
self.assertEqual(action.trigger_type, TriggerType.SCHEDULE)
self.assertEqual(action.mode, ActionMode.GROUP_SUMMARY)
- self.assertEqual(action.selection, {"scanner_type": "summarizer", "window_days": 1})
+ self.assertEqual(action.selection, {"window_days": 1})
self.assertEqual(action.synthesis_config, {})
self.assertEqual(action.delivery_config, [])
self.assertIsNotNone(action.scanner)