: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(signals): restrict personal inbox ranking to a person's own reports (#129637)
posthog[bot]7055aaa30881
diff --git a/products/signals/backend/management/AGENTS.md b/products/signals/backend/management/AGENTS.mdindex 2c363770a618..72efab95d4e2 100644--- a/products/signals/backend/management/AGENTS.md+++ b/products/signals/backend/management/AGENTS.md@@ -281,23 +281,23 @@ uv run manage.py run_personal_inbox_ranking --team-id 1 --user-id 1 --dry-runuv run manage.py run_personal_inbox_ranking --team-id 1 --user-id 1 --focus "checkout errors"```+Every candidate is tied to the person: routed to them, waiting on their input, or claimed by them.+A person with no such report gets `status: empty` with no model call.+An optional `pools` list in the payload replaces the default candidate pools, in merge order:```json{"pools": [- { "source": "priority", "size": 5, "lowest_priority": "P1" },+ { "source": "assigned", "size": 5 },{ "source": "for_you_recommended", "size": 10 },- { "source": "assigned", "size": 0 },- { "source": "scored", "size": 10, "head": "fixed", "actionable_only": true, "has_pr": false, "window_days": 30 }+ { "source": "for_you_updated", "size": 0 }]}```-Each entry takes a `source` (`for_you_recommended`, `for_you_updated`, `assigned`, `scored` or `priority`), a `size` (0 turns it off) and an optional `name`.-`scored` needs a `head` (`open`, `action` or `fixed`) and only joins for a person who can see the ranking model.-`scored` and `priority` also take `actionable_only`, `has_pr` and `window_days`.-The build logs and drops an invalid entry, and uses the default pools when no entry is valid.+Each entry takes a `source` (`for_you_recommended`, `for_you_updated` or `assigned`), a `size` (0 turns it off) and an optional `name`.+The build logs and drops an invalid entry, such as one with the removed `scored` or `priority` source, and uses the default pools when no entry is valid.A person with no ready activity summary gets a list in model order with no model call, marked `personalized: False` and `fallback_reason: no_activity_summary`.When the model call fails or answers outside the schema, the list is in model order and `fallback_reason` says why.diff --git a/products/signals/backend/personal_ranking/candidates.py b/products/signals/backend/personal_ranking/candidates.pyindex 60782b47eb34..3798c006a5ed 100644--- a/products/signals/backend/personal_ranking/candidates.py+++ b/products/signals/backend/personal_ranking/candidates.py@@ -1,5 +1,7 @@"""The reports a personal ranking considers: a few server-side pools, deduped and capped, with the facts the prompt shows.+Every pool holds only reports tied to the person: routed to them, or claimed by them.+The pools come in the configured order, and a report keeps the position of the first pool that holds it.That order is the model order: the fallback when the LLM does not rank a report."""@@ -15,7 +17,6 @@ import structlogfrom posthog.dataclasses import frozenfrom posthog.models import Team, User-from products.signals.backend.artefact_schemas import ActionabilityChoicefrom products.signals.backend.briefing_reports import (SUMMARY_LEAD_LIMIT,implementation_pull_request_state,@@ -23,19 +24,16 @@ from products.signals.backend.briefing_reports import (reports_for_person,summary_lead,)-from products.signals.backend.implementation_pr import (- fetch_implementation_pr_state_for_reports,- implementation_pr_report_filter,-)+from products.signals.backend.implementation_pr import fetch_implementation_pr_state_for_reportsfrom products.signals.backend.models import AutonomyPriority, SignalReport, SignalReportArtefactfrom products.signals.backend.personal_ranking.config import CandidatePool, PersonalRankingConfig, candidate_poolsfrom products.signals.backend.ranking.access import can_view_inbox_ranking-from products.signals.backend.ranking.inbox_sort import InboxRanker, latest_ranking_value, resolve_recommended_arm+from products.signals.backend.ranking.inbox_sort import InboxRanker, resolve_recommended_armfrom products.signals.backend.ranking.report_predictions import ReportPredictions, read_report_predictionsfrom products.signals.backend.ranking.staleness import EDIT_ARTEFACT_TYPESfrom products.signals.backend.report_claims import reports_claimed_for_userfrom products.signals.backend.report_lifecycle import report_status_filter-from products.signals.backend.report_priority import latest_priority_rank, latest_report_priorities+from products.signals.backend.report_priority import latest_report_prioritiesfrom products.signals.backend.signal_metadata import fetch_source_products_for_reportslogger = structlog.get_logger(__name__)@@ -49,7 +47,6 @@ EXCLUDED_STATUSES: tuple[str, ...] = (SignalReport.Status.CLOSED,SignalReport.Status.DELETED,)-_OPEN_STATUSES = (SignalReport.Status.READY, SignalReport.Status.PENDING_INPUT)# The recommended order is computed here, so the `for_you` pool reads at most this many reports to sort._FOR_YOU_SCAN_LIMIT = 300_TITLE_MAX_CHARS = 200@@ -163,49 +160,6 @@ def _ids(queryset: QuerySet[SignalReport], size: int) -> list[str]:return [str(report_id) for report_id in queryset.values_list("id", flat=True)[:size]]-def _scored_pool(queryset: QuerySet[SignalReport], head: str, size: int) -> list[str]:- """Reports with a current score for `head`, the highest first. Unscored and stale reports drop out."""- return _ids(- queryset.annotate(_pool_score=latest_ranking_value(head, "scores"))- .filter(_pool_score__isnull=False)- .order_by("-_pool_score", "-updated_at", "id"),- size,- )---def _priority_pool(queryset: QuerySet[SignalReport], lowest_priority: str, size: int) -> list[str]:- """Reports with `lowest_priority` or a more urgent one, the most urgent first. A score is not needed."""- return _ids(- queryset.annotate(_pool_priority=latest_priority_rank())- .filter(_pool_priority__lte=AutonomyPriority.values.index(lowest_priority))- .order_by("_pool_priority", "-updated_at", "id"),- size,- )---def _filtered(- team_reports: QuerySet[SignalReport], team_id: int, pool: CandidatePool, since: datetime.datetime-) -> QuerySet[SignalReport]:- if pool.actionable_only:- reports = team_reports.filter(- status=SignalReport.Status.READY,- latest_actionability=ActionabilityChoice.IMMEDIATELY_ACTIONABLE.value,- latest_already_addressed=False,- )- else:- reports = (- team_reports.filter(status__in=_OPEN_STATUSES)- .exclude(latest_actionability=ActionabilityChoice.NOT_ACTIONABLE.value)- .exclude(latest_already_addressed=True)- )- reports = reports.filter(created_at__gte=since)- if pool.has_pr is True:- reports = reports.filter(implementation_pr_report_filter(team_id=team_id))- elif pool.has_pr is False:- reports = reports.exclude(implementation_pr_report_filter(team_id=team_id))- return reports--def _pool_ids(team: Team,user: User,@@ -215,10 +169,9 @@ def _pool_ids(team_reports: QuerySet[SignalReport],now: datetime.datetime,) -> list[str]:- since = now - datetime.timedelta(days=pool.window_days or config.window_days)match pool.source:case "for_you_recommended":- return _recommended_for_you(team, user, since, pool.size)+ return _recommended_for_you(team, user, now - datetime.timedelta(days=config.window_days), pool.size)case "for_you_updated":return _ids(reports_for_person(team.id, user).order_by("-updated_at", "id"), pool.size)case "assigned":@@ -228,15 +181,10 @@ def _pool_ids(),pool.size,)- case "scored":- assert pool.head is not None- return _scored_pool(_filtered(team_reports, team.id, pool, since), pool.head, pool.size)- case "priority":- return _priority_pool(_filtered(team_reports, team.id, pool, since), pool.lowest_priority, pool.size)def _pools(- team: Team, user: User, config: PersonalRankingConfig, *, now: datetime.datetime, can_view_ranking: bool+ team: Team, user: User, config: PersonalRankingConfig, *, now: datetime.datetime) -> list[tuple[str, list[str]]]:# The gate-aware filter, because a `monitoring` report reads as resolved while the monitoring gate is off.team_reports = SignalReport.objects.filter(team_id=team.id).exclude(@@ -245,8 +193,7 @@ def _pools(return [(pool.name, _pool_ids(team, user, pool, config, team_reports=team_reports, now=now))for pool in candidate_pools(config)- # The `scored` pools show the ranking model's order, so only a person who can see the ranking gets them.- if pool.size and (pool.source != "scored" or can_view_ranking)+ if pool.size]@@ -294,7 +241,7 @@ def gather_candidates() -> list[Candidate]:"""`with_sources=False` skips the ClickHouse read of each report's source, which only the prompt shows."""can_view_ranking = can_view_inbox_ranking(user, team)- merged = merge_pools(_pools(team, user, config, now=now, can_view_ranking=can_view_ranking), config.max_candidates)+ merged = merge_pools(_pools(team, user, config, now=now), config.max_candidates)return _load_candidates(team, user, merged, can_view_ranking=can_view_ranking, with_sources=with_sources)diff --git a/products/signals/backend/personal_ranking/config.py b/products/signals/backend/personal_ranking/config.pyindex 9c8f3aa3885c..b71acc6b21c6 100644--- a/products/signals/backend/personal_ranking/config.py+++ b/products/signals/backend/personal_ranking/config.py@@ -5,8 +5,9 @@ a large one to its maximum, so no value is unbounded. `"enabled": false` in theswitch: it stops every build. `max_builds_per_day` limits the builds that call the model across everyperson in one region.-The optional `pools` list replaces the default candidate pools, in order. An invalid entry is dropped-and logged. When no entry is valid, the build uses the default pools.+The optional `pools` list replaces the default candidate pools, in order. Every pool holds only reports+tied to the person, so a personal list never takes reports from across the project. An invalid entry is+dropped and logged. When no entry is valid, the build uses the default pools.The optional `tick` object holds the levers of the scheduled tick (`tick.py`). Its parse fails closed:a missing or malformed object, or one without `"enabled": true`, turns the tick off. An enabled tick raises@@ -35,25 +36,12 @@ DEFAULT_MODEL = "gpt-6.1-terra"ReasoningEffort = Literal["minimal", "low", "medium", "high"]REASONING_EFFORTS: tuple[ReasoningEffort, ...] = get_args(ReasoningEffort)-PoolSource = Literal["for_you_recommended", "for_you_updated", "assigned", "scored", "priority"]+PoolSource = Literal["for_you_recommended", "for_you_updated", "assigned"]POOL_SOURCES: tuple[PoolSource, ...] = get_args(PoolSource)-ScoreHead = Literal["open", "action", "fixed"]-SCORE_HEADS: tuple[ScoreHead, ...] = get_args(ScoreHead)-PriorityLevel = Literal["P0", "P1", "P2", "P3", "P4"]-PRIORITY_LEVELS: tuple[PriorityLevel, ...] = get_args(PriorityLevel)-DEFAULT_LOWEST_PRIORITY: PriorityLevel = "P1"MAX_POOLS = 10_POOL_NAME = re.compile(r"^[a-z0-9_]{1,40}$")-# The keys a payload pool entry may have for each source. Any other key drops the entry, so a typo shows in the logs.-_COMMON_POOL_KEYS = frozenset({"source", "size", "name"})-_FILTER_POOL_KEYS = frozenset({"actionable_only", "has_pr", "window_days"})-_POOL_KEYS: dict[PoolSource, frozenset[str]] = {- "for_you_recommended": _COMMON_POOL_KEYS,- "for_you_updated": _COMMON_POOL_KEYS,- "assigned": _COMMON_POOL_KEYS,- "scored": _COMMON_POOL_KEYS | _FILTER_POOL_KEYS | {"head"},- "priority": _COMMON_POOL_KEYS | _FILTER_POOL_KEYS | {"lowest_priority"},-}+# The keys a payload pool entry may have. Any other key drops the entry, so a typo shows in the logs.+_POOL_KEYS = frozenset({"source", "size", "name"})@frozen@@ -73,17 +61,6 @@ class CandidatePool:source: PoolSource# 0 turns the pool off.size: int- # `scored` only: the ranking model head that orders the pool.- head: ScoreHead | None = None- # `priority` only: the pool takes reports with this priority or a more urgent one.- lowest_priority: PriorityLevel = DEFAULT_LOWEST_PRIORITY- # `scored` and `priority` only. True takes ready reports judged immediately actionable. False takes- # ready and pending input reports that are not judged not actionable.- actionable_only: bool = False- # `scored` and `priority` only. None takes reports with and without an implementation PR.- has_pr: bool | None = None- # `scored` and `priority` only: the days back the pool reads by creation time. None uses the config `window_days`.- window_days: int | None = None@frozen@@ -129,15 +106,12 @@ class PersonalRankingConfig:enabled: bool = Truemodel: str = DEFAULT_MODELreasoning_effort: ReasoningEffort = "low"- # The `for_you_recommended` pool, and the `scored` and `priority` pools without their own `window_days`, read- # reports created in this window.+ # The `for_you_recommended` pool reads reports created in this window.window_days: int = 14for_you_recommended_pool: int = 10# No window, so older reports with new activity come in too.for_you_updated_pool: int = 5assigned_pool: int = 5- actionable_pool: int = 5- new_pool: int = 5# The pools in merge order. Empty uses `default_pools`, which take their sizes from the `*_pool` fields.pools: tuple[CandidatePool, ...] = ()max_candidates: int = 30@@ -178,8 +152,6 @@ _MAXIMUMS: dict[str, int] = {"for_you_recommended_pool": 100,"for_you_updated_pool": 100,"assigned_pool": 100,- "actionable_pool": 100,- "new_pool": 100,"max_candidates": 100,"pool_size": 100,"rank_top": 100,@@ -286,15 +258,6 @@ def default_pools(config: PersonalRankingConfig) -> tuple[CandidatePool, ...]:CandidatePool(name="for_you_recommended", source="for_you_recommended", size=config.for_you_recommended_pool),CandidatePool(name="for_you_updated", source="for_you_updated", size=config.for_you_updated_pool),CandidatePool(name="assigned", source="assigned", size=config.assigned_pool),- CandidatePool(- name="actionable",- source="scored",- size=config.actionable_pool,- head="action",- actionable_only=True,- has_pr=False,- ),- CandidatePool(name="new", source="scored", size=config.new_pool, head="open"),)@@ -313,13 +276,6 @@ def _pool_count(entry: dict[str, Any], key: str, *, minimum: int, maximum: int)return min(value, maximum)-def _pool_flag(entry: dict[str, Any], key: str) -> bool | None:- value = entry.get(key)- if value is not None and not isinstance(value, bool):- raise _InvalidPool(f"{key} must be true, false or null")- return value--def _parse_pool(entry: Any) -> CandidatePool:if not isinstance(entry, dict):raise _InvalidPool("entry must be an object")@@ -327,30 +283,16 @@ def _parse_pool(entry: Any) -> CandidatePool:if source not in POOL_SOURCES:raise _InvalidPool(f"source must be one of {', '.join(POOL_SOURCES)}")source = cast(PoolSource, source)- unknown = set(entry) - _POOL_KEYS[source]+ unknown = set(entry) - _POOL_KEYSif unknown:- raise _InvalidPool(f"unknown keys for source {source}: {', '.join(sorted(unknown))}")- head = entry.get("head")- if source == "scored" and head not in SCORE_HEADS:- raise _InvalidPool(f"head must be one of {', '.join(SCORE_HEADS)}")- lowest_priority = entry.get("lowest_priority", DEFAULT_LOWEST_PRIORITY)- if lowest_priority not in PRIORITY_LEVELS:- raise _InvalidPool(f"lowest_priority must be one of {', '.join(PRIORITY_LEVELS)}")- default_name = f"scored_{head}" if source == "scored" else source- name = entry.get("name", default_name)+ raise _InvalidPool(f"unknown keys: {', '.join(sorted(unknown))}")+ name = entry.get("name", source)if not isinstance(name, str) or not _POOL_NAME.match(name):raise _InvalidPool("name must be 1 to 40 lowercase letters, digits or underscores")return CandidatePool(name=name,source=source,size=_pool_count(entry, "size", minimum=0, maximum=_MAXIMUMS["pool_size"]),- head=cast(ScoreHead, head) if source == "scored" else None,- lowest_priority=cast(PriorityLevel, lowest_priority),- actionable_only=_pool_flag(entry, "actionable_only") or False,- has_pr=_pool_flag(entry, "has_pr"),- window_days=None- if entry.get("window_days") is None- else _pool_count(entry, "window_days", minimum=1, maximum=_MAXIMUMS["window_days"]),)diff --git a/products/signals/backend/test/test_personal_ranking.py b/products/signals/backend/test/test_personal_ranking.pyindex b477aff56c9c..353a5f857fe8 100644--- a/products/signals/backend/test/test_personal_ranking.py+++ b/products/signals/backend/test/test_personal_ranking.py@@ -492,23 +492,16 @@ class TestConfig(SimpleTestCase):"pools_in_order_with_default_names_and_large_values_capped",{"pools": [- {"source": "priority", "size": 5, "lowest_priority": "P0", "window_days": 1000},+ {"source": "for_you_updated", "size": 5},{"source": "assigned", "size": 0},- {"source": "scored", "size": 500, "head": "fixed", "has_pr": True, "actionable_only": True},+ {"source": "for_you_recommended", "size": 500},]},PersonalRankingConfig(pools=(- CandidatePool(name="priority", source="priority", size=5, lowest_priority="P0", window_days=90),+ CandidatePool(name="for_you_updated", source="for_you_updated", size=5),CandidatePool(name="assigned", source="assigned", size=0),- CandidatePool(- name="scored_fixed",- source="scored",- size=100,- head="fixed",- has_pr=True,- actionable_only=True,- ),+ CandidatePool(name="for_you_recommended", source="for_you_recommended", size=100),)),),@@ -519,18 +512,22 @@ class TestConfig(SimpleTestCase):{"source": "assigned", "size": 5, "name": "mine"},{"source": "for_you_updated", "size": 5, "name": "mine"},{"source": "everything", "size": 5},- {"source": "scored", "size": 5},+ {"source": "scored", "size": 5, "head": "action"},+ {"source": "priority", "size": 5, "lowest_priority": "P1"},{"source": "assigned", "size": 5, "head": "open"},+ {"source": "assigned", "size": 5, "window_days": 30},{"source": "assigned", "size": True},{"source": "assigned", "size": -1},- {"source": "priority", "size": 5, "lowest_priority": "urgent"},- {"source": "priority", "size": 5, "has_pr": "yes"},{"source": "assigned", "size": 5, "name": "Has Spaces"},]},PersonalRankingConfig(pools=(CandidatePool(name="mine", source="assigned", size=5),)),),- ("no_valid_pool_keeps_the_defaults", {"pools": [{"source": "scored", "size": 5}]}, PersonalRankingConfig()),+ (+ "no_valid_pool_keeps_the_defaults",+ {"pools": [{"source": "scored", "size": 5, "head": "action"}]},+ PersonalRankingConfig(),+ ),("pools_not_a_list", {"pools": {"source": "assigned", "size": 5}}, PersonalRankingConfig()),("pools_past_the_maximum_drop",@@ -795,60 +792,50 @@ class TestBuildPersonalRanking(BaseTest):@parameterized.expand([- ("can_see_scores", True, True, True),- ("cannot_see_ranking", False, True, False),- ("no_scores_as_in_eu", True, False, False),+ ("can_see_scores", True, True),+ ("cannot_see_ranking", False, True),+ ("nothing_tied_to_them", True, False),])- def test_ranking_pools_join_only_with_access_and_scores(- self, _name: str, staff: bool, scored: bool, expect_pool: bool- ) -> None:+ def test_only_reports_tied_to_the_person_are_candidates(self, _name: str, staff: bool, has_own: bool) -> None:self.user.is_staff = staffself.user.save(update_fields=["is_staff"])- unowned = self._report("Unowned actionable")- if scored:- self._score(unowned, action=0.8)+ unowned = self._prioritize(self._report("Unowned actionable"), "P0")+ self._score(unowned, action=0.9)+ own = self._names_me(self._report("Routed to me")) if has_own else None+ if own is not None:+ self._score(own, action=0.2)self.create.return_value = _response(_answer([_entry("c1", 1)]))with patch("products.signals.backend.ranking.access.feature_enabled_or_false", return_value=False):build = self._build(dry_run=True)- pools = {candidate.report_id: candidate.pools for candidate in build.candidates}- if expect_pool:- assert pools == {str(unowned.id): ("actionable", "new")}- assert build.candidates[0].predictions is not None- else:- assert pools == {}- assert build.status == "empty"+ assert str(unowned.id) not in {candidate.report_id for candidate in build.candidates}+ if own is None:+ assert (build.status, build.fallback_reason, build.model_called) == ("empty", "no_candidates", False)self.create.assert_not_called()+ else:+ assert [candidate.report_id for candidate in build.candidates] == [str(own.id)]+ assert (build.candidates[0].predictions is not None) is staff- @parameterized.expand([("can_see_scores", True), ("cannot_see_ranking", False)])- def test_configured_pools_keep_their_order_and_names(self, _name: str, staff: bool) -> None:- self.user.is_staff = staff- self.user.save(update_fields=["is_staff"])- urgent = self._prioritize(self._report("Urgent and unscored"), "P1")- self._prioritize(self._report("Not urgent"), "P3")- scored = self._report("Scored")- self._score(scored, action=0.8)+ def test_configured_pools_keep_their_order_and_names(self) -> None:claimed = self._report("Claimed", status=SignalReport.Status.IN_PROGRESS)SignalReportAssignment.all_teams.create(team=self.team, report=claimed, actor_kind="user", actor_user=self.user)+ routed = self._names_me(self._report("Routed"))+ self._report("Unrelated")self.create.return_value = _response(_answer([_entry("c1", 1)]))config = PersonalRankingConfig(pools=(CandidatePool(name="assigned", source="assigned", size=0),- CandidatePool(name="scored_action", source="scored", size=5, head="action"),- CandidatePool(name="urgent", source="priority", size=5),+ CandidatePool(name="mine", source="assigned", size=5),+ CandidatePool(name="routed", source="for_you_updated", size=5),))- with patch("products.signals.backend.ranking.access.feature_enabled_or_false", return_value=False):- build = build_personal_ranking(self.team, self.user, config=config, dry_run=True)+ build = build_personal_ranking(self.team, self.user, config=config, dry_run=True)pools = [(candidate.report_id, candidate.pools) for candidate in build.candidates]- expected = [(str(urgent.id), ("urgent",))]- if staff:- expected = [(str(scored.id), ("scored_action",)), *expected]- assert pools == expected+ assert pools == [(str(claimed.id), ("mine",)), (str(routed.id), ("routed",))]@parameterized.expand([("dry_run", True, 0), ("stored", False, 1)])def test_command(self, _name: str, dry_run: bool, expected_rows: int) -> None:diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 24202c3d2ea5..98605537ac83 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -479,15 +479,15 @@ tools:idempotent: truetitle: Get your personal ranked inboxdescription: >- Get the current user's own open inbox reports, ranked for them. One language model call ranks the reports- that need them (suggested reviewer, claimed, waiting on their input) and the reports the ranking model rates- highest, using their activity summary. Use it for "what should I work on" and "my top N" questions in place- of paging inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries- and a compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is- personal: only the user it describes can read it. The call never waits on the model. A current stored list- comes back quickly, as is. Otherwise the call reads every candidate report, which can take some seconds,- starts a background build and returns the last stored list with `stale: true`, or the reports in inbox order- with `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, and+ Get the current user's own open inbox reports, ranked for them. One language model call ranks only the+ reports tied to them (suggested reviewer, claimed, waiting on their input), using their activity summary and+ the ranking model's scores. Use it for "what should I work on" and "my top N" questions in place of paging+ inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries and a+ compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is personal:+ only the user it describes can read it. The call never waits on the model. A current stored list comes back+ quickly, as is. Otherwise the call reads every candidate report, which can take some seconds, starts a+ background build and returns the last stored list with `stale: true`, or the reports in inbox order with+ `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, andbuilds are rate limited. A report created after the stored list joins at the next build. When `building` istrue, call again a little later, or pass `wait_seconds` (up to 30, counted from the start of the call) towait for the new list in the same call. `personalized: false` means the user has no activity summary yet ordiff --git a/products/signals/skills/prioritizing-my-inbox/SKILL.md b/products/signals/skills/prioritizing-my-inbox/SKILL.mdindex 24ee6dceee1d..8113b99500c8 100644--- a/products/signals/skills/prioritizing-my-inbox/SKILL.md+++ b/products/signals/skills/prioritizing-my-inbox/SKILL.md@@ -71,12 +71,13 @@ Pools overlap; dedupe by `id` and remember which pools each report came from.| For you | `view: "for_you"`, `sort: "recommended"`, `created_after: <window>` | Routed to them, waiting on them, or claimed by them || Recently updated | `view: "for_you"`, `ordering: "-updated_at"`, no `created_after` | Older reports with new activity, such as a new PR approval or question || Mine | `assignee: "mine"` | Work they or their agents already own |-| Likely action | `view: "actionable"`, `ordering: "-ranking_action"`, `created_after: <window>` | What the model thinks someone will act on |-| New and likely opened | `created_after: <last 3 to 7 days>`, `ordering: "-ranking_open"` | Fresh reports worth a look || Theme searches | `search: "<specific term>"`, `created_after: <window>`, one call per top theme (3 to 5 calls, `limit` 10 to 15) | Personal relevance the routing misses || Needs my input (option) | `view: "needs_input"`, `scope: "for_me"`, `created_after: <window>` | Decisions only they can make |All pools use `inbox-reports-list`.+Do not add project-wide pools such as `view: "actionable"` or a bare `ordering: "-ranking_action"`.+They bring in reports routed to someone else, and the list is for this person.+A theme search is the exception, because it matches their own interests.Always bound `for_you` and `needs_input` by a window.`created_after` filters on creation time only, so a report created before the window but updated inside it reaches you only through the recently updated pool.That pool uses `updated_at` as its window: page it until `updated_at` falls outside the window, and stop after 3 pages.@@ -89,6 +90,7 @@ Rows still carry `ranking.predictions` when the user can see them, so you can scAim for 60 to 150 unique candidates.That is enough for a strong top 25 without reading the whole inbox.+A person with few reports of their own gets a shorter list. Return the short list rather than filling it with reports from across the project.## Step 3: Scorediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 999bea81d5d2..939c438b6761 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -8091,7 +8091,7 @@}},"inbox-reports-for-me": {- "description": "Get the current user's own open inbox reports, ranked for them. One language model call ranks the reports that need them (suggested reviewer, claimed, waiting on their input) and the reports the ranking model rates highest, using their activity summary. Use it for \"what should I work on\" and \"my top N\" questions in place of paging inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries and a compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is personal: only the user it describes can read it. The call never waits on the model. A current stored list comes back quickly, as is. Otherwise the call reads every candidate report, which can take some seconds, starts a background build and returns the last stored list with `stale: true`, or the reports in inbox order with `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, and builds are rate limited. A report created after the stored list joins at the next build. When `building` is true, call again a little later, or pass `wait_seconds` (up to 30, counted from the start of the call) to wait for the new list in the same call. `personalized: false` means the user has no activity summary yet or the list is in inbox order (see `fallback_reason`). `stale: true` without `building` means the build limit was reached and the list may miss recent changes. `status: unavailable` means personal ranking is off for now.",+ "description": "Get the current user's own open inbox reports, ranked for them. One language model call ranks only the reports tied to them (suggested reviewer, claimed, waiting on their input), using their activity summary and the ranking model's scores. Use it for \"what should I work on\" and \"my top N\" questions in place of paging inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries and a compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is personal: only the user it describes can read it. The call never waits on the model. A current stored list comes back quickly, as is. Otherwise the call reads every candidate report, which can take some seconds, starts a background build and returns the last stored list with `stale: true`, or the reports in inbox order with `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, and builds are rate limited. A report created after the stored list joins at the next build. When `building` is true, call again a little later, or pass `wait_seconds` (up to 30, counted from the start of the call) to wait for the new list in the same call. `personalized: false` means the user has no activity summary yet or the list is in inbox order (see `fallback_reason`). `stale: true` without `building` means the build limit was reached and the list may miss recent changes. `status: unavailable` means personal ranking is off for now.","category": "Signals","feature": "signals","summary": "Get your personal ranked inbox",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex bcb65aaa72cb..37e4eb14d3fb 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -8323,7 +8323,7 @@}},"inbox-reports-for-me": {- "description": "Get the current user's own open inbox reports, ranked for them. One language model call ranks the reports that need them (suggested reviewer, claimed, waiting on their input) and the reports the ranking model rates highest, using their activity summary. Use it for \"what should I work on\" and \"my top N\" questions in place of paging inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries and a compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is personal: only the user it describes can read it. The call never waits on the model. A current stored list comes back quickly, as is. Otherwise the call reads every candidate report, which can take some seconds, starts a background build and returns the last stored list with `stale: true`, or the reports in inbox order with `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, and builds are rate limited. A report created after the stored list joins at the next build. When `building` is true, call again a little later, or pass `wait_seconds` (up to 30, counted from the start of the call) to wait for the new list in the same call. `personalized: false` means the user has no activity summary yet or the list is in inbox order (see `fallback_reason`). `stale: true` without `building` means the build limit was reached and the list may miss recent changes. `status: unavailable` means personal ranking is off for now.",+ "description": "Get the current user's own open inbox reports, ranked for them. One language model call ranks only the reports tied to them (suggested reviewer, claimed, waiting on their input), using their activity summary and the ranking model's scores. Use it for \"what should I work on\" and \"my top N\" questions in place of paging inbox-reports-list. Each entry has a rank, a tier, a short reason, a next step for the top entries and a compact report. Read the full report with inbox-reports-retrieve before you act on it. The list is personal: only the user it describes can read it. The call never waits on the model. A current stored list comes back quickly, as is. Otherwise the call reads every candidate report, which can take some seconds, starts a background build and returns the last stored list with `stale: true`, or the reports in inbox order with `fallback_reason: building`, and sets `building: true`. `refresh` and `focus` always start a build, and builds are rate limited. A report created after the stored list joins at the next build. When `building` is true, call again a little later, or pass `wait_seconds` (up to 30, counted from the start of the call) to wait for the new list in the same call. `personalized: false` means the user has no activity summary yet or the list is in inbox order (see `fallback_reason`). `stale: true` without `building` means the build limit was reached and the list may miss recent changes. `status: unavailable` means personal ranking is off for now.","category": "Signals","feature": "signals","summary": "Get your personal ranked inbox",