:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(devex): populate the owners.yaml slack channel registry (#71120)
Julian Bez1d9a0c063315
diff --git a/.agents/skills/establishing-code-ownership/SKILL.md b/.agents/skills/establishing-code-ownership/SKILL.mdindex 5f0cd9daed59..1e7fc4e413e2 100644--- a/.agents/skills/establishing-code-ownership/SKILL.md+++ b/.agents/skills/establishing-code-ownership/SKILL.md@@ -18,7 +18,8 @@ hogli owners:resolve --json posthog/api/survey.py products/surveys/backend/api.phogli owners:unowned # every tracked file with no owner (append a prefix to scope: `owners:unowned products/`)```-`owners:who` prints the resolved `owners`, the `status`, the derived Slack channel, and `source` — the `owners.yaml`/`product.yaml` file that decided the answer.+`owners:who` prints the resolved `owners`, the `status`, the Slack channel, and `source` — the `owners.yaml`/`product.yaml` file that decided the answer.+The channel comes from the root `teams:` registry entry for the primary owner, else a derived `#<slug>`; a path whose primary owner is an `@handle` has no channel.`owners:resolve` takes paths as arguments or newline-delimited on stdin, so you can pipe a file list: `git ls-files posthog/hogql | hogli owners:resolve --json`.No hogli/flox available? The dependency-light fallback needs only pyyaml: `git ls-files posthog/hogql | PYTHONPATH=tools/owners python -m posthog_owners` (stdin paths → the same JSON).diff --git a/docs/internal/ownership-model-proposal.md b/docs/internal/ownership-model-proposal.mdindex ccf94f7a65ab..fe7786559c37 100644--- a/docs/internal/ownership-model-proposal.md+++ b/docs/internal/ownership-model-proposal.md@@ -119,13 +119,19 @@ This keeps all 68 products at zero migration cost and preserves `hogli product:l### Slack derivation: measured, not assumed-Checked all 31 team slugs in use (CODEOWNERS + soft + product.yaml) against live Slack channels (2026-07):+Checked every team slug in use against live Slack channels, re-verified 2026-07-15 against the 30 slugs left after the migration:-- 24/31: `#<slug>` exists verbatim — every well-formed `team-*` slug.-- 3/31 (`clickhouse`, `conversations`, `batch-exports`): slug lacks the `team-` prefix but `#team-<slug>` exists — slug hygiene to fix during migration, not an override case.-- 4/31 need an explicit value: `team-posthog-code` → `#team-code`, `team-wizard` → `#team-wizard-and-docs`, `team-data-stack` → `#group-data-stack`, and `hogql`/`logs` have no team channel at all (`slack: false`).+- 24/30: `#<slug>` exists verbatim, so no entry is needed.+- 6/30 need an entry in the root `teams:` registry (below):+ - `clickhouse`, `conversations`, `batch-exports` — these predate the `team-` convention and are the real org slugs; `team-clickhouse` and friends do not exist as GitHub teams, so the slugs cannot be "fixed" and the channel is `#team-<slug>`.+ - `team-data-stack` → `#group-data-stack`.+ - `team-posthog-code` → `#team-desktop`, the name the channel was created under.+ - `logs` → `#team-apm`: the `logs` and `apm` GitHub teams have identical membership, APM ("Logs, Metrics and Traces") having absorbed logs.-So the derived default is right for ~87% of teams and the rest add one line to the root `teams:` registry (below). Guarding against a derived channel that doesn't exist is lint's job, not a per-file flag: `owners:lint` gets an opt-in Slack-API check mirroring the existing opt-in live GitHub-team validation.+So the derived default is right for 80% of teams and the rest carry one entry each.++Nothing validates that a derived channel actually exists — a wrong or dead channel fails silently.+An opt-in Slack-API check in `owners:lint`, mirroring the existing opt-in live GitHub-team validation, would close that gap; it is not built.#### The `teams:` registry (repo-root only)@@ -135,11 +141,11 @@ The **repo-root** `owners.yaml` may carry a `teams:` registry — a mapping of t```yaml# owners.yaml (repo root only)teams:- team-posthog-code:- slack: '#team-code'+ clickhouse:+ slack: '#team-clickhouse'team-data-stack:slack: '#group-data-stack'- hogql:+ some-retired-team:slack: false```diff --git a/owners.yaml b/owners.yamlindex 28841be3605c..2ae7cbddc2a2 100644--- a/owners.yaml+++ b/owners.yaml@@ -1,5 +1,26 @@version: 1owners: []+# Slack channel per team, declared once for the whole repo (root-only registry).+# A team only needs an entry where the derived '#<slug>' is wrong or missing; the+# other 24 slugs in use derive correctly and are deliberately absent.+teams:+ # GitHub team slugs that predate the 'team-' convention: the slug is right,+ # the channel just doesn't match it.+ batch-exports:+ slack: '#team-batch-exports'+ clickhouse:+ slack: '#team-clickhouse'+ conversations:+ slack: '#team-conversations'+ # The 'logs' and 'apm' GitHub teams have identical membership: APM ("Logs,+ # Metrics and Traces") absorbed logs, and #team-apm is where it lives.+ logs:+ slack: '#team-apm'+ team-data-stack:+ slack: '#group-data-stack'+ # PostHog Code's channel kept the name it was created under.+ team-posthog-code:+ slack: '#team-desktop'rules:- match: Dockerfile.llm-analyticsowners: team-ai-observability