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(signals): route scout reviewer resolution via members-list tool (#67090)

Andrew Maguire19a9de17e5b6
diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.py
index 91123ca31670..9d7815dcc02d 100644
--- a/products/signals/backend/scout_harness/serializers.py
+++ b/products/signals/backend/scout_harness/serializers.py
@@ -607,15 +607,16 @@ class SuggestedReviewerSerializer(serializers.Serializer):
max_length=200,
help_text=(
"GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display "
- "name. Resolve one via `org-member-get-github-login` / git history when you only have a name."
+ "name. Resolve one via `signals-scout-members-list` (each member row carries a resolved "
+ "`github_login`) or git history when you only have a name."
),
)
user_uuid = serializers.UUIDField(
required=False,
help_text=(
- "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked "
- "GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a "
- "concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here."
+ "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). "
+ "Resolved server-side to the member's linked GitHub login — use this when you know the PostHog "
+ "user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here."
),
)
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index d63285ba8918..c8936fd67ad2 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -1227,11 +1227,11 @@ export interface SignalScoutRunDetailApi {
*/
export interface SuggestedReviewerApi {
/**
- * GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.
+ * GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.
* @maxLength 200
*/
github_login?: string
- /** PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here. */
+ /** PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here. */
user_uuid?: string
}
diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.ts
index 004ae0625058..b257eafe258f 100644
--- a/products/signals/frontend/generated/api.zod.ts
+++ b/products/signals/frontend/generated/api.zod.ts
@@ -307,13 +307,13 @@ export const SignalsScoutEditReportBody = /* @__PURE__ */ zod
.max(signalsScoutEditReportBodySuggestedReviewersItemGithubLoginMax)
.optional()
.describe(
- 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` \/ git history when you only have a name.'
+ 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.'
),
user_uuid: zod
.uuid()
.optional()
.describe(
- "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here."
+ "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here."
),
})
.describe(
@@ -425,13 +425,13 @@ export const SignalsScoutEmitReportBody = /* @__PURE__ */ zod
.max(signalsScoutEmitReportBodySuggestedReviewersItemGithubLoginMax)
.optional()
.describe(
- 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` \/ git history when you only have a name.'
+ 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.'
),
user_uuid: zod
.uuid()
.optional()
.describe(
- "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here."
+ "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here."
),
})
.describe(
diff --git a/products/signals/skills/authoring-scouts/references/report-contract.md b/products/signals/skills/authoring-scouts/references/report-contract.md
index 19b0ec512e5f..0af07fcdcddf 100644
--- a/products/signals/skills/authoring-scouts/references/report-contract.md
+++ b/products/signals/skills/authoring-scouts/references/report-contract.md
@@ -125,12 +125,13 @@ So you have two routes to a reviewer. If you already hold a PostHog user UUID, p
login directly: CODEOWNERS entries are often **team** slugs (`@your-org/team-name`) and `git log`
gives a name + email — both must be resolved to an **individual** GitHub login before you write
the reviewer (a team slug or an email won't match any user).
-4. **`org-members-list` + `org-member-get-github-login`** — only where the run has organization scope
- (`organization_member:read`), which **headless scout runs scoped to a single team often don't
- have**, so these tools are typically **absent from a scout's toolset**; don't build a scout's
- reviewer recipe around them. Where they _are_ available: `org-members-list` gives a member's
- `user_uuid` (pass that straight through as `user_uuid` — simplest), and `org-member-get-github-login`
- resolves a `user_uuid` to its GitHub login if you'd rather hand a `github_login`.
+4. **`signals-scout-members-list`** — the in-run roster lookup, for the cold-start case where the
+ cheaper paths above don't resolve an owner. It returns this project's members, each with `user_uuid`,
+ `email`, name, and a resolved `github_login` (pass `search=` to narrow); match the owner and route to
+ their `github_login`, or hand the `user_uuid` straight through and let the server resolve it. The
+ org-scoped `org-members-list` / `org-member-get-github-login` tools are **not available in a scout
+ run** — a scoped-team token can't reach the org-nested endpoint, so don't build a scout's reviewer
+ recipe around them.
**If you can't confidently identify a reviewer, leave `suggested_reviewers` empty** — the report
still surfaces for a human to grab. **Never guess a handle**: a wrong login mis-assigns the report
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index f1e3a5bbe9b8..bc53776ee7e0 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -17946,11 +17946,11 @@ export namespace Schemas {
*/
export interface SuggestedReviewer {
/**
- * GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.
+ * GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.
* @maxLength 200
*/
github_login?: string;
- /** PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here. */
+ /** PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here. */
user_uuid?: string;
}
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 3424aaec2f2d..3e943ff50fe2 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -624,13 +624,13 @@ export const SignalsScoutEditReportBody = /* @__PURE__ */ zod
.max(signalsScoutEditReportBodySuggestedReviewersItemGithubLoginMax)
.optional()
.describe(
- 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.'
+ 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.'
),
user_uuid: zod
.string()
.optional()
.describe(
- "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here."
+ "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here."
),
})
.describe(
@@ -777,13 +777,13 @@ export const SignalsScoutEmitReportBody = /* @__PURE__ */ zod
.max(signalsScoutEmitReportBodySuggestedReviewersItemGithubLoginMax)
.optional()
.describe(
- 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.'
+ 'GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.'
),
user_uuid: zod
.string()
.optional()
.describe(
- "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here."
+ "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here."
),
})
.describe(
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-edit-report.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-edit-report.json
index a158f95a73fc..9c4c0ae63987 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-edit-report.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-edit-report.json
@@ -26,12 +26,12 @@
"description": "One suggested reviewer — identified by `github_login`, `user_uuid`, or both.\n\nThe server canonicalizes each entry to a lowercased GitHub login: a `user_uuid` is resolved to the\norg member's linked GitHub login (and wins over a supplied `github_login` when both are given). A\n`user_uuid` that isn't an org member of this team with a linked GitHub identity is rejected — so a\nreviewer is never silently dropped.",
"properties": {
"github_login": {
- "description": "GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.",
+ "description": "GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.",
"maxLength": 200,
"type": "string"
},
"user_uuid": {
- "description": "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here.",
+ "description": "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here.",
"type": "string"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-emit-report.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-emit-report.json
index 43cf91f6f84f..0330aeff1e68 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-emit-report.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-emit-report.json
@@ -85,12 +85,12 @@
"description": "One suggested reviewer — identified by `github_login`, `user_uuid`, or both.\n\nThe server canonicalizes each entry to a lowercased GitHub login: a `user_uuid` is resolved to the\norg member's linked GitHub login (and wins over a supplied `github_login` when both are given). A\n`user_uuid` that isn't an org member of this team with a linked GitHub identity is rejected — so a\nreviewer is never silently dropped.",
"properties": {
"github_login": {
- "description": "GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `org-member-get-github-login` / git history when you only have a name.",
+ "description": "GitHub login (case-insensitive, stored lowercased) — e.g. `octocat`, no `@`, no display name. Resolve one via `signals-scout-members-list` (each member row carries a resolved `github_login`) or git history when you only have a name.",
"maxLength": 200,
"type": "string"
},
"user_uuid": {
- "description": "PostHog user UUID (e.g. from `org-members-list`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias accepted by `org-member-get-github-login` is not valid here.",
+ "description": "PostHog user UUID (e.g. from `signals-scout-members-list`, or an entity's `created_by`). Resolved server-side to the member's linked GitHub login — use this when you know the PostHog user but not their GitHub handle. Must be a concrete UUID; the `@me` alias is not valid here.",
"type": "string"
}
},