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.

chore(devex): ratchet cross-boundary reverse accessors (#91584)

Julian Bez958962241ae0
diff --git a/.agents/skills/improving-drf-endpoints/SKILL.md b/.agents/skills/improving-drf-endpoints/SKILL.md
index b3e79013c04d..b2d35ed685fc 100644
--- a/.agents/skills/improving-drf-endpoints/SKILL.md
+++ b/.agents/skills/improving-drf-endpoints/SKILL.md
@@ -53,7 +53,7 @@ Work through this list for every serializer and viewset you touch.
3. **No bare `JSONField()`** — create a custom field class with `@extend_schema_field(TypedSchema)`
4. **`SerializerMethodField` has `@extend_schema_field`** on its `get_*` method
5. **`ChoiceField` has explicit `choices=`** with all valid values listed
-6. **Avoid collision-prone enum field names** — `format`, `type`, `status`, `kind`, `level`, `mode`, `state`, `platform`, `provider` clash with existing choices and fail CI under `--fail-on-warn`; pick a specific name or add an `ENUM_NAME_OVERRIDES` entry up front (see [serializer-fields.md](references/serializer-fields.md#choicefield--explicit-choices))
+6. **Avoid collision-prone enum field names** — `format`, `type`, `status`, `kind`, `level`, `mode`, `state`, `platform`, `provider` clash with existing choices and fail CI under `--fail-on-warn`; pick a specific name or add an `ENUM_NAME_OVERRIDES` entry up front. A product enum's entry must point at a re-export in the product's `backend/facade/enums.py`, never at an internal module — an internal target goes stale invisibly when the product refactors (see [serializer-fields.md](references/serializer-fields.md#choicefield--explicit-choices))
7. **Read vs write serializers are separate** when input shape differs from output
8. **Every success response is backed by a serializer** — returning raw dicts or untyped lists means no generated types downstream
diff --git a/.agents/skills/isolating-product-facade-contracts/SKILL.md b/.agents/skills/isolating-product-facade-contracts/SKILL.md
index e21da261cd99..6c343e317c4e 100644
--- a/.agents/skills/isolating-product-facade-contracts/SKILL.md
+++ b/.agents/skills/isolating-product-facade-contracts/SKILL.md
@@ -135,11 +135,36 @@ least leave a string to grep for.
## Clearing coupling the scan won't show
-`product:isolate:scan` walks the import graph of `backend.*`. Four kinds of
+`product:isolate:scan` walks the import graph of `backend.*`. Six kinds of
coupling escape it — none is a dead end, each has a defined move. After the
backend sweep, `git grep "products.<name>"` (not just `.backend`) and read the
scan's string-reference section to find them.
+**Reverse accessors.** A relation field (FK, O2O, M2M) that crosses a product
+boundary without `related_name="+"` adds a reverse accessor and a reverse query
+name to the target class. No import exists, so the scan cannot see it, but any
+caller can traverse it. The move: seal the relation with `related_name="+"`,
+remove any explicit `related_query_name` (it keeps `filter()` traversal alive
+and shows as a `query:<name>` row), and delete its `reverse-accessor(...)` line
+from
+`products/model_crossing_uses_baseline.txt` in the same change
+(`bin/hogli product:crossings --all --write-baseline`); give a caller that
+needs reverse access a facade read function. The crossing ratchet blocks new
+unsealed relations. See products/architecture.md § Cross-product foreign keys.
+
+**Signal coupling.** A receiver whose sender belongs to another boundary runs
+that boundary's code inside this one's save path, with no import edge when the
+sender is a string. Three moves, by case:
+
+- _Core listens to a product model_ (string sender) — flip the direction: the
+ product calls core's public function from its own save path
+ (`remote_config.mark_dirty(team_id)`), a normal product→core import.
+- _A product reacts to a core save_ — register through a core-owned hook
+ (the `register_team_extension_signal` shape), not a raw `@receiver` on a
+ foreign sender. The hook registry is the inventory.
+- _Either direction_ — never do slow or external work in a receiver body. Use
+ `transaction.on_commit` to dispatch a task instead.
+
**Test-infrastructure coupling.** Tests are in tach's interface graph but not
in its dependency graph (`hogli lint:tach` runs the two passes CI runs). A test
may import any product's public surface without a `depends_on` entry, and a
@@ -246,6 +271,10 @@ records the decrease. See `products/architecture.md` § Wiring couplings.
- Keep facades thin; put business rules behind the facade, in `logic/` by default. Other internal packages (`services/`, `reviewer/`, …) are fine as long as they stay behind the facade.
- Transaction boundaries belong in the facade (or logic), not in views.
- Never return ORM models across product boundaries.
+- Declare every relation field that crosses a product boundary with
+ `related_name="+"` — the reverse-accessor ratchet blocks new unsealed ones.
+- Do not register a signal receiver on another boundary's sender; use the moves
+ in "Signal coupling" above.
- Keep contracts pure (no Django/DRF imports).
- Filter by `team_id` in querysets.
- Do not add product-specific fields to `Team`; use a Team Extension model.
diff --git a/posthog/management/commands/find_enum_collisions.py b/posthog/management/commands/find_enum_collisions.py
index 993e87559cad..4a0d88350eb8 100644
--- a/posthog/management/commands/find_enum_collisions.py
+++ b/posthog/management/commands/find_enum_collisions.py
@@ -77,9 +77,11 @@ class Command(BaseCommand):
self.stdout.write(" Override entry to add to ENUM_NAME_OVERRIDES in web.py")
self.stdout.write(" (key defaults to the current auto-resolved name; rename for a nicer schema type):")
if c["has_spec_id"] and not c["inline_override_matches"]:
- self.stdout.write(f' "{c["auto_name"]}": "your.models.module.Model.ChoicesClass",')
+ self.stdout.write(f' "{c["auto_name"]}": "products.<name>.backend.facade.enums.ChoicesClass",')
self.stdout.write(
- " # ChoiceField with custom labels (labels != values) — override must be a model class path"
+ " # ChoiceField with custom labels (labels != values) — override must be a choices class path."
+ "\n # For a product enum, point at a re-export in backend/facade/enums.py, never at an"
+ "\n # internal module: internal targets go stale invisibly when the product refactors."
)
else:
vals = c["values"]
diff --git a/posthog/test/repo_invariants/test_model_crossing_uses.py b/posthog/test/repo_invariants/test_model_crossing_uses.py
index 231d25fbd56e..62ce22d38a71 100644
--- a/posthog/test/repo_invariants/test_model_crossing_uses.py
+++ b/posthog/test/repo_invariants/test_model_crossing_uses.py
@@ -8,6 +8,11 @@ frozen here, so the count can fall but never rise.
it resolves through the Django app registry, so no import linter can see the edge. Test modules stay
out of scope on that channel.
+`reverse-accessor(...)` lines come from the model graph, not the AST: a relation field that
+crosses a product boundary without `related_name="+"` adds a reverse accessor to the target class,
+with no import for any other check to see. Seal the relation and delete the line in the same change;
+a caller that needs reverse access gets a facade read function.
+
`drives(...)` lines read tests only: a test outside a product that executes a query runner in the
product's wiring location `backend/hogql_queries/`. `drives(<Kind>)` is a query kind the test builds
and runs; `drives(<Name>)` is a name it imports from there. `hogli product:lint` keeps that location
@@ -22,13 +27,13 @@ Regenerate after removing uses:
bin/hogli product:crossings --all --write-baseline
"""
-from hogli_commands.product.crossings import BASELINE_PATH, disallowed_uses, read_baseline, scan_crossing_uses
+from hogli_commands.product.crossings import BASELINE_PATH, all_crossing_uses, disallowed_uses, read_baseline
REGENERATE = "bin/hogli product:crossings --all --write-baseline"
def test_disallowed_crossing_uses_match_the_baseline() -> None:
- scanned = sorted(use.as_baseline_line() for use in disallowed_uses(scan_crossing_uses()))
+ scanned = sorted(use.as_baseline_line() for use in disallowed_uses(all_crossing_uses()))
recorded = sorted(read_baseline())
if scanned == recorded:
return
@@ -42,7 +47,11 @@ def test_disallowed_crossing_uses_match_the_baseline() -> None:
"change the caller: move the query, serializer or write into the model's own product and "
"call a facade function instead. A 'get_model' line is an apps.get_model reference from "
"outside the owning product; it is a coupling the import linters cannot see, and it belongs "
- "behind a facade function too. A 'drives(...)' line is a test outside the product that executes "
+ "behind a facade function too. A 'reverse-accessor(...)' line is a boundary-crossing relation "
+ 'field without related_name="+" (a query:<name> row means an explicit related_query_name '
+ "keeps filter() traversal alive); seal it, remove the explicit query name, and give "
+ "callers a facade read function. "
+ "A 'drives(...)' line is a test outside the product that executes "
"one of its query runners; move that test into the product. Only a doctrine amendment in "
"products/architecture.md § Wiring couplings can add a line.\n"
f"A '-' line means a use went away — good, but the file must record that too. Run: {REGENERATE}\n"
diff --git a/products/architecture.md b/products/architecture.md
index 1cc8b4a14e9f..07ba5f42416b 100644
--- a/products/architecture.md
+++ b/products/architecture.md
@@ -519,18 +519,22 @@ tach handles _inter_-module boundaries (what can cross a product boundary). impo
During migration, existing cross-product model imports are tracked in `tach.toml` `depends_on`. The goal is to replace them with facade calls over time.
-### Django Foreign Keys
+### Cross-product foreign keys
-Django allows `ForeignKey` relationships across products. This is still allowed, but ForeignKey relations create **implicit reverse dependencies**, even if you never use them:
+Django allows `ForeignKey` relationships across products. A relation that crosses a boundary creates an **implicit reverse dependency**, even if you never use it:
```python
# visual_review/backend/models.py
project = models.ForeignKey(Project, ...)
```
-Django will auto-generate reverse relations (`project.visualreview_set`), migration dependencies, and app loading order dependencies — all of which violate isolation.
+Django auto-generates a reverse accessor (`project.visualreview_set`), a reverse query name (`filter(visualreview__...)`), migration dependencies, and app loading order dependencies. No import checker can see the accessor, yet any caller can traverse it.
-**Rule:** a product may have ForeignKeys _to_ core models, but other products must not reference models _inside_ this product. Use `related_name='+'` to disable reverse relations. If you need reverse access, use explicit facade calls rather than ORM traversal.
+**Rule:** declare every relation field (FK, O2O, M2M) that crosses a product boundary with `related_name="+"`, and do not set an explicit `related_query_name` on it. `related_name="+"` alone removes the reverse accessor and the reverse query name; an explicit `related_query_name` keeps `filter()` traversal alive, and the ratchet records it as a `query:<name>` row. A product may point relations _at_ core models; other products must not reference models _inside_ this product. When a caller needs reverse access, add a facade read function — do not traverse the ORM.
+
+A repo invariant enforces this: every cross-boundary reverse accessor is frozen as a `reverse-accessor(...)` line in `products/model_crossing_uses_baseline.txt`, next to the other crossing kinds. The set may only shrink. A new relation without `related_name="+"` fails CI until you seal it or a review adds a baseline line. Regenerate with `bin/hogli product:crossings --all --write-baseline`.
+
+`db_constraint` is a separate concern: it is migration safety (see the hot-table FK rules in [products/README.md](README.md)) and multi-database planning, not Python isolation. Both `db_constraint=False` and a two-phase validated constraint are sanctioned.
# 9. Turbo Tasks & Contract-Based Testing
diff --git a/products/model_crossing_uses_baseline.txt b/products/model_crossing_uses_baseline.txt
index 2e52417f5355..2c6415767146 100644
--- a/products/model_crossing_uses_baseline.txt
+++ b/products/model_crossing_uses_baseline.txt
@@ -2,23 +2,64 @@
# One line per (product.Class, consumer module, kind, count); see products/architecture.md
# § Wiring couplings for which shapes are allowed.
#
-# Three channels land here. Name-level uses of a watched-models crossing class, in any kind the
+# Four channels land here. Name-level uses of a watched-models crossing class, in any kind the
# doctrine does not call instance-free. The kind `get_model`: an `apps.get_model` reference
# from outside the owning product, which covers every product model, not only the allowance ones.
# Test modules and migrations are out of scope on both: a migration reaches a model through the
# historical registry, which is the only way a migration can.
-# And the kind `drives(<Kind or Name>)`, read from tests only: a test outside the product that
+# The kind `drives(<Kind or Name>)`, read from tests only: a test outside the product that
# executes a query runner in the product's wiring location backend/hogql_queries/, by the query
# kind it builds and runs, or by the name it imports from there. While a line stands for a
# location, `hogli product:lint` keeps that location in the contract-check inputs.
+# And the kind `reverse-accessor(<name>)`, read from the model graph: a relation field that
+# crosses a product boundary without related_name="+" adds a reverse accessor to the target
+# class, with no import for any other check to see. The line reads
+# `target.Class owner.Model.field reverse-accessor(<name>) 1`. Seal the relation with
+# related_name="+", remove any explicit related_query_name (a query:<name> row means one keeps
+# filter() traversal alive), and delete the line in the same change; a caller that needs reverse
+# access gets a facade read function. See products/architecture.md § Cross-product foreign keys.
#
# Counts may only go down, and a line that disappears must be deleted here too.
# A new line needs a doctrine amendment, not a baseline edit.
#
# Regenerate: bin/hogli product:crossings --all --write-baseline
+access_control.Role approvals.ApprovalPolicy.bypass_roles reverse-accessor(bypass_policies) 1
+access_control.Role conversations.TicketAssignment.role reverse-accessor(ticketassignment_set) 1
+access_control.Role error_tracking.ErrorTrackingAssignmentRule.role reverse-accessor(errortrackingassignmentrule_set) 1
+access_control.Role error_tracking.ErrorTrackingGroupingRule.role reverse-accessor(errortrackinggroupingrule_set) 1
+access_control.Role error_tracking.ErrorTrackingIssueAssignment.role reverse-accessor(errortrackingissueassignment_set) 1
+access_control.Role posthog.Organization.default_role reverse-accessor(default_for_organizations) 1
+actions.Action cdp.PluginConfig.match_action reverse-accessor(plugin_configs) 1
+actions.Action posthog.TaggedItem.action reverse-accessor(tagged_items) 1
+actions.Action surveys.Survey.actions reverse-accessor(survey_set) 1
+approvals.ChangeRequest feature_flags.ScheduledChange.change_request reverse-accessor(scheduled_changes) 1
+batch_exports.BatchExport cdp.HogFunction.batch_export reverse-accessor(hogfunction_set) 1
canvas.Canvas products.tasks.backend.logic.services.loop_runs get_model 1
+cohorts.Cohort error_tracking.ErrorTrackingIssueCohort.cohort reverse-accessor(errortrackingissuecohort_set) 1
+cohorts.Cohort experiments.Experiment.exposure_cohort reverse-accessor(experiment_set) 1
+conversations.Ticket posthog.TaggedItem.ticket reverse-accessor(tagged_items) 1
+customer_analytics.Account notebooks.ResourceNotebook.account reverse-accessor(notebooks) 1
+customer_analytics.Account posthog.TaggedItem.account reverse-accessor(tagged_items) 1
customer_analytics:backend/hogql_queries/ posthog.api.test.test_sharing drives(AccountsQuery) 1
+dashboards.Dashboard annotations.Annotation.dashboard reverse-accessor(annotation_set) 1
+dashboards.Dashboard ee.DashboardPrivilege.dashboard reverse-accessor(privileges) 1
+dashboards.Dashboard exports.ExportedAsset.dashboard reverse-accessor(exportedasset_set) 1
+dashboards.Dashboard exports.Subscription.dashboard reverse-accessor(subscription_set) 1
+dashboards.Dashboard feature_flags.FeatureFlag.analytics_dashboards reverse-accessor(analytics_dashboards) 1
+dashboards.Dashboard feature_flags.FeatureFlag.usage_dashboard reverse-accessor(featureflag_set) 1
+dashboards.Dashboard feature_flags.FeatureFlagDashboards.dashboard reverse-accessor(featureflagdashboards_set) 1
+dashboards.Dashboard posthog.GroupTypeMapping.detail_dashboard reverse-accessor(grouptypemapping_set) 1
+dashboards.Dashboard posthog.SharingConfiguration.dashboard reverse-accessor(sharingconfiguration_set) 1
+dashboards.Dashboard posthog.TaggedItem.dashboard reverse-accessor(tagged_items) 1
+dashboards.Dashboard posthog.Team.primary_dashboard reverse-accessor(primary_dashboard_teams) 1
+dashboards.Dashboard posthog.UserScenePersonalisation.dashboard reverse-accessor(userscenepersonalisation_set) 1
+dashboards.Dashboard product_analytics.Insight.dashboard reverse-accessor(items) 1
+dashboards.Dashboard product_analytics.Insight.dive_dashboard reverse-accessor(insight_set) 1
+data_modeling.DataWarehouseSavedQuery data_tools.DataWarehouseViewLink.saved_query reverse-accessor(datawarehouseviewlink_set) 1
+data_modeling.DataWarehouseSavedQuery endpoints.EndpointVersion.saved_query reverse-accessor(endpoint_versions) 1
data_modeling.DataWarehouseSavedQuery products.customer_analytics.backend.facade.api get_model 5
+data_tools.DataWarehouseSavedQueryFolder data_modeling.DataWarehouseSavedQuery.folder reverse-accessor(saved_queries) 1
+endpoints.Endpoint posthog.TaggedItem.endpoint reverse-accessor(tagged_items) 1
error_tracking.ErrorTrackingIssue products.demo.backend.logic.products.hedgebox.matrix get_model 1
error_tracking.ErrorTrackingIssue products.posthog_ai.evals.error_tracking.seeders get_model 1
error_tracking.ErrorTrackingIssue products.reminders.backend.constants get_model 1
@@ -30,6 +71,14 @@ error_tracking.ErrorTrackingIssueFingerprintV2 products.posthog_ai.evals.error_t
error_tracking.ErrorTrackingStackFrame products.demo.backend.logic.products.hedgebox.matrix get_model 1
error_tracking:backend/hogql_queries/ products.posthog_ai.eval_harness.test.test_eval_seeders drives(ErrorTrackingQueryRunner) 1
error_tracking:backend/hogql_queries/ products.product_analytics.backend.tests.api.test_insight_query drives(ErrorTrackingQuery) 1
+event_definitions.EventDefinition ee.EnterpriseEventDefinition.eventdefinition_ptr reverse-accessor(enterpriseeventdefinition) 1
+event_definitions.EventDefinition posthog.ObjectMediaPreview.event_definition reverse-accessor(media_previews) 1
+event_definitions.EventDefinition posthog.TaggedItem.event_definition reverse-accessor(tagged_items) 1
+event_definitions.PropertyDefinition access_control.PropertyAccessControl.property_definition reverse-accessor(property_access_controls) 1
+event_definitions.PropertyDefinition ee.EnterprisePropertyDefinition.propertydefinition_ptr reverse-accessor(enterprisepropertydefinition) 1
+event_definitions.PropertyDefinition posthog.MaterializedColumnSlot.property_definition reverse-accessor(materialized_column_slots) 1
+event_definitions.PropertyDefinition posthog.TaggedItem.property_definition reverse-accessor(tagged_items) 1
+experiments.ExperimentSavedMetric posthog.TaggedItem.experiment_saved_metric reverse-accessor(tagged_items) 1
experiments:backend/hogql_queries/ ee.clickhouse.views.test.test_experiment_saved_metrics drives(ExperimentTrendsQuery) 2
experiments:backend/hogql_queries/ posthog.session_recordings.queries.test.listing_recordings.test_session_recordings_list_by_experiment_exposure drives(ExposureQueryBuilder) 1
experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warming drives(ExperimentQueryRunner) 2
@@ -37,7 +86,519 @@ experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warmi
experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warming drives(compute_metric_fingerprint) 2
experiments:backend/hogql_queries/ posthog.temporal.experiments.test_cache_warming drives(get_experiment_stats_method) 2
experiments:backend/hogql_queries/ products.actions.backend.api.test.test_action drives(ExperimentTrendsQuery) 3
+exports.ExportedAsset posthog.ObjectMediaPreview.exported_asset reverse-accessor(object_previews) 1
+feature_flags.FeatureFlag access_control.FeatureFlagRoleAccess.feature_flag reverse-accessor(access) 1
+feature_flags.FeatureFlag early_access_features.EarlyAccessFeature.feature_flag reverse-accessor(features) 1
+feature_flags.FeatureFlag experiments.Experiment.feature_flag reverse-accessor(experiment_set) 1
+feature_flags.FeatureFlag posthog.TaggedItem.feature_flag reverse-accessor(tagged_items) 1
+feature_flags.FeatureFlag product_tours.ProductTour.internal_targeting_flag reverse-accessor(product_tours_internal_targeting_flag) 1
+feature_flags.FeatureFlag product_tours.ProductTour.linked_flag reverse-accessor(product_tours_linked_flag) 1
+feature_flags.FeatureFlag surveys.Survey.internal_response_sampling_flag reverse-accessor(surveys_internal_response_sampling_flag) 1
+feature_flags.FeatureFlag surveys.Survey.internal_targeting_flag reverse-accessor(surveys_internal_targeting_flag) 1
+feature_flags.FeatureFlag surveys.Survey.linked_flag reverse-accessor(surveys_linked_flag) 1
+feature_flags.FeatureFlag surveys.Survey.targeting_flag reverse-accessor(surveys_targeting_flag) 1
metrics:backend/hogql_queries/ posthog.tasks.alerts.test.test_metrics_alerts drives(MetricsQuery) 1
+notebooks.Notebook posthog.SharingConfiguration.notebook reverse-accessor(sharing_configurations) 1
+posthog.Comment conversations.EmailMessageMapping.comment reverse-accessor(emailmessagemapping_set) 1
+posthog.Comment conversations.EmailOutboxMessage.comment reverse-accessor(emailoutboxmessage) 1
+posthog.Comment conversations.EmailThreadMessage.comment reverse-accessor(email_thread_message) 1
+posthog.Comment conversations.GithubCommentMapping.comment reverse-accessor(githubcommentmapping_set) 1
+posthog.CoreEvent marketing_analytics.MarketingAnalyticsGoalMapping.core_event reverse-accessor(marketing_goal_mappings) 1
+posthog.DataColorTheme dashboards.Dashboard.data_color_theme reverse-accessor(dashboard_set) 1
+posthog.Event actions.Action.events reverse-accessor(action_set) 1
+posthog.Integration batch_exports.BatchExportDestination.integration reverse-accessor(batchexportdestination_set) 1
+posthog.Integration data_modeling.GitHubSyncConfig.integration reverse-accessor(githubsyncconfig_set) 1
+posthog.Integration error_tracking.ErrorTrackingExternalReference.integration reverse-accessor(errortrackingexternalreference_set) 1
+posthog.Integration exports.Subscription.integration reverse-accessor(subscription_set) 1
+posthog.Integration slack_app.SlackSettings.default_integration reverse-accessor(slack_settings_as_default) 1
+posthog.Integration slack_app.SlackThreadTaskMapping.integration reverse-accessor(slack_thread_task_mappings) 1
+posthog.Integration slack_app.SlackUserProfileCache.integration reverse-accessor(slack_user_profile_cache) 1
+posthog.Integration tasks.SandboxSnapshot.integration reverse-accessor(snapshots) 1
+posthog.Integration tasks.Task.github_integration reverse-accessor(task_set) 1
+posthog.Organization access_control.OrganizationResourceAccess.organization reverse-accessor(resource_access) 1
+posthog.Organization access_control.Role.organization reverse-accessor(roles) 1
+posthog.Organization access_control.RoleExternalReference.organization reverse-accessor(role_external_references) 1
+posthog.Organization annotations.Annotation.organization reverse-accessor(annotation_set) 1
+posthog.Organization approvals.ApprovalPolicy.organization reverse-accessor(approvalpolicy_set) 1
+posthog.Organization approvals.ChangeRequest.organization reverse-accessor(changerequest_set) 1
+posthog.Organization cdp.Plugin.has_private_access reverse-accessor(plugin_set) 1
+posthog.Organization cdp.Plugin.organization reverse-accessor(plugins) 1
+posthog.Organization growth.EnrichmentLabelResult.organization reverse-accessor(enrichment_label_results) 1
+posthog.Organization growth.EnrichmentSignupSnapshot.organization reverse-accessor(enrichment_signup_snapshot) 1
+posthog.Organization growth.OrganizationEnrichment.organization reverse-accessor(enrichment_record) 1
+posthog.Organization growth.OrganizationEnrichmentFetch.organization reverse-accessor(enrichment_fetches) 1
+posthog.Organization growth.ProductPushCampaign.organization reverse-accessor(product_push_campaigns) 1
+posthog.Organization legal_documents.LegalDocument.organization reverse-accessor(legal_documents) 1
+posthog.Organization managed_warehouse.DuckgresServer.organization reverse-accessor(duckgres_server) 1
+posthog.Organization managed_warehouse.ManagedWarehouseSourceLifecycle.organization reverse-accessor(managed_warehouse_source_lifecycle) 1
+posthog.Organization notifications.NotificationEvent.organization reverse-accessor(notificationevent_set) 1
+posthog.Organization reminders.Reminder.organization reverse-accessor(reminder_set) 1
+posthog.Organization replay_vision.ReplayObservationUsage.organization reverse-accessor(replay_observation_usage) 1
+posthog.Organization tasks.DesktopBetaTermsAcceptance.organization reverse-accessor(desktopbetatermsacceptance) 1
+posthog.OrganizationMembership access_control.AccessControl.organization_member reverse-accessor(access_controls) 1
+posthog.OrganizationMembership access_control.PropertyAccessControl.organization_member reverse-accessor(property_access_controls) 1
+posthog.OrganizationMembership access_control.RoleMembership.organization_member reverse-accessor(role_memberships) 1
+posthog.Person cohorts.Cohort.people reverse-accessor(cohort_set) 1
+posthog.Person cohorts.CohortPeople.person reverse-accessor(cohortpeople_set) 1
+posthog.Person feature_flags.FeatureFlagHashKeyOverride.person reverse-accessor(featureflaghashkeyoverride_set) 1
+posthog.Project actions.Action.project reverse-accessor(action_set) 1
+posthog.Project event_definitions.EventDefinition.project reverse-accessor(eventdefinition_set) 1
+posthog.Project event_definitions.EventProperty.project reverse-accessor(eventproperty_set) 1
+posthog.Project event_definitions.PropertyDefinition.project reverse-accessor(propertydefinition_set) 1
+posthog.Project event_definitions.SchemaPropertyGroup.project reverse-accessor(schemapropertygroup_set) 1
+posthog.Team access_control.AccessControl.team reverse-accessor(access_controls) 1
+posthog.Team access_control.PropertyAccessControl.team reverse-accessor(property_access_controls) 1
+posthog.Team actions.Action.team reverse-accessor(action_set) 1
+posthog.Team ai_observability.AIObservabilityChecklistItemState.team reverse-accessor(aiobservabilitychecklistitemstate_set) 1
+posthog.Team ai_observability.ClusteringConfig.team reverse-accessor(clustering_config) 1
+posthog.Team ai_observability.ClusteringJob.team reverse-accessor(clustering_jobs) 1
+posthog.Team ai_observability.Dataset.team reverse-accessor(dataset_set) 1
+posthog.Team ai_observability.DatasetItem.team reverse-accessor(datasetitem_set) 1
+posthog.Team ai_observability.DatasetItemVersion.team reverse-accessor(datasetitemversion_set) 1
+posthog.Team ai_observability.DatasetRevision.team reverse-accessor(datasetrevision_set) 1
+posthog.Team ai_observability.Evaluation.team reverse-accessor(evaluation_set) 1
+posthog.Team ai_observability.EvaluationConfig.team reverse-accessor(evaluation_config) 1
+posthog.Team ai_observability.EvaluationDirectory.team reverse-accessor(evaluationdirectory_set) 1
+posthog.Team ai_observability.EvaluationReport.team reverse-accessor(evaluationreport_set) 1
+posthog.Team ai_observability.LLMModelConfiguration.team reverse-accessor(llmmodelconfiguration_set) 1
+posthog.Team ai_observability.LLMPrompt.team reverse-accessor(llmprompt_set) 1
+posthog.Team ai_observability.LLMPromptLabel.team reverse-accessor(llmpromptlabel_set) 1
+posthog.Team ai_observability.LLMProviderKey.team reverse-accessor(llmproviderkey_set) 1
+posthog.Team ai_observability.LLMTraceSummary.team reverse-accessor(llmtracesummary_set) 1
+posthog.Team ai_observability.ParserRecipe.team reverse-accessor(parserrecipe_set) 1
+posthog.Team ai_observability.ReviewQueue.team reverse-accessor(reviewqueue_set) 1
+posthog.Team ai_observability.ReviewQueueItem.team reverse-accessor(reviewqueueitem_set) 1
+posthog.Team ai_observability.ScoreDefinition.team reverse-accessor(scoredefinition_set) 1
+posthog.Team ai_observability.Tagger.team reverse-accessor(tagger_set) 1
+posthog.Team ai_observability.TraceReview.team reverse-accessor(tracereview_set) 1
+posthog.Team ai_observability.TraceReviewScore.team reverse-accessor(tracereviewscore_set) 1
+posthog.Team alerts.Alert.team reverse-accessor(alert_set) 1
+posthog.Team alerts.AlertConfiguration.team reverse-accessor(alertconfiguration_set) 1
+posthog.Team alerts.Threshold.team reverse-accessor(threshold_set) 1
+posthog.Team analytics_platform.PreaggregationJob.team reverse-accessor(preaggregationjob_set) 1
+posthog.Team annotations.Annotation.team reverse-accessor(annotation_set) 1
+posthog.Team approvals.ApprovalPolicy.team reverse-accessor(approvalpolicy_set) 1
+posthog.Team approvals.ChangeRequest.team reverse-accessor(changerequest_set) 1
+posthog.Team batch_exports.BatchExport.team reverse-accessor(batchexport_set) 1
+posthog.Team batch_exports.BatchExportBackfill.team reverse-accessor(batchexportbackfill_set) 1
+posthog.Team batch_exports.BatchExportFileDownload.team reverse-accessor(batchexportfiledownload_set) 1
+posthog.Team batch_exports.BatchExportOnDemand.team reverse-accessor(batchexportondemand_set) 1
+posthog.Team batch_exports.BatchExportSource.team reverse-accessor(batchexportsource_set) 1
+posthog.Team business_knowledge.KnowledgeGapSuggestion.team reverse-accessor(business_knowledge_gap_suggestions) 1
+posthog.Team business_knowledge.KnowledgeSource.team reverse-accessor(business_knowledge_sources) 1
+posthog.Team canvas.Canvas.team reverse-accessor(canvas_set) 1
+posthog.Team canvas.CanvasBuild.team reverse-accessor(canvasbuild_set) 1
+posthog.Team canvas.CanvasHomePreference.team reverse-accessor(canvashomepreference_set) 1
+posthog.Team canvas.CanvasSourceVersion.team reverse-accessor(canvassourceversion_set) 1
+posthog.Team canvas.CanvasState.team reverse-accessor(canvasstate_set) 1
+posthog.Team cdp.HogFunction.team reverse-accessor(hogfunction_set) 1
+posthog.Team cdp.HogFunctionRevision.team reverse-accessor(hogfunctionrevision_set) 1
+posthog.Team cdp.Hook.team reverse-accessor(rest_hooks) 1
+posthog.Team cdp.PluginAttachment.team reverse-accessor(pluginattachment_set) 1
+posthog.Team cdp.PluginConfig.team reverse-accessor(pluginconfig_set) 1
+posthog.Team cohorts.Cohort.team reverse-accessor(cohort_set) 1
+posthog.Team cohorts.CohortCalculationHistory.team reverse-accessor(cohortcalculationhistory_set) 1
+posthog.Team conversations.ConversationRestoreToken.team reverse-accessor(conversation_restore_tokens) 1
+posthog.Team conversations.EmailChannel.team reverse-accessor(email_channels) 1
+posthog.Team conversations.EmailChannelSetup.team reverse-accessor(emailchannelsetup_set) 1
+posthog.Team conversations.EmailMessageMapping.team reverse-accessor(emailmessagemapping_set) 1
+posthog.Team conversations.EmailOutboxMessage.team reverse-accessor(emailoutboxmessage_set) 1
+posthog.Team conversations.EmailThread.team reverse-accessor(emailthread_set) 1
+posthog.Team conversations.EmailThreadAccountLink.team reverse-accessor(emailthreadaccountlink_set) 1
+posthog.Team conversations.EmailThreadMessage.team reverse-accessor(emailthreadmessage_set) 1
+posthog.Team conversations.EmailThreadParticipant.team reverse-accessor(emailthreadparticipant_set) 1
+posthog.Team conversations.GithubCommentMapping.team reverse-accessor(githubcommentmapping_set) 1
+posthog.Team conversations.SigningSecret.team reverse-accessor(conversations_signing_secret) 1
+posthog.Team conversations.TeamConversationsSlackConfig.team reverse-accessor(teamconversationsslackconfig) 1
+posthog.Team conversations.TeamConversationsTeamsChannelSync.team reverse-accessor(teamconversationsteamschannelsync_set) 1
+posthog.Team conversations.TeamConversationsTeamsConfig.team reverse-accessor(teamconversationsteamsconfig) 1
+posthog.Team conversations.Ticket.team reverse-accessor(ticket_set) 1
+posthog.Team conversations.TicketView.team reverse-accessor(ticketview_set) 1
+posthog.Team conversations.TicketViewFavorite.team reverse-accessor(ticketviewfavorite_set) 1
+posthog.Team conversations.ZendeskImportJob.team reverse-accessor(zendeskimportjob_set) 1
+posthog.Team customer_analytics.Account.team reverse-accessor(account_set) 1
+posthog.Team customer_analytics.AccountChannelSummary.team reverse-accessor(accountchannelsummary_set) 1
+posthog.Team customer_analytics.AccountRelationship.team reverse-accessor(accountrelationship_set) 1
+posthog.Team customer_analytics.AccountRelationshipDefinition.team reverse-accessor(accountrelationshipdefinition_set) 1
+posthog.Team customer_analytics.AccountTrackRuleRun.team reverse-accessor(accounttrackrulerun_set) 1
+posthog.Team customer_analytics.Announcement.team reverse-accessor(announcement_set) 1
+posthog.Team customer_analytics.AnnouncementDelivery.team reverse-accessor(announcementdelivery_set) 1
+posthog.Team customer_analytics.CustomPropertyDefinition.team reverse-accessor(custompropertydefinition_set) 1
+posthog.Team customer_analytics.CustomPropertySource.team reverse-accessor(custompropertysource_set) 1
+posthog.Team customer_analytics.CustomPropertySyncRun.team reverse-accessor(custompropertysyncrun_set) 1
+posthog.Team customer_analytics.CustomPropertyValue.team reverse-accessor(custompropertyvalue_set) 1
+posthog.Team customer_analytics.CustomerJourney.team reverse-accessor(customerjourney_set) 1
+posthog.Team customer_analytics.CustomerProfileConfig.team reverse-accessor(customerprofileconfig_set) 1
+posthog.Team customer_analytics.EventStreamMember.team reverse-accessor(eventstreammember_set) 1
+posthog.Team customer_analytics.FeatureRequest.team reverse-accessor(featurerequest_set) 1
+posthog.Team customer_analytics.FeatureRequestAccountLink.team reverse-accessor(featurerequestaccountlink_set) 1
+posthog.Team customer_analytics.FeatureRequestEvidence.team reverse-accessor(featurerequestevidence_set) 1
+posthog.Team customer_analytics.FeatureRequestHistory.team reverse-accessor(featurerequesthistory_set) 1
+posthog.Team customer_analytics.FeatureRequestProductArea.team reverse-accessor(featurerequestproductarea_set) 1
+posthog.Team customer_analytics.FeatureRequestProductAreaLink.team reverse-accessor(featurerequestproductarealink_set) 1
+posthog.Team customer_analytics.Meeting.team reverse-accessor(meeting_set) 1
+posthog.Team customer_analytics.MeetingParticipant.team reverse-accessor(meetingparticipant_set) 1
+posthog.Team customer_analytics.TeamCustomerAnalyticsConfig.team reverse-accessor(teamcustomeranalyticsconfig) 1
+posthog.Team dashboards.ButtonTile.team reverse-accessor(buttontile_set) 1
+posthog.Team dashboards.Dashboard.team reverse-accessor(dashboard_set) 1
+posthog.Team dashboards.DashboardTemplate.team reverse-accessor(dashboardtemplate_set) 1
+posthog.Team dashboards.DashboardTile.team reverse-accessor(dashboardtile_set) 1
+posthog.Team dashboards.DashboardWidget.team reverse-accessor(dashboardwidget_set) 1
+posthog.Team dashboards.Text.team reverse-accessor(text_set) 1
+posthog.Team data_catalog.Metric.team reverse-accessor(metric_set) 1
+posthog.Team data_catalog.RelationshipProposal.team reverse-accessor(relationshipproposal_set) 1
+posthog.Team data_catalog.TableCertification.team reverse-accessor(tablecertification_set) 1
+posthog.Team data_modeling.DAG.team reverse-accessor(dag_set) 1
+posthog.Team data_modeling.DataModelingJob.team reverse-accessor(datamodelingjob_set) 1
+posthog.Team data_modeling.DataWarehouseManagedViewSet.team reverse-accessor(datawarehousemanagedviewset_set) 1
+posthog.Team data_modeling.DataWarehouseModelPath.team reverse-accessor(datawarehousemodelpath_set) 1
+posthog.Team data_modeling.DataWarehouseSavedQuery.team reverse-accessor(datawarehousesavedquery_set) 1
+posthog.Team data_modeling.DataWarehouseSavedQueryColumnAnnotation.team reverse-accessor(datawarehousesavedquerycolumnannotation_set) 1
+posthog.Team data_modeling.DataWarehouseSavedQueryDraft.team reverse-accessor(datawarehousesavedquerydraft_set) 1
+posthog.Team data_modeling.Edge.team reverse-accessor(edge_set) 1
+posthog.Team data_modeling.GitHubSyncConfig.team reverse-accessor(githubsyncconfig) 1
+posthog.Team data_modeling.GitHubSyncPlan.team reverse-accessor(githubsyncplan_set) 1
+posthog.Team data_modeling.GitHubSyncedModel.team reverse-accessor(githubsyncedmodel_set) 1
+posthog.Team data_modeling.Node.team reverse-accessor(node_set) 1
+posthog.Team data_quality.DataQualityCheck.team reverse-accessor(dataqualitycheck_set) 1
+posthog.Team data_quality.DataQualityCheckRun.team reverse-accessor(dataqualitycheckrun_set) 1
+posthog.Team data_quality.DataQualitySuiteRun.team reverse-accessor(dataqualitysuiterun_set) 1
+posthog.Team data_quality.TeamDataQualityConfig.team reverse-accessor(teamdataqualityconfig) 1
+posthog.Team data_tools.DataWarehouseExpression.team reverse-accessor(datawarehouseexpression_set) 1
+posthog.Team data_tools.DataWarehouseJoin.team reverse-accessor(datawarehousejoin_set) 1
+posthog.Team data_tools.DataWarehouseSavedQueryFolder.team reverse-accessor(datawarehousesavedqueryfolder_set) 1
+posthog.Team data_tools.DataWarehouseViewLink.team reverse-accessor(datawarehouseviewlink_set) 1
+posthog.Team data_tools.QueryTabState.team reverse-accessor(querytabstate_set) 1
+posthog.Team data_warehouse.ManagedWarehouseBackfillPartition.team reverse-accessor(managedwarehousebackfillpartition_set) 1
+posthog.Team data_warehouse.TeamDataWarehouseConfig.team reverse-accessor(teamdatawarehouseconfig) 1
+posthog.Team early_access_features.EarlyAccessFeature.team reverse-accessor(features) 1
+posthog.Team endpoints.Endpoint.team reverse-accessor(endpoint_set) 1
+posthog.Team endpoints.EndpointVersion.team reverse-accessor(endpointversion_set) 1
+posthog.Team error_tracking.ErrorTrackingAssignmentRule.team reverse-accessor(errortrackingassignmentrule_set) 1
+posthog.Team error_tracking.ErrorTrackingAutoCaptureControls.team reverse-accessor(errortrackingautocapturecontrols_set) 1
+posthog.Team error_tracking.ErrorTrackingBypassRule.team reverse-accessor(errortrackingbypassrule_set) 1
+posthog.Team error_tracking.ErrorTrackingGroup.team reverse-accessor(errortrackinggroup_set) 1
+posthog.Team error_tracking.ErrorTrackingGroupingRule.team reverse-accessor(errortrackinggroupingrule_set) 1
+posthog.Team error_tracking.ErrorTrackingIssue.team reverse-accessor(errortrackingissue_set) 1
+posthog.Team error_tracking.ErrorTrackingIssueAssignment.team reverse-accessor(errortrackingissueassignment_set) 1
+posthog.Team error_tracking.ErrorTrackingIssueFingerprint.team reverse-accessor(errortrackingissuefingerprint_set) 1
+posthog.Team error_tracking.ErrorTrackingIssueFingerprintV2.team reverse-accessor(errortrackingissuefingerprintv2_set) 1
+posthog.Team error_tracking.ErrorTrackingRecommendation.team reverse-accessor(error_tracking_recommendations) 1
+posthog.Team error_tracking.ErrorTrackingRelease.team reverse-accessor(errortrackingrelease_set) 1
+posthog.Team error_tracking.ErrorTrackingSettings.team reverse-accessor(error_tracking_settings) 1
+posthog.Team error_tracking.ErrorTrackingSeverityRule.team reverse-accessor(errortrackingseverityrule_set) 1
+posthog.Team error_tracking.ErrorTrackingSpikeDetectionConfig.team reverse-accessor(error_tracking_spike_detection_config) 1
+posthog.Team error_tracking.ErrorTrackingSpikeEvent.team reverse-accessor(errortrackingspikeevent_set) 1
+posthog.Team error_tracking.ErrorTrackingStackFrame.team reverse-accessor(errortrackingstackframe_set) 1
+posthog.Team error_tracking.ErrorTrackingSuppressionRule.team reverse-accessor(errortrackingsuppressionrule_set) 1
+posthog.Team error_tracking.ErrorTrackingSymbolSet.team reverse-accessor(errortrackingsymbolset_set) 1
+posthog.Team event_definitions.EventDefinition.team reverse-accessor(event_definitions) 1
+posthog.Team event_definitions.EventProperty.team reverse-accessor(eventproperty_set) 1
+posthog.Team event_definitions.PropertyDefinition.team reverse-accessor(property_definitions) 1
+posthog.Team event_definitions.SchemaPropertyGroup.team reverse-accessor(schema_property_groups) 1
+posthog.Team experiments.Experiment.team reverse-accessor(experiment_set) 1
+posthog.Team experiments.ExperimentHoldout.team reverse-accessor(experimentholdout_set) 1
+posthog.Team experiments.ExperimentMetricsRecalculation.team reverse-accessor(experimentmetricsrecalculation_set) 1
+posthog.Team experiments.ExperimentSavedMetric.team reverse-accessor(experimentsavedmetric_set) 1
+posthog.Team experiments.ExperimentTimeseriesRecalculation.team reverse-accessor(experimenttimeseriesrecalculation_set) 1
+posthog.Team experiments.TeamExperimentsConfig.team reverse-accessor(teamexperimentsconfig) 1
+posthog.Team exports.ExportedAsset.team reverse-accessor(exportedasset_set) 1
+posthog.Team exports.Subscription.team reverse-accessor(subscription_set) 1
+posthog.Team exports.SubscriptionDelivery.team reverse-accessor(subscriptiondelivery_set) 1
+posthog.Team feature_flags.EvaluationContext.team reverse-accessor(evaluation_context_set) 1
+posthog.Team feature_flags.FeatureFlag.team reverse-accessor(featureflag_set) 1
+posthog.Team feature_flags.FeatureFlagHashKeyOverride.team reverse-accessor(featureflaghashkeyoverride_set) 1
+posthog.Team feature_flags.FeatureFlagOverride.team reverse-accessor(featureflagoverride_set) 1
+posthog.Team feature_flags.ScheduledChange.team reverse-accessor(scheduledchange_set) 1
+posthog.Team feature_flags.TeamDefaultEvaluationContext.team reverse-accessor(default_evaluation_context_set) 1
+posthog.Team feature_flags.TeamFeatureFlagDefaultsConfig.team reverse-accessor(teamfeatureflagdefaultsconfig) 1
+posthog.Team feature_flags.TeamFeatureFlagsConfig.team reverse-accessor(teamfeatureflagsconfig) 1
+posthog.Team field_notes.FieldNote.team reverse-accessor(fieldnote_set) 1
+posthog.Team links.Link.team reverse-accessor(link_set) 1
+posthog.Team live_debugger.LiveDebuggerBreakpoint.team reverse-accessor(livedebuggerbreakpoint_set) 1
+posthog.Team logs.LogsAlertConfiguration.team reverse-accessor(logsalertconfiguration_set) 1
+posthog.Team logs.LogsExclusionRule.team reverse-accessor(logsexclusionrule_set) 1
+posthog.Team logs.LogsMetricRule.team reverse-accessor(logsmetricrule_set) 1
+posthog.Team logs.LogsRetentionRule.team reverse-accessor(logsretentionrule_set) 1
+posthog.Team logs.LogsView.team reverse-accessor(logsview_set) 1
+posthog.Team logs.TeamLogsConfig.team reverse-accessor(teamlogsconfig) 1
+posthog.Team managed_migrations.BatchImport.team reverse-accessor(batchimport_set) 1
+posthog.Team managed_warehouse.ManagedWarehouseSourceJob.team reverse-accessor(managed_warehouse_source_jobs) 1
+posthog.Team marketing_analytics.MarketingAnalyticsGoalMapping.team reverse-accessor(marketing_analytics_goal_mappings) 1
+posthog.Team mcp_analytics.MCPAnalyticsSubmission.team reverse-accessor(mcpanalyticssubmission_set) 1
+posthog.Team mcp_analytics.MCPIntentClusterSnapshot.team reverse-accessor(mcp_intent_cluster_snapshot) 1
+posthog.Team mcp_analytics.MCPIntentEmbeddingCache.team reverse-accessor(mcpintentembeddingcache_set) 1
+posthog.Team mcp_analytics.MCPSession.team reverse-accessor(mcpsession_set) 1
+posthog.Team mcp_store.MCPGatewayServer.team reverse-accessor(gateway_servers) 1
+posthog.Team mcp_store.MCPOAuthState.team reverse-accessor(mcpoauthstate_set) 1
+posthog.Team mcp_store.MCPOrgRule.team reverse-accessor(org_rules) 1
+posthog.Team mcp_store.MCPServerInstallation.team reverse-accessor(mcpserverinstallation_set) 1
+posthog.Team mcp_store.MCPServiceAccount.team reverse-accessor(mcp_service_accounts) 1
+posthog.Team mcp_store.TeamMCPGatewayConfig.team reverse-accessor(mcp_gateway_config) 1
+posthog.Team messaging.MessageCategory.team reverse-accessor(messagecategory_set) 1
+posthog.Team messaging.MessageRecipientPreference.team reverse-accessor(messagerecipientpreference_set) 1
+posthog.Team messaging.MessageSuppression.team reverse-accessor(messagesuppression_set) 1
+posthog.Team messaging.MessageTemplate.team reverse-accessor(messagetemplate_set) 1
+posthog.Team messaging.OptOutSyncConfig.team reverse-accessor(optoutsyncconfig) 1
+posthog.Team notebooks.KernelRuntime.team reverse-accessor(kernelruntime_set) 1
+posthog.Team notebooks.Notebook.team reverse-accessor(notebook_set) 1
+posthog.Team notebooks.NotebookNodeRun.team reverse-accessor(notebooknoderun_set) 1
+posthog.Team notifications.NotificationEvent.team reverse-accessor(notificationevent_set) 1
+posthog.Team posthog_ai.AgentArtifact.team reverse-accessor(agentartifact_set) 1
+posthog.Team posthog_ai.AgentMemory.team reverse-accessor(agent_memories) 1
+posthog.Team posthog_ai.Conversation.team reverse-accessor(conversation_set) 1
+posthog.Team posthog_ai.CoreMemory.team reverse-accessor(corememory) 1
+posthog.Team product_analytics.Insight.team reverse-accessor(insight_set) 1
+posthog.Team product_analytics.InsightVariable.team reverse-accessor(insightvariable_set) 1
+posthog.Team product_analytics.InsightViewed.team reverse-accessor(insightviewed_set) 1
+posthog.Team product_tours.ProductTour.team reverse-accessor(product_tours) 1
+posthog.Team pulse.BriefConfig.team reverse-accessor(briefconfig_set) 1
+posthog.Team pulse.Opportunity.team reverse-accessor(opportunity_set) 1
+posthog.Team pulse.ProductBrief.team reverse-accessor(productbrief_set) 1
+posthog.Team pulse.ResourceLink.team reverse-accessor(resourcelink_set) 1
+posthog.Team reminders.Reminder.team reverse-accessor(reminder_set) 1
+posthog.Team replay.ExportedRecording.team reverse-accessor(exported_recordings) 1
+posthog.Team replay_vision.VisionAction.team reverse-accessor(vision_actions) 1
+posthog.Team signals.SignalEmissionRecord.team reverse-accessor(signalemissionrecord_set) 1
+posthog.Team signals.SignalProjectProfile.team reverse-accessor(signal_project_profiles) 1
+posthog.Team signals.SignalReport.team reverse-accessor(signalreport_set) 1
+posthog.Team signals.SignalReportAction.team reverse-accessor(signalreportaction_set) 1
+posthog.Team signals.SignalReportArtefact.team reverse-accessor(signalreportartefact_set) 1
+posthog.Team signals.SignalReportRefund.team reverse-accessor(signalreportrefund_set) 1
+posthog.Team signals.SignalReportTask.team reverse-accessor(signalreporttask_set) 1
+posthog.Team signals.SignalRepositoryAreaActivity.team reverse-accessor(signal_repo_area_activities) 1
+posthog.Team signals.SignalScoutConfig.team reverse-accessor(signal_scout_configs) 1
+posthog.Team signals.SignalScoutEmission.team reverse-accessor(signal_scout_emissions) 1
+posthog.Team signals.SignalScoutNote.team reverse-accessor(signal_scout_notes) 1
+posthog.Team signals.SignalScoutRun.team reverse-accessor(signal_scout_runs) 1
+posthog.Team signals.SignalScratchpad.team reverse-accessor(signal_scratchpads) 1
+posthog.Team signals.SignalSourceConfig.team reverse-accessor(signal_source_configs) 1
+posthog.Team signals.SignalTeamConfig.team reverse-accessor(signal_team_config) 1
+posthog.Team skills.LLMSkill.team reverse-accessor(llmskill_set) 1
+posthog.Team slack_app.SlackThreadTaskMapping.team reverse-accessor(slack_thread_task_mappings) 1
+posthog.Team streamlit_apps.StreamlitApp.team reverse-accessor(streamlitapp_set) 1
+posthog.Team surveys.Survey.team reverse-accessor(surveys) 1
+posthog.Team surveys.SurveyResponseArchive.team reverse-accessor(survey_response_archives) 1
+posthog.Team tasks.SandboxEnvironment.team reverse-accessor(sandboxenvironment_set) 1
+posthog.Team tasks.Task.team reverse-accessor(task_set) 1
+posthog.Team tasks.TaskRun.team reverse-accessor(taskrun_set) 1
+posthog.Team tasks.TaskWorkflowDispatch.team reverse-accessor(taskworkflowdispatch_set) 1
+posthog.Team tracing.TracingView.team reverse-accessor(tracingview_set) 1
+posthog.Team user_interviews.IntervieweeContext.team reverse-accessor(intervieweecontext_set) 1
+posthog.Team user_interviews.UserInterview.team reverse-accessor(userinterview_set) 1
+posthog.Team user_interviews.UserInterviewTopic.team reverse-accessor(userinterviewtopic_set) 1
+posthog.Team warehouse_sources.CustomOAuth2Integration.team reverse-accessor(customoauth2integration_set) 1
+posthog.Team warehouse_sources.DataWarehouseCredential.team reverse-accessor(datawarehousecredential_set) 1
+posthog.Team warehouse_sources.DataWarehouseTable.team reverse-accessor(datawarehousetable_set) 1
+posthog.Team warehouse_sources.ExternalDataJob.team reverse-accessor(externaldatajob_set) 1
+posthog.Team warehouse_sources.ExternalDataSchema.team reverse-accessor(externaldataschema_set) 1
+posthog.Team warehouse_sources.ExternalDataSchemaOOMEvent.team reverse-accessor(externaldataschemaoomevent_set) 1
+posthog.Team warehouse_sources.ExternalDataSource.team reverse-accessor(externaldatasource_set) 1
+posthog.Team warehouse_sources.PendingSourceCredential.team reverse-accessor(pendingsourcecredential_set) 1
+posthog.Team warehouse_sources.WarehouseColumnAnnotation.team reverse-accessor(warehousecolumnannotation_set) 1
+posthog.Team warehouse_sources.WarehouseColumnStatistics.team reverse-accessor(warehousecolumnstatistics_set) 1
+posthog.Team web_analytics.SavedHeatmap.team reverse-accessor(savedheatmap_set) 1
+posthog.Team web_analytics.WebAnalyticsAchievementProgress.team reverse-accessor(webanalyticsachievementprogress_set) 1
+posthog.Team web_analytics.WebAnalyticsFilterPreset.team reverse-accessor(webanalyticsfilterpreset_set) 1
+posthog.Team web_analytics.WebAnalyticsInteraction.team reverse-accessor(webanalyticsinteraction_set) 1
+posthog.Team web_analytics.WebAnalyticsUserConfig.team reverse-accessor(webanalyticsuserconfig_set) 1
+posthog.Team web_analytics.WebAnalyticsVisit.team reverse-accessor(webanalyticsvisit_set) 1
+posthog.Team workflows.HogFlow.team reverse-accessor(hogflow_set) 1
+posthog.Team workflows.HogFlowBatchJob.team reverse-accessor(hogflowbatchjob_set) 1
+posthog.Team workflows.HogFlowRevision.team reverse-accessor(hogflowrevision_set) 1
+posthog.Team workflows.HogFlowSchedule.team reverse-accessor(hogflowschedule_set) 1
+posthog.Team workflows.HogFlowTemplate.team reverse-accessor(hogflowtemplate_set) 1
+posthog.Team workflows.TeamWorkflowsConfig.team reverse-accessor(teamworkflowsconfig) 1
+posthog.User access_control.AccessControl.created_by reverse-accessor(accesscontrol_set) 1
+posthog.User access_control.OrganizationResourceAccess.created_by reverse-accessor(organizationresourceaccess_set) 1
+posthog.User access_control.PropertyAccessControl.created_by reverse-accessor(propertyaccesscontrol_set) 1
+posthog.User access_control.Role.created_by reverse-accessor(roles) 1
+posthog.User access_control.Role.members reverse-accessor(role_set) 1
+posthog.User access_control.RoleExternalReference.created_by reverse-accessor(roleexternalreference_set) 1
+posthog.User access_control.RoleMembership.user reverse-accessor(role_memberships) 1
+posthog.User actions.Action.created_by reverse-accessor(action_set) 1
+posthog.User ai_observability.Dataset.created_by reverse-accessor(dataset_set) 1
+posthog.User ai_observability.DatasetItem.created_by reverse-accessor(datasetitem_set) 1
+posthog.User ai_observability.DatasetItemVersion.created_by reverse-accessor(datasetitemversion_set) 1
+posthog.User ai_observability.DatasetRevision.created_by reverse-accessor(datasetrevision_set) 1
+posthog.User ai_observability.Evaluation.created_by reverse-accessor(evaluation_set) 1
+posthog.User ai_observability.EvaluationReport.created_by reverse-accessor(evaluationreport_set) 1
+posthog.User ai_observability.LLMPrompt.created_by reverse-accessor(llmprompt_set) 1
+posthog.User ai_observability.LLMPromptLabel.created_by reverse-accessor(llmpromptlabel_set) 1
+posthog.User ai_observability.LLMProviderKey.created_by reverse-accessor(llmproviderkey_set) 1
+posthog.User ai_observability.ParserRecipe.created_by reverse-accessor(parserrecipe_set) 1
+posthog.User ai_observability.ReviewQueue.created_by reverse-accessor(reviewqueue_set) 1
+posthog.User ai_observability.ReviewQueueItem.created_by reverse-accessor(reviewqueueitem_set) 1
+posthog.User ai_observability.ScoreDefinition.created_by reverse-accessor(scoredefinition_set) 1
+posthog.User ai_observability.ScoreDefinitionVersion.created_by reverse-accessor(scoredefinitionversion_set) 1
+posthog.User ai_observability.Tagger.created_by reverse-accessor(tagger_set) 1
+posthog.User ai_observability.TraceReview.created_by reverse-accessor(tracereview_set) 1
+posthog.User ai_observability.TraceReviewScore.created_by reverse-accessor(tracereviewscore_set) 1
+posthog.User alerts.AlertConfiguration.created_by reverse-accessor(alertconfiguration_set) 1
+posthog.User alerts.AlertConfiguration.subscribed_users reverse-accessor(alert_configurations) 1
+posthog.User alerts.AlertSubscription.created_by reverse-accessor(alertsubscription_set) 1
+posthog.User alerts.AlertSubscription.user reverse-accessor(alert_subscriptions) 1
+posthog.User alerts.Threshold.created_by reverse-accessor(threshold_set) 1
+posthog.User analytics_platform.PreaggregationJob.created_by reverse-accessor(preaggregationjob_set) 1
+posthog.User annotations.Annotation.created_by reverse-accessor(annotation_set) 1
+posthog.User approvals.Approval.created_by reverse-accessor(approval_set) 1
+posthog.User approvals.ApprovalPolicy.created_by reverse-accessor(approvalpolicy_set) 1
+posthog.User approvals.ChangeRequest.applied_by reverse-accessor(change_requests_applied) 1
+posthog.User approvals.ChangeRequest.created_by reverse-accessor(changerequest_set) 1
+posthog.User business_knowledge.KnowledgeSource.created_by reverse-accessor(knowledgesource_set) 1
+posthog.User canvas.Canvas.created_by reverse-accessor(canvas_set) 1
+posthog.User canvas.CanvasHomePreference.user reverse-accessor(canvashomepreference_set) 1
+posthog.User canvas.CanvasSourceVersion.created_by reverse-accessor(canvassourceversion_set) 1
+posthog.User canvas.CanvasState.user reverse-accessor(canvasstate_set) 1
+posthog.User cdp.HogFunction.created_by reverse-accessor(hogfunction_set) 1
+posthog.User cdp.HogFunctionRevision.created_by reverse-accessor(hogfunctionrevision_set) 1
+posthog.User cdp.Hook.user reverse-accessor(rest_hooks) 1
+posthog.User cohorts.Cohort.created_by reverse-accessor(cohort_set) 1
+posthog.User conversations.EmailChannel.owner reverse-accessor(owned_conversations_email_channels) 1
+posthog.User conversations.TicketAssignment.user reverse-accessor(ticketassignment_set) 1
+posthog.User conversations.TicketView.created_by reverse-accessor(ticketview_set) 1
+posthog.User conversations.TicketViewFavorite.user reverse-accessor(ticketviewfavorite_set) 1
+posthog.User customer_analytics.Account.created_by reverse-accessor(account_set) 1
+posthog.User customer_analytics.AccountRelationship.created_by reverse-accessor(accountrelationship_set) 1
+posthog.User customer_analytics.AccountRelationshipDefinition.created_by reverse-accessor(accountrelationshipdefinition_set) 1
+posthog.User customer_analytics.AccountTrackRuleRun.created_by reverse-accessor(accounttrackrulerun_set) 1
+posthog.User customer_analytics.Announcement.created_by reverse-accessor(announcement_set) 1
+posthog.User customer_analytics.CustomPropertyDefinition.created_by reverse-accessor(custompropertydefinition_set) 1
+posthog.User customer_analytics.CustomPropertySource.created_by reverse-accessor(custompropertysource_set) 1
+posthog.User customer_analytics.CustomPropertySyncRun.created_by reverse-accessor(custompropertysyncrun_set) 1
+posthog.User customer_analytics.CustomPropertyValue.created_by reverse-accessor(custompropertyvalue_set) 1
+posthog.User customer_analytics.CustomerJourney.created_by reverse-accessor(customerjourney_set) 1
+posthog.User customer_analytics.CustomerProfileConfig.created_by reverse-accessor(customerprofileconfig_set) 1
+posthog.User customer_analytics.EventStream.created_by reverse-accessor(eventstream_set) 1
+posthog.User customer_analytics.EventStreamMember.created_by reverse-accessor(eventstreammember_set) 1
+posthog.User dashboards.ButtonTile.created_by reverse-accessor(buttontile_set) 1
+posthog.User dashboards.ButtonTile.last_modified_by reverse-accessor(modified_button_tiles) 1
+posthog.User dashboards.Dashboard.created_by reverse-accessor(dashboard_set) 1
+posthog.User dashboards.DashboardTemplate.created_by reverse-accessor(dashboardtemplate_set) 1
+posthog.User dashboards.DashboardWidget.created_by reverse-accessor(dashboardwidget_set) 1
+posthog.User dashboards.DashboardWidget.last_modified_by reverse-accessor(modified_dashboard_widgets) 1
+posthog.User dashboards.Text.created_by reverse-accessor(text_set) 1
+posthog.User dashboards.Text.last_modified_by reverse-accessor(modified_text_tiles) 1
+posthog.User data_catalog.RelationshipProposal.created_by reverse-accessor(relationshipproposal_set) 1
+posthog.User data_catalog.TableCertification.created_by reverse-accessor(tablecertification_set) 1
+posthog.User data_modeling.DAG.created_by reverse-accessor(dag_set) 1
+posthog.User data_modeling.DataModelingJob.created_by reverse-accessor(datamodelingjob_set) 1
+posthog.User data_modeling.DataWarehouseManagedViewSet.created_by reverse-accessor(datawarehousemanagedviewset_set) 1
+posthog.User data_modeling.DataWarehouseModelPath.created_by reverse-accessor(datawarehousemodelpath_set) 1
+posthog.User data_modeling.DataWarehouseSavedQuery.created_by reverse-accessor(datawarehousesavedquery_set) 1
+posthog.User data_modeling.DataWarehouseSavedQueryColumnAnnotation.created_by reverse-accessor(datawarehousesavedquerycolumnannotation_set) 1
+posthog.User data_modeling.DataWarehouseSavedQueryDraft.created_by reverse-accessor(datawarehousesavedquerydraft_set) 1
+posthog.User data_modeling.Edge.created_by reverse-accessor(edge_set) 1
+posthog.User data_modeling.GitHubSyncConfig.created_by reverse-accessor(githubsyncconfig_set) 1
+posthog.User data_modeling.GitHubSyncPlan.created_by reverse-accessor(githubsyncplan_set) 1
+posthog.User data_modeling.GitHubSyncedModel.created_by reverse-accessor(githubsyncedmodel_set) 1
+posthog.User data_modeling.Node.created_by reverse-accessor(node_set) 1
+posthog.User data_tools.DataWarehouseExpression.created_by reverse-accessor(datawarehouseexpression_set) 1
+posthog.User data_tools.DataWarehouseJoin.created_by reverse-accessor(datawarehousejoin_set) 1
+posthog.User data_tools.DataWarehouseSavedQueryFolder.created_by reverse-accessor(datawarehousesavedqueryfolder_set) 1
+posthog.User data_tools.DataWarehouseViewLink.created_by reverse-accessor(datawarehouseviewlink_set) 1
+posthog.User data_tools.QueryTabState.created_by reverse-accessor(querytabstate_set) 1
+posthog.User early_access_features.EarlyAccessFeature.created_by reverse-accessor(early_access_features) 1
+posthog.User endpoints.Endpoint.created_by reverse-accessor(endpoint_set) 1
+posthog.User endpoints.EndpointVersion.created_by reverse-accessor(endpoint_versions_created) 1
+posthog.User error_tracking.ErrorTrackingAssignmentRule.user reverse-accessor(errortrackingassignmentrule_set) 1
+posthog.User error_tracking.ErrorTrackingGroup.assignee reverse-accessor(errortrackinggroup_set) 1
+posthog.User error_tracking.ErrorTrackingGroupingRule.user reverse-accessor(errortrackinggroupingrule_set) 1
+posthog.User error_tracking.ErrorTrackingIssueAssignment.user reverse-accessor(errortrackingissueassignment_set) 1
+posthog.User event_definitions.SchemaPropertyGroup.created_by reverse-accessor(created_schema_property_groups) 1
+posthog.User experiments.Experiment.created_by reverse-accessor(experiment_set) 1
+posthog.User experiments.ExperimentHoldout.created_by reverse-accessor(experimentholdout_set) 1
+posthog.User experiments.ExperimentMetricsRecalculation.created_by reverse-accessor(experimentmetricsrecalculation_set) 1
+posthog.User experiments.ExperimentSavedMetric.created_by reverse-accessor(experimentsavedmetric_set) 1
+posthog.User exports.ExportedAsset.created_by reverse-accessor(exportedasset_set) 1
+posthog.User exports.Subscription.created_by reverse-accessor(subscription_set) 1
+posthog.User feature_flags.FeatureFlag.created_by reverse-accessor(featureflag_set) 1
+posthog.User feature_flags.FeatureFlag.last_modified_by reverse-accessor(updated_feature_flags) 1
+posthog.User feature_flags.FeatureFlagOverride.user reverse-accessor(featureflagoverride_set) 1
+posthog.User feature_flags.ScheduledChange.created_by reverse-accessor(scheduledchange_set) 1
+posthog.User field_notes.FieldNote.created_by reverse-accessor(fieldnote_set) 1
+posthog.User growth.EnrichmentPromptConfig.created_by reverse-accessor(enrichmentpromptconfig_set) 1
+posthog.User growth.IcpScoringConfig.created_by reverse-accessor(icpscoringconfig_set) 1
+posthog.User growth.ProductPushCampaign.created_by reverse-accessor(productpushcampaign_set) 1
+posthog.User legal_documents.LegalDocument.created_by reverse-accessor(legaldocument_set) 1
+posthog.User links.Link.created_by reverse-accessor(link_set) 1
+posthog.User logs.LogsAlertConfiguration.created_by reverse-accessor(logsalertconfiguration_set) 1
+posthog.User logs.LogsExclusionRule.created_by reverse-accessor(logsexclusionrule_set) 1
+posthog.User logs.LogsRetentionRule.created_by reverse-accessor(logsretentionrule_set) 1
+posthog.User logs.LogsView.created_by reverse-accessor(logsview_set) 1
+posthog.User managed_warehouse.DuckgresServer.created_by reverse-accessor(duckgresserver_set) 1
+posthog.User managed_warehouse.ManagedWarehouseSourceJob.created_by reverse-accessor(managedwarehousesourcejob_set) 1
+posthog.User mcp_store.MCPOAuthState.created_by reverse-accessor(mcpoauthstate_set) 1
+posthog.User mcp_store.MCPServerInstallation.created_by reverse-accessor(mcpserverinstallation_set) 1
+posthog.User mcp_store.MCPServerInstallation.user reverse-accessor(mcp_server_installations) 1
+posthog.User mcp_store.MCPServerInstallationTool.created_by reverse-accessor(mcpserverinstallationtool_set) 1
+posthog.User mcp_store.MCPServerTemplate.created_by reverse-accessor(mcpservertemplate_set) 1
+posthog.User messaging.MessageCategory.created_by reverse-accessor(messagecategory_set) 1
+posthog.User messaging.MessageRecipientPreference.created_by reverse-accessor(messagerecipientpreference_set) 1
+posthog.User messaging.MessageSuppression.created_by reverse-accessor(messagesuppression_set) 1
+posthog.User messaging.MessageTemplate.created_by reverse-accessor(messagetemplate_set) 1
+posthog.User notebooks.KernelRuntime.user reverse-accessor(kernelruntime_set) 1
+posthog.User notebooks.Notebook.created_by reverse-accessor(notebook_set) 1
+posthog.User notebooks.Notebook.last_modified_by reverse-accessor(modified_notebooks) 1
+posthog.User notebooks.NotebookNodeRun.user reverse-accessor(notebooknoderun_set) 1
+posthog.User notifications.NotificationArchiveState.user reverse-accessor(notification_archive_states) 1
+posthog.User notifications.NotificationReadState.user reverse-accessor(notification_read_states) 1
+posthog.User posthog_ai.AgentArtifact.created_by reverse-accessor(agentartifact_set) 1
+posthog.User posthog_ai.AgentMemory.user reverse-accessor(agent_memories) 1
+posthog.User posthog_ai.Conversation.user reverse-accessor(conversation_set) 1
+posthog.User product_analytics.Insight.created_by reverse-accessor(insight_set) 1
+posthog.User product_analytics.Insight.last_modified_by reverse-accessor(modified_insights) 1
+posthog.User product_analytics.InsightVariable.created_by reverse-accessor(insightvariable_set) 1
+posthog.User product_analytics.InsightViewed.user reverse-accessor(insightviewed_set) 1
+posthog.User product_tours.ProductTour.created_by reverse-accessor(product_tours_created) 1
+posthog.User pulse.BriefConfig.created_by reverse-accessor(briefconfig_set) 1
+posthog.User pulse.Opportunity.created_by reverse-accessor(opportunity_set) 1
+posthog.User pulse.ProductBrief.created_by reverse-accessor(productbrief_set) 1
+posthog.User pulse.ResourceLink.created_by reverse-accessor(resourcelink_set) 1
+posthog.User reminders.Reminder.created_by reverse-accessor(reminder_set) 1
+posthog.User replay.ExportedRecording.created_by reverse-accessor(exported_recordings) 1
+posthog.User signals.SignalSourceConfig.created_by reverse-accessor(signalsourceconfig_set) 1
+posthog.User signals.SignalUserAutonomyConfig.user reverse-accessor(signal_autonomy_config) 1
+posthog.User skills.CommunitySkillVote.user reverse-accessor(communityskillvote_set) 1
+posthog.User skills.LLMSkill.created_by reverse-accessor(llmskill_set) 1
+posthog.User slack_app.SlackChannel.approved_by reverse-accessor(approved_slack_channels) 1
+posthog.User streamlit_apps.StreamlitApp.created_by reverse-accessor(streamlitapp_set) 1
+posthog.User streamlit_apps.StreamlitAppVersion.created_by reverse-accessor(streamlitappversion_set) 1
+posthog.User surveys.Survey.created_by reverse-accessor(surveys) 1
+posthog.User tasks.SandboxEnvironment.created_by reverse-accessor(sandboxenvironment_set) 1
+posthog.User tasks.Task.created_by reverse-accessor(task_set) 1
+posthog.User tracing.TracingView.created_by reverse-accessor(tracingview_set) 1
+posthog.User user_interviews.IntervieweeContext.created_by reverse-accessor(intervieweecontext_set) 1
+posthog.User user_interviews.UserInterview.created_by reverse-accessor(userinterview_set) 1
+posthog.User user_interviews.UserInterviewTopic.created_by reverse-accessor(userinterviewtopic_set) 1
+posthog.User warehouse_sources.CustomOAuth2Integration.created_by reverse-accessor(customoauth2integration_set) 1
+posthog.User warehouse_sources.DataWarehouseCredential.created_by reverse-accessor(datawarehousecredential_set) 1
+posthog.User warehouse_sources.DataWarehouseTable.created_by reverse-accessor(datawarehousetable_set) 1
+posthog.User warehouse_sources.ExternalDataJob.created_by reverse-accessor(externaldatajob_set) 1
+posthog.User warehouse_sources.ExternalDataSchema.created_by reverse-accessor(externaldataschema_set) 1
+posthog.User warehouse_sources.ExternalDataSource.created_by reverse-accessor(externaldatasource_set) 1
+posthog.User warehouse_sources.PendingSourceCredential.created_by reverse-accessor(pendingsourcecredential_set) 1
+posthog.User warehouse_sources.WarehouseColumnAnnotation.created_by reverse-accessor(warehousecolumnannotation_set) 1
+posthog.User warehouse_sources.WarehouseColumnStatistics.created_by reverse-accessor(warehousecolumnstatistics_set) 1
+posthog.User web_analytics.SavedHeatmap.created_by reverse-accessor(savedheatmap_set) 1
+posthog.User web_analytics.WebAnalyticsAchievementProgress.user reverse-accessor(webanalyticsachievementprogress_set) 1
+posthog.User web_analytics.WebAnalyticsFilterPreset.created_by reverse-accessor(webanalyticsfilterpreset_set) 1
+posthog.User web_analytics.WebAnalyticsFilterPreset.last_modified_by reverse-accessor(modified_web_analytics_filter_presets) 1
+posthog.User web_analytics.WebAnalyticsInteraction.user reverse-accessor(webanalyticsinteraction_set) 1
+posthog.User web_analytics.WebAnalyticsUserConfig.user reverse-accessor(webanalyticsuserconfig_set) 1
+posthog.User web_analytics.WebAnalyticsVisit.user reverse-accessor(webanalyticsvisit_set) 1
+posthog.User workflows.HogFlow.created_by reverse-accessor(hogflow_set) 1
+posthog.User workflows.HogFlowBatchJob.created_by reverse-accessor(hogflowbatchjob_set) 1
+posthog.User workflows.HogFlowRevision.created_by reverse-accessor(hogflowrevision_set) 1
+posthog.User workflows.HogFlowTemplate.created_by reverse-accessor(hogflowtemplate_set) 1
+posthog.UserIntegration tasks.Task.github_user_integration reverse-accessor(task_set) 1
+product_analytics.Insight alerts.Alert.insight reverse-accessor(alert_set) 1
+product_analytics.Insight alerts.AlertConfiguration.insight reverse-accessor(alertconfiguration_set) 1
+product_analytics.Insight alerts.Threshold.insight reverse-accessor(threshold_set) 1
+product_analytics.Insight annotations.Annotation.dashboard_item reverse-accessor(annotation_set) 1
+product_analytics.Insight customer_analytics.CustomerJourney.insight reverse-accessor(customerjourney_set) 1
+product_analytics.Insight dashboards.Dashboard.insights reverse-accessor(dashboards) 1
+product_analytics.Insight dashboards.DashboardTile.insight reverse-accessor(dashboard_tiles) 1
product_analytics.Insight ee.api.subscription instance-many(filter) 2
product_analytics.Insight ee.api.subscription instance-many(manager) 2
product_analytics.Insight ee.hogai.artifacts.handlers.visualization instance-many(filter) 1
@@ -47,6 +608,11 @@ product_analytics.Insight ee.hogai.context.entity_search.context in-collection 1
product_analytics.Insight ee.hogai.context.entity_search.context instance-many(order_by) 1
product_analytics.Insight ee.hogai.eval.ci.max_tools.eval_upsert_dashboard write(acreate) 1
product_analytics.Insight ee.hogai.tools.upsert_dashboard.tool construct 1
+product_analytics.Insight exports.ExportedAsset.insight reverse-accessor(exportedasset_set) 1
+product_analytics.Insight exports.Subscription.dashboard_export_insights reverse-accessor(subscriptions_dashboard_export) 1
+product_analytics.Insight exports.Subscription.insight reverse-accessor(subscription_set) 1
+product_analytics.Insight posthog.SharingConfiguration.insight reverse-accessor(sharingconfiguration_set) 1
+product_analytics.Insight posthog.TaggedItem.insight reverse-accessor(tagged_items) 1
product_analytics.Insight posthog.api.cohort instance-many(order_by) 1
product_analytics.Insight posthog.api.search in-collection 1
product_analytics.Insight posthog.api.sharing instance-many(filter) 1
@@ -107,12 +673,24 @@ product_analytics.Insight products.pulse.backend.sources.resource_health instanc
product_analytics.Insight products.reminders.backend.constants in-collection 1
product_analytics.Insight products.slack_app.backend.slack_link_unfurl instance-single 1
product_analytics.Insight products.surveys.backend.api.survey instance-single 1
+product_analytics.Insight surveys.Survey.linked_insight reverse-accessor(surveys_linked_insight) 1
+replay_vision.ReplayScanner posthog.TaggedItem.replay_scanner reverse-accessor(tagged_items) 1
+signals.SignalReport tasks.Task.signal_report reverse-accessor(task) 1
+surveys.Survey product_tours.ProductTour.linked_surveys reverse-accessor(product_tours) 1
surveys.Survey products.early_access_features.backend.management.commands.migrate_enrollments_to_waitlist_surveys get_model 1
+tasks.Channel canvas.Canvas.channel reverse-accessor(canvases) 1
+tasks.Task signals.SignalReportTask.task reverse-accessor(signal_report_tasks) 1
+tasks.Task slack_app.SlackThreadTaskMapping.task reverse-accessor(slack_thread_mappings) 1
tasks.TaskRun products.review_hog.backend.receivers get_model 1
+tasks.TaskRun signals.SignalScoutRun.task_run reverse-accessor(signal_scout_run) 1
+tasks.TaskRun slack_app.SlackThreadTaskMapping.task_run reverse-accessor(slack_thread_mappings) 1
+user_interviews.IntervieweeContext posthog.SharingConfiguration.interviewee_context reverse-accessor(sharing_configurations) 1
warehouse_sources.DataWarehouseCredential posthog.hogql.database.database instance-many(filter) 1
warehouse_sources.DataWarehouseCredential products.data_warehouse.backend.presentation.views.table drf-model-serializer 1
warehouse_sources.DataWarehouseCredential products.data_warehouse.backend.presentation.views.table write(create) 1
warehouse_sources.DataWarehouseCredential products.posthog_ai.evals.data_warehouse.seeder write(create) 1
+warehouse_sources.DataWarehouseTable data_modeling.DataWarehouseModelPath.table reverse-accessor(datawarehousemodelpath_set) 1
+warehouse_sources.DataWarehouseTable data_modeling.DataWarehouseSavedQuery.table reverse-accessor(datawarehousesavedquery_set) 1
warehouse_sources.DataWarehouseTable ee.hogai.eval.offline.snapshot_loader write(abulk_create) 1
warehouse_sources.DataWarehouseTable ee.hogai.eval.schema construct 1
warehouse_sources.DataWarehouseTable ee.hogai.eval.schema in-collection 1
@@ -215,6 +793,7 @@ warehouse_sources.ExternalDataSchema products.marketing_analytics.backend.servic
warehouse_sources.ExternalDataSchema products.signals.backend.emission.emit_signals instance-many(aget) 1
warehouse_sources.ExternalDataSchema products.signals.backend.management.commands.emit_signals_from_warehouse instance-single 1
warehouse_sources.ExternalDataSchema products.signals.backend.views instance-many(select_related) 1
+warehouse_sources.ExternalDataSource data_warehouse.ExternalDataSourceRevenueAnalyticsConfig.external_data_source reverse-accessor(revenue_analytics_config) 1
warehouse_sources.ExternalDataSource ee.hogai.tools.execute_sql.direct_connection_suggestions instance-many(defer) 1
warehouse_sources.ExternalDataSource posthog.hogql.database.database instance-many(filter) 1
warehouse_sources.ExternalDataSource posthog.hogql.database.database instance-single 2
diff --git a/tools/hogli-commands/hogli_commands/product/cli.py b/tools/hogli-commands/hogli_commands/product/cli.py
index 055312a6db9c..afe02e0d8f21 100644
--- a/tools/hogli-commands/hogli_commands/product/cli.py
+++ b/tools/hogli-commands/hogli_commands/product/cli.py
@@ -196,9 +196,9 @@ def cmd_crossings(name: str | None, scan_all: bool, as_json: bool, write_baselin
from .crossings import (
BASELINE_PATH,
+ all_crossing_uses,
crossing_classes,
render_report,
- scan_crossing_uses,
write_baseline as write_baseline_file,
)
@@ -208,7 +208,7 @@ def cmd_crossings(name: str | None, scan_all: bool, as_json: bool, write_baselin
raise click.UsageError("--write-baseline regenerates the whole file, so it needs --all")
products = None if scan_all else [name] if name else None
- uses = scan_crossing_uses(products)
+ uses = all_crossing_uses(products)
if write_baseline:
write_baseline_file(uses)
click.echo(f"Baseline written: {BASELINE_PATH}")
diff --git a/tools/hogli-commands/hogli_commands/product/crossings.py b/tools/hogli-commands/hogli_commands/product/crossings.py
index 0dfbe429c4fe..2ce0858783fa 100644
--- a/tools/hogli-commands/hogli_commands/product/crossings.py
+++ b/tools/hogli-commands/hogli_commands/product/crossings.py
@@ -33,6 +33,11 @@ test that imports anything the location defines, through the facade or directly,
yields no line at all, which reads the same as no dependency. Such a test is counted as
`drives(unresolved-kind)` against every query location it could reach, so the unreadable case holds
the inputs rather than releasing them in silence.
+
+The fourth channel does not read source at all. A relation field that crosses a product boundary
+without `related_name="+"` adds a reverse accessor to the target class — no import, no name-level
+use, only the model registry can see it. reverse_accessors.py walks the graph; each edge is counted
+as the disallowed kind `reverse-accessor(<name>)`.
"""
from __future__ import annotations
@@ -51,6 +56,7 @@ from pathlib import Path
from .ast_helpers import ast_parse_safe, get_model_names, lazy_reexport_map
from .isolation import COMPUTED_WIRING_LOCATIONS, MODEL_CROSSINGS, facade_model_crossings
from .paths import PRODUCTS_DIR, REPO_ROOT
+from .reverse_accessors import reverse_accessor_edge_lines
# Where Python that can consume a product model lives. Everything else at the repo root is
# frontend, infra, or standalone tooling that never imports Django product models.
@@ -133,7 +139,10 @@ class CrossingClass:
@dataclass(frozen=True)
class CrossingUse:
- """One kind of use of one crossing class in one consumer module, with how often it appears."""
+ """One kind of use of one crossing class in one consumer module, with how often it appears.
+
+ `reverse-accessor(...)` rows overload `consumer_module` with the relation declaration
+ (`app.Model.field`) — a path into the model graph, not an importable module."""
crossing: str # CrossingClass.label
consumer_module: str # dotted, e.g. "products.product_analytics.backend.presentation.insight"
@@ -1382,6 +1391,34 @@ def disallowed_uses(uses: Iterable[CrossingUse]) -> list[CrossingUse]:
return [use for use in uses if not use.is_allowed]
+# ---------------------------------------------------------------------------
+# Reverse accessors — the fourth channel, read from the model graph
+# ---------------------------------------------------------------------------
+
+
+def reverse_accessor_uses(products: Iterable[str] | None = None) -> list[CrossingUse]:
+ """Cross-boundary reverse accessors as CrossingUse rows.
+
+ The crossing is the class that grows the accessor; the consumer slot holds the relation field
+ that creates it, as `app.Model.field` — a declaration path, not an importable module (the one
+ kind that overloads the field this way). With a product filter, an edge counts when the
+ *target* class belongs to a listed product, matching the other channels' one-sided scoping.
+ """
+ wanted = set(products) if products is not None else None
+ uses = []
+ for line in reverse_accessor_edge_lines():
+ target, owner_field, accessor = line.split(" ")
+ if wanted is not None and target.split(".")[0] not in wanted:
+ continue
+ uses.append(CrossingUse(target, owner_field, f"reverse-accessor({accessor})", 1))
+ return uses
+
+
+def all_crossing_uses(products: Iterable[str] | None = None) -> list[CrossingUse]:
+ """Every channel: the three AST scans plus the model-graph reverse accessors."""
+ return scan_crossing_uses(products) + reverse_accessor_uses(products)
+
+
# ---------------------------------------------------------------------------
# Reporting
# ---------------------------------------------------------------------------
@@ -1447,15 +1484,22 @@ BASELINE_HEADER = """\
# One line per (product.Class, consumer module, kind, count); see products/architecture.md
# § Wiring couplings for which shapes are allowed.
#
-# Three channels land here. Name-level uses of a watched-models crossing class, in any kind the
+# Four channels land here. Name-level uses of a watched-models crossing class, in any kind the
# doctrine does not call instance-free. The kind `get_model`: an `apps.get_model` reference
# from outside the owning product, which covers every product model, not only the allowance ones.
# Test modules and migrations are out of scope on both: a migration reaches a model through the
# historical registry, which is the only way a migration can.
-# And the kind `drives(<Kind or Name>)`, read from tests only: a test outside the product that
+# The kind `drives(<Kind or Name>)`, read from tests only: a test outside the product that
# executes a query runner in the product's wiring location backend/hogql_queries/, by the query
# kind it builds and runs, or by the name it imports from there. While a line stands for a
# location, `hogli product:lint` keeps that location in the contract-check inputs.
+# And the kind `reverse-accessor(<name>)`, read from the model graph: a relation field that
+# crosses a product boundary without related_name="+" adds a reverse accessor to the target
+# class, with no import for any other check to see. The line reads
+# `target.Class owner.Model.field reverse-accessor(<name>) 1`. Seal the relation with
+# related_name="+", remove any explicit related_query_name (a query:<name> row means one keeps
+# filter() traversal alive), and delete the line in the same change; a caller that needs reverse
+# access gets a facade read function. See products/architecture.md § Cross-product foreign keys.
#
# Counts may only go down, and a line that disappears must be deleted here too.
# A new line needs a doctrine amendment, not a baseline edit.
diff --git a/tools/hogli-commands/hogli_commands/product/paths.py b/tools/hogli-commands/hogli_commands/product/paths.py
index 4972f0d330eb..a3300ce23ebe 100644
--- a/tools/hogli-commands/hogli_commands/product/paths.py
+++ b/tools/hogli-commands/hogli_commands/product/paths.py
@@ -9,6 +9,11 @@ import yaml
# product/ -> hogli_commands/ -> hogli-commands/ -> tools/ -> repo root
REPO_ROOT = Path(__file__).parent.parent.parent.parent.parent
STRUCTURE_FILE = Path(__file__).parent.parent / "product_structure.yaml"
+# The repo roots that hold first-party Python. crossings.py scans them; reverse_accessors.py
+# prefix-matches modules against them; the capture scripts in
+# posthog/test/repo_invariants/test_startup_import_budget.py carry their own copies.
+FIRST_PARTY_ROOTS: tuple[str, ...] = ("posthog", "ee", "products", "common")
+
PRODUCTS_DIR = REPO_ROOT / "products"
TACH_TOML = REPO_ROOT / "tach.toml"
FRONTEND_PACKAGE_JSON = REPO_ROOT / "frontend" / "package.json"
diff --git a/tools/hogli-commands/hogli_commands/product/reverse_accessors.py b/tools/hogli-commands/hogli_commands/product/reverse_accessors.py
new file mode 100644
index 000000000000..2aed8d08d866
--- /dev/null
+++ b/tools/hogli-commands/hogli_commands/product/reverse_accessors.py
@@ -0,0 +1,129 @@
+"""Cross-boundary reverse accessors, read from the Django model graph.
+
+A relation field (FK, O2O, M2M) that crosses a product boundary without `related_name="+"` adds a
+reverse accessor to the target class. There is no import and no name-level use, so the AST channels
+in crossings.py cannot see it; only the model registry can. This module owns the introspection and
+returns plain edge lines; crossings.py turns them into baseline rows.
+
+"""
+
+from __future__ import annotations
+
+import os
+import re
+import sys
+import subprocess
+from pathlib import Path
+
+from .paths import FIRST_PARTY_ROOTS, REPO_ROOT
+
+FIRST_PARTY = tuple(f"{root}." for root in FIRST_PARTY_ROOTS)
+
+_EDGE_LINE = re.compile(r"^\S+ \S+ \S+$")
+
+
+def reverse_accessor_edges() -> list[str]:
+ """One line per cross-boundary relation with a visible accessor: `target owner.Model.field accessor`.
+
+ Requires a populated Django app registry (`django.setup()` has run).
+ """
+ # noqa comments: Django is only importable after setup; hogli loads this module without it.
+ from django.apps import apps # noqa: PLC0415
+ from django.db.models import Model # noqa: PLC0415
+ from django.db.models.fields.related import RelatedField # noqa: PLC0415
+
+ def boundary(model: type[Model]) -> str:
+ # Ownership comes from the defining module, not _meta.app_label: product models that keep a
+ # legacy label ("ee" on access_control's Role) would otherwise read as core and bypass the
+ # ratchet, and relations between two such models would read as cross-product.
+ module = model.__module__
+ return module.split(".")[1] if module.startswith("products.") else "core"
+
+ def label(model: type[Model]) -> str:
+ # Rows carry the module-derived product name, not _meta.app_label, so a product's rows
+ # survive the per-product filter even when the model keeps a legacy label (ee.Role).
+ # Core models keep their app label (posthog/ee) — "core" would erase real information.
+ owner = boundary(model)
+ return owner if owner != "core" else model._meta.app_label
+
+ out = set()
+ for model in apps.get_models():
+ if model._meta.auto_created:
+ continue # auto-created M2M through models restate the M2M field's own edge
+ if model._meta.proxy:
+ continue # a proxy shares its parent's fields and creates no accessor of its own
+ for field in model._meta.get_fields(include_hidden=False):
+ # RelatedField narrows the get_fields() union to the concrete relation fields
+ # (FK, O2O, M2M) that install a reverse descriptor.
+ if not isinstance(field, RelatedField) or field.related_model is None:
+ continue
+ if field.model is not model:
+ continue # a concrete parent's field — only the parent installs the reverse descriptor
+ related_model = field.related_model
+ if related_model == "self":
+ continue # self-referential — never cross-boundary
+ # A proxy target installs its reverse descriptor on the concrete model, so the
+ # boundary check must see the concrete model, not the proxy.
+ target = related_model._meta.concrete_model
+ if target is None or not target.__module__.startswith(FIRST_PARTY):
+ continue
+ if boundary(model) == boundary(target):
+ continue
+ rel = field.remote_field
+ if rel.hidden and not rel.related_query_name:
+ continue # related_name="+" with no explicit query name — fully sealed
+ # An explicit related_query_name keeps filter() traversal alive even under
+ # related_name="+", so the edge stays in the ratchet under a query: marker naming
+ # the live traversal (get_accessor_name() would return the literal "+").
+ accessor = f"query:{field.related_query_name()}" if rel.hidden else rel.get_accessor_name()
+ out.add(f"{label(target)}.{target.__name__} {label(model)}.{model.__name__}.{field.name} {accessor}")
+ return sorted(out)
+
+
+_SUBPROCESS_BOOTSTRAP = """
+import os
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "posthog.settings")
+# settings.TEST gates the AppConfig.ready() side effects (Redis template sync, Celery
+# enqueues) — a model-graph read must not fire them.
+os.environ["TEST"] = "1"
+import django
+
+django.setup()
+from hogli_commands.product.reverse_accessors import reverse_accessor_edges
+
+print("\\n".join(reverse_accessor_edges()))
+"""
+
+
+def reverse_accessor_edge_lines() -> list[str]:
+ """Edges via the current process when Django is booted, else via a subprocess.
+
+ `django.setup()` runs every AppConfig.ready() (registries, clients, checks), so the subprocess
+ path costs a few seconds. A caller that already booted Django — pytest does — gets the walk for
+ free in-process.
+ """
+ try:
+ from django.apps import apps # noqa: PLC0415 — probe, not a dependency: hogli runs without Django booted
+
+ ready = apps.ready
+ except Exception:
+ ready = False
+ if ready:
+ return reverse_accessor_edges()
+
+ # The CLI reaches hogli_commands through sys.path, not site-packages, and the settings module
+ # needs the repo root as cwd — hand the subprocess both explicitly.
+ package_root = Path(__file__).parents[2]
+ env = {**os.environ, "PYTHONPATH": os.pathsep.join([str(package_root), os.environ.get("PYTHONPATH", "")])}
+ result = subprocess.run(
+ [sys.executable, "-c", _SUBPROCESS_BOOTSTRAP],
+ capture_output=True,
+ text=True,
+ timeout=120,
+ cwd=REPO_ROOT,
+ env=env,
+ )
+ if result.returncode != 0:
+ raise RuntimeError(f"reverse accessor capture failed:\n{result.stderr[-2000:]}")
+ return [line for line in result.stdout.splitlines() if _EDGE_LINE.match(line)]