: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
chore: update stale source paths in products backend comments (#115084)
Paul D'Ambra93cdaa6756ca
diff --git a/products/access_control/backend/tests/test_access_control.py b/products/access_control/backend/tests/test_access_control.pyindex 2178e3f3edff..5069957c9bbc 100644--- a/products/access_control/backend/tests/test_access_control.py+++ b/products/access_control/backend/tests/test_access_control.py@@ -2267,7 +2267,7 @@ class TestAccessControlMembersEndpoint(BaseAccessControlTest):# A viewset gaining or losing AccessControlViewSetMixin changes this set. Regenerate with-# `pytest ee/api/rbac/test/test_access_control.py --snapshot-update` so the change shows up in+# `pytest products/access_control/backend/tests/test_access_control.py --snapshot-update` so the change shows up in# review, and give the settings picker a look for the new resource while at it.def test_resources_with_object_access_controls_snapshot(snapshot):assert sorted(resources_with_object_access_controls()) == snapshotdiff --git a/products/ai_observability/backend/api/test/test_evaluations.py b/products/ai_observability/backend/api/test/test_evaluations.pyindex c329b1400ffe..530fd11fa7c8 100644--- a/products/ai_observability/backend/api/test/test_evaluations.py+++ b/products/ai_observability/backend/api/test/test_evaluations.py@@ -2293,7 +2293,7 @@ class TestReEnableValidatesRootCauseResolved(APIBaseTest):class TestEvaluationsAccessControl(APIBaseTest):# Evaluations have their own access control resource (see ACCESS_CONTROL_RESOURCES in- # posthog/rbac/user_access_control.py). They used to inherit from `llm_analytics`.+ # products/access_control/backend/facade/user_access_control.py). They used to inherit from `llm_analytics`.def setUp(self) -> None:super().setUp()self.organization.available_product_features = [diff --git a/products/alerts/backend/evaluation/hogql.py b/products/alerts/backend/evaluation/hogql.pyindex 49cc35954bb8..a3ed678985d2 100644--- a/products/alerts/backend/evaluation/hogql.py+++ b/products/alerts/backend/evaluation/hogql.py@@ -34,7 +34,7 @@ _HOGQL_SUBJECT = "The SQL insight value"# Any-row alerts fail loud past this many rows: silently truncating could skip the breaching row# (a false negative), which is worse than asking the user to add a LIMIT or aggregate the query.# Deliberately conservative to start — easy to raise if users ask for more. Mirrored in the-# frontend preview as ``HOGQL_ANY_ROW_MAX_ROWS`` (frontend/src/lib/components/Alerts/alertFormLogic.ts);+# frontend preview as ``HOGQL_ANY_ROW_MAX_ROWS`` (products/alerts/frontend/logic/hogqlAlertPreview.ts);# keep the two in sync.ANY_ROW_MAX_ROWS = 50# last_row reads the tail, so a result truncated at HogQL's hard cap can't be trusted (the real@@ -175,7 +175,7 @@ class HogQLExtractor:PREVIEW MIRROR CONTRACT: the configure-time preview re-implements this extractor's decisionrules in TypeScript (``deriveHogQLAlertPreview`` in- frontend/src/lib/components/Alerts/alertFormLogic.ts) so the modal can preview instantly from+ products/alerts/frontend/logic/hogqlAlertPreview.ts) so the modal can preview instantly fromthe already-loaded result. The mirror is advisory only — this extractor is the sole authorityat evaluation time — but if you change any of these rules, update the mirror to match:1. value-column resolution: explicit ``column`` -> single column -> single numeric columndiff --git a/products/feature_flags/backend/api/feature_flag.py b/products/feature_flags/backend/api/feature_flag.pyindex 8673fea64792..72d71cad3d18 100644--- a/products/feature_flags/backend/api/feature_flag.py+++ b/products/feature_flags/backend/api/feature_flag.py@@ -3434,7 +3434,7 @@ class UserBlastRadiusResponseSerializer(serializers.Serializer):# HYPERCACHE CONTRACT: This serializer defines the JSON schema that the Rust feature-flags# service deserializes. Field changes (renames, removals, type changes) must follow the# expand-and-contract pattern. Run the contract tests to verify compatibility:-# pytest posthog/models/feature_flag/test/test_flags_cache.py -k "test_serializer_output_matches_fixture_schema"+# pytest products/feature_flags/backend/test/test_flags_cache.py -k "test_serializer_output_matches_fixture_schema"# See also: rust/feature-flags/src/flags/flag_models.rs (FeatureFlag struct)class MinimalFeatureFlagSerializer(serializers.ModelSerializer):filters = serializers.DictField(source="get_filters", required=False)@@ -3902,7 +3902,7 @@ class FlagRolloutWriteRequest(FlagLifecycleWriteRequest):# that already tag their queries. If you add a new ClickHouse query reachable from an# action on this viewset, wrap it with tag_queries(product=Product.FEATURE_FLAGS,# feature=Feature.QUERY, team_id=self.team_id) so query_log attribution stays correct.-# See posthog/models/feature_flag/user_blast_radius.py for the pattern.+# See products/feature_flags/backend/user_blast_radius.py for the pattern.@extend_schema(extensions={"x-product": ProductKey.FEATURE_FLAGS})class FeatureFlagViewSet(ApprovalHandlingMixin,diff --git a/products/logs/backend/presentation/filter_group_validation.py b/products/logs/backend/presentation/filter_group_validation.pyindex c5d2230d7fa2..50855f3499ec 100644--- a/products/logs/backend/presentation/filter_group_validation.py+++ b/products/logs/backend/presentation/filter_group_validation.py@@ -3,7 +3,7 @@ from __future__ import annotationsfrom typing import Any# Keep aligned with `MAX_FILTER_GROUP_DEPTH` / `MAX_FILTER_GROUP_NODES` in-# `nodejs/src/logs-ingestion/sampling/filter-group-match.ts` and+# `nodejs/src/logs/sampling/filter-group-match.ts` and# `compile-rules.ts`. Both depth and breadth are bounded so an adversarially# deep or wide filter_group cannot stack-overflow or CPU-burn the per-record# evaluator in the Node ingestion worker. The breadth cap is the morediff --git a/products/logs/backend/presentation/views/sampling_api.py b/products/logs/backend/presentation/views/sampling_api.pyindex 8e8451b6562d..8630af67247a 100644--- a/products/logs/backend/presentation/views/sampling_api.py+++ b/products/logs/backend/presentation/views/sampling_api.py@@ -208,7 +208,7 @@ class LogsSamplingRuleSerializer(serializers.ModelSerializer):# record over this tree, so an adversarially deep group is a# stack-overflow + CPU footgun on every log line. Matches# `MAX_FILTER_GROUP_DEPTH` in- # `nodejs/src/logs-ingestion/sampling/filter-group-match.ts`.+ # `nodejs/src/logs/sampling/filter-group-match.ts`.if filter_group_depth(filter_group) > MAX_FILTER_GROUP_DEPTH:raise ValidationError({"config": {"filter_group": f"filter_group is nested too deeply (max depth {MAX_FILTER_GROUP_DEPTH})."}}diff --git a/products/mcp_analytics/backend/tests/test_access_control.py b/products/mcp_analytics/backend/tests/test_access_control.pyindex dc803b5e70dc..371adad254b0 100644--- a/products/mcp_analytics/backend/tests/test_access_control.py+++ b/products/mcp_analytics/backend/tests/test_access_control.py@@ -19,7 +19,7 @@ from products.mcp_analytics.backend.tests import _MCPAnalyticsTeamScopedTestMixi# Guards that "mcp_analytics" being registered in ACCESS_CONTROL_RESOURCES is actually enforced# end-to-end through a real viewset - generic level-comparison and org-admin-bypass mechanics are-# already covered by posthog/rbac/test/test_user_access_control_pbt.py for every registered resource.+# already covered by products/access_control/backend/tests/test_user_access_control_pbt.py for every registered resource.@pytest.mark.eeclass TestMCPAnalyticsAccessControl(_MCPAnalyticsTeamScopedTestMixin, APIBaseTest):def setUp(self) -> None:diff --git a/products/messaging/backend/remote_config.py b/products/messaging/backend/remote_config.pyindex 838639a5ecae..6464879108fd 100644--- a/products/messaging/backend/remote_config.py+++ b/products/messaging/backend/remote_config.py@@ -1,7 +1,7 @@from posthog.models.integration import Integration# Firebase identifies an app by its project_id, APNs by its bundle_id. Kept in step with-# _find_integrations in products/messaging/backend/api/push_subscriptions.py, which resolves the same+# _find_integrations in products/messaging/backend/presentation/views/push_subscriptions.py, which resolves the same# mapping in the opposite direction (app_id to integration).PUSH_APP_ID_CONFIG_KEYS = {"firebase": "project_id", "apns": "bundle_id"}diff --git a/products/workflows/backend/services/account_audience.py b/products/workflows/backend/services/account_audience.pyindex da8f68a76676..46672da24683 100644--- a/products/workflows/backend/services/account_audience.py+++ b/products/workflows/backend/services/account_audience.py@@ -27,7 +27,7 @@ from products.workflows.backend.facade.contracts import (ACCOUNT_BATCH_SIZE = 500# Mirrors ACCOUNT_CUSTOM_PROPERTY_OPERATOR_ALLOWLIST in-# products/customer_analytics/frontend/components/Accounts/accountsCustomPropertyFilters.ts.+# products/customer_analytics/frontend/components/Accounts/accountsPropertyFilters.ts.SUPPORTED_CUSTOM_PROPERTY_OPERATORS = frozenset({"exact",