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): make personhog-proto a registered leaf package (#128212)

Julian Bezebcc13c71234
diff --git a/packages/personhog-proto/package.json b/packages/personhog-proto/package.json
new file mode 100644
index 000000000000..73bb9dc6799c
--- /dev/null
+++ b/packages/personhog-proto/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "@posthog/personhog-proto",
+ "version": "0.0.1",
+ "private": true,
+ "description": "Python stubs generated from proto/personhog (personhog-proto). Python uv workspace member; this manifest registers it in the turbo graph so turbo-discover can see when it changed and re-test the products that import it. The package has no tests of its own, so backend:test is a no-op that exists to make it a cascade source.",
+ "scripts": {
+ "backend:test": "echo 'personhog-proto has no tests'"
+ },
+ "pythonImportName": "personhog"
+}
diff --git a/packages/personhog-proto/turbo.json b/packages/personhog-proto/turbo.json
new file mode 100644
index 000000000000..776b224560cb
--- /dev/null
+++ b/packages/personhog-proto/turbo.json
@@ -0,0 +1,8 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ "backend:test": {
+ "inputs": ["personhog/**/*.py", "personhog/**/*.pyi", "pyproject.toml"]
+ }
+ }
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 28e47799534c..12fed851602b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2015,6 +2015,8 @@ importers:
packages/owners-yaml: {}
+ packages/personhog-proto: {}
+
packages/quill:
devDependencies:
tailwindcss-scroll-mask:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 015c4e31b3c9..8849f857eb93 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -9,6 +9,7 @@ packages:
- common/tailwind
- packages/llm-normalizer
- packages/owners-yaml
+ - packages/personhog-proto
- packages/quill
- packages/quill/apps/*
- packages/quill/packages/*
diff --git a/pyproject.toml b/pyproject.toml
index e897f3eae303..66df398750a5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -603,7 +603,7 @@ exclude = [
# Complements tach (inter-module boundaries) with intra-product enforcement.
[tool.importlinter]
-root_packages = ["products", "owners_yaml"]
+root_packages = ["products", "owners_yaml", "personhog"]
include_external_packages = true
# A Python distribution under packages/ is a leaf: it must install and run outside the
@@ -616,6 +616,12 @@ type = "forbidden"
source_modules = ["owners_yaml"]
forbidden_modules = ["posthog", "ee", "products", "common", "django", "rest_framework"]
+[[tool.importlinter.contracts]]
+name = "packages/personhog-proto is a leaf"
+type = "forbidden"
+source_modules = ["personhog"]
+forbidden_modules = ["posthog", "ee", "products", "common", "django", "rest_framework"]
+
# A vendor directory under products/warehouse_sources/sources/ imports shared code only from its
# SDK, products.warehouse_sources.sources.sdk. tach checks this for vendor code. `hogli lint:tach`
# leaves test files out of its dependency pass, so this contract also covers the vendor tests.