Skip to content

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

fix(devex): select posthog_ai tests on eval harness and tools yaml edits (#105786)

Julian Bezd3eecc6a7ee6
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 569c5e3152f8..fda66fa991f7 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -381,6 +381,11 @@ jobs:
# widening or fixing the script doesn't trigger
# tests it controls.
- 'products/*/package.json'
+ # Tests read these MCP manifests from disk. Each one is a turbo input of
+ # its reader (tasks directly, posthog_ai through feature_flags'
+ # backend:mcp-surface task). Add a manifest here only with that wiring.
+ - products/feature_flags/mcp/tools.yaml
+ - products/tasks/mcp/tools.yaml
- 'products/canvas/packages/canvas_builder/**'
- bin/build-schema-latest-versions.py
- bin/build-taxonomy-json.py
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index 00249aeb17d2..9f909b4ba17d 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -251,6 +251,11 @@ jobs:
# widening or fixing the script doesn't trigger
# tests it controls.
- 'products/*/package.json'
+ # Tests read these MCP manifests from disk. Each one is a turbo input of
+ # its reader (tasks directly, posthog_ai through feature_flags'
+ # backend:mcp-surface task). Add a manifest here only with that wiring.
+ - products/feature_flags/mcp/tools.yaml
+ - products/tasks/mcp/tools.yaml
- 'products/canvas/packages/canvas_builder/**'
- bin/build-schema-latest-versions.py
- bin/build-taxonomy-json.py
diff --git a/products/feature_flags/turbo.json b/products/feature_flags/turbo.json
new file mode 100644
index 000000000000..5ff158cf38c7
--- /dev/null
+++ b/products/feature_flags/turbo.json
@@ -0,0 +1,12 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ // No script backs this task. It exists so a product whose tests read tools.yaml can
+ // depend on it, and Turbo then marks that product's backend:test affected on a change.
+ "backend:mcp-surface": {
+ "inputs": ["mcp/tools.yaml"],
+ "outputs": [],
+ "cache": true
+ }
+ }
+}
diff --git a/products/posthog_ai/turbo.json b/products/posthog_ai/turbo.json
new file mode 100644
index 000000000000..7a67da95262f
--- /dev/null
+++ b/products/posthog_ai/turbo.json
@@ -0,0 +1,11 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ "backend:test": {
+ // test_feature_flags_scorers.py reads feature_flags' tools.yaml from disk, so no import edge exists.
+ "dependsOn": ["@posthog/products-feature-flags#backend:mcp-surface"],
+ // backend:test also runs eval_harness/test/, which the root globs miss.
+ "inputs": ["$TURBO_EXTENDS$", "eval_harness/**/*.py"]
+ }
+ }
+}
diff --git a/products/tasks/turbo.json b/products/tasks/turbo.json
new file mode 100644
index 000000000000..62b2ba312b23
--- /dev/null
+++ b/products/tasks/turbo.json
@@ -0,0 +1,9 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ "backend:test": {
+ // backend/tests/test_constants.py reads the MCP manifest from disk.
+ "inputs": ["$TURBO_EXTENDS$", "mcp/tools.yaml"]
+ }
+ }
+}