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.

feat(review_hog): name the review kinds Standard and Deep for users (#114777)

Julian Bez6885751b703d
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 87d986bb6191..984686dc782e 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -14529,21 +14529,21 @@ snapshots:
scenes-code-review--narrow--light:
hash: v1.k794b7964.7e0bbeeffb4b8d8372dbdfe90686b2becc1991df2b78af2a0a2b6a0b3a41aadf.7Z4Aht9zbaWjsS8W-Yd9wCOuUjU5-A9Xb6Xpg__bgMs
scenes-code-review--narrow-settings--dark:
- hash: v1.k794b7964.42c69fa134810eaa6839b00998935fe9ba6a3bffc1841f709cd96a6896b6b074.c-AXhUZgqz811HSny4dwYc91twpyWbW7WMuUpm5Uag0
+ hash: v1.k794b7964.ba0c6e6160731eb30a5cf3c2e9881d895bc8674bc92be363c0e0c56522de5412.p-Ja1csUKoKyRzXWuypC3sTYjDfrX5fnzoPn4GJ8JuI
scenes-code-review--narrow-settings--light:
- hash: v1.k794b7964.cb4787e8c722043e3db27c5171e43afdf8dae9839f5e85c1b1fb19f06311152d.UlOSrJ-luTuZXQzrmlccN78W31uvDkOAVfUI3tzxIqE
+ hash: v1.k794b7964.b134ab5646a4f88af2a8933eacf56f7fbe81a3878c88f096a2de26c97798a15e.Ctq0UoV4dTw4T_7Xk6kAnusLi6l98J33E1ay11PynN4
scenes-code-review--saved-inbox-opt-ins--dark:
- hash: v1.k794b7964.dad9c200176e5b9be56e1e80a1dfe3d5c1ce3a499b53be7a73c8052d585ed251.4nSbexxZBEqqRqKVwgvSaQ3k53FcZXF5-8txH9FaFQ0
+ hash: v1.k794b7964.3a64a0be7055a214fb3173dd006ecb263372f2e429b6b314f1b6455866c5d9e6.p3xOCDvydAdcTIi3sJ-5w5Ndf92WiNe_mcWrgXuDXGA
scenes-code-review--saved-inbox-opt-ins--light:
- hash: v1.k794b7964.56e64569af5c37d2e61a530c2d39f74568b504dcef7cc76eff2be1433ecf2c8f.RoS4azTih4OIrutFdCk4sWUGns6WrvpPJDuPRXgJBkE
+ hash: v1.k794b7964.368abff5eb46814f2cc3c3d10e4c59d6a0bf480b3f1ecb6a45b5e694a88978ba.OhmRQsmGVa20oHmk_m8065vfDMLvUv8P9AYum8QeHJs
scenes-code-review--settings--dark:
- hash: v1.k794b7964.60889443f3a34d898aee89e7ffac26a302c285fd57bd7946302221376f1ab4b6.KIhDwvP7zZ1KDLTX3Lmm_w0LvilEeHyRZN3eCapZZ_c
+ hash: v1.k794b7964.3935ec90bad4ccbb9ed89ff00a75126f93b79912fdebef442b4755cd5c75fc65.umFZDadahhYUQAU3tEthgDUjkpOWm_NgTFSLtvoCrTg
scenes-code-review--settings--light:
- hash: v1.k794b7964.2bcf6fbe592507da84640646a01323420ae75ffe5847948eaf54ef401d74ff24.7NNJMuWHJK3bzYTJD-t-1be6YvdhePHFXaNA51dXaVg
+ hash: v1.k794b7964.435c87b03cc4a492717fff6940d766b133fad1068fa9b2b669ac3d9944c2be3b.f6hDtHznFMXN7NxsMo95AG0i_BXV9E65NU6UMKCYzDw
scenes-code-review--settings-for-member--dark:
- hash: v1.k794b7964.1131a4b430803b274b20831ec1b3c968671f1e8e34607d12e07536bcc1678a7c.LNgVtPhC1Xo1Sfv_yH-I_vyV-DtnOBoVs4eyqaD5gxI
+ hash: v1.k794b7964.a62e1453b1802e39a906f37be04cd6e412dca3f3221e8ff57b4de729a645fe94.Ytn8_u9jOQTFGyaw-XroxgfThGZmk3mteWQ6JNftPVo
scenes-code-review--settings-for-member--light:
- hash: v1.k794b7964.b5522a57b337f41fee07d6829f6d7be6ab1e744a29aeca65a8698c17f40026db.M3xsf3k9C-O3R1lUMN9X-l9nsNuzIecT1NSEJncQLTA
+ hash: v1.k794b7964.4f5b919eb4bed674c6eaa36100f683ccde5c43e5573ece05dd1e9dd60eb3d6b1.u2R46wlONU2DmOf5auxw8EyznBfCGA4YDzlPWs2gzBk
scenes-dashboards-customize-breakdown-colors--customize-breakdown-colors--dark:
hash: v1.k794b7964.cf89a12669d5221b2441fbfb4439b8b1b38191943438a2c1a220444148329954.B4ew6uW3gZCbPU_3vTOggsOyHojRlyvuXxh5FZnlO-0
scenes-dashboards-customize-breakdown-colors--customize-breakdown-colors--light:
diff --git a/products/review_hog/ARCHITECTURE.md b/products/review_hog/ARCHITECTURE.md
index 6e0a55ae35e1..583f7d12eebd 100644
--- a/products/review_hog/ARCHITECTURE.md
+++ b/products/review_hog/ARCHITECTURE.md
@@ -1,5 +1,16 @@
# ReviewHog Architecture
+## Terms
+
+The UI and the text ReviewHog posts use the user-facing names. Code, API values, and stored data use the internal names.
+
+- **Standard** (internal name **Flash**, `flash`): the automatic review every push gets. A fixed set of reviewers on a lower-cost model. It never pushes to the branch.
+- **Deep** (internal name **Full**, `full`): the review someone asks for with the Review button, the `reviewhog` label, or an Inbox report. It uses the requester's perspectives, validator, and threshold.
+- **Resolve**: the stage after a Deep review that fixes review comments on the PR branch, only when the PR owner opted in (`resolve_comments`).
+- **Inbox review**: a Deep review of a PR the PostHog agent opened for an Inbox report. The report's assigned reviewer counts as the PR owner.
+- **Perspective**: one angle a Deep review reads the code from, such as logic and correctness. Each one is a review skill.
+- **Threshold**: the lowest finding priority a Deep review posts to GitHub (`urgency_threshold`). Findings below it stay in the report in PostHog.
+
## Overview
**ReviewHog** (`products/review_hog`) is an automated GitHub PR code reviewer. It is a Django app
@@ -40,7 +51,7 @@ in flight, with the detail in DECISIONS.md.
## Status & next
ReviewHog runs end-to-end: label / UI / inbox / automatic authored-PR triggers → the Temporal pipeline → published PR review.
-Opted-in authors receive Flash reviews on new PRs and pushes in `PostHog/posthog`, including drafts.
+Automatic Standard reviews run on new PRs and pushes, including drafts, in every repository a project reviews, for the authors that the project rule, the repository exceptions, and each person's own choices select (`backend/automatic_review_rules.py`).
The per-PR queue serializes reviews and coalesces automatic pushes into a follow-up for the latest head.
The current focus is productionizing the reviewer-topology eval and tightening the finder/validator balance
(validator strictness, fewer junk candidates, the coverage gap).
diff --git a/products/review_hog/backend/api/project_settings.py b/products/review_hog/backend/api/project_settings.py
index abbbbb7d94d9..1f243604ea54 100644
--- a/products/review_hog/backend/api/project_settings.py
+++ b/products/review_hog/backend/api/project_settings.py
@@ -51,7 +51,7 @@ class ReviewProjectSettingsSerializer(serializers.Serializer):
flash_for = serializers.ChoiceField(
choices=AutomaticFlashFor.choices,
required=False,
- help_text="Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except "
+ help_text="Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except "
"the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the "
"default). A repository exception or a person's own choice wins over it.",
)
@@ -59,18 +59,18 @@ class ReviewProjectSettingsSerializer(serializers.Serializer):
choices=ReviewProjectSettings.BotPullRequests.choices,
required=False,
help_text="Pull requests from bots, and from authors who are not project members, in every repository "
- "this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the "
+ "this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the "
"person who connected GitHub, with default settings and no changes to the pull request).",
)
urgency_threshold = serializers.ChoiceField(
choices=UrgencyThreshold.choices,
required=False,
- help_text="Project default for the minimum priority a Full review publishes: 'consider' (all, the "
+ help_text="Project default for the minimum priority a Deep review publishes: 'consider' (all, the "
"built-in default), 'should_fix', or 'must_fix'. A person's own value wins.",
)
celebrate_clean_reviews = serializers.BooleanField(
required=False,
- help_text="Project default for the image in a Full review that finds nothing to raise. On by default. "
+ help_text="Project default for the image in a Deep review that finds nothing to raise. On by default. "
"A person's own value wins.",
)
people = ReviewRepositoryPersonSerializer(
@@ -145,6 +145,10 @@ class ReviewRepositoryOverviewEntrySerializer(serializers.Serializer):
help_text="What the requesting user's own pull requests would get here without their choice for this "
"repository. Equals my_result when there is no choice."
)
+ repository_result = AutomaticReviewDecisionSerializer(
+ help_text="What the requesting user's own pull requests would get here from the repository exception or "
+ "the project rule alone, without their default and their choice for this repository."
+ )
class ReviewRepositoryOverviewSerializer(serializers.Serializer):
@@ -158,6 +162,10 @@ class ReviewRepositoryOverviewSerializer(serializers.Serializer):
total = serializers.IntegerField(help_text="Repositories that match the search and the view.")
has_more = serializers.BooleanField(help_text="Whether more entries follow this page.")
next_offset = serializers.IntegerField(allow_null=True, help_text="Offset of the next page, or null.")
+ my_choices_unlike_default = serializers.IntegerField(
+ help_text="How many of the requesting user's own repository choices in this project give something other "
+ "than their default. Counts every installation, so the search, the view, and the page do not change it."
+ )
def _entry_data(entry: OverviewEntry) -> dict[str, Any]:
@@ -181,6 +189,7 @@ def _entry_data(entry: OverviewEntry) -> dict[str, Any]:
"my_choice_id": entry.my_choice.id if entry.my_choice is not None else None,
"my_result": decision_data(entry.my_result),
"inherited_result": decision_data(entry.inherited_result),
+ "repository_result": decision_data(entry.repository_result),
}
@@ -222,7 +231,7 @@ class ReviewProjectSettingsViewSet(ReviewHogProjectViewSetMixin, viewsets.Generi
methods=["GET"],
responses={200: OpenApiResponse(response=ReviewProjectSettingsSerializer)},
summary="Get the project's ReviewHog rule",
- description="The project rule for automatic Flash reviews, bot pull requests, the Full review defaults, "
+ description="The project rule for automatic Standard reviews, bot pull requests, the Deep review defaults, "
"and the connected GitHub installations.",
)
@extend_schema(
@@ -365,5 +374,6 @@ class ReviewProjectSettingsViewSet(ReviewHogProjectViewSetMixin, viewsets.Generi
"total": total,
"has_more": has_more,
"next_offset": offset + len(entries) if has_more else None,
+ "my_choices_unlike_default": overview.choices_unlike_default(),
}
return Response(ReviewRepositoryOverviewSerializer(data).data)
diff --git a/products/review_hog/backend/api/repositories.py b/products/review_hog/backend/api/repositories.py
index 565a96d5b57e..b2c41a8458cf 100644
--- a/products/review_hog/backend/api/repositories.py
+++ b/products/review_hog/backend/api/repositories.py
@@ -113,7 +113,7 @@ class ReviewRepositoryPersonSerializer(serializers.ModelSerializer):
kind = serializers.ChoiceField(
choices=ReviewRepositoryPerson.Kind.choices,
read_only=True,
- help_text="Which list: 'listed' (gets Flash when the rule reviews only listed people) or "
+ help_text="Which list: 'listed' (gets automatic reviews when the rule reviews only listed people) or "
"'excepted' (skipped when the rule reviews everyone).",
)
@@ -132,7 +132,7 @@ class ReviewRepositoryPersonRequestSerializer(serializers.Serializer):
class AutomaticReviewDecisionSerializer(serializers.Serializer):
flash = serializers.BooleanField(
- help_text="Whether the requesting user's own pull requests get automatic Flash reviews in this repository."
+ help_text="Whether the requesting user's own pull requests get automatic Standard reviews in this repository."
)
reason = serializers.ChoiceField(
choices=AutomaticReviewReason.choices,
@@ -234,7 +234,7 @@ class ReviewInstallationSerializer(serializers.Serializer):
account_name = serializers.CharField(help_text="The GitHub account (organization or user) of the installation.")
connected_by = UserBasicSerializer(
allow_null=True,
- help_text="Who connected the installation to this project. Automatic Flash reviews of bot pull requests "
+ help_text="Who connected the installation to this project. Automatic Standard reviews of bot pull requests "
"run as this user.",
)
claim_id = serializers.UUIDField(
diff --git a/products/review_hog/backend/api/reviews.py b/products/review_hog/backend/api/reviews.py
index 6d05015dc166..992b8f7d2aa7 100644
--- a/products/review_hog/backend/api/reviews.py
+++ b/products/review_hog/backend/api/reviews.py
@@ -115,7 +115,7 @@ class ReviewProgressSerializer(serializers.Serializer):
choices=REVIEW_STAGES,
help_text="How far the in-flight review turn has come: fetching the diff, chunking, picking "
"each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, "
- "or finalizing (building and publishing the review). A single-agent Flash turn reports its "
+ "or finalizing (building and publishing the review). A single-agent Standard turn reports its "
"own `single_agent_*` stages instead: preparing, reviewing (main and lens sessions), and "
"finalizing (merging, capping, and publishing the findings).",
)
@@ -196,7 +196,7 @@ class ReviewRecentReviewSerializer(serializers.Serializer):
)
published = serializers.BooleanField(help_text="Whether a review has been published back to GitHub.")
full_review_published = serializers.BooleanField(
- help_text="Whether a Full review of this pull request has been published. No Flash review runs after one."
+ help_text="Whether a Deep review of this pull request has been published. No Standard review runs after one."
)
in_progress = serializers.BooleanField(
help_text="Whether a run is on this report right now: a review turn or a resolution run "
@@ -272,7 +272,7 @@ class ReviewTriggerRequestRunMode(models.TextChoices):
REVIEW = RUN_MODE_REVIEW, "Review"
REVIEW_ONLY = RUN_MODE_REVIEW_ONLY, "Review only"
RESOLVE_ONLY = RUN_MODE_RESOLVE_ONLY, "Resolve only"
- FLASH = RUN_MODE_FLASH, "Flash"
+ FLASH = RUN_MODE_FLASH, "Standard"
class ReviewTriggerRequestSerializer(serializers.Serializer):
@@ -288,8 +288,8 @@ class ReviewTriggerRequestSerializer(serializers.Serializer):
"request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' "
"reviews without resolving regardless of that setting; 'resolve_only' skips the review and only "
"runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's "
- "opt-in; 'flash' uses a lower-cost model for the review passes and validation, never resolves "
- "comments, and is refused once the PR has a published Full review. The owner is the PR's author, "
+ "opt-in; 'flash' runs a Standard review: a lower-cost model for the review passes and validation, never resolves "
+ "comments, and is refused once the PR has a published Deep review. The owner is the PR's author, "
"or the Inbox reviewer of a pull request the PostHog app opened.",
)
@@ -302,7 +302,7 @@ class ReviewTriggerResponseSerializer(serializers.Serializer):
help_text="Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the "
"pull request's current commit already has a published review in the requested mode, "
"'joined_running_review' when a review was already in flight and the request joined its queue. "
- "A requested Full review waits for an active Flash review."
+ "A requested Deep review waits for an active Standard review."
)
@@ -312,7 +312,7 @@ class ReviewTriggerErrorSerializer(serializers.Serializer):
required=False,
choices=ReviewRequestRefusal.choices,
help_text="Why the request was refused, for a client that shows its own reason: 'flash_after_full' "
- "(the PR already has a published Full review), 'resolution_not_opted_in' (the PR owner has not "
+ "(the PR already has a published Deep review), 'resolution_not_opted_in' (the PR owner has not "
"turned on resolving comments). Absent for other errors.",
)
@@ -761,7 +761,7 @@ class ReviewRecentReviewsViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet
response=ReviewTriggerErrorSerializer,
description="The pull request's cycle is busy (busy-guard): reviews are blocked while its "
"comments are being resolved, and resolve-only runs are blocked while a review is running. "
- "Also returned with a code when Flash follows a published Full review ('flash_after_full') "
+ "Also returned with a code when a Standard review follows a published Deep review ('flash_after_full') "
"or the PR owner has not opted in to resolution ('resolution_not_opted_in').",
),
429: OpenApiResponse(description="GitHub rate-limited the App's token; retry after the Retry-After delay."),
@@ -773,7 +773,7 @@ class ReviewRecentReviewsViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet
"appears under their recent reviews. Resolution writes to the branch only when the pull request "
"owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution "
"stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a "
- "lower-cost Flash review that never resolves comments and is refused after a published Full review. "
+ "lower-cost Standard review that never resolves comments and is refused after a published Deep review. "
"Nonexistent, closed, and fork PRs are rejected synchronously; "
"a PR whose current commit already has a published review returns 'already_reviewed' without "
"starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole "
diff --git a/products/review_hog/backend/api/settings.py b/products/review_hog/backend/api/settings.py
index 79fd7af74402..80dc494fdaf0 100644
--- a/products/review_hog/backend/api/settings.py
+++ b/products/review_hog/backend/api/settings.py
@@ -48,10 +48,10 @@ class ReviewPreferenceSourcesSerializer(serializers.Serializer):
class ReviewProjectDefaultsSerializer(serializers.Serializer):
urgency_threshold = serializers.ChoiceField(
choices=UrgencyThreshold.choices,
- help_text="The project's default for the minimum priority a Full review publishes.",
+ help_text="The project's default for the minimum priority a Deep review publishes.",
)
celebrate_clean_reviews = serializers.BooleanField(
- help_text="The project's default for the image in a Full review that finds nothing to raise.",
+ help_text="The project's default for the image in a Deep review that finds nothing to raise.",
)
@@ -60,25 +60,25 @@ class ReviewUserSettingsSerializer(serializers.Serializer):
required=False,
choices=DefaultReviewMode.choices,
help_text="Automatic reviews of the user's own pull requests in every repository this project reviews: "
- "'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' "
- "turns automatic Flash off everywhere. A choice for one repository wins over this default.",
+ "'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' "
+ "turns automatic reviews off everywhere. A choice for one repository wins over this default.",
)
resolve_comments = serializers.BooleanField(
required=False,
- help_text="After a Full review of the user's pull requests is published, run the resolution stage: "
+ help_text="After a Deep review of the user's pull requests is published, run the resolution stage: "
"triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and "
"reply on every thread. Off by default. Personal only: no project default applies.",
)
urgency_threshold = serializers.ChoiceField(
required=False,
choices=UrgencyThreshold.choices,
- help_text="Minimum priority a validated Full review finding needs to be published: 'consider' "
+ help_text="Minimum priority a validated Deep review finding needs to be published: 'consider' "
"publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only "
"blocking issues. Without the user's own value the project default applies.",
)
celebrate_clean_reviews = serializers.BooleanField(
required=False,
- help_text="Show a fun image in the review comment when a Full review of the user's pull requests "
+ help_text="Show a fun image in the review comment when a Deep review of the user's pull requests "
"finds nothing to raise. Without the user's own value the project default applies.",
)
review_inbox_prs = serializers.BooleanField(
@@ -101,7 +101,7 @@ class ReviewUserSettingsSerializer(serializers.Serializer):
project_defaults = ReviewProjectDefaultsSerializer(
read_only=True,
source="project",
- help_text="The project defaults the Full review preferences fall back to.",
+ help_text="The project defaults the Deep review preferences fall back to.",
)
stamphog_connected = serializers.SerializerMethodField(
help_text="Whether this project has at least one synced, enabled Stamphog repository. When "
diff --git a/products/review_hog/backend/preferences.py b/products/review_hog/backend/preferences.py
index 09cd91fa6b48..798d4c6a191d 100644
--- a/products/review_hog/backend/preferences.py
+++ b/products/review_hog/backend/preferences.py
@@ -20,8 +20,8 @@ PreferenceValue = str | bool
class DefaultReviewMode(models.TextChoices):
- FOLLOW = "follow", "Follow each repository"
- FLASH = "flash", "Flash everywhere"
+ FOLLOW = "follow", "Let each repository decide"
+ FLASH = "flash", "On everywhere"
OFF = "off", "Off everywhere"
diff --git a/products/review_hog/backend/repository_settings.py b/products/review_hog/backend/repository_settings.py
index 1e9d2de5e6b1..5de6f409ec33 100644
--- a/products/review_hog/backend/repository_settings.py
+++ b/products/review_hog/backend/repository_settings.py
@@ -32,6 +32,7 @@ from products.review_hog.backend.models import (
ReviewUserRepositoryChoice,
)
from products.review_hog.backend.ownership import RepositoryOwnership, RepositoryRef, find_matching_row, resolve_owner
+from products.review_hog.backend.preferences import DefaultReviewMode
logger = logging.getLogger(__name__)
@@ -319,6 +320,7 @@ class OverviewEntry:
my_choice: ReviewUserRepositoryChoice | None
my_result: AutomaticReviewDecision
inherited_result: AutomaticReviewDecision
+ repository_result: AutomaticReviewDecision
class RepositoryOverview:
@@ -360,9 +362,13 @@ class RepositoryOverview:
author = self.viewer.for_repository(ref)
result = rule.resolve(author)
inherited = rule.resolve(replace(author, repository_choice=None))
+ repository_result = rule.resolve(
+ replace(author, repository_choice=None, default_mode=DefaultReviewMode.FOLLOW)
+ )
else:
result = AutomaticReviewDecision(flash=False, reason=AutomaticReviewReason.NOT_IN_PROJECT)
inherited = result
+ repository_result = result
if owner is None:
owner_kind, owner_project = RepositoryOwnerKind.NONE, None
elif in_project:
@@ -382,8 +388,15 @@ class RepositoryOverview:
my_choice=choice,
my_result=result,
inherited_result=inherited,
+ repository_result=repository_result,
)
+ def choices_unlike_default(self) -> int:
+ """The viewer's repository choices, in any installation, that give something other than their default."""
+ if self.viewer.default_mode == DefaultReviewMode.FOLLOW:
+ return len(self.viewer.choices)
+ return sum(1 for choice in self.viewer.choices if choice.mode != self.viewer.default_mode)
+
def _in_view(self, entry: OverviewEntry, view: str) -> bool:
if view == RepositoryOverviewView.IN_PROJECT:
return entry.in_project
diff --git a/products/review_hog/backend/requested_reviews.py b/products/review_hog/backend/requested_reviews.py
index c42d3b852efe..4cf7a7b866c7 100644
--- a/products/review_hog/backend/requested_reviews.py
+++ b/products/review_hog/backend/requested_reviews.py
@@ -183,8 +183,8 @@ def request_pr_review(
if flash_refusal(report, review_mode) is not None:
return PRReviewRequestOutcome(
status=PRReviewRequestStatus.REFUSED,
- error="This pull request already has a Full review, so it gets no more Flash reviews. "
- "Start a Full review instead.",
+ error="This pull request already has a Deep review, so it gets no more Standard reviews. "
+ "Start a Deep review instead.",
refusal=ReviewRequestRefusal.FLASH_AFTER_FULL,
)
if report is not None and review_already_published(report, pr_meta.head_sha or "", review_mode):
diff --git a/products/review_hog/backend/review_request_rules.py b/products/review_hog/backend/review_request_rules.py
index 3fe95f8fee9c..9de46ec03a07 100644
--- a/products/review_hog/backend/review_request_rules.py
+++ b/products/review_hog/backend/review_request_rules.py
@@ -20,7 +20,7 @@ from products.review_hog.backend.reviewer.review_state import published_heads_by
class ReviewRequestRefusal(models.TextChoices):
"""Why a request is refused. Clients show a reason per code."""
- FLASH_AFTER_FULL = "flash_after_full", "Flash after a published Full review"
+ FLASH_AFTER_FULL = "flash_after_full", "Standard after a published Deep review"
RESOLUTION_NOT_OPTED_IN = "resolution_not_opted_in", "The pull request owner has not opted in to resolution"
diff --git a/products/review_hog/backend/reviewer/status_comment.py b/products/review_hog/backend/reviewer/status_comment.py
index daec93bc5f76..b339c6871c80 100644
--- a/products/review_hog/backend/reviewer/status_comment.py
+++ b/products/review_hog/backend/reviewer/status_comment.py
@@ -178,7 +178,7 @@ def report_deep_link(team_id: int, report_id: str) -> str:
def _product_name(review_mode: str) -> str:
- return "PostHog Review (flash)" if review_mode == REVIEW_MODE_FLASH else "PostHog Review"
+ return "PostHog Review (standard)" if review_mode == REVIEW_MODE_FLASH else "PostHog Review"
def _plural(count: int, noun: str) -> str:
diff --git a/products/review_hog/backend/temporal/activities.py b/products/review_hog/backend/temporal/activities.py
index 6afb098ba300..879264239999 100644
--- a/products/review_hog/backend/temporal/activities.py
+++ b/products/review_hog/backend/temporal/activities.py
@@ -1427,7 +1427,7 @@ async def lens_review_activity(input: LensReviewInput) -> None:
# --- Combine + scope-clean + dedup -----------------------------------------------------------------
# The reviews API shows this as the finding's validator note, so it says that no validator ran.
-SINGLE_AGENT_VERDICT_NOTE = "Not validated separately. The single-agent Flash review publishes its findings directly."
+SINGLE_AGENT_VERDICT_NOTE = "Not validated separately. A Standard review publishes its findings directly."
def _is_final_attempt() -> bool:
diff --git a/products/review_hog/backend/tests/test_repositories_api.py b/products/review_hog/backend/tests/test_repositories_api.py
index f96ed2adaa70..2152bdc764d5 100644
--- a/products/review_hog/backend/tests/test_repositories_api.py
+++ b/products/review_hog/backend/tests/test_repositories_api.py
@@ -17,6 +17,7 @@ from products.review_hog.backend.models import (
ReviewProjectSettings,
ReviewRepository,
ReviewUserRepositoryChoice,
+ ReviewUserSettings,
)
INSTALLATION = "1001"
@@ -314,21 +315,28 @@ class TestReviewRepositorySettingsAPI(APIBaseTest):
ReviewUserRepositoryChoice.objects.for_team(self.team.id).create(
team=self.team, user=self.user, installation_id=INSTALLATION, full_name="example-org/docs", mode="off"
)
+ ReviewUserSettings.objects.for_team(self.team.id).create(
+ team_id=self.team.id, user_id=self.user.id, preferences={"default_review_mode": "flash"}
+ )
url = self._url(f"repository_overview/?installation_id={INSTALLATION}")
everything = self.client.get(url)
assert everything.status_code == 200, everything.json()
assert everything.json()["claim_scope"] == "all"
+ # The one choice, "off" on docs, differs from the "flash" default.
+ assert everything.json()["my_choices_unlike_default"] == 1
entries = {entry["full_name"]: entry for entry in everything.json()["results"]}
assert entries["example-org/web"]["owner"] == "this_project"
- assert entries["example-org/web"]["my_result"] == {"flash": False, "reason": "project_opt_in"}
+ assert entries["example-org/web"]["my_result"] == {"flash": True, "reason": "own_default"}
+ assert entries["example-org/web"]["repository_result"] == {"flash": False, "reason": "project_opt_in"}
assert entries["example-org/api"]["owner"] == "other_project"
assert entries["example-org/api"]["owner_project"] == {"id": self.other_team.id, "name": "Other project"}
assert entries["example-org/api"]["my_result"] == {"flash": False, "reason": "not_in_project"}
assert entries["example-org/docs"]["exception"]["flash_for"] == "everyone"
assert entries["example-org/docs"]["my_result"] == {"flash": False, "reason": "own_repository_choice"}
- assert entries["example-org/docs"]["inherited_result"] == {"flash": True, "reason": "repository_everyone"}
+ assert entries["example-org/docs"]["inherited_result"] == {"flash": True, "reason": "own_default"}
+ assert entries["example-org/docs"]["repository_result"] == {"flash": True, "reason": "repository_everyone"}
exceptions = self.client.get(f"{url}&view=exceptions").json()
assert [entry["full_name"] for entry in exceptions["results"]] == ["example-org/docs"]
diff --git a/products/review_hog/backend/tests/test_status_comment.py b/products/review_hog/backend/tests/test_status_comment.py
index 3585aec53d3d..d704f701238b 100644
--- a/products/review_hog/backend/tests/test_status_comment.py
+++ b/products/review_hog/backend/tests/test_status_comment.py
@@ -90,9 +90,9 @@ class TestFlashHeader:
# The status comment is rewritten in every state; a state that forgot the label would read
# as a full review mid-run or at the end, and a full run must never carry it.
flash, full = render(REVIEW_MODE_FLASH), render(REVIEW_MODE_FULL)
- assert flash.startswith("### \U0001f994 PostHog Review (flash) ")
+ assert flash.startswith("### \U0001f994 PostHog Review (standard) ")
assert full.startswith("### \U0001f994 PostHog Review ")
- assert "(flash)" not in full
+ assert "(standard)" not in full
assert "FLASH MODE" not in flash + full
@@ -348,7 +348,7 @@ class TestEnsureStatusComment(BaseTest):
ensure_status_comment(self.team.id, str(report.id), review_mode=REVIEW_MODE_FLASH)
assert _posts(mock_request) == ["/repos/o/r/issues/123/comments"]
- assert mock_request.call_args.kwargs["json"]["body"].startswith("### \U0001f994 PostHog Review (flash) ")
+ assert mock_request.call_args.kwargs["json"]["body"].startswith("### \U0001f994 PostHog Review (standard) ")
report.refresh_from_db()
assert report.status_comment_id == 777
assert report.status_comment_edited_at is not None
@@ -519,7 +519,7 @@ class TestFinalizeStatusComment(BaseTest):
assert "couldn't finish this review" in body
# The entry point threads the turn's mode into the renderer; a dropped kwarg here would
# leave a dead flash run reading as a full one.
- assert body.startswith("### \U0001f994 PostHog Review (flash) ")
+ assert body.startswith("### \U0001f994 PostHog Review (standard) ")
class TestResolutionSection:
diff --git a/products/review_hog/frontend/CodeReviewScene.stories.tsx b/products/review_hog/frontend/CodeReviewScene.stories.tsx
index 5ba1a331664c..111a77d06acb 100644
--- a/products/review_hog/frontend/CodeReviewScene.stories.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.stories.tsx
@@ -255,12 +255,12 @@ function inProject(name: string): boolean {
}
/** A story-sized copy of the backend resolver, so the panes answer like the real API after each change. */
-function inherited(name: string): AutomaticReviewDecisionApi {
+function inherited(name: string, { withDefault = true }: { withDefault?: boolean } = {}): AutomaticReviewDecisionApi {
if (!inProject(name)) {
return { flash: false, reason: 'not_in_project' }
}
const defaultMode = storyState.settings.default_review_mode ?? 'follow'
- if (defaultMode !== 'follow') {
+ if (withDefault && defaultMode !== 'follow') {
return { flash: defaultMode === 'flash', reason: 'own_default' }
}
const row = storyState.rows[name]
@@ -301,9 +301,16 @@ function overviewEntry(name: string): ReviewRepositoryOverviewEntryApi {
my_choice_id: own ? (choice?.id ?? null) : null,
my_result: own && choice ? { flash: choice.mode === 'flash', reason: 'own_repository_choice' } : base,
inherited_result: base,
+ repository_result: inherited(name, { withDefault: false }),
}
}
+function choicesUnlikeDefault(): number {
+ const defaultMode = storyState.settings.default_review_mode ?? 'follow'
+ return Object.values(storyState.choices).filter((choice) => defaultMode === 'follow' || choice.mode !== defaultMode)
+ .length
+}
+
function saveRepository(write: ReviewRepositoryWriteApi): void {
const current = storyState.rows[write.full_name] ?? {
id: `repo-new-${storyState.nextId++}`,
@@ -406,6 +413,7 @@ const meta: Meta<typeof CodeReviewScene> = {
total: entries.length,
has_more: offset + limit < entries.length,
next_offset: offset + limit < entries.length ? offset + limit : null,
+ my_choices_unlike_default: choicesUnlikeDefault(),
},
]
},
@@ -535,7 +543,7 @@ export const Default: Story = {
await expect(await canvas.findByText('Review a pull request')).toBeVisible()
await expect(await canvas.findByText('Add retry to the export job')).toBeVisible()
await expect(canvas.getByText('Mine')).toBeVisible()
- await expect(canvas.queryByText('Full review settings')).not.toBeInTheDocument()
+ await expect(canvas.queryByText('Deep review settings')).not.toBeInTheDocument()
},
}
@@ -549,17 +557,27 @@ export const Settings: Story = {
await expect(await canvas.findByText('example-org/web')).toBeVisible()
await expect(canvas.getByText('Reviewed in the Billing project')).toBeVisible()
await expect(canvas.getByText('You can edit: project admin')).toBeVisible()
- await expect(canvas.getByText('Full review settings')).toBeVisible()
+ await expect(canvas.getByText('Deep review settings')).toBeVisible()
await expect(canvas.queryByText('Review a pull request')).not.toBeInTheDocument()
await expect(canvas.getByLabelText('Resolve comments on my pull requests')).toBeVisible()
},
}
export const SettingsForMember: Story = {
- parameters: { tab: 'settings', canEdit: false, claimScope: 'selected' },
+ parameters: {
+ tab: 'settings',
+ canEdit: false,
+ claimScope: 'selected',
+ savedSettings: { default_review_mode: 'flash' },
+ },
play: async ({ canvasElement }) => {
const canvas = within(canvasElement)
await expect(await canvas.findByText('Project admins edit')).toBeVisible()
+ await expect(
+ await canvas.findByText(
+ 'Your default, On everywhere, applies to your PRs in every repository, except 1 where you picked something else.'
+ )
+ ).toBeVisible()
await expect(await canvas.findByText('example-org/web')).toBeVisible()
await expect(canvas.queryByText('Include in project')).not.toBeInTheDocument()
await expect(canvas.queryByLabelText('Add exception for example-org/docs')).not.toBeInTheDocument()
diff --git a/products/review_hog/frontend/CodeReviewScene.tsx b/products/review_hog/frontend/CodeReviewScene.tsx
index 412c05db46c3..53a026558392 100644
--- a/products/review_hog/frontend/CodeReviewScene.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.tsx
@@ -669,13 +669,13 @@ function TriggerReviewSection(): JSX.Element {
const resolvingReason = triggerUrlResolving ? 'Still resolving comments from the last review' : undefined
const inFlightReason = triggeringReview ? 'A run is already starting…' : undefined
const flashAfterFullReason = triggerUrlHasFullReview
- ? 'This pull request already has a Full review. Flash does not run after one.'
+ ? 'This pull request already has a Deep review. Standard does not run after one.'
: undefined
return (
<section className="flex flex-col gap-4">
<SectionHeader icon={<IconGithub />} title="Review a pull request">
- Start a Full review of any pull request the GitHub App can access. The review is posted back to the pull
- request and shows up under recent reviews. Your perspectives and other review skills apply to Full
+ Start a Deep review of any pull request the GitHub App can access. The review is posted back to the pull
+ request and shows up under recent reviews. Your perspectives and other review skills apply to Deep
reviews only.
</SectionHeader>
<form
@@ -724,10 +724,10 @@ function TriggerReviewSection(): JSX.Element {
<LemonButton
fullWidth
onClick={() => submitTriggerReview(ReviewTriggerRequestRunModeEnumApi.Flash)}
- tooltip="A faster, cheaper review that never resolves comments and uses none of your review skills. Its status comment is marked as flash."
+ tooltip="A lower-cost review that never resolves comments and uses none of your review skills. Its status comment is marked as standard."
disabledReason={flashAfterFullReason}
>
- Review in Flash mode
+ Standard review
</LemonButton>
</>
),
@@ -1542,9 +1542,9 @@ function SettingsTab(): JSX.Element {
<>
<section className="flex flex-col gap-3">
<p className="m-0 text-sm text-secondary">
- Flash runs automatically on every push, following the rules below. Full runs only when someone asks
- for it: the Review button, the reviewhog label, or the Inbox. No Flash runs on a pull request after
- it had a Full review.
+ Standard runs automatically on every push, following the rules below. Deep runs only when someone
+ asks for it: the Review button, the reviewhog label, or the Inbox. No Standard review runs on a pull
+ request after it had a Deep review.
</p>
<InstallationClaims />
<RepositoriesPanes />
diff --git a/products/review_hog/frontend/generated/api.schemas.ts b/products/review_hog/frontend/generated/api.schemas.ts
index 4e6ef0ccae1a..e4321dc5d7ec 100644
--- a/products/review_hog/frontend/generated/api.schemas.ts
+++ b/products/review_hog/frontend/generated/api.schemas.ts
@@ -222,7 +222,7 @@ export interface ReviewRepositoryPersonApi {
readonly id: string
/** The project member on the list. */
readonly user: UserBasicApi
- /** Which list: 'listed' (gets Flash when the rule reviews only listed people) or 'excepted' (skipped when the rule reviews everyone).
+ /** Which list: 'listed' (gets automatic reviews when the rule reviews only listed people) or 'excepted' (skipped when the rule reviews everyone).
*
* * `listed` - Listed
* * `excepted` - Excepted */
@@ -234,7 +234,7 @@ export interface ReviewInstallationApi {
installation_id: string
/** The GitHub account (organization or user) of the installation. */
account_name: string
- /** Who connected the installation to this project. Automatic Flash reviews of bot pull requests run as this user. */
+ /** Who connected the installation to this project. Automatic Standard reviews of bot pull requests run as this user. */
connected_by: UserBasicApi | null
/**
* Id of this project's claim. Null when the project reviews nothing there.
@@ -251,24 +251,24 @@ export interface ReviewInstallationApi {
}
export interface ReviewProjectSettingsApi {
- /** Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
+ /** Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
*
* * `everyone` - Automatic Flash for everyone
* * `listed` - Automatic Flash for these people
* * `off` - Automatic Flash opt-in only */
flash_for?: AutomaticFlashForEnumApi
- /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the person who connected GitHub, with default settings and no changes to the pull request).
+ /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the person who connected GitHub, with default settings and no changes to the pull request).
*
* * `skip` - Not reviewed
* * `run` - Automatic Flash */
bot_prs?: ReviewProjectSettingsBotPullRequestsEnumApi
- /** Project default for the minimum priority a Full review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
+ /** Project default for the minimum priority a Deep review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnumApi
- /** Project default for the image in a Full review that finds nothing to raise. On by default. A person's own value wins. */
+ /** Project default for the image in a Deep review that finds nothing to raise. On by default. A person's own value wins. */
celebrate_clean_reviews?: boolean
/** The people on the project rule's two lists. Only the list that matches flash_for has an effect. */
readonly people: readonly ReviewRepositoryPersonApi[]
@@ -279,24 +279,24 @@ export interface ReviewProjectSettingsApi {
}
export interface PatchedReviewProjectSettingsApi {
- /** Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
+ /** Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
*
* * `everyone` - Automatic Flash for everyone
* * `listed` - Automatic Flash for these people
* * `off` - Automatic Flash opt-in only */
flash_for?: AutomaticFlashForEnumApi
- /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the person who connected GitHub, with default settings and no changes to the pull request).
+ /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the person who connected GitHub, with default settings and no changes to the pull request).
*
* * `skip` - Not reviewed
* * `run` - Automatic Flash */
bot_prs?: ReviewProjectSettingsBotPullRequestsEnumApi
- /** Project default for the minimum priority a Full review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
+ /** Project default for the minimum priority a Deep review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnumApi
- /** Project default for the image in a Full review that finds nothing to raise. On by default. A person's own value wins. */
+ /** Project default for the image in a Deep review that finds nothing to raise. On by default. A person's own value wins. */
celebrate_clean_reviews?: boolean
/** The people on the project rule's two lists. Only the list that matches flash_for has an effect. */
readonly people?: readonly ReviewRepositoryPersonApi[]
@@ -470,7 +470,7 @@ export const AutomaticReviewReasonEnumApi = {
} as const
export interface AutomaticReviewDecisionApi {
- /** Whether the requesting user's own pull requests get automatic Flash reviews in this repository. */
+ /** Whether the requesting user's own pull requests get automatic Standard reviews in this repository. */
flash: boolean
/** Which rule decided: the user's own choice ('own_repository_choice', 'own_default'), the repository exception ('repository_*'), the project rule ('project_*'), or 'not_in_project' when this project does not review the repository.
*
@@ -564,6 +564,8 @@ export interface ReviewRepositoryOverviewEntryApi {
my_result: AutomaticReviewDecisionApi
/** What the requesting user's own pull requests would get here without their choice for this repository. Equals my_result when there is no choice. */
inherited_result: AutomaticReviewDecisionApi
+ /** What the requesting user's own pull requests would get here from the repository exception or the project rule alone, without their default and their choice for this repository. */
+ repository_result: AutomaticReviewDecisionApi
}
export interface ReviewRepositoryOverviewApi {
@@ -585,6 +587,8 @@ export interface ReviewRepositoryOverviewApi {
* @nullable
*/
next_offset: number | null
+ /** How many of the requesting user's own repository choices in this project give something other than their default. Counts every installation, so the search, the view, and the page do not change it. */
+ my_choices_unlike_default: number
}
export interface ReviewResolutionConfigApi {
@@ -631,7 +635,7 @@ export const ReviewStageEnumApi = {
} as const
export interface ReviewProgressApi {
- /** How far the in-flight review turn has come: fetching the diff, chunking, picking each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, or finalizing (building and publishing the review). A single-agent Flash turn reports its own `single_agent_*` stages instead: preparing, reviewing (main and lens sessions), and finalizing (merging, capping, and publishing the findings).
+ /** How far the in-flight review turn has come: fetching the diff, chunking, picking each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, or finalizing (building and publishing the review). A single-agent Standard turn reports its own `single_agent_*` stages instead: preparing, reviewing (main and lens sessions), and finalizing (merging, capping, and publishing the findings).
*
* * `fetching` - fetching
* * `chunking` - chunking
@@ -731,7 +735,7 @@ export interface ReviewRecentReviewApi {
last_run_at: string | null
/** Whether a review has been published back to GitHub. */
published: boolean
- /** Whether a Full review of this pull request has been published. No Flash review runs after one. */
+ /** Whether a Deep review of this pull request has been published. No Standard review runs after one. */
full_review_published: boolean
/** Whether a run is on this report right now: a review turn or a resolution run (activity within the last 30 minutes). */
in_progress: boolean
@@ -948,7 +952,7 @@ export interface ReviewDetailApi {
last_run_at: string | null
/** Whether a review has been published back to GitHub. */
published: boolean
- /** Whether a Full review of this pull request has been published. No Flash review runs after one. */
+ /** Whether a Deep review of this pull request has been published. No Standard review runs after one. */
full_review_published: boolean
/** Whether a run is on this report right now: a review turn or a resolution run (activity within the last 30 minutes). */
in_progress: boolean
@@ -1034,7 +1038,7 @@ export interface ReviewPerspectiveStatsApi {
* * `review` - Review
* * `review_only` - Review only
* * `resolve_only` - Resolve only
- * * `flash` - Flash
+ * * `flash` - Standard
*/
export type ReviewTriggerRequestRunModeEnumApi =
(typeof ReviewTriggerRequestRunModeEnumApi)[keyof typeof ReviewTriggerRequestRunModeEnumApi]
@@ -1049,24 +1053,24 @@ export const ReviewTriggerRequestRunModeEnumApi = {
export interface ReviewTriggerRequestApi {
/** GitHub pull request URL to review, e.g. 'https://github.com/PostHog/posthog.com/pull/123'. The repository must be accessible to the project's GitHub App installation. */
pr_url: string
- /** What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' uses a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Full review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.
+ /** What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' runs a Standard review: a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Deep review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.
*
* * `review` - Review
* * `review_only` - Review only
* * `resolve_only` - Resolve only
- * * `flash` - Flash */
+ * * `flash` - Standard */
run_mode?: ReviewTriggerRequestRunModeEnumApi
}
export interface ReviewTriggerResponseApi {
/** Temporal workflow id for the started review run; empty when no run was started. */
workflow_id: string
- /** Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the pull request's current commit already has a published review in the requested mode, 'joined_running_review' when a review was already in flight and the request joined its queue. A requested Full review waits for an active Flash review. */
+ /** Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the pull request's current commit already has a published review in the requested mode, 'joined_running_review' when a review was already in flight and the request joined its queue. A requested Deep review waits for an active Standard review. */
status: string
}
/**
- * * `flash_after_full` - Flash after a published Full review
+ * * `flash_after_full` - Standard after a published Deep review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
*/
export type ReviewRequestRefusalEnumApi = (typeof ReviewRequestRefusalEnumApi)[keyof typeof ReviewRequestRefusalEnumApi]
@@ -1079,16 +1083,16 @@ export const ReviewRequestRefusalEnumApi = {
export interface ReviewTriggerErrorApi {
/** Human-readable explanation of why the trigger was rejected. */
error: string
- /** Why the request was refused, for a client that shows its own reason: 'flash_after_full' (the PR already has a published Full review), 'resolution_not_opted_in' (the PR owner has not turned on resolving comments). Absent for other errors.
+ /** Why the request was refused, for a client that shows its own reason: 'flash_after_full' (the PR already has a published Deep review), 'resolution_not_opted_in' (the PR owner has not turned on resolving comments). Absent for other errors.
*
- * * `flash_after_full` - Flash after a published Full review
+ * * `flash_after_full` - Standard after a published Deep review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution */
code?: ReviewRequestRefusalEnumApi
}
/**
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere
*/
export type DefaultReviewModeEnumApi = (typeof DefaultReviewModeEnumApi)[keyof typeof DefaultReviewModeEnumApi]
@@ -1152,32 +1156,32 @@ export interface ReviewPreferenceSourcesApi {
}
export interface ReviewProjectDefaultsApi {
- /** The project's default for the minimum priority a Full review publishes.
+ /** The project's default for the minimum priority a Deep review publishes.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold: UrgencyThresholdEnumApi
- /** The project's default for the image in a Full review that finds nothing to raise. */
+ /** The project's default for the image in a Deep review that finds nothing to raise. */
celebrate_clean_reviews: boolean
}
export interface ReviewUserSettingsApi {
- /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' turns automatic Flash off everywhere. A choice for one repository wins over this default.
+ /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' turns automatic reviews off everywhere. A choice for one repository wins over this default.
*
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere */
default_review_mode?: DefaultReviewModeEnumApi
- /** After a Full review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
+ /** After a Deep review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
resolve_comments?: boolean
- /** Minimum priority a validated Full review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
+ /** Minimum priority a validated Deep review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnumApi
- /** Show a fun image in the review comment when a Full review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
+ /** Show a fun image in the review comment when a Deep review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
celebrate_clean_reviews?: boolean
/** Review the pull requests the agent opens for Inbox reports assigned to the user: ReviewHog reviews each one and posts its findings to the pull request. Off by default. */
review_inbox_prs?: boolean
@@ -1185,28 +1189,28 @@ export interface ReviewUserSettingsApi {
stamphog_review_inbox_prs?: boolean
/** Where each effective value comes from. A value equal to the inherited one is never stored, so writing the project default or the built-in default makes the source follow it again. */
readonly sources: ReviewPreferenceSourcesApi
- /** The project defaults the Full review preferences fall back to. */
+ /** The project defaults the Deep review preferences fall back to. */
readonly project_defaults: ReviewProjectDefaultsApi
/** Whether this project has at least one synced, enabled Stamphog repository. When false, the stamphog_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamphog GitHub App. */
readonly stamphog_connected: boolean
}
export interface PatchedReviewUserSettingsApi {
- /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' turns automatic Flash off everywhere. A choice for one repository wins over this default.
+ /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' turns automatic reviews off everywhere. A choice for one repository wins over this default.
*
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere */
default_review_mode?: DefaultReviewModeEnumApi
- /** After a Full review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
+ /** After a Deep review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
resolve_comments?: boolean
- /** Minimum priority a validated Full review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
+ /** Minimum priority a validated Deep review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnumApi
- /** Show a fun image in the review comment when a Full review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
+ /** Show a fun image in the review comment when a Deep review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
celebrate_clean_reviews?: boolean
/** Review the pull requests the agent opens for Inbox reports assigned to the user: ReviewHog reviews each one and posts its findings to the pull request. Off by default. */
review_inbox_prs?: boolean
@@ -1214,7 +1218,7 @@ export interface PatchedReviewUserSettingsApi {
stamphog_review_inbox_prs?: boolean
/** Where each effective value comes from. A value equal to the inherited one is never stored, so writing the project default or the built-in default makes the source follow it again. */
readonly sources?: ReviewPreferenceSourcesApi
- /** The project defaults the Full review preferences fall back to. */
+ /** The project defaults the Deep review preferences fall back to. */
readonly project_defaults?: ReviewProjectDefaultsApi
/** Whether this project has at least one synced, enabled Stamphog repository. When false, the stamphog_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamphog GitHub App. */
readonly stamphog_connected?: boolean
diff --git a/products/review_hog/frontend/generated/api.ts b/products/review_hog/frontend/generated/api.ts
index 1cb9dd643122..4537e8e89f49 100644
--- a/products/review_hog/frontend/generated/api.ts
+++ b/products/review_hog/frontend/generated/api.ts
@@ -227,7 +227,7 @@ export const getReviewHogProjectSettingsRetrieveUrl = (projectId: string) => {
}
/**
- * The project rule for automatic Flash reviews, bot pull requests, the Full review defaults, and the connected GitHub installations.
+ * The project rule for automatic Standard reviews, bot pull requests, the Deep review defaults, and the connected GitHub installations.
* @summary Get the project's ReviewHog rule
*/
export const reviewHogProjectSettingsRetrieve = async (
@@ -626,7 +626,7 @@ export const getReviewHogReviewsTriggerCreateUrl = (projectId: string) => {
}
/**
- * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Flash review that never resolves comments and is refused after a published Full review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
+ * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Standard review that never resolves comments and is refused after a published Deep review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
* @summary Start a review of a pull request
*/
export const reviewHogReviewsTriggerCreate = async (
diff --git a/products/review_hog/frontend/generated/api.zod.ts b/products/review_hog/frontend/generated/api.zod.ts
index 265c50e701b5..4a5075bc9854 100644
--- a/products/review_hog/frontend/generated/api.zod.ts
+++ b/products/review_hog/frontend/generated/api.zod.ts
@@ -78,27 +78,27 @@ export const ReviewHogProjectSettingsPartialUpdateBody = /* @__PURE__ */ zod.obj
)
.optional()
.describe(
- "Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.\n\n\* `everyone` - Automatic Flash for everyone\n\* `listed` - Automatic Flash for these people\n\* `off` - Automatic Flash opt-in only"
+ "Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.\n\n\* `everyone` - Automatic Flash for everyone\n\* `listed` - Automatic Flash for these people\n\* `off` - Automatic Flash opt-in only"
),
bot_prs: zod
.enum(['skip', 'run'])
.describe('\* `skip` - Not reviewed\n\* `run` - Automatic Flash')
.optional()
.describe(
- "Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the person who connected GitHub, with default settings and no changes to the pull request).\n\n\* `skip` - Not reviewed\n\* `run` - Automatic Flash"
+ "Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the person who connected GitHub, with default settings and no changes to the pull request).\n\n\* `skip` - Not reviewed\n\* `run` - Automatic Flash"
),
urgency_threshold: zod
.enum(['consider', 'should_fix', 'must_fix'])
.describe('\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix')
.optional()
.describe(
- "Project default for the minimum priority a Full review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.\n\n\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix"
+ "Project default for the minimum priority a Deep review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.\n\n\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix"
),
celebrate_clean_reviews: zod
.boolean()
.optional()
.describe(
- "Project default for the image in a Full review that finds nothing to raise. On by default. A person's own value wins."
+ "Project default for the image in a Deep review that finds nothing to raise. On by default. A person's own value wins."
),
})
@@ -213,7 +213,7 @@ export const ReviewHogResolutionPartialUpdateBody = /* @__PURE__ */ zod.object({
})
/**
- * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Flash review that never resolves comments and is refused after a published Full review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
+ * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Standard review that never resolves comments and is refused after a published Deep review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
* @summary Start a review of a pull request
*/
export const reviewHogReviewsTriggerCreateBodyRunModeDefault = `review`
@@ -227,11 +227,11 @@ export const ReviewHogReviewsTriggerCreateBody = /* @__PURE__ */ zod.object({
run_mode: zod
.enum(['review', 'review_only', 'resolve_only', 'flash'])
.describe(
- '\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Flash'
+ '\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Standard'
)
.default(reviewHogReviewsTriggerCreateBodyRunModeDefault)
.describe(
- "What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' uses a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Full review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.\n\n\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Flash"
+ "What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' runs a Standard review: a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Deep review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.\n\n\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Standard"
),
})
@@ -242,29 +242,29 @@ export const ReviewHogReviewsTriggerCreateBody = /* @__PURE__ */ zod.object({
export const ReviewHogSettingsPartialUpdateBody = /* @__PURE__ */ zod.object({
default_review_mode: zod
.enum(['follow', 'flash', 'off'])
- .describe('\* `follow` - Follow each repository\n\* `flash` - Flash everywhere\n\* `off` - Off everywhere')
+ .describe('\* `follow` - Let each repository decide\n\* `flash` - On everywhere\n\* `off` - Off everywhere')
.optional()
.describe(
- "Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' turns automatic Flash off everywhere. A choice for one repository wins over this default.\n\n\* `follow` - Follow each repository\n\* `flash` - Flash everywhere\n\* `off` - Off everywhere"
+ "Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' turns automatic reviews off everywhere. A choice for one repository wins over this default.\n\n\* `follow` - Let each repository decide\n\* `flash` - On everywhere\n\* `off` - Off everywhere"
),
resolve_comments: zod
.boolean()
.optional()
.describe(
- "After a Full review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies."
+ "After a Deep review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies."
),
urgency_threshold: zod
.enum(['consider', 'should_fix', 'must_fix'])
.describe('\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix')
.optional()
.describe(
- "Minimum priority a validated Full review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.\n\n\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix"
+ "Minimum priority a validated Deep review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.\n\n\* `consider` - Consider (all)\n\* `should_fix` - Should fix\n\* `must_fix` - Must fix"
),
celebrate_clean_reviews: zod
.boolean()
.optional()
.describe(
- "Show a fun image in the review comment when a Full review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies."
+ "Show a fun image in the review comment when a Deep review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies."
),
review_inbox_prs: zod
.boolean()
diff --git a/products/review_hog/frontend/repositories/MyDefaultCell.tsx b/products/review_hog/frontend/repositories/MyDefaultCell.tsx
index 29bd95826306..0fd16b0d0693 100644
--- a/products/review_hog/frontend/repositories/MyDefaultCell.tsx
+++ b/products/review_hog/frontend/repositories/MyDefaultCell.tsx
@@ -1,30 +1,35 @@
import { useActions, useValues } from 'kea'
-import { LemonSelect } from '@posthog/lemon-ui'
+import { LemonBanner, LemonSelect } from '@posthog/lemon-ui'
import type { DefaultReviewModeEnumApi } from 'products/review_hog/frontend/generated/api.schemas'
import { reviewHogSettingsLogic } from 'products/review_hog/frontend/reviewHogSettingsLogic'
-import { DEFAULT_REVIEW_MODE_OPTIONS } from './repositoryChoices'
+import { DEFAULT_REVIEW_MODE_OPTIONS, myDefaultNotice } from './repositoryChoices'
import { reviewHogRepositoriesLogic } from './reviewHogRepositoriesLogic'
import { YouMark } from './YouMark'
export function MyDefaultCell({ className }: { className?: string }): JSX.Element {
const { settings, settingsLoading } = useValues(reviewHogSettingsLogic)
+ const { overview } = useValues(reviewHogRepositoriesLogic)
const { setMyDefault } = useActions(reviewHogRepositoriesLogic)
const value = settings?.default_review_mode ?? 'follow'
+ const notice = myDefaultNotice(value, overview?.my_choices_unlike_default ?? null)
return (
<div className={`flex min-w-0 flex-col gap-2 px-4 py-3 ${className ?? ''}`}>
<div className="flex flex-col gap-0.5">
<span className="text-sm font-semibold">My default</span>
- <span className="text-xs text-secondary">Every repository without your own choice follows this.</span>
+ <span className="text-xs text-secondary">
+ Applies to every repository where you have not picked something else.
+ </span>
</div>
- <div className="flex items-center gap-1">
+ <div className="flex flex-wrap items-center gap-1">
<YouMark shown={value !== 'follow'} />
+ <span className="text-xs text-secondary">Automatic review on my PRs</span>
<LemonSelect<DefaultReviewModeEnumApi>
size="small"
- aria-label="My default"
+ aria-label="Automatic review on my PRs"
value={value}
options={DEFAULT_REVIEW_MODE_OPTIONS}
onChange={(mode) => mode !== value && setMyDefault(mode)}
@@ -32,6 +37,11 @@ export function MyDefaultCell({ className }: { className?: string }): JSX.Elemen
data-attr="review-hog-default-review-mode"
/>
</div>
+ {notice && (
+ <LemonBanner type="info" className="text-xs">
+ {notice}
+ </LemonBanner>
+ )}
</div>
)
}
diff --git a/products/review_hog/frontend/repositories/PeopleList.tsx b/products/review_hog/frontend/repositories/PeopleList.tsx
index 25edea45a0f9..46f1d4fc582f 100644
--- a/products/review_hog/frontend/repositories/PeopleList.tsx
+++ b/products/review_hog/frontend/repositories/PeopleList.tsx
@@ -32,7 +32,7 @@ export function PeopleList({
return (
<div className="flex flex-wrap items-center gap-1.5 text-xs">
- <span className="text-secondary">{kind === 'excepted' ? 'Except:' : 'People:'}</span>
+ <span className="text-secondary">{kind === 'excepted' ? 'except:' : 'People:'}</span>
{listed.map((person) => (
<LemonSnack
key={person.id}
diff --git a/products/review_hog/frontend/repositories/ProjectRuleCell.tsx b/products/review_hog/frontend/repositories/ProjectRuleCell.tsx
index def73e7d4264..f74459674417 100644
--- a/products/review_hog/frontend/repositories/ProjectRuleCell.tsx
+++ b/products/review_hog/frontend/repositories/ProjectRuleCell.tsx
@@ -20,9 +20,9 @@ function botRunLabel(installations: readonly ReviewInstallationApi[]): string {
)
)
if (connectors.size === 1) {
- return `Automatic Flash, billed to ${[...connectors][0]} (connected GitHub)`
+ return `Automatic review, billed to ${[...connectors][0]} (connected GitHub)`
}
- return 'Automatic Flash, billed to the person who connected GitHub'
+ return 'Automatic review, billed to the person who connected GitHub'
}
export function ProjectRuleCell({ className }: { className?: string }): JSX.Element {
@@ -50,6 +50,9 @@ export function ProjectRuleCell({ className }: { className?: string }): JSX.Elem
onRemovePerson={removeProjectPerson}
dataAttr="review-hog-project-flash-for"
/>
+ <span className="text-xs text-secondary">
+ People opt in under My pull requests, with their default or a choice for one repository.
+ </span>
<div className="flex flex-wrap items-center gap-2">
<span className="text-xs text-secondary">Bot PRs, all repositories:</span>
<LemonSelect<ReviewProjectSettingsBotPullRequestsEnumApi>
diff --git a/products/review_hog/frontend/repositories/RepositoriesPanes.tsx b/products/review_hog/frontend/repositories/RepositoriesPanes.tsx
index 38d9b4d465d4..ec62f897b00d 100644
--- a/products/review_hog/frontend/repositories/RepositoriesPanes.tsx
+++ b/products/review_hog/frontend/repositories/RepositoriesPanes.tsx
@@ -96,8 +96,8 @@ export function RepositoriesPanes(): JSX.Element {
</LemonTag>
</span>
<span className="text-xs text-secondary">
- Highest wins: your repository choice, your default, the repository's exception, the project. A
- "you" mark shows where you set your own value.
+ Decided in this order: your choice for a repository, your default, the repository's exception,
+ the project rule. A "you" mark shows where you set your own value.
</span>
</div>
<ProjectRuleCell className={`${PANE_LEFT} ${PANE_ROW}`} />
diff --git a/products/review_hog/frontend/repositories/RepositoryMyCell.tsx b/products/review_hog/frontend/repositories/RepositoryMyCell.tsx
index ab6e41b26e9a..860664b9d3b5 100644
--- a/products/review_hog/frontend/repositories/RepositoryMyCell.tsx
+++ b/products/review_hog/frontend/repositories/RepositoryMyCell.tsx
@@ -6,7 +6,7 @@ import { urls } from 'scenes/urls'
import type { ReviewRepositoryOverviewEntryApi } from 'products/review_hog/frontend/generated/api.schemas'
-import { MyChoiceValue, describeReason, myChoiceOptions, myChoiceValue, projectName } from './repositoryChoices'
+import { MyChoiceValue, myChoiceNote, myChoiceOptions, myChoiceValue, projectName } from './repositoryChoices'
import { reviewHogRepositoriesLogic } from './reviewHogRepositoriesLogic'
import { YouMark } from './YouMark'
@@ -41,10 +41,9 @@ export function RepositoryMyCell({
</span>
)
} else if (!entry.in_project) {
- content = <span className="text-xs text-secondary">No automatic Flash. Not part of this project.</span>
+ content = <span className="text-xs text-secondary">No automatic review. Not part of this project.</span>
} else {
- const withoutChoice = entry.inherited_result.flash ? 'automatic Flash' : 'no automatic Flash'
- const choiceMatchesInherited = (entry.my_choice === 'flash') === entry.inherited_result.flash
+ const note = myChoiceNote(entry)
content = (
<div className="flex min-w-0 flex-col items-start gap-1">
<LemonSelect<MyChoiceValue>
@@ -56,13 +55,7 @@ export function RepositoryMyCell({
disabledReason={busyReason}
data-attr="review-hog-my-choice"
/>
- <span className="text-xs text-secondary">
- {!hasChoice
- ? describeReason(entry.inherited_result)
- : choiceMatchesInherited
- ? `Your choice. Without it you also get ${withoutChoice}.`
- : `Your choice. Without it: ${withoutChoice}`}
- </span>
+ {note && <span className="text-xs text-secondary">{note}</span>}
</div>
)
}
@@ -73,7 +66,7 @@ export function RepositoryMyCell({
My choice
</span>
<div className="flex items-start gap-1">
- {/* Lines the mark up with the select, not with the reason text under it. */}
+ {/* Lines the mark up with the select, not with the note under it. */}
<span className="pt-1.5">
<YouMark shown={hasChoice} />
</span>
diff --git a/products/review_hog/frontend/repositories/RepositoryProjectCell.tsx b/products/review_hog/frontend/repositories/RepositoryProjectCell.tsx
index 0f4a07b1ad24..f2a75d9c424a 100644
--- a/products/review_hog/frontend/repositories/RepositoryProjectCell.tsx
+++ b/products/review_hog/frontend/repositories/RepositoryProjectCell.tsx
@@ -62,7 +62,7 @@ export function RepositoryProjectCell({
status = (
<>
<span className="text-xs text-secondary">
- Follows project · {flashForLabel(projectSettings?.flash_for ?? 'off')}
+ Project rule · {flashForLabel(projectSettings?.flash_for ?? 'off')}
</span>
{canEdit && (
<LemonButton
diff --git a/products/review_hog/frontend/repositories/RuleControls.tsx b/products/review_hog/frontend/repositories/RuleControls.tsx
index 43ef1caa1356..5601269d83b4 100644
--- a/products/review_hog/frontend/repositories/RuleControls.tsx
+++ b/products/review_hog/frontend/repositories/RuleControls.tsx
@@ -9,7 +9,7 @@ import type {
import { PeopleList } from './PeopleList'
import { FLASH_FOR_OPTIONS, peopleKindFor } from './repositoryChoices'
-/** Who gets automatic Flash, for the project settings and for a repository exception alike. */
+/** Who gets automatic reviews, for the project settings and for a repository exception alike. */
export function RuleControls({
label,
flashFor,
@@ -32,8 +32,19 @@ export function RuleControls({
dataAttr: string
}): JSX.Element {
const kind = peopleKindFor(flashFor)
+ const peopleList = kind && (
+ <PeopleList
+ kind={kind}
+ people={people}
+ canEdit={canEdit}
+ disabledReason={disabledReason}
+ onAdd={(userId) => onAddPerson(userId, kind)}
+ onRemove={onRemovePerson}
+ />
+ )
return (
- <div className="flex flex-col gap-1.5">
+ // The except list continues the "for everyone" sentence, so it shares the select's line.
+ <div className={kind === 'excepted' ? 'flex flex-wrap items-center gap-1.5' : 'flex flex-col gap-1.5'}>
<LemonSelect
size="small"
aria-label={label}
@@ -44,16 +55,9 @@ export function RuleControls({
data-attr={dataAttr}
className="max-w-full self-start"
/>
- {kind && (
- <PeopleList
- kind={kind}
- people={people}
- canEdit={canEdit}
- disabledReason={disabledReason}
- onAdd={(userId) => onAddPerson(userId, kind)}
- onRemove={onRemovePerson}
- />
- )}
+ {/* A separate item, so a wrapped except list never starts its line with the comma. */}
+ {kind === 'excepted' && <span className="-ml-1 text-xs text-secondary">,</span>}
+ {peopleList}
</div>
)
}
diff --git a/products/review_hog/frontend/repositories/repositoryChoices.test.ts b/products/review_hog/frontend/repositories/repositoryChoices.test.ts
index 2156056baa87..3c28cd56f98c 100644
--- a/products/review_hog/frontend/repositories/repositoryChoices.test.ts
+++ b/products/review_hog/frontend/repositories/repositoryChoices.test.ts
@@ -1,6 +1,6 @@
import type { ReviewRepositoryOverviewEntryApi } from 'products/review_hog/frontend/generated/api.schemas'
-import { myChoiceOptions, myChoiceValue } from './repositoryChoices'
+import { myChoiceNote, myChoiceOptions, myChoiceValue } from './repositoryChoices'
function entry(overrides: Partial<ReviewRepositoryOverviewEntryApi>): ReviewRepositoryOverviewEntryApi {
return {
@@ -16,6 +16,7 @@ function entry(overrides: Partial<ReviewRepositoryOverviewEntryApi>): ReviewRepo
my_choice_id: null,
my_result: { flash: false, reason: 'project_opt_in' },
inherited_result: { flash: false, reason: 'project_opt_in' },
+ repository_result: { flash: false, reason: 'project_opt_in' },
...overrides,
}
}
@@ -44,4 +45,52 @@ describe('repositoryChoices', () => {
expect(myChoiceValue(picked)).toEqual(value)
expect(myChoiceOptions(picked).map((option) => option.value)).toEqual(options)
})
+
+ it.each([
+ {
+ name: 'the select alone explains a row the rules decide',
+ entry: entry({}),
+ note: null,
+ },
+ {
+ name: 'a default that agrees with the repository adds nothing',
+ entry: entry({
+ my_result: { flash: true, reason: 'own_default' },
+ inherited_result: { flash: true, reason: 'own_default' },
+ repository_result: { flash: true, reason: 'repository_everyone' },
+ }),
+ note: null,
+ },
+ {
+ name: 'a default that overrides the project rule leaves the note to the page notice',
+ entry: entry({
+ my_result: { flash: true, reason: 'own_default' },
+ inherited_result: { flash: true, reason: 'own_default' },
+ }),
+ note: null,
+ },
+ {
+ name: 'a default that overrides a repository exception names what the exception gives',
+ entry: entry({
+ exception: { flash_for: 'off', people: [] },
+ my_result: { flash: true, reason: 'own_default' },
+ inherited_result: { flash: true, reason: 'own_default' },
+ repository_result: { flash: false, reason: 'repository_opt_in' },
+ }),
+ note: 'The repository alone gives: no automatic review',
+ },
+ {
+ name: 'an own choice names what applies without it, and where that comes from',
+ entry: entry({
+ my_choice: 'off',
+ my_choice_id: 'choice-1',
+ my_result: { flash: false, reason: 'own_repository_choice' },
+ inherited_result: { flash: true, reason: 'repository_everyone' },
+ repository_result: { flash: true, reason: 'repository_everyone' },
+ }),
+ note: 'Your choice. Without it: automatic review (repository exception)',
+ },
+ ])('note: $name', ({ entry: picked, note }) => {
+ expect(myChoiceNote(picked)).toEqual(note)
+ })
})
diff --git a/products/review_hog/frontend/repositories/repositoryChoices.ts b/products/review_hog/frontend/repositories/repositoryChoices.ts
index 9293df27c9d9..8345de2bdc7a 100644
--- a/products/review_hog/frontend/repositories/repositoryChoices.ts
+++ b/products/review_hog/frontend/repositories/repositoryChoices.ts
@@ -16,9 +16,9 @@ export interface ChoiceOption<T extends string> {
}
export const FLASH_FOR_OPTIONS: ChoiceOption<AutomaticFlashForEnumApi>[] = [
- { value: 'everyone', label: 'Automatic Flash for everyone' },
- { value: 'listed', label: 'Automatic Flash for these people' },
- { value: 'off', label: 'Automatic Flash: opt-in only' },
+ { value: 'everyone', label: 'Automatic review for everyone' },
+ { value: 'listed', label: 'Automatic review for these people' },
+ { value: 'off', label: 'Only people who opt in' },
]
export function flashForLabel(flashFor: AutomaticFlashForEnumApi): string {
@@ -26,11 +26,15 @@ export function flashForLabel(flashFor: AutomaticFlashForEnumApi): string {
}
export const DEFAULT_REVIEW_MODE_OPTIONS: ChoiceOption<DefaultReviewModeEnumApi>[] = [
- { value: 'follow', label: 'Follow each repository' },
- { value: 'flash', label: 'Flash everywhere' },
+ { value: 'follow', label: 'Let each repository decide' },
+ { value: 'flash', label: 'On everywhere' },
{ value: 'off', label: 'Off everywhere' },
]
+export function defaultReviewModeLabel(mode: DefaultReviewModeEnumApi): string {
+ return DEFAULT_REVIEW_MODE_OPTIONS.find((option) => option.value === mode)?.label ?? mode
+}
+
/** The people list a rule reads: the except list for "everyone", the people list for "listed", none for "off". */
export function peopleKindFor(flashFor: AutomaticFlashForEnumApi): ReviewRepositoryPersonKindEnumApi | null {
if (flashFor === 'everyone') {
@@ -39,30 +43,57 @@ export function peopleKindFor(flashFor: AutomaticFlashForEnumApi): ReviewReposit
return flashFor === 'listed' ? 'listed' : null
}
-const REASONS: Record<AutomaticReviewReasonEnumApi, string> = {
- own_repository_choice: 'Your choice for this repository',
- own_default: 'Your default',
- repository_everyone: "This repository's exception: everyone",
- repository_excepted: "This repository's exception: you are on the except list",
- repository_listed: "This repository's exception: you are on the list",
- repository_not_listed: "This repository's exception: you are not on the list",
- repository_opt_in: "This repository's exception: opt-in only",
- project_everyone: 'Project settings: everyone',
- project_excepted: 'Project settings: you are on the except list',
- project_listed: 'Project settings: you are on the list',
- project_not_listed: 'Project settings: you are not on the list',
- project_opt_in: 'Project settings: opt-in only',
- bot_reviewed: 'The project reviews bot pull requests',
- bot_skipped: 'The project does not review bot pull requests',
- not_in_project: 'Not part of this project',
+const SOURCES: Record<AutomaticReviewReasonEnumApi, string> = {
+ own_repository_choice: 'your choice',
+ own_default: 'your default',
+ repository_everyone: 'repository exception',
+ repository_excepted: 'repository exception',
+ repository_listed: 'repository exception',
+ repository_not_listed: 'repository exception',
+ repository_opt_in: 'repository exception',
+ project_everyone: 'project',
+ project_excepted: 'project',
+ project_listed: 'project',
+ project_not_listed: 'project',
+ project_opt_in: 'project',
+ bot_reviewed: 'project',
+ bot_skipped: 'project',
+ not_in_project: 'not part of this project',
}
-export function describeReason(decision: AutomaticReviewDecisionApi): string {
- return REASONS[decision.reason]
+/** Where a result comes from, in the words the "My pull requests" pane uses. */
+export function describeSource(decision: AutomaticReviewDecisionApi): string {
+ return SOURCES[decision.reason]
}
export function describeResult(decision: AutomaticReviewDecisionApi): string {
- return decision.flash ? 'Automatic Flash' : 'No automatic Flash'
+ return decision.flash ? 'Automatic review' : 'No automatic review'
+}
+
+/** The note under a repository's own choice, or null when the select already says enough. */
+export function myChoiceNote(entry: ReviewRepositoryOverviewEntryApi): string | null {
+ const inherited = entry.inherited_result
+ if (entry.my_choice !== null) {
+ return `Your choice. Without it: ${describeResult(inherited).toLowerCase()} (${describeSource(inherited)})`
+ }
+ // Rows on the project rule get no note: the notice under My default already covers them.
+ const repositoryResult = entry.repository_result
+ if (inherited.reason === 'own_default' && entry.exception !== null && repositoryResult.flash !== inherited.flash) {
+ return `The repository alone gives: ${describeResult(repositoryResult).toLowerCase()}`
+ }
+ return null
+}
+
+/** The notice for a default that overrides every repository, or null while the default lets each one decide. */
+export function myDefaultNotice(mode: DefaultReviewModeEnumApi, choicesUnlikeDefault: number | null): string | null {
+ if (mode === 'follow') {
+ return null
+ }
+ const notice = `Your default, ${defaultReviewModeLabel(mode)}, applies to your PRs in every repository`
+ if (!choicesUnlikeDefault) {
+ return `${notice}.`
+ }
+ return `${notice}, except ${choicesUnlikeDefault} where you picked something else.`
}
export type MyChoiceValue = ReviewUserRepositoryChoiceModeEnumApi | 'follow'
@@ -72,7 +103,7 @@ export function myChoiceValue(entry: ReviewRepositoryOverviewEntryApi): MyChoice
}
const CHOICE_LABELS: Record<ReviewUserRepositoryChoiceModeEnumApi, string> = {
- flash: 'Flash for me',
+ flash: 'On for me',
off: 'Off for me',
}
@@ -84,7 +115,7 @@ export function myChoiceOptions(entry: ReviewRepositoryOverviewEntryApi): Choice
const inherited = entry.inherited_result
const opposite: ReviewUserRepositoryChoiceModeEnumApi = inherited.flash ? 'off' : 'flash'
const options: ChoiceOption<MyChoiceValue>[] = [
- { value: 'follow', label: `${describeResult(inherited)} (follow)` },
+ { value: 'follow', label: `${describeResult(inherited)} (${describeSource(inherited)})` },
{ value: opposite, label: CHOICE_LABELS[opposite] },
]
if (entry.my_choice !== null && entry.my_choice !== opposite) {
diff --git a/products/review_hog/frontend/repositories/reviewHogRepositoriesLogic.test.ts b/products/review_hog/frontend/repositories/reviewHogRepositoriesLogic.test.ts
index 9a045f8f72ce..ae8efd1b9760 100644
--- a/products/review_hog/frontend/repositories/reviewHogRepositoriesLogic.test.ts
+++ b/products/review_hog/frontend/repositories/reviewHogRepositoriesLogic.test.ts
@@ -23,6 +23,7 @@ function entry(overrides: Partial<ReviewRepositoryOverviewEntryApi>): ReviewRepo
my_choice_id: null,
my_result: { flash: true, reason: 'project_everyone' },
inherited_result: { flash: true, reason: 'project_everyone' },
+ repository_result: { flash: true, reason: 'project_everyone' },
...overrides,
}
}
@@ -69,6 +70,7 @@ describe('reviewHogRepositoriesLogic', () => {
total: overviewTotal,
has_more: false,
next_offset: null,
+ my_choices_unlike_default: 0,
},
]
},
diff --git a/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx b/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
index d27e88cdfdd4..9faf85cdb647 100644
--- a/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
+++ b/products/review_hog/frontend/settings/FullReviewSettingsSection.tsx
@@ -65,12 +65,12 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
return (
<SettingsTable
- title="Full review settings"
- description="Full reviews use these. Flash reads none of them. A review someone else starts on your PR uses their settings, but only your own Resolve choice can push to your branch."
+ title="Deep review settings"
+ description="Deep reviews use these. Standard reads none of them. A review someone else starts on your PR uses their settings, but only your own Resolve choice can push to your branch."
>
<SettingRow
title="Resolve comments on my pull requests"
- description="Applies on your PRs. After a Full review, ReviewHog pushes fix commits to your branch. Only your own opt-in counts, whoever starts the review. Never commits while the pull request is in the merge queue or has another pull request stacked on it. Without a PostHog account behind a PR, nothing is pushed."
+ description="Applies on your PRs. After a Deep review, ReviewHog pushes fix commits to your branch. Only your own opt-in counts, whoever starts the review. Never commits while the pull request is in the merge queue or has another pull request stacked on it. Without a PostHog account behind a PR, nothing is pushed."
project={<span className="text-xs text-secondary">Personal only. Default: off</span>}
mine={
<>
@@ -87,7 +87,7 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
/>
<SettingRow
title="Post findings at or above"
- description="Applies to Full reviews you start. Lower findings stay in the report on the PostHog side."
+ description="Applies to Deep reviews you start. Lower findings stay in the report on the PostHog side."
project={
<LemonSelect<UrgencyThresholdEnumApi>
size="small"
@@ -120,7 +120,7 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
/>
<SettingRow
title="Celebrate clean reviews"
- description="Applies to Full reviews you start. A clean Full review gets a small celebration in the status comment."
+ description="Applies to Deep reviews you start. A clean Deep review gets a small celebration in the status comment."
project={
<LemonSelect<OnOff>
size="small"
@@ -153,7 +153,7 @@ export function FullReviewSettingsSection({ onEditSkills }: { onEditSkills: () =
/>
<SettingRow
title="Perspectives, blind spots, validation and resolution criteria"
- description="Applies to Full reviews you start. Resolution criteria also pick how fixes work: default, big gaps only, or small fixes only."
+ description="Applies to Deep reviews you start. Resolution criteria also pick how fixes work: default, big gaps only, or small fixes only."
project={<span className="text-xs text-secondary">Skills shared in this project</span>}
mine={
<>
diff --git a/products/review_hog/frontend/settings/InboxSection.tsx b/products/review_hog/frontend/settings/InboxSection.tsx
index 63b6e79ef62d..c6d28efe1c9e 100644
--- a/products/review_hog/frontend/settings/InboxSection.tsx
+++ b/products/review_hog/frontend/settings/InboxSection.tsx
@@ -20,7 +20,7 @@ export function InboxSection(): JSX.Element {
>
<SettingRow
title="Review PRs the agent opens for Inbox reports assigned to me"
- description="Full review today. Moves to Flash once Flash is stable."
+ description="Deep review today. Moves to Standard once Standard is stable."
project={<span className="text-xs text-secondary">Default: off</span>}
mine={
<>
diff --git a/products/review_hog/mcp/tools.yaml b/products/review_hog/mcp/tools.yaml
index 61281f878e06..5f119425bb04 100644
--- a/products/review_hog/mcp/tools.yaml
+++ b/products/review_hog/mcp/tools.yaml
@@ -58,13 +58,13 @@ tools:
App installation. `run_mode` picks the variant: `review` (the default) reviews the PR, publishes the review
to it, and then chains the comment-resolution stage when the requesting user's `resolve_comments` setting is
on; `review_only` reviews without resolving; `resolve_only` skips the review and only works the PR's
- existing unresolved review threads; `flash` reviews and publishes on a lower-cost model, and never resolves
- comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may push signed fix
- commits to the PR's branch, reply to review threads, and resolve bot-authored threads. Nothing is deleted
- and the commits are plain appends, but the actions are public to everyone on the PR. Non-blocking: returns a
- `workflow_id` and `status` of `started` while the run executes. If the PR's current commit already has a
- published review it returns `already_reviewed` without starting a run (`resolve_only` skips that check,
- since resolving is useful exactly then), and triggering a PR whose review is already running joins the
- in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings with
- `review-hog-reviews-get`.
+ existing unresolved review threads; `flash` runs a Standard review, published on a lower-cost model, and
+ never resolves comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may
+ push signed fix commits to the PR's branch, reply to review threads, and resolve bot-authored threads.
+ Nothing is deleted and the commits are plain appends, but the actions are public to everyone on the PR.
+ Non-blocking: returns a `workflow_id` and `status` of `started` while the run executes. If the PR's current
+ commit already has a published review it returns `already_reviewed` without starting a run (`resolve_only`
+ skips that check, since resolving is useful exactly then), and triggering a PR whose review is already
+ running joins the in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings
+ with `review-hog-reviews-get`.
feature_flag: review-hog
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index bfef200ed8b7..1185823ba169 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -10990,7 +10990,7 @@
"feature_flag": "review-hog"
},
"review-hog-reviews-trigger": {
- "description": "Start a ReviewHog run on a pull request. Pass the PR as `pr_url` (e.g. `https://github.com/PostHog/posthog/pull/123`); the repository must be accessible to the project's GitHub App installation. `run_mode` picks the variant: `review` (the default) reviews the PR, publishes the review to it, and then chains the comment-resolution stage when the requesting user's `resolve_comments` setting is on; `review_only` reviews without resolving; `resolve_only` skips the review and only works the PR's existing unresolved review threads; `flash` reviews and publishes on a lower-cost model, and never resolves comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may push signed fix commits to the PR's branch, reply to review threads, and resolve bot-authored threads. Nothing is deleted and the commits are plain appends, but the actions are public to everyone on the PR. Non-blocking: returns a `workflow_id` and `status` of `started` while the run executes. If the PR's current commit already has a published review it returns `already_reviewed` without starting a run (`resolve_only` skips that check, since resolving is useful exactly then), and triggering a PR whose review is already running joins the in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings with `review-hog-reviews-get`.",
+ "description": "Start a ReviewHog run on a pull request. Pass the PR as `pr_url` (e.g. `https://github.com/PostHog/posthog/pull/123`); the repository must be accessible to the project's GitHub App installation. `run_mode` picks the variant: `review` (the default) reviews the PR, publishes the review to it, and then chains the comment-resolution stage when the requesting user's `resolve_comments` setting is on; `review_only` reviews without resolving; `resolve_only` skips the review and only works the PR's existing unresolved review threads; `flash` runs a Standard review, published on a lower-cost model, and never resolves comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may push signed fix commits to the PR's branch, reply to review threads, and resolve bot-authored threads. Nothing is deleted and the commits are plain appends, but the actions are public to everyone on the PR. Non-blocking: returns a `workflow_id` and `status` of `started` while the run executes. If the PR's current commit already has a published review it returns `already_reviewed` without starting a run (`resolve_only` skips that check, since resolving is useful exactly then), and triggering a PR whose review is already running joins the in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings with `review-hog-reviews-get`.",
"category": "ReviewHog",
"feature": "review_hog",
"summary": "Trigger a ReviewHog review",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 2647221b1c93..28d341f3aa7e 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -11595,7 +11595,7 @@
"feature_flag": "review-hog"
},
"review-hog-reviews-trigger": {
- "description": "Start a ReviewHog run on a pull request. Pass the PR as `pr_url` (e.g. `https://github.com/PostHog/posthog/pull/123`); the repository must be accessible to the project's GitHub App installation. `run_mode` picks the variant: `review` (the default) reviews the PR, publishes the review to it, and then chains the comment-resolution stage when the requesting user's `resolve_comments` setting is on; `review_only` reviews without resolving; `resolve_only` skips the review and only works the PR's existing unresolved review threads; `flash` reviews and publishes on a lower-cost model, and never resolves comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may push signed fix commits to the PR's branch, reply to review threads, and resolve bot-authored threads. Nothing is deleted and the commits are plain appends, but the actions are public to everyone on the PR. Non-blocking: returns a `workflow_id` and `status` of `started` while the run executes. If the PR's current commit already has a published review it returns `already_reviewed` without starting a run (`resolve_only` skips that check, since resolving is useful exactly then), and triggering a PR whose review is already running joins the in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings with `review-hog-reviews-get`.",
+ "description": "Start a ReviewHog run on a pull request. Pass the PR as `pr_url` (e.g. `https://github.com/PostHog/posthog/pull/123`); the repository must be accessible to the project's GitHub App installation. `run_mode` picks the variant: `review` (the default) reviews the PR, publishes the review to it, and then chains the comment-resolution stage when the requesting user's `resolve_comments` setting is on; `review_only` reviews without resolving; `resolve_only` skips the review and only works the PR's existing unresolved review threads; `flash` runs a Standard review, published on a lower-cost model, and never resolves comments or pushes fixes. IMPORTANT: resolve-capable runs write to the PR itself. They may push signed fix commits to the PR's branch, reply to review threads, and resolve bot-authored threads. Nothing is deleted and the commits are plain appends, but the actions are public to everyone on the PR. Non-blocking: returns a `workflow_id` and `status` of `started` while the run executes. If the PR's current commit already has a published review it returns `already_reviewed` without starting a run (`resolve_only` skips that check, since resolving is useful exactly then), and triggering a PR whose review is already running joins the in-flight run. Poll progress with `review-hog-reviews-list` and read the finished findings with `review-hog-reviews-get`.",
"category": "ReviewHog",
"feature": "review_hog",
"summary": "Trigger a ReviewHog review",
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 36e9246f8dce..ae65eb99dee2 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -13583,7 +13583,7 @@ export namespace Schemas {
} as const;
export interface AutomaticReviewDecision {
- /** Whether the requesting user's own pull requests get automatic Flash reviews in this repository. */
+ /** Whether the requesting user's own pull requests get automatic Standard reviews in this repository. */
flash: boolean;
/** Which rule decided: the user's own choice ('own_repository_choice', 'own_default'), the repository exception ('repository_*'), the project rule ('project_*'), or 'not_in_project' when this project does not review the repository.
*
@@ -34929,8 +34929,8 @@ export namespace Schemas {
} as const;
/**
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere
*/
export type DefaultReviewModeEnum = typeof DefaultReviewModeEnum[keyof typeof DefaultReviewModeEnum];
@@ -82951,7 +82951,7 @@ export namespace Schemas {
readonly id: string;
/** The project member on the list. */
readonly user: UserBasic;
- /** Which list: 'listed' (gets Flash when the rule reviews only listed people) or 'excepted' (skipped when the rule reviews everyone).
+ /** Which list: 'listed' (gets automatic reviews when the rule reviews only listed people) or 'excepted' (skipped when the rule reviews everyone).
*
* * `listed` - Listed
* * `excepted` - Excepted */
@@ -82976,7 +82976,7 @@ export namespace Schemas {
installation_id: string;
/** The GitHub account (organization or user) of the installation. */
account_name: string;
- /** Who connected the installation to this project. Automatic Flash reviews of bot pull requests run as this user. */
+ /** Who connected the installation to this project. Automatic Standard reviews of bot pull requests run as this user. */
connected_by: UserBasic | null;
/**
* Id of this project's claim. Null when the project reviews nothing there.
@@ -82993,24 +82993,24 @@ export namespace Schemas {
}
export interface PatchedReviewProjectSettings {
- /** Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
+ /** Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
*
* * `everyone` - Automatic Flash for everyone
* * `listed` - Automatic Flash for these people
* * `off` - Automatic Flash opt-in only */
flash_for?: AutomaticFlashForEnum;
- /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the person who connected GitHub, with default settings and no changes to the pull request).
+ /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the person who connected GitHub, with default settings and no changes to the pull request).
*
* * `skip` - Not reviewed
* * `run` - Automatic Flash */
bot_prs?: ReviewProjectSettingsBotPullRequestsEnum;
- /** Project default for the minimum priority a Full review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
+ /** Project default for the minimum priority a Deep review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnum;
- /** Project default for the image in a Full review that finds nothing to raise. On by default. A person's own value wins. */
+ /** Project default for the image in a Deep review that finds nothing to raise. On by default. A person's own value wins. */
celebrate_clean_reviews?: boolean;
/** The people on the project rule's two lists. Only the list that matches flash_for has an effect. */
readonly people?: readonly ReviewRepositoryPerson[];
@@ -83092,32 +83092,32 @@ export namespace Schemas {
}
export interface ReviewProjectDefaults {
- /** The project's default for the minimum priority a Full review publishes.
+ /** The project's default for the minimum priority a Deep review publishes.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold: UrgencyThresholdEnum;
- /** The project's default for the image in a Full review that finds nothing to raise. */
+ /** The project's default for the image in a Deep review that finds nothing to raise. */
celebrate_clean_reviews: boolean;
}
export interface PatchedReviewUserSettings {
- /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' turns automatic Flash off everywhere. A choice for one repository wins over this default.
+ /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' turns automatic reviews off everywhere. A choice for one repository wins over this default.
*
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere */
default_review_mode?: DefaultReviewModeEnum;
- /** After a Full review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
+ /** After a Deep review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
resolve_comments?: boolean;
- /** Minimum priority a validated Full review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
+ /** Minimum priority a validated Deep review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnum;
- /** Show a fun image in the review comment when a Full review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
+ /** Show a fun image in the review comment when a Deep review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
celebrate_clean_reviews?: boolean;
/** Review the pull requests the agent opens for Inbox reports assigned to the user: ReviewHog reviews each one and posts its findings to the pull request. Off by default. */
review_inbox_prs?: boolean;
@@ -83125,7 +83125,7 @@ export namespace Schemas {
stamphog_review_inbox_prs?: boolean;
/** Where each effective value comes from. A value equal to the inherited one is never stored, so writing the project default or the built-in default makes the source follow it again. */
readonly sources?: ReviewPreferenceSources;
- /** The project defaults the Full review preferences fall back to. */
+ /** The project defaults the Deep review preferences fall back to. */
readonly project_defaults?: ReviewProjectDefaults;
/** Whether this project has at least one synced, enabled Stamphog repository. When false, the stamphog_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamphog GitHub App. */
readonly stamphog_connected?: boolean;
@@ -95187,7 +95187,7 @@ export namespace Schemas {
} as const;
export interface ReviewProgress {
- /** How far the in-flight review turn has come: fetching the diff, chunking, picking each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, or finalizing (building and publishing the review). A single-agent Flash turn reports its own `single_agent_*` stages instead: preparing, reviewing (main and lens sessions), and finalizing (merging, capping, and publishing the findings).
+ /** How far the in-flight review turn has come: fetching the diff, chunking, picking each chunk's perspectives, reviewing chunks, merging overlapping findings, validating them, or finalizing (building and publishing the review). A single-agent Standard turn reports its own `single_agent_*` stages instead: preparing, reviewing (main and lens sessions), and finalizing (merging, capping, and publishing the findings).
*
* * `fetching` - fetching
* * `chunking` - chunking
@@ -95395,7 +95395,7 @@ export namespace Schemas {
last_run_at: string | null;
/** Whether a review has been published back to GitHub. */
published: boolean;
- /** Whether a Full review of this pull request has been published. No Flash review runs after one. */
+ /** Whether a Deep review of this pull request has been published. No Standard review runs after one. */
full_review_published: boolean;
/** Whether a run is on this report right now: a review turn or a resolution run (activity within the last 30 minutes). */
in_progress: boolean;
@@ -95527,24 +95527,24 @@ export namespace Schemas {
}
export interface ReviewProjectSettings {
- /** Who gets automatic Flash reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
+ /** Who gets automatic Standard reviews in the repositories this project reviews: 'everyone' (except the excepted people), 'listed' (only the listed people), or 'off' (only people who opt in, the default). A repository exception or a person's own choice wins over it.
*
* * `everyone` - Automatic Flash for everyone
* * `listed` - Automatic Flash for these people
* * `off` - Automatic Flash opt-in only */
flash_for?: AutomaticFlashForEnum;
- /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (automatic Flash that runs as the person who connected GitHub, with default settings and no changes to the pull request).
+ /** Pull requests from bots, and from authors who are not project members, in every repository this project reviews: 'skip' (not reviewed, the default) or 'run' (an automatic Standard review that runs as the person who connected GitHub, with default settings and no changes to the pull request).
*
* * `skip` - Not reviewed
* * `run` - Automatic Flash */
bot_prs?: ReviewProjectSettingsBotPullRequestsEnum;
- /** Project default for the minimum priority a Full review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
+ /** Project default for the minimum priority a Deep review publishes: 'consider' (all, the built-in default), 'should_fix', or 'must_fix'. A person's own value wins.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnum;
- /** Project default for the image in a Full review that finds nothing to raise. On by default. A person's own value wins. */
+ /** Project default for the image in a Deep review that finds nothing to raise. On by default. A person's own value wins. */
celebrate_clean_reviews?: boolean;
/** The people on the project rule's two lists. Only the list that matches flash_for has an effect. */
readonly people: readonly ReviewRepositoryPerson[];
@@ -95620,7 +95620,7 @@ export namespace Schemas {
last_run_at: string | null;
/** Whether a review has been published back to GitHub. */
published: boolean;
- /** Whether a Full review of this pull request has been published. No Flash review runs after one. */
+ /** Whether a Deep review of this pull request has been published. No Standard review runs after one. */
full_review_published: boolean;
/** Whether a run is on this report right now: a review turn or a resolution run (activity within the last 30 minutes). */
in_progress: boolean;
@@ -95813,6 +95813,8 @@ export namespace Schemas {
my_result: AutomaticReviewDecision;
/** What the requesting user's own pull requests would get here without their choice for this repository. Equals my_result when there is no choice. */
inherited_result: AutomaticReviewDecision;
+ /** What the requesting user's own pull requests would get here from the repository exception or the project rule alone, without their default and their choice for this repository. */
+ repository_result: AutomaticReviewDecision;
}
export interface ReviewRepositoryOverview {
@@ -95834,6 +95836,8 @@ export namespace Schemas {
* @nullable
*/
next_offset: number | null;
+ /** How many of the requesting user's own repository choices in this project give something other than their default. Counts every installation, so the search, the view, and the page do not change it. */
+ my_choices_unlike_default: number;
}
export interface ReviewRepositoryPersonRequest {
@@ -95893,7 +95897,7 @@ export namespace Schemas {
}
/**
- * * `flash_after_full` - Flash after a published Full review
+ * * `flash_after_full` - Standard after a published Deep review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
*/
export type ReviewRequestRefusalEnum = typeof ReviewRequestRefusalEnum[keyof typeof ReviewRequestRefusalEnum];
@@ -95935,9 +95939,9 @@ export namespace Schemas {
export interface ReviewTriggerError {
/** Human-readable explanation of why the trigger was rejected. */
error: string;
- /** Why the request was refused, for a client that shows its own reason: 'flash_after_full' (the PR already has a published Full review), 'resolution_not_opted_in' (the PR owner has not turned on resolving comments). Absent for other errors.
+ /** Why the request was refused, for a client that shows its own reason: 'flash_after_full' (the PR already has a published Deep review), 'resolution_not_opted_in' (the PR owner has not turned on resolving comments). Absent for other errors.
*
- * * `flash_after_full` - Flash after a published Full review
+ * * `flash_after_full` - Standard after a published Deep review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution */
code?: ReviewRequestRefusalEnum;
}
@@ -95946,7 +95950,7 @@ export namespace Schemas {
* * `review` - Review
* * `review_only` - Review only
* * `resolve_only` - Resolve only
- * * `flash` - Flash
+ * * `flash` - Standard
*/
export type ReviewTriggerRequestRunModeEnum = typeof ReviewTriggerRequestRunModeEnum[keyof typeof ReviewTriggerRequestRunModeEnum];
@@ -95961,38 +95965,38 @@ export namespace Schemas {
export interface ReviewTriggerRequest {
/** GitHub pull request URL to review, e.g. 'https://github.com/PostHog/posthog.com/pull/123'. The repository must be accessible to the project's GitHub App installation. */
pr_url: string;
- /** What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' uses a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Full review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.
+ /** What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' runs a Standard review: a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Deep review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.
*
* * `review` - Review
* * `review_only` - Review only
* * `resolve_only` - Resolve only
- * * `flash` - Flash */
+ * * `flash` - Standard */
run_mode?: ReviewTriggerRequestRunModeEnum;
}
export interface ReviewTriggerResponse {
/** Temporal workflow id for the started review run; empty when no run was started. */
workflow_id: string;
- /** Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the pull request's current commit already has a published review in the requested mode, 'joined_running_review' when a review was already in flight and the request joined its queue. A requested Full review waits for an active Flash review. */
+ /** Run lifecycle marker: 'started' when the review was queued, 'already_reviewed' when the pull request's current commit already has a published review in the requested mode, 'joined_running_review' when a review was already in flight and the request joined its queue. A requested Deep review waits for an active Standard review. */
status: string;
}
export interface ReviewUserSettings {
- /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Flash everywhere, and 'off' turns automatic Flash off everywhere. A choice for one repository wins over this default.
+ /** Automatic reviews of the user's own pull requests in every repository this project reviews: 'follow' (default) uses each repository's rule, 'flash' gives automatic Standard reviews everywhere, and 'off' turns automatic reviews off everywhere. A choice for one repository wins over this default.
*
- * * `follow` - Follow each repository
- * * `flash` - Flash everywhere
+ * * `follow` - Let each repository decide
+ * * `flash` - On everywhere
* * `off` - Off everywhere */
default_review_mode?: DefaultReviewModeEnum;
- /** After a Full review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
+ /** After a Deep review of the user's pull requests is published, run the resolution stage: triage the unresolved review threads, implement the worth-and-safe fixes on the PR branch, and reply on every thread. Off by default. Personal only: no project default applies. */
resolve_comments?: boolean;
- /** Minimum priority a validated Full review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
+ /** Minimum priority a validated Deep review finding needs to be published: 'consider' publishes everything, 'should_fix' drops consider-level findings, 'must_fix' publishes only blocking issues. Without the user's own value the project default applies.
*
* * `consider` - Consider (all)
* * `should_fix` - Should fix
* * `must_fix` - Must fix */
urgency_threshold?: UrgencyThresholdEnum;
- /** Show a fun image in the review comment when a Full review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
+ /** Show a fun image in the review comment when a Deep review of the user's pull requests finds nothing to raise. Without the user's own value the project default applies. */
celebrate_clean_reviews?: boolean;
/** Review the pull requests the agent opens for Inbox reports assigned to the user: ReviewHog reviews each one and posts its findings to the pull request. Off by default. */
review_inbox_prs?: boolean;
@@ -96000,7 +96004,7 @@ export namespace Schemas {
stamphog_review_inbox_prs?: boolean;
/** Where each effective value comes from. A value equal to the inherited one is never stored, so writing the project default or the built-in default makes the source follow it again. */
readonly sources: ReviewPreferenceSources;
- /** The project defaults the Full review preferences fall back to. */
+ /** The project defaults the Deep review preferences fall back to. */
readonly project_defaults: ReviewProjectDefaults;
/** Whether this project has at least one synced, enabled Stamphog repository. When false, the stamphog_review_inbox_prs toggle has nothing to act on and the UI renders it disabled with a pointer to connect the Stamphog GitHub App. */
readonly stamphog_connected: boolean;
diff --git a/services/mcp/src/generated/review_hog/api.ts b/services/mcp/src/generated/review_hog/api.ts
index 8e679cb14df2..a1459caa33c9 100644
--- a/services/mcp/src/generated/review_hog/api.ts
+++ b/services/mcp/src/generated/review_hog/api.ts
@@ -56,7 +56,7 @@ export const ReviewHogReviewsRetrieveParams = () => zod.object({
})
/**
- * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Flash review that never resolves comments and is refused after a published Full review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
+ * Start a ReviewHog review of any pull request the project's GitHub App installation can access, and publish it back to the PR. The requesting user is the review's acting user: their enabled perspectives, blind-spot check, validator, and urgency threshold drive the run, and it appears under their recent reviews. Resolution writes to the branch only when the pull request owner opted in, whoever asks. `run_mode` picks the variant: a review (which chains the resolution stage per the owner's resolve_comments setting), a review without resolving, resolution only, or a lower-cost Standard review that never resolves comments and is refused after a published Deep review. Nonexistent, closed, and fork PRs are rejected synchronously; a PR whose current commit already has a published review returns 'already_reviewed' without starting a run (resolve_only skips that check — settling threads on a reviewed head is its whole point), and triggering a PR whose run is currently in flight joins that run. Otherwise non-blocking: returns the Temporal workflow id immediately while the run executes in the worker.
* @summary Start a review of a pull request
*/
export const ReviewHogReviewsTriggerCreateParams = () => zod.object({
@@ -78,10 +78,10 @@ export const ReviewHogReviewsTriggerCreateBody = () => zod.object({
run_mode: zod
.enum(['review', 'review_only', 'resolve_only', 'flash'])
.describe(
- '\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Flash'
+ '\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Standard'
)
.default(reviewHogReviewsTriggerCreateBodyRunModeDefault)
.describe(
- "What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' uses a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Full review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.\n\n\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Flash"
+ "What to run on the pull request. 'review' (default) reviews it and, when the pull request owner's resolve_comments setting is on, chains the resolution stage; 'review_only' reviews without resolving regardless of that setting; 'resolve_only' skips the review and only runs the resolution stage on the PR's existing unresolved review threads, which needs the owner's opt-in; 'flash' runs a Standard review: a lower-cost model for the review passes and validation, never resolves comments, and is refused once the PR has a published Deep review. The owner is the PR's author, or the Inbox reviewer of a pull request the PostHog app opened.\n\n\* `review` - Review\n\* `review_only` - Review only\n\* `resolve_only` - Resolve only\n\* `flash` - Standard"
),
})