Skip to content

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

fix(review_hog): drop the review-hog-internal gate (#114754)

Julian Bezd9c4d76351b9
diff --git a/docs/internal/sandboxes-setup-guide.md b/docs/internal/sandboxes-setup-guide.md
index 7c98b6b933fa..8ef12768915a 100644
--- a/docs/internal/sandboxes-setup-guide.md
+++ b/docs/internal/sandboxes-setup-guide.md
@@ -237,10 +237,9 @@ The property identifies the active environment: explicitly include every environ
access. A parent project's flag does not enable its child environments, even though ReviewHog stores
their settings and reviews under the shared parent project.
-Newly enabled projects get manual Full reviews. The `review-hog-internal` flag, set up the same way per
-project, adds the internal-only parts: automatic Flash reviews, the `reviewhog` label trigger, manual
-Flash, resolution, Inbox reviews, the tiered review models, and the Stamphog Inbox switch.
-Existing Inbox or Stamphog opt-ins remain visible in other projects until the user switches them off.
+Newly enabled projects get every ReviewHog part: manual Full and Flash reviews, automatic Flash reviews,
+the `reviewhog` label trigger, resolution, Inbox reviews, the tiered review models, and the Stamphog
+Inbox switch.
Each project needs a GitHub App integration covering the repository; review skills seed automatically.
Automatic reviews and the label trigger also need the project to claim the repository in the Code review
settings. No environment variable or shared secret picks the project.
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 97439d45d973..87d986bb6191 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -11956,14 +11956,14 @@ snapshots:
hash: v1.k794b7964.78c398feb22adb44344fad6c155ad42ecdbd9d77d80e4e0a60227b4a32abf14f.wmWI9S-nFvoZ5tNpxol33U3eINboLyZM9cggyHqv8hU
scenes-app-insights-error-empty-states--validation-error--light:
hash: v1.k794b7964.2b012576da17dc343cba68c671217dcfb23f907543fd897d65e42e8793f31958.gL9lf9tk2rIHPSZBxNHmPitiTqUvCG08VR3K9hK7xMo
- scenes-app-insights-flag-calls-retention-notice--default--dark:
- hash: v1.k794b7964.d9aefe5f9ce9d7a864d6bf0338965adf5c01284b0fa767b3db193cbf9102838b.F_x981isYjYR1oKf0BPU3Agkr_bpR7TqheKovVn432o
- scenes-app-insights-flag-calls-retention-notice--default--light:
- hash: v1.k794b7964.7923e9cd78a4bd2e62c7f95ce8eb80df0bb9fab29de527b307048b8e5b5011ff.Mrf6YkRMfO82M2uM5Fc4LKBf3vjTEjIDdw4MZ1cPIrA
scenes-app-insights-flag-called-rebuild-banner--insight-on-flag-calls--dark:
hash: v1.k794b7964.3d946f71319ec412299b8888e9a3fed48a7098bcf0e92cda25f6f34a43071a3f.PbH5UAwbwGY8tveYtVSlUz6TeywtNh7otO1PSPZi9vw
scenes-app-insights-flag-called-rebuild-banner--insight-on-flag-calls--light:
hash: v1.k794b7964.c1bca29126f3f201df46989d83af5e777ad42f21aba60febca75e2ded1a00d6e.WHUf4o3J7Uo7jwnFaGNXQgqa9jMdohuIOo1eSFbW9a4
+ scenes-app-insights-flag-calls-retention-notice--default--dark:
+ hash: v1.k794b7964.d9aefe5f9ce9d7a864d6bf0338965adf5c01284b0fa767b3db193cbf9102838b.F_x981isYjYR1oKf0BPU3Agkr_bpR7TqheKovVn432o
+ scenes-app-insights-flag-calls-retention-notice--default--light:
+ hash: v1.k794b7964.7923e9cd78a4bd2e62c7f95ce8eb80df0bb9fab29de527b307048b8e5b5011ff.Mrf6YkRMfO82M2uM5Fc4LKBf3vjTEjIDdw4MZ1cPIrA
scenes-app-insights-insight-quick-start--default--dark:
hash: v1.k794b7964.f190c463ee799e93ea5d408200712776460a5a9a920977e2b7a85348350fa43b.dcN7n63RW9QEXstFsPgnAaKodbV6piSN7PMhBuHkaGc
scenes-app-insights-insight-quick-start--default--light:
@@ -14524,30 +14524,26 @@ snapshots:
hash: v1.k794b7964.af1b6736f5a6e6ffb329599ed7407d25dbee0939861cd554e0c94b84b2970a7c.HwLX1pgZqjpFAoG4ni16T0wtf1PJQkw0Evr2jBw2vG4
scenes-code-review--flag-disabled-for-staff--light:
hash: v1.k794b7964.a71251e301794f51a0a9140ab1442fada37b1cc0fb54095a5eb19499e0cb1b34.3GhhJCqNfLkY2WdBTTn0LHJifxiCqyEJ7viaHaoCoGA
- scenes-code-review--internal-features--dark:
- hash: v1.k794b7964.a61b916676bea5494ff48e295b83eb92e1c9850a651be1c3530ac5fd322c8408.5Tp4Sn4kG5SN3u3i7Opqr0DkyO84D0w-xxXmFOSa28I
- scenes-code-review--internal-features--light:
- hash: v1.k794b7964.25bbf6757d423d75229154f1ebfd502382a84b5a8103fe2a7a3d28864895cacb.owi4aYj4U1shMo5kWlIFeLYX9Z8PlpZBTHSRtqPMff0
scenes-code-review--narrow--dark:
hash: v1.k794b7964.63649dd285864639be3334f1450409dd32ffb381f643a5399e16c7b48f794d68.4xKhrVrw_gEjmbdN5mWEDTj9gTuStyD0Cqne2ezG_Hw
scenes-code-review--narrow--light:
hash: v1.k794b7964.7e0bbeeffb4b8d8372dbdfe90686b2becc1991df2b78af2a0a2b6a0b3a41aadf.7Z4Aht9zbaWjsS8W-Yd9wCOuUjU5-A9Xb6Xpg__bgMs
scenes-code-review--narrow-settings--dark:
- hash: v1.k794b7964.d546f76af0f025813013429c23d52b6212104cb379ec1fcf08943e4934ee2c5d.wFyM2Rme9y3HDcRPKWiOe_g6In4h_cHL9l9kce-8I0I
+ hash: v1.k794b7964.42c69fa134810eaa6839b00998935fe9ba6a3bffc1841f709cd96a6896b6b074.c-AXhUZgqz811HSny4dwYc91twpyWbW7WMuUpm5Uag0
scenes-code-review--narrow-settings--light:
- hash: v1.k794b7964.73b9ba4a69a74077c0dc233c54662e71d63b0d9ecb492274fa9982ce756dde54.gT_BISy-ePJrir7xQgDwEUM9DCL3bIFFybJyCEtUmL8
+ hash: v1.k794b7964.cb4787e8c722043e3db27c5171e43afdf8dae9839f5e85c1b1fb19f06311152d.UlOSrJ-luTuZXQzrmlccN78W31uvDkOAVfUI3tzxIqE
scenes-code-review--saved-inbox-opt-ins--dark:
hash: v1.k794b7964.dad9c200176e5b9be56e1e80a1dfe3d5c1ce3a499b53be7a73c8052d585ed251.4nSbexxZBEqqRqKVwgvSaQ3k53FcZXF5-8txH9FaFQ0
scenes-code-review--saved-inbox-opt-ins--light:
hash: v1.k794b7964.56e64569af5c37d2e61a530c2d39f74568b504dcef7cc76eff2be1433ecf2c8f.RoS4azTih4OIrutFdCk4sWUGns6WrvpPJDuPRXgJBkE
scenes-code-review--settings--dark:
- hash: v1.k794b7964.a617092a7232b08019189f2125a635fb8576ee687acecf7492dd0495d4da1118.zgtFXbxvPvpaz0TGxgPhDHLhRAdoFCnfLbx7AJlIJsc
+ hash: v1.k794b7964.60889443f3a34d898aee89e7ffac26a302c285fd57bd7946302221376f1ab4b6.KIhDwvP7zZ1KDLTX3Lmm_w0LvilEeHyRZN3eCapZZ_c
scenes-code-review--settings--light:
- hash: v1.k794b7964.5579f34ea08fdda6357fad8a11970196becdf6597de575c2fbc774c322be689a.zzn-hRm8xYwsGUe9nHYgi0ziJQBIoC0k-oMWu_0XGG8
+ hash: v1.k794b7964.2bcf6fbe592507da84640646a01323420ae75ffe5847948eaf54ef401d74ff24.7NNJMuWHJK3bzYTJD-t-1be6YvdhePHFXaNA51dXaVg
scenes-code-review--settings-for-member--dark:
- hash: v1.k794b7964.f14c3a0e51ba2baebb5e0407d368b50bb340139aaec1d7eef8797140af1d7ad3.1p59Ps3G9efZlooqggBe7sC-sVF1dxVMjH2VdrkNimA
+ hash: v1.k794b7964.1131a4b430803b274b20831ec1b3c968671f1e8e34607d12e07536bcc1678a7c.LNgVtPhC1Xo1Sfv_yH-I_vyV-DtnOBoVs4eyqaD5gxI
scenes-code-review--settings-for-member--light:
- hash: v1.k794b7964.760cbd371646375a6adcbf652d575316664bb52dc81c48abfac1c0856e5c6921.LRpauwESRD6qBXB5MVNF1cKFwvFi54AXbjcPyBa0_gg
+ hash: v1.k794b7964.b5522a57b337f41fee07d6829f6d7be6ab1e744a29aeca65a8698c17f40026db.M3xsf3k9C-O3R1lUMN9X-l9nsNuzIecT1NSEJncQLTA
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/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 9dab1d20f1da..3ddfa93c9dd8 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -538,7 +538,6 @@ export const FEATURE_FLAGS = {
REVAMPED_PY_NOTEBOOKS: 'revamped-py-notebooks', // owner: #team-data-tools
REVENUE_FIELDS_IN_POWER_USERS_TABLE: 'revenue-fields-in-power-users-table', // owner: @arthurdedeus #team-customer-analytics
REVIEW_HOG: 'review-hog', // owner: #team-devex, gates the Code review menu entry, scene, and API access
- REVIEW_HOG_INTERNAL: 'review-hog-internal', // owner: #team-devex, gates ReviewHog automation, Flash, resolution, and Inbox reviews per project
SCENE_MENU_BAR: 'scene-menu-bar', // owner: @adamleithp #team-platform-ux, gates the per-scene MenuBar above SceneTitleSection
SCHEMA_ENFORCEMENT_REJECT: 'schema-enforcement-reject', // owner: @aspicer, gates the ability to set schema enforcement mode to "reject"
SCHEMA_MANAGEMENT: 'schema-management', // owner: @aspicer
diff --git a/products/review_hog/ARCHITECTURE.md b/products/review_hog/ARCHITECTURE.md
index a0f8442a29dc..6e0a55ae35e1 100644
--- a/products/review_hog/ARCHITECTURE.md
+++ b/products/review_hog/ARCHITECTURE.md
@@ -70,7 +70,7 @@ dependency manifests delivers a human-review warning instead of the link and nev
**TODO (BLOCKING public release): the three remaining injection-surface hardening items from the July e2e
GO conditions.** Manual review is available to explicitly enabled projects. Resolution is limited to
-projects with the `review-hog-internal` flag, for repositories their teams own. This is a limited rollout; the feature flag does not establish repository or
+projects with the `review-hog` flag, for repositories their teams own. This is a limited rollout; the feature flag does not establish repository or
comment trust. Operators must assess both before enabling resolution. DECISIONS.md Stage 7 records the
2026-09-30 decision to accept the existing risks for this limited manual rollout. The path backstop above is built; these
are deliberately deferred (maintainer decisions 2026-08-06 and 2026-08-10, recorded in DECISIONS.md Stage 7)
@@ -97,8 +97,8 @@ and MUST land before public release or resolution on untrusted PRs or repositori
than a fix in this repo.
**Full reviews can include resolving**: a published Full review chains into the stage when the **PR owner**
-opted in (`resolve_comments`, default off), whoever triggered the review, and the project has the
-`review-hog-internal` flag (`review_request_rules.ResolutionGate`). The owner (`backend/pr_owner.py`) is the
+opted in (`resolve_comments`, default off), whoever triggered the review
+(`review_request_rules.ResolutionGate`). The owner (`backend/pr_owner.py`) is the
author when the GitHub login maps to an active member; for a self-driving PR that the PostHog GitHub App opened, it
is the Inbox report's canonical reviewer; otherwise nobody, and a PR without an owner never gets writes. Flash never
resolves. The chained run applies the owner's resolution criteria. Standalone entry: the `run_resolution` command or
@@ -562,8 +562,7 @@ never the reverse; a resolve-only run upserts the same row but does not lift (`l
person's Full trigger that lands while the report's review is still running signals the existing queue and preserves a pending Full request.
The trigger endpoints write the lift themselves (`lift_review_tier_for_joined_trigger`) and answer
`joined_running_review`; remaining Full units and later Full turns use the human tier, while an active Flash turn keeps its Flash arm.
-The cheaper arms are rolled out per project through the `review-hog-internal` flag; other projects record their tier
-but run the default arm. `load_review_arm` → `resolve_review_arm` honors a persisted arm only while it stays a
+Every project runs the arm of its tier. `load_review_arm` → `resolve_review_arm` honors a persisted arm only while it stays a
registry-supported combo — anything else falls back to the default (full-strength) pins and stamps
`review_arm_fallback` on the run's analytics events. Chunking, dedup, and the validator stay on Claude at fixed
pins; the resolution stage runs the validator's model at lower effort (`claude-opus-5-5` @ high). One per-turn override sits on top
@@ -852,21 +851,17 @@ See [DECISIONS.md](./DECISIONS.md) for the "reuse the leaf, own the model" bound
project rule (`ReviewProjectSettings.flash_for`: everyone except the excepted people, the listed people, or
opt-in only, the default). Bot authors and authors who map to no active member get automatic Flash only when the
project sets `bot_prs=run`; the review then runs as the user who connected the installation, with default
- settings and no resolution. The owning project also needs the `review-hog-internal` flag. No per-deploy team id
- picks the project for any trigger.
-- **Internal features** (`backend/internal_features.py::has_internal_features`) — the `review-hog-internal`
- feature flag, evaluated per project with the project group the same way as `review-hog` (set it up the same way).
- It gates automatic Flash reviews, the label trigger, resolution, manual Flash, the tiered review arms, and the
- scene's Flash, Inbox, and Stamphog controls (`FEATURE_FLAGS.REVIEW_HOG_INTERNAL`). Saved Inbox or Stamphog
- opt-ins stay visible without it until switched off, and settings reads without it do not query Stamphog. A flag
- service failure reads as off.
+ settings and no resolution. No per-deploy team id picks the project for any trigger.
+- **One feature flag.** `review-hog` is the only ReviewHog flag. Automatic Flash reviews, the label trigger,
+ resolution, manual Flash, Inbox reviews, the Stamphog Inbox switch, and the tiered review arms are available
+ wherever it is on. DECISIONS.md records why the separate `review-hog-internal` gate went away.
- **`REVIEWHOG_GITHUB_BOT_LOGIN`** (`posthog/settings/access.py`) names the app's `<slug>[bot]` login per region.
`is_app_bot_author` trusts only that login; unset, it trusts no author in production (local development and tests
fall back to any `Bot`-typed author).
**Customer setup path.** Nothing in ReviewHog's behavior depends on a per-deploy team id, so any project can enable it:
-1. Turn on the `review-hog` flag for the project (and `review-hog-internal` for the internal-only parts).
+1. Turn on the `review-hog` flag for the project.
2. Connect GitHub through the core GitHub integration (the PostHog GitHub App installation).
3. In the Code review settings, claim the installation: all repositories (at most one project per installation) or
only selected repositories.
@@ -875,8 +870,7 @@ See [DECISIONS.md](./DECISIONS.md) for the "reuse the leaf, own the model" bound
**Triggers.** Six entry points feed the same per-PR `ReviewPRQueueWorkflow`: the `run_review` CLI (manual / eval), the
`reviewhog` **label** on a PR in a repository that a project reviews (the GitHub App's own `labeled` delivery), a **UI**
"Review this PR" field in the Code review scene (any installation-accessible PR; its split button's `run_mode`
-also carries the review-without-resolving and resolve-only variants; projects with `review-hog-internal` also see
-**Flash**, which pins resolution off), an **inbox** trigger (a
+also carries the review-without-resolving, resolve-only, and **Flash** variants; Flash pins resolution off), an **inbox** trigger (a
`TaskRun` receiver auto-reviews self-driving Signals implementations once their PR exists — a pushed branch without
a PR is not reviewed, and the PR must sit in the task's own repository because `output.pr_url` is written by
whoever controls the run, the sandbox agent included), **MCP tools**
@@ -889,14 +883,13 @@ Enabling the setting performs no backfill; existing PRs become eligible on their
The turn rechecks ownership and the rules before starting. Flash publishes every kept finding (it records `consider` as the turn's threshold) and never starts resolution.
**No Flash after Full:** once a PR has a published Full review, automatic dispatch skips it (`full_review_published`), the turn's recheck refuses it, and a manual Flash request answers 409 `flash_after_full`.
The same `review_hog_authored_prs` consumer (the name is the dedup key, so it stays) routes by action through `facade/github.py::accept_pull_request_event` (`backend/pull_request_events.py`): `labeled` with the `reviewhog` label queues `process_label_event`.
-That task finds the owning project, requires `review-hog-internal`, and accepts a person or `stamphog[bot]` (Stamphog's hand-off) as the labeler; another bot's label gets an explaining comment and is removed with the app token.
+That task finds the owning project and accepts a person or `stamphog[bot]` (Stamphog's hand-off) as the labeler; another bot's label gets an explaining comment and is removed with the app token.
The review runs as the PR owner, else as the user who connected the installation (`Integration.created_by`) with default settings and no resolution; the workflow removes the label when the run ends, and a running resolution leaves the label for a later retry.
Counters: `posthog_review_hog_authored_pr_review_total` and `posthog_review_hog_label_review_total`, keyed by outcome.
`facade/github.py::owning_team_id(installation_id, repository)` answers the same ownership question for other products, for example a PR comment command dispatcher.
The UI and MCP paths are one surface: the viewset carries the grantable `review_hog` scope (`review_hog:read` for list /
retrieve / perspective_stats, `review_hog:write` for trigger). Both require the `review-hog` feature flag,
and the trigger action checks the URL, GitHub App access, fork status, and open state regardless of caller.
-It refuses `run_mode=flash` and `resolve_only` with a 403 (`internal_feature`) without the `review-hog-internal` flag.
The trigger action and the `@posthog review` comment (`facade/reviews.py`) both call `requested_reviews.request_pr_review()`, which applies the owner rule for resolution and the no-Flash-after-Full refusal.
Settings: an automatic review follows the owner's rules (Flash reads no personal settings), the UI / MCP Review button
and the comment follow the person who asks, the label follows the owner, and an Inbox review follows the report's reviewer.
diff --git a/products/review_hog/CONTEXT.md b/products/review_hog/CONTEXT.md
index 37ddc80375aa..01f0e519406a 100644
--- a/products/review_hog/CONTEXT.md
+++ b/products/review_hog/CONTEXT.md
@@ -32,7 +32,7 @@ Vocabulary settled while working on the product. Pure vocabulary — no spec, no
- **Review cycle** — one review turn plus its chained resolution, taken as a unit: the span from review start until the resolution stage finishes settling that review's comments. Two Temporal workflows implement it (see ADR 0001), but users reason about the cycle — "the PR is being worked on" — not the stages.
- **Busy-guard** — the explicit cross-stage check that refuses to start a new review while the PR's `resolve-pr` workflow is running, and refuses to start a standalone resolution while its `review-pr` workflow is running (the chained hand-off is exempt: it fires only after publish). Needed because Temporal's same-id joining cannot see across the two workflows.
- **Resolution etiquette** — triage and fixing logic is identical for every thread regardless of author; only the _resolve_ action is author-gated. Human-authored threads: reply as the bot with the outcome (fix + commit link, or the decline/escalate reasoning), **never resolve** — the human keeps the final word on their own thread. Bot-authored threads: reply and resolve on terminal outcomes. ESCALATE never resolves, for any author. (Autonomous adaptation of the triage skill's "bot threads: reply + resolve; human threads: hand back" invariant — the bot now speaks as itself, but resolution of human threads still belongs to humans.)
-- **Entry points** — the UI / MCP resolve-only action and the `run_resolution` command start a standalone run. Chained mode — `ReviewPRWorkflow` dispatching the stage after publish — is an internal dispatch, not an HTTP hop, and it is the **default**: reviewing includes resolving, gated by the **PR owner's** `resolve_comments` opt-in (off by default; snapshotted at acting-user resolution like the other gates; the owner is the mapped author, or the Inbox reviewer of a self-driving PR) and the `review-hog-internal` flag, with the workflow input as a per-run switch-off only the Code review scene uses (its split Review button offers "review without resolving", "resolve only", and "flash" — the Luna medium review that never resolves). A `run_resolution` management command mirrors `run_review` for dev/test. Deterministic skip gates run before any sandbox: closed/merged PR, fork (hard refuse — this stage writes), empty work-list after the pre-filter. One run per PR at a time via a deterministic workflow ID.
+- **Entry points** — the UI / MCP resolve-only action and the `run_resolution` command start a standalone run. Chained mode — `ReviewPRWorkflow` dispatching the stage after publish — is an internal dispatch, not an HTTP hop, and it is the **default**: reviewing includes resolving, gated by the **PR owner's** `resolve_comments` opt-in (off by default; snapshotted at acting-user resolution like the other gates; the owner is the mapped author, or the Inbox reviewer of a self-driving PR), with the workflow input as a per-run switch-off only the Code review scene uses (its split Review button offers "review without resolving", "resolve only", and "flash" — the Luna medium review that never resolves). A `run_resolution` management command mirrors `run_review` for dev/test. Deterministic skip gates run before any sandbox: closed/merged PR, fork (hard refuse — this stage writes), empty work-list after the pre-filter. One run per PR at a time via a deterministic workflow ID.
- **Writing mechanics** — one signed commit per FIXED thread (a signed commit is inherently remote — the harness creates commits via the GitHub API, so commit cadence _is_ push cadence), with that thread's reply/resolve posted right after its commit is visible. On a mid-run race (author pushed; signed commit refuses because the remote advanced): sync onto the new head once, re-verify, retry; if the branch moves again, yield gracefully — done threads keep their outcomes, the rest wait for the next run.
- **CI boundary** — the resolution stage handles review threads only; it never waits on, chases, or fixes PR checks. CI babysitting already exists (the Tasks CI follow-up loop). Known seam to close on the Tasks side: `_should_run_ci_follow_up` also fires on new unresolved threads and `DEFAULT_CI_MESSAGE` mandates comment-addressing — narrow that to checks-only (or skip its thread trigger) where the resolution stage is active, so two bots never fix the same comment.
- **Run budget** — a run resolves at most **20** threads, priority-ordered; the binding constraint is the warm session's context window (every turn accumulates, and fix quality degrades as it fills), not just sandbox cost. Overflow is always named in the run summary ("handled 20, N remain") and the next run continues — never silent truncation. Session/turn timeouts are inherited from the Tasks runner. Fix _size_ is deliberately not a numeric cap — proportionality in the criteria skill is the guard. Model/effort pinned by `RESOLUTION_*` constants (validator's Claude default to start).
diff --git a/products/review_hog/DECISIONS.md b/products/review_hog/DECISIONS.md
index f1b97452e651..e87afff916ed 100644
--- a/products/review_hog/DECISIONS.md
+++ b/products/review_hog/DECISIONS.md
@@ -198,6 +198,17 @@ read `FINAL_REPORT.md` there first (config glossary + coverage matrix + ranking)
rate drops materially (toward ≤50%) on frozen-PR evals with the valid-finding set intact (item 5's
coverage matrix as the guard); kill if valid findings drop with the noise.
+### ✅ DECIDED 2026-10-09 — the `review-hog-internal` gate is gone
+
+- **What.** `review-hog` is the only ReviewHog flag. Automatic Flash reviews, the label trigger, resolution, manual
+ Flash, Inbox reviews, the Stamphog Inbox switch, and the tiered review arms run wherever it is on.
+ `backend/internal_features.py` and the `internal_feature` refusal code are removed.
+- **Why.** The gate was never created in production, so after the deploy all of those parts stopped with no error.
+ The flag then went to 100% for every organization, which left a second flag with no remaining audience and a
+ silent off switch for most of the product. Removing it keeps the behavior of the 100% rollout and removes the
+ failure mode. The resolution hardening TODO in ARCHITECTURE.md still applies: the `review-hog` flag does not
+ establish repository or comment trust.
+
### ✅ BUILT 2026-10-09 — Full reviews without other reviewers' comments (`reviewhog-full-1-4`)
- **What.** The perspective review prompt quotes only the PR author's own inline comments, as context for intent and
diff --git a/products/review_hog/backend/api/reviews.py b/products/review_hog/backend/api/reviews.py
index d4f80f4a3bb4..3b41a2dd70dc 100644
--- a/products/review_hog/backend/api/reviews.py
+++ b/products/review_hog/backend/api/reviews.py
@@ -302,8 +302,7 @@ class ReviewTriggerErrorSerializer(serializers.Serializer):
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 "
- "turned on resolving comments), 'internal_feature' (the run mode is not available in this project). "
- "Absent for other errors.",
+ "turned on resolving comments). Absent for other errors.",
)
@@ -712,8 +711,7 @@ class ReviewRecentReviewsViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet
),
403: OpenApiResponse(
response=ReviewTriggerErrorSerializer,
- description="The review-hog feature flag is off for this project, or Flash or resolve-only was "
- "requested in a project without the review-hog-internal flag (code 'internal_feature').",
+ description="The review-hog feature flag is off for this project.",
),
409: OpenApiResponse(
response=ReviewTriggerErrorSerializer,
diff --git a/products/review_hog/backend/api/settings.py b/products/review_hog/backend/api/settings.py
index 259390a86487..79fd7af74402 100644
--- a/products/review_hog/backend/api/settings.py
+++ b/products/review_hog/backend/api/settings.py
@@ -14,7 +14,6 @@ from posthog.models.scoping.manager import resolve_effective_team_id
from posthog.models.user import User
from posthog.permissions import PostHogFeatureFlagPermission
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewProjectSettings, ReviewUserSettings
from products.review_hog.backend.preferences import (
PREFERENCE_KEYS,
@@ -115,8 +114,6 @@ class ReviewUserSettingsSerializer(serializers.Serializer):
@extend_schema_field(serializers.BooleanField())
def get_stamphog_connected(self, instance: ReviewPreferences) -> bool:
- if not has_internal_features(self._team_id()):
- return False
# This reads the stamphog product DB, which can fail fast on its own circuit breaker. An
# informational UI flag must not fail the settings endpoint, so fall back to False.
try:
diff --git a/products/review_hog/backend/automatic_reviews.py b/products/review_hog/backend/automatic_reviews.py
index adfdb350f3e8..45008d2b6333 100644
--- a/products/review_hog/backend/automatic_reviews.py
+++ b/products/review_hog/backend/automatic_reviews.py
@@ -8,7 +8,6 @@ from posthog.models.integration import Integration
from posthog.otel_metrics import OtelInstrumentFactory
from products.review_hog.backend.automatic_review_rules import AutomaticReviewReason, decide_automatic_review
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewReport
from products.review_hog.backend.ownership import RepositoryOwner, RepositoryOwnership, RepositoryRef
from products.review_hog.backend.pr_owner import is_active_member
@@ -19,7 +18,6 @@ _otel = OtelInstrumentFactory("review_hog")
AuthoredPRReviewOutcome = Literal[
"repository_not_added",
- "internal_features_off",
"installation_mismatch",
"bot_skipped",
"bot_no_connector",
@@ -75,8 +73,6 @@ def plan_automatic_review(
if owner is None:
return AutomaticDispatch(outcome="repository_not_added")
team_id = owner.team_id
- if not has_internal_features(team_id):
- return AutomaticDispatch(outcome="internal_features_off", team_id=team_id)
has_integration = Integration.objects.filter(
team_id=team_id, kind="github", integration_id=owner.installation_id
).exists()
diff --git a/products/review_hog/backend/facade/reviews.py b/products/review_hog/backend/facade/reviews.py
index 8d76d92b10ee..4f1274041fa7 100644
--- a/products/review_hog/backend/facade/reviews.py
+++ b/products/review_hog/backend/facade/reviews.py
@@ -9,7 +9,6 @@ from posthog.models.team import Team
from posthog.models.user import User
from posthog.permissions import posthog_feature_flag_enabled
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.requested_reviews import (
RUN_MODE_FLASH,
RUN_MODE_REVIEW,
@@ -24,18 +23,12 @@ __all__ = [
"RUN_MODE_REVIEW",
"PRReviewRequestOutcome",
"PRReviewRequestStatus",
- "flash_available",
"request_pr_review",
]
_FEATURE_FLAG = "review-hog"
-def flash_available(team_id: int) -> bool:
- """Flash is limited to projects with the `review-hog-internal` flag."""
- return has_internal_features(resolve_effective_team_id(team_id))
-
-
def request_pr_review(
*, team_id: int, requester_id: int, repository: str, pr_number: int, run_mode: str
) -> PRReviewRequestOutcome:
diff --git a/products/review_hog/backend/internal_features.py b/products/review_hog/backend/internal_features.py
deleted file mode 100644
index 4d2cab8944b6..000000000000
--- a/products/review_hog/backend/internal_features.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import logging
-
-from posthog.models.team.team import Team
-from posthog.permissions import posthog_feature_flag_enabled
-
-logger = logging.getLogger(__name__)
-
-# Gates the parts of ReviewHog that stay internal: automatic reviews, the label trigger, resolution,
-# manual Flash, Inbox reviews (ReviewHog and the Stamphog handoff), and the tiered review arms.
-# The `review-hog` flag stays the product switch.
-REVIEW_HOG_INTERNAL_FLAG = "review-hog-internal"
-
-
-def has_internal_features(team_id: int) -> bool:
- """Whether the `review-hog-internal` flag is on for this project.
-
- Evaluated with the project group, the same way the `review-hog` permission evaluates the product flag.
- A flag service failure reads as off, so an outage cannot turn on writes for a project.
- """
- try:
- team = Team.objects.filter(id=team_id).values_list("organization_id", "uuid").first()
- if team is None:
- return False
- organization_id, team_uuid = team
- return posthog_feature_flag_enabled(
- REVIEW_HOG_INTERNAL_FLAG, str(team_uuid), organization_id=organization_id, team_id=team_id
- )
- except Exception:
- logger.exception("Could not evaluate %s for team %s; treating it as off", REVIEW_HOG_INTERNAL_FLAG, team_id)
- return False
diff --git a/products/review_hog/backend/label_reviews.py b/products/review_hog/backend/label_reviews.py
index 30788796598b..e6c4d8b7b025 100644
--- a/products/review_hog/backend/label_reviews.py
+++ b/products/review_hog/backend/label_reviews.py
@@ -6,7 +6,7 @@ review again, and the workflow removes the label when the run ends.
- A person can add the label, and so can Stamphog, which hands a refused or escalated pull request to
ReviewHog this way. Another bot's label gets an explaining comment and is removed.
-- The review runs in the owning project, which needs the `review-hog-internal` flag.
+- The review runs in the owning project.
- It runs as the pull request owner (`pr_owner.py`). Without an owner it runs as the person who
connected the installation, with default settings and no resolution.
"""
@@ -22,7 +22,6 @@ from posthog.models.integration import GitHubIntegration, Integration
from posthog.otel_metrics import OtelInstrumentFactory
from products.review_hog.backend.automatic_reviews import connector_user_id
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.ownership import RepositoryOwnership, RepositoryRef
from products.review_hog.backend.pr_owner import PullRequestOwnerResolver
from products.review_hog.backend.pull_request_events import REVIEWHOG_LABEL
@@ -42,7 +41,6 @@ BOT_LABEL_COMMENT = (
LabelReviewOutcome = Literal[
"repository_not_added",
- "internal_features_off",
"installation_mismatch",
"bot_labeler",
"no_run_user",
@@ -129,9 +127,6 @@ class LabelReview:
_observe("repository_not_added")
return
team_id = owner.team_id
- if not has_internal_features(team_id):
- _observe("internal_features_off")
- return
integration = (
Integration.objects.filter(team_id=team_id, kind="github", integration_id=self.installation_id)
.order_by("id")
diff --git a/products/review_hog/backend/receivers.py b/products/review_hog/backend/receivers.py
index 95eff2a60e0e..bf49fb693dd9 100644
--- a/products/review_hog/backend/receivers.py
+++ b/products/review_hog/backend/receivers.py
@@ -30,9 +30,6 @@ whose PR never opens is spend with no reader, and the PR save re-fires this rece
for the PR costs only the head start. The workflow and client keep their branch-target support for
callers that know what they are doing; this receiver just never uses it.
-Both reviews start only in projects with the `review-hog-internal` flag, the same flag that shows
-the Inbox switches in settings. A saved opt-in in any other project starts nothing.
-
The `TaskRun.branch` FIELD is never used as a target: auto-start seeds it with the BASE branch and
the agent server later overwrites it with the work branch, so its meaning depends on the path taken.
@@ -57,8 +54,6 @@ from products.stamphog.backend.facade.inbox_hooks import register_inbox_acting_r
# posthog/test/repo_invariants/test_startup_import_budget.py forbids temporalio/modal/openai/anthropic at setup —
# the temporal client and the stamphog task module reach all four, so those two imports stay
# function-local in _start_review / _start_stamphog_review per the budget test's own prescription.
-# The internal flag check reaches posthog.permissions, which loads webauthn and zxcvbn, so it is
-# function-local too.
logger = logging.getLogger(__name__)
@@ -111,10 +106,6 @@ def handle_task_run_saved(sender: type, instance: Any, created: bool, **kwargs:
# both signal_report_id and internal=True with it, so only ai_stage tells them apart.
if (instance.state or {}).get("ai_stage") != "implementation":
return
- from products.review_hog.backend.internal_features import has_internal_features # noqa: PLC0415
-
- if not has_internal_features(instance.team_id):
- return
repository = (task.repository or "").strip() or None
resolved = resolve_assigned_reviewers(instance.team_id, task.signal_report_id)
if not resolved:
@@ -170,10 +161,6 @@ def resolve_stamphog_acting_reviewer(team_id: int, signal_report_id: str, prefer
approval while somebody is still opted in. ``preferred_user_id`` (the task's creator, or the
reviewer a queued job was attributed to) wins while still opted in, keeping attribution stable.
"""
- from products.review_hog.backend.internal_features import has_internal_features # noqa: PLC0415
-
- if not has_internal_features(team_id):
- return None
resolved = resolve_assigned_reviewers(team_id, signal_report_id)
if not resolved:
return None
diff --git a/products/review_hog/backend/requested_reviews.py b/products/review_hog/backend/requested_reviews.py
index 7e7a90b86e6f..c42d3b852efe 100644
--- a/products/review_hog/backend/requested_reviews.py
+++ b/products/review_hog/backend/requested_reviews.py
@@ -11,7 +11,6 @@ from enum import StrEnum
from posthog.dataclasses import frozen
from posthog.models.integration import GitHubIntegration
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewReport
from products.review_hog.backend.pr_owner import PullRequestOwnerResolver
from products.review_hog.backend.review_request_rules import ResolutionGate, ReviewRequestRefusal, flash_refusal
@@ -104,13 +103,6 @@ def request_pr_review(
Full review. Raises `GitHubRateLimitError` when GitHub rate-limits the App's token, so the
caller can answer with the wait.
"""
- # The scene hides these outside internal projects; this also stops API and MCP callers there.
- if run_mode in (RUN_MODE_FLASH, RUN_MODE_RESOLVE_ONLY) and not has_internal_features(team_id):
- return PRReviewRequestOutcome(
- status=PRReviewRequestStatus.NOT_ALLOWED,
- error="This run mode isn't available in this project. Start a regular review instead.",
- refusal=ReviewRequestRefusal.INTERNAL_FEATURE,
- )
repository = f"{owner}/{repo}"
# Checked synchronously (one GitHub API call) so an inaccessible repo errors here, in the UI —
# asynchronously the fetch activity would fail before the report row exists, showing nothing.
diff --git a/products/review_hog/backend/review_request_rules.py b/products/review_hog/backend/review_request_rules.py
index 42f1d07a754d..3fe95f8fee9c 100644
--- a/products/review_hog/backend/review_request_rules.py
+++ b/products/review_hog/backend/review_request_rules.py
@@ -1,8 +1,8 @@
"""The rules every review request follows, whichever trigger asks.
- Resolution writes to the branch only after a Full review, only when the pull request's owner opted
- in (`resolve_comments`), and only where the `review-hog-internal` flag is on. Who triggered does not
- matter: one person's opt-in never writes to a teammate's branch.
+ in (`resolve_comments`). Who triggered does not matter: one person's opt-in never writes to a
+ teammate's branch.
- No Flash after Full: once a Full review of a pull request is published, Flash reviews of it stop.
The checks are small functions so every trigger can call the same ones.
@@ -12,7 +12,6 @@ from django.db import models
from posthog.dataclasses import frozen
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewReport, ReviewUserSettings
from products.review_hog.backend.reviewer.constants import REVIEW_MODE_FLASH, REVIEW_MODE_FULL
from products.review_hog.backend.reviewer.review_state import published_heads_by_mode
@@ -23,31 +22,22 @@ class ReviewRequestRefusal(models.TextChoices):
FLASH_AFTER_FULL = "flash_after_full", "Flash after a published Full review"
RESOLUTION_NOT_OPTED_IN = "resolution_not_opted_in", "The pull request owner has not opted in to resolution"
- INTERNAL_FEATURE = "internal_feature", "Not available in this project"
@frozen
class ResolutionGate:
owner_user_id: int | None
owner_opted_in: bool
- internal_features: bool
def allows(self, review_mode: str) -> bool:
- return (
- review_mode == REVIEW_MODE_FULL
- and self.internal_features
- and self.owner_user_id is not None
- and self.owner_opted_in
- )
+ return review_mode == REVIEW_MODE_FULL and self.owner_user_id is not None and self.owner_opted_in
@classmethod
def load(cls, team_id: int, owner_user_id: int | None) -> "ResolutionGate":
opted_in = (
owner_user_id is not None and ReviewUserSettings.load_preferences(team_id, owner_user_id).resolve_comments
)
- return cls(
- owner_user_id=owner_user_id, owner_opted_in=opted_in, internal_features=has_internal_features(team_id)
- )
+ return cls(owner_user_id=owner_user_id, owner_opted_in=opted_in)
def full_review_published(report: ReviewReport | None) -> bool:
diff --git a/products/review_hog/backend/reviewer/persistence.py b/products/review_hog/backend/reviewer/persistence.py
index d8cf19dbf953..563bc9440c5c 100644
--- a/products/review_hog/backend/reviewer/persistence.py
+++ b/products/review_hog/backend/reviewer/persistence.py
@@ -37,7 +37,6 @@ from django.utils import timezone
from pydantic import ValidationError
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewReport, ReviewReportArtefact
from products.review_hog.backend.reviewer.artefact_content import (
ArtefactContentValidationError,
@@ -53,7 +52,6 @@ from products.review_hog.backend.reviewer.artefact_content import (
parse_artefact_content,
)
from products.review_hog.backend.reviewer.constants import (
- DEFAULT_REVIEW_ARM,
HUMAN_TRIGGER_SOURCES,
REVIEW_ARMS_BY_TIER,
ReviewArm,
@@ -134,7 +132,7 @@ def upsert_review_report(
"status": ReviewReport.Status.ACTIVE,
"signal_report_id": signal_report_id,
"review_signal_priority": signal_priority.value if signal_priority is not None else None,
- **_review_tier_fields(team_id, tier),
+ **_review_tier_fields(tier),
}
if trigger_source is not None:
create_kwargs["trigger_source"] = trigger_source
@@ -177,7 +175,7 @@ def upsert_review_report(
# Accepted cost of the lift: this turn treats the cheap turn's findings as already
# covered, the same as any re-turn. Rare enough (a person asking about an agent PR)
# that quality for the person wins over a clean re-review.
- updates.update(_review_tier_fields(team_id, ReviewTier.HUMAN))
+ updates.update(_review_tier_fields(ReviewTier.HUMAN))
qs.filter(pk=report.pk).update(**updates)
return str(report.id)
@@ -216,18 +214,13 @@ def lift_review_tier_for_joined_trigger(*, team_id: int, repository: str, pr_num
persisted_tier = _parse_persisted_tier(report.review_tier)
if persisted_tier is None or not is_below_human_tier(persisted_tier):
return False
- qs.filter(pk=report.pk).update(**_review_tier_fields(team_id, ReviewTier.HUMAN))
+ qs.filter(pk=report.pk).update(**_review_tier_fields(ReviewTier.HUMAN))
return True
-def _review_tier_fields(team_id: int, tier: ReviewTier) -> dict[str, object]:
- """The tier column plus the arm bundle a report placed in `tier` reviews on.
-
- Tiered arms are rolled out per project through the `review-hog-internal` flag. Other projects
- keep the single default arm but still record their tier, so the label stays truthful and the
- tiers can be compared on their traffic before the rollout widens.
- """
- arm = REVIEW_ARMS_BY_TIER[tier] if has_internal_features(team_id) else DEFAULT_REVIEW_ARM
+def _review_tier_fields(tier: ReviewTier) -> dict[str, object]:
+ """The tier column plus the arm bundle a report placed in `tier` reviews on."""
+ arm = REVIEW_ARMS_BY_TIER[tier]
return {
"review_tier": tier.value,
"review_runtime_adapter": arm.runtime_adapter.value,
diff --git a/products/review_hog/backend/temporal/activities.py b/products/review_hog/backend/temporal/activities.py
index ce8700937c40..fe7fb75457a4 100644
--- a/products/review_hog/backend/temporal/activities.py
+++ b/products/review_hog/backend/temporal/activities.py
@@ -34,7 +34,6 @@ from posthog.temporal.common.scoped import scoped_temporal
from posthog.temporal.common.utils import close_db_connections
from products.review_hog.backend.automatic_reviews import automatic_flash_allowed
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.models import ReviewProjectSettings, ReviewReport, ReviewUserSettings
from products.review_hog.backend.pr_owner import PullRequestOwnerResolver
from products.review_hog.backend.preferences import ReviewPreferences
@@ -899,11 +898,7 @@ def _resolve_acting_user(input: ResolveActingUserInput) -> ResolveActingUserResu
defaults = ReviewPreferences.resolve({}, ReviewProjectSettings.load(input.team_id).defaults)
preferences = defaults if borrowed else preferences_by_user[acting_user_id]
owner_preferences = preferences_by_user[owner.user_id] if owner.user_id is not None else defaults
- resolution = ResolutionGate(
- owner_user_id=owner.user_id,
- owner_opted_in=owner_preferences.resolve_comments,
- internal_features=owner.user_id is not None and has_internal_features(input.team_id),
- )
+ resolution = ResolutionGate(owner_user_id=owner.user_id, owner_opted_in=owner_preferences.resolve_comments)
return ResolveActingUserResult(
acting_user_id=acting_user_id,
review_labeled_prs=True,
diff --git a/products/review_hog/backend/tests/test_acting_user.py b/products/review_hog/backend/tests/test_acting_user.py
index 7027dc7ed83c..12425d03f880 100644
--- a/products/review_hog/backend/tests/test_acting_user.py
+++ b/products/review_hog/backend/tests/test_acting_user.py
@@ -1,5 +1,4 @@
from posthog.test.base import BaseTest
-from unittest.mock import patch
from parameterized import parameterized
from social_django.models import UserSocialAuth
@@ -17,14 +16,12 @@ from products.review_hog.backend.temporal.activities import ResolveActingUserInp
from products.review_hog.backend.temporal.types import TRIGGER_AUTOMATIC, TRIGGER_LABEL, TRIGGER_MANUAL
_SELF = "SELF"
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
class TestResolveActingUser(BaseTest):
def setUp(self) -> None:
super().setUp()
UserSocialAuth.objects.create(user=self.user, provider="github", uid="gh-1", extra_data={"login": "OctoCat"})
- self.internal_flag = self.enterContext(patch(_INTERNAL_FLAG, return_value=True))
@parameterized.expand(
[
@@ -288,10 +285,9 @@ class TestResolveActingUser(BaseTest):
@parameterized.expand(
[
- ("owner_opted_in_and_a_teammate_asks", "teammate", True, False, True, True),
- ("requester_opted_in_but_the_owner_did_not", "teammate", False, True, True, False),
- ("internal_flag_off", "teammate", True, False, False, False),
- ("no_owner", "ghost", False, True, True, False),
+ ("owner_opted_in_and_a_teammate_asks", "teammate", True, False, True),
+ ("requester_opted_in_but_the_owner_did_not", "teammate", False, True, False),
+ ("no_owner", "ghost", False, True, False),
]
)
def test_resolution_follows_the_pr_owners_opt_in(
@@ -300,7 +296,6 @@ class TestResolveActingUser(BaseTest):
author_login: str,
owner_opted_in: bool,
requester_opted_in: bool,
- internal: bool,
expected: bool,
) -> None:
teammate = self._create_user("[email protected]")
@@ -309,8 +304,6 @@ class TestResolveActingUser(BaseTest):
ReviewUserSettings.objects.for_team(self.team.id).create(
team_id=self.team.id, user_id=user.id, preferences={"resolve_comments": opted_in}
)
- self.internal_flag.return_value = internal
-
result = _resolve_acting_user(
ResolveActingUserInput(team_id=self.team.id, author_login=author_login, override_user_id=self.user.id)
)
diff --git a/products/review_hog/backend/tests/test_automatic_reviews.py b/products/review_hog/backend/tests/test_automatic_reviews.py
index 7734e7e9fbd5..bdc4243b76a3 100644
--- a/products/review_hog/backend/tests/test_automatic_reviews.py
+++ b/products/review_hog/backend/tests/test_automatic_reviews.py
@@ -43,7 +43,6 @@ _LABEL_QUEUE = "products.review_hog.backend.tasks.process_label_event.delay"
_START = "products.review_hog.backend.temporal.client.start_review_pr_workflow"
_BUSY = "products.review_hog.backend.temporal.client.workflow_running"
_GITHUB = "products.review_hog.backend.label_reviews.github_api_request"
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
_SECRET = "test-review-hog-webhook-secret"
_HEAD_SHA = "a" * 40
_DISPATCH_METRIC = "posthog_review_hog_authored_pr_review_total"
@@ -306,7 +305,6 @@ class TestAuthoredPRReviewTask(BaseTest):
self.preferences = ReviewUserSettings.objects.for_team(self.team.id).create(
team_id=self.team.id, user_id=self.user.id, preferences={"default_review_mode": "flash"}
)
- self.internal_flag = self.enterContext(patch(_INTERNAL_FLAG, return_value=True))
def _queued_event(self, login: str = "OctoCat") -> Mapping[str, object]:
with patch(_QUEUE) as enqueue:
@@ -361,7 +359,6 @@ class TestAuthoredPRReviewTask(BaseTest):
("left_org", "bot_skipped"),
("unmapped", "bot_skipped"),
("missing_installation", "installation_mismatch"),
- ("internal_flag_off", "internal_features_off"),
("full_review_published", "full_review_published"),
]
)
@@ -382,8 +379,6 @@ class TestAuthoredPRReviewTask(BaseTest):
OrganizationMembership.objects.filter(organization=self.organization, user=self.user).delete()
elif change == "missing_installation":
self.integration.delete()
- elif change == "internal_flag_off":
- self.internal_flag.return_value = False
elif change == "full_review_published":
ReviewReport.objects.for_team(self.team.id).create(
team=self.team,
@@ -462,7 +457,6 @@ class TestLabelReviewTask(BaseTest):
self.repository = ReviewRepository.objects.for_team(self.team.id).create(
team=self.team, installation_id=_INSTALLATION_ID, full_name="PostHog/posthog", selected=True
)
- self.internal_flag = self.enterContext(patch(_INTERNAL_FLAG, return_value=True))
self.enterContext(patch(_BUSY, return_value=False))
self.start = self.enterContext(patch(_START))
self.github = self.enterContext(patch(_GITHUB))
@@ -520,16 +514,13 @@ class TestLabelReviewTask(BaseTest):
@parameterized.expand(
[
("repository_not_added", "repository_not_added"),
- ("internal_flag_off", "internal_features_off"),
("no_run_user", "no_run_user"),
]
)
- def test_a_label_without_an_owning_internal_project_starts_nothing(self, change: str, outcome: str) -> None:
+ def test_a_label_without_an_owning_project_or_run_user_starts_nothing(self, change: str, outcome: str) -> None:
queued = self._queued_event(_label_payload(login="stranger"))
if change == "repository_not_added":
self.repository.delete()
- elif change == "internal_flag_off":
- self.internal_flag.return_value = False
else:
self.integration.created_by = None
self.integration.save(update_fields=["created_by"])
diff --git a/products/review_hog/backend/tests/test_feature_flags.py b/products/review_hog/backend/tests/test_feature_flags.py
index 8fc392bc9f54..285da23ec2f6 100644
--- a/products/review_hog/backend/tests/test_feature_flags.py
+++ b/products/review_hog/backend/tests/test_feature_flags.py
@@ -3,7 +3,6 @@ from unittest.mock import MagicMock, patch
from parameterized import parameterized
-from products.review_hog.backend.internal_features import has_internal_features
from products.review_hog.backend.reviewer.feature_flags import flash_pipeline_kill_switch_on
_FEATURE_ENABLED = "products.review_hog.backend.reviewer.feature_flags.posthoganalytics.feature_enabled"
@@ -23,19 +22,3 @@ class TestFlashPipelineKillSwitch(BaseTest):
) -> None:
with patch(_FEATURE_ENABLED, feature_enabled):
assert flash_pipeline_kill_switch_on(self.team.id) is expected
-
-
-class TestInternalFeaturesFlag(BaseTest):
- @parameterized.expand(
- [
- ("flag_on", MagicMock(return_value=True), True),
- # A flag service failure must not switch on writes or automation for a project.
- ("flag_error", MagicMock(side_effect=RuntimeError("flag service down")), False),
- ]
- )
- def test_internal_features_follow_the_project_flag(
- self, _name: str, feature_enabled: MagicMock, expected: bool
- ) -> None:
- with patch("posthog.permissions.posthoganalytics.feature_enabled", feature_enabled):
- assert has_internal_features(self.team.id) is expected
- assert feature_enabled.call_args.kwargs["groups"]["project"] == str(self.team.id)
diff --git a/products/review_hog/backend/tests/test_fetch_review_tier.py b/products/review_hog/backend/tests/test_fetch_review_tier.py
index 28ac1691a9f5..b0e6a2797fa8 100644
--- a/products/review_hog/backend/tests/test_fetch_review_tier.py
+++ b/products/review_hog/backend/tests/test_fetch_review_tier.py
@@ -14,8 +14,6 @@ from products.review_hog.backend.temporal.activities import FetchPRDataInput, _f
from products.review_hog.backend.temporal.types import TRIGGER_INBOX, TRIGGER_UI
from products.signals.backend.models import SignalReport
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
-
_MODULE = "products.review_hog.backend.temporal.activities"
@@ -131,43 +129,42 @@ class TestFetchDecidesTheTier(BaseTest):
pr_metadata=_pr_metadata(), pr_comments=[], pr_files=[], diff=""
)
- with patch(_INTERNAL_FLAG, return_value=True):
- fetch_input = FetchPRDataInput(
- team_id=self.team.id,
- user_id=1,
- repository="o/r",
- owner="o",
- repo="r",
- pr_number=9,
- pr_url="https://github.com/o/r/pull/9",
- signal_report_id=str(signal_report.id),
- trigger_source=TRIGGER_INBOX,
- signal_priority="P3",
- )
- meta = _fetch_and_persist(fetch_input)
+ fetch_input = FetchPRDataInput(
+ team_id=self.team.id,
+ user_id=1,
+ repository="o/r",
+ owner="o",
+ repo="r",
+ pr_number=9,
+ pr_url="https://github.com/o/r/pull/9",
+ signal_report_id=str(signal_report.id),
+ trigger_source=TRIGGER_INBOX,
+ signal_priority="P3",
+ )
+ meta = _fetch_and_persist(fetch_input)
- row = ReviewReport.objects.for_team(self.team.id).get(id=meta.report_id)
- assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
- "agent_p3_p4",
- "P3",
- "low",
- )
- original_arm = load_review_arm(team_id=self.team.id, report_id=meta.report_id)
-
- _fetch_and_persist(replace(fetch_input, trigger_source=TRIGGER_UI, review_mode=REVIEW_MODE_FLASH))
- row.refresh_from_db()
- assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
- "agent_p3_p4",
- "P3",
- "low",
- )
- assert load_review_arm(team_id=self.team.id, report_id=meta.report_id) == original_arm
-
- _fetch_and_persist(replace(fetch_input, trigger_source=TRIGGER_UI))
- row.refresh_from_db()
- assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
- "human",
- "P3",
- "xhigh",
- )
- assert load_review_arm(team_id=self.team.id, report_id=meta.report_id) == DEFAULT_REVIEW_ARM
+ row = ReviewReport.objects.for_team(self.team.id).get(id=meta.report_id)
+ assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
+ "agent_p3_p4",
+ "P3",
+ "low",
+ )
+ original_arm = load_review_arm(team_id=self.team.id, report_id=meta.report_id)
+
+ _fetch_and_persist(replace(fetch_input, trigger_source=TRIGGER_UI, review_mode=REVIEW_MODE_FLASH))
+ row.refresh_from_db()
+ assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
+ "agent_p3_p4",
+ "P3",
+ "low",
+ )
+ assert load_review_arm(team_id=self.team.id, report_id=meta.report_id) == original_arm
+
+ _fetch_and_persist(replace(fetch_input, trigger_source=TRIGGER_UI))
+ row.refresh_from_db()
+ assert (row.review_tier, row.review_signal_priority, row.review_reasoning_effort) == (
+ "human",
+ "P3",
+ "xhigh",
+ )
+ assert load_review_arm(team_id=self.team.id, report_id=meta.report_id) == DEFAULT_REVIEW_ARM
diff --git a/products/review_hog/backend/tests/test_inbox_trigger.py b/products/review_hog/backend/tests/test_inbox_trigger.py
index dbfbbf164a7d..f42a8562bd09 100644
--- a/products/review_hog/backend/tests/test_inbox_trigger.py
+++ b/products/review_hog/backend/tests/test_inbox_trigger.py
@@ -25,7 +25,6 @@ from products.tasks.backend.models import Task, TaskRun
_START = "products.review_hog.backend.temporal.client.start_review_pr_workflow"
_WORKFLOW_RUNNING = "products.review_hog.backend.temporal.client.workflow_running"
_STAMPHOG_QUEUE = "products.stamphog.backend.facade.tasks.queue_inbox_pr_review"
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
# GitHub's own casing, as a real `output.pr_url` carries it. The task row lowercases its slug, so
# this is what lets an assertion tell the task's repository apart from the PR URL's own claim.
_PR_URL = "https://github.com/PostHog/posthog/pull/9"
@@ -40,7 +39,6 @@ class TestInboxTrigger(BaseTest):
busy_patcher = patch(_WORKFLOW_RUNNING, return_value=False)
self.addCleanup(busy_patcher.stop)
busy_patcher.start()
- self.internal_flag = self.enterContext(patch(_INTERNAL_FLAG, return_value=True))
self.signal_report = SignalReport.objects.create(
team=self.team, status=SignalReport.Status.IN_PROGRESS, signal_count=1, total_weight=1.0
)
@@ -238,28 +236,18 @@ class TestInboxTrigger(BaseTest):
mock_start.assert_not_called()
- @parameterized.expand(
- [
- # A soft-deleted task's run can still save output and re-fire the receiver; its PR is
- # disowned work, and the webhook leg already excludes deleted tasks, so the first review
- # (the one that mints the approval) must not fire either.
- ("soft_deleted_task",),
- # The settings tab hides the Inbox switches without the flag, so saved opt-ins start nothing.
- ("internal_flag_off",),
- ]
- )
@patch(_STAMPHOG_QUEUE)
@patch(_START, return_value="wf-1")
- def test_neither_review_starts(self, change: str, mock_start, mock_queue) -> None:
+ def test_a_soft_deleted_task_starts_neither_review(self, mock_start, mock_queue) -> None:
+ # A soft-deleted task's run can still save output and re-fire the receiver; its PR is
+ # disowned work, and the webhook leg already excludes deleted tasks, so the first review
+ # (the one that mints the approval) must not fire either.
self._mock_start = mock_start
self._suggest_reviewers(["alice"])
self._opt_in(self.alice, review_inbox_prs=True, stamphog_review_inbox_prs=True)
task = self._task()
- if change == "soft_deleted_task":
- task.deleted = True
- task.save(update_fields=["deleted"])
- else:
- self.internal_flag.return_value = False
+ task.deleted = True
+ task.save(update_fields=["deleted"])
self._record_output(self._run(task), {"pr_url": _PR_URL})
mock_start.assert_not_called()
@@ -464,21 +452,17 @@ class TestInboxTrigger(BaseTest):
@parameterized.expand(
[
- # (name, flags, internal, expected) — the webhook-leg resolver must key on the STAMPHOG toggle:
+ # (name, flags, expected) — the webhook-leg resolver must key on the STAMPHOG toggle:
# keying on review_inbox_prs would re-review for users who never opted into stamphog.
- ("stamphog_toggle_on", {"stamphog_review_inbox_prs": True}, True, True),
- ("only_review_hog_toggle_on", {"review_inbox_prs": True}, True, False),
- ("internal_flag_off", {"stamphog_review_inbox_prs": True}, False, False),
+ ("stamphog_toggle_on", {"stamphog_review_inbox_prs": True}, True),
+ ("only_review_hog_toggle_on", {"review_inbox_prs": True}, False),
]
)
- def test_resolve_stamphog_acting_reviewer_keys_on_the_stamphog_toggle(
- self, _name, flags, internal, expected
- ) -> None:
+ def test_resolve_stamphog_acting_reviewer_keys_on_the_stamphog_toggle(self, _name, flags, expected) -> None:
# The hook stamphog's webhook path calls before re-reviewing a self-driving PR on a later
# push — switching the toggle off mid-PR must stop new runs.
self._suggest_reviewers(["alice"])
self._opt_in(self.alice, **flags)
- self.internal_flag.return_value = internal
resolved = resolve_stamphog_acting_reviewer(self.team.id, str(self.signal_report.id), None)
diff --git a/products/review_hog/backend/tests/test_persistence.py b/products/review_hog/backend/tests/test_persistence.py
index f9da35163090..1dda84c989e0 100644
--- a/products/review_hog/backend/tests/test_persistence.py
+++ b/products/review_hog/backend/tests/test_persistence.py
@@ -3,7 +3,6 @@ from dataclasses import replace
from typing import TypeVar
from posthog.test.base import BaseTest
-from unittest.mock import patch
from parameterized import parameterized
@@ -69,8 +68,6 @@ from products.signals.backend.artefact_schemas import Commit
from products.signals.backend.enums import ReportPriority
from products.tasks.backend.facade.run_config import ReasoningEffort
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
-
_ContentT = TypeVar("_ContentT")
@@ -168,71 +165,68 @@ class TestUpsertReviewReport(BaseTest):
# path would flip a report's reviewer between turns and feed a cheap turn's findings into a
# stronger turn's "already covered" injection; a downgrade would hand a person a cheap review.
signal_report_id = str(uuid.uuid4())
- with patch(_INTERNAL_FLAG, return_value=True):
- report_id = upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- signal_report_id=signal_report_id,
- trigger_source=TRIGGER_INBOX,
- signal_priority=ReportPriority.P2,
- )
- assert self._routing(report_id) == ("agent_p2", "P2", "medium")
- # Through the real loader, not just the raw columns: the values_list → resolve positional
- # coupling would otherwise silently fall every off-default report back to the default pins.
- assert (
- load_review_arm(team_id=self.team.id, report_id=report_id) == REVIEW_ARMS_BY_TIER[ReviewTier.AGENT_P2]
- )
- assert load_review_arm(team_id=self.team.id, report_id=str(uuid.uuid4())) == DEFAULT_REVIEW_ARM
+ report_id = upsert_review_report(
+ team_id=self.team.id,
+ repository="o/r",
+ pr_url="u",
+ pr_metadata=_pr_metadata(),
+ signal_report_id=signal_report_id,
+ trigger_source=TRIGGER_INBOX,
+ signal_priority=ReportPriority.P2,
+ )
+ assert self._routing(report_id) == ("agent_p2", "P2", "medium")
+ # Through the real loader, not just the raw columns: the values_list → resolve positional
+ # coupling would otherwise silently fall every off-default report back to the default pins.
+ assert load_review_arm(team_id=self.team.id, report_id=report_id) == REVIEW_ARMS_BY_TIER[ReviewTier.AGENT_P2]
+ assert load_review_arm(team_id=self.team.id, report_id=str(uuid.uuid4())) == DEFAULT_REVIEW_ARM
- # An inbox re-turn after a re-judgment keeps the tier and the priority the decision used.
- upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- signal_report_id=signal_report_id,
- trigger_source=TRIGGER_INBOX,
- signal_priority=ReportPriority.P0,
- )
- assert self._routing(report_id) == ("agent_p2", "P2", "medium")
+ # An inbox re-turn after a re-judgment keeps the tier and the priority the decision used.
+ upsert_review_report(
+ team_id=self.team.id,
+ repository="o/r",
+ pr_url="u",
+ pr_metadata=_pr_metadata(),
+ signal_report_id=signal_report_id,
+ trigger_source=TRIGGER_INBOX,
+ signal_priority=ReportPriority.P0,
+ )
+ assert self._routing(report_id) == ("agent_p2", "P2", "medium")
- # The resolution stage upserts under the person's trigger too; a resolve-only request
- # reviews nothing, so without the review turn's opt-in the tier must hold.
- upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- trigger_source=TRIGGER_UI,
- )
- assert self._routing(report_id) == ("agent_p2", "P2", "medium")
+ # The resolution stage upserts under the person's trigger too; a resolve-only request
+ # reviews nothing, so without the review turn's opt-in the tier must hold.
+ upsert_review_report(
+ team_id=self.team.id,
+ repository="o/r",
+ pr_url="u",
+ pr_metadata=_pr_metadata(),
+ trigger_source=TRIGGER_UI,
+ )
+ assert self._routing(report_id) == ("agent_p2", "P2", "medium")
- # A person's label review lifts the report to the human tier for this and every later turn...
- upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- trigger_source=TRIGGER_LABEL,
- lift_tier_on_human_trigger=True,
- )
- assert self._routing(report_id) == ("human", "P2", "xhigh")
- assert load_review_arm(team_id=self.team.id, report_id=report_id) == DEFAULT_REVIEW_ARM
+ # A person's label review lifts the report to the human tier for this and every later turn...
+ upsert_review_report(
+ team_id=self.team.id,
+ repository="o/r",
+ pr_url="u",
+ pr_metadata=_pr_metadata(),
+ trigger_source=TRIGGER_LABEL,
+ lift_tier_on_human_trigger=True,
+ )
+ assert self._routing(report_id) == ("human", "P2", "xhigh")
+ assert load_review_arm(team_id=self.team.id, report_id=report_id) == DEFAULT_REVIEW_ARM
- # ...and a later inbox turn never lowers it back.
- upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- signal_report_id=signal_report_id,
- trigger_source=TRIGGER_INBOX,
- signal_priority=ReportPriority.P3,
- lift_tier_on_human_trigger=True,
- )
- assert self._routing(report_id) == ("human", "P2", "xhigh")
+ # ...and a later inbox turn never lowers it back.
+ upsert_review_report(
+ team_id=self.team.id,
+ repository="o/r",
+ pr_url="u",
+ pr_metadata=_pr_metadata(),
+ signal_report_id=signal_report_id,
+ trigger_source=TRIGGER_INBOX,
+ signal_priority=ReportPriority.P3,
+ lift_tier_on_human_trigger=True,
+ )
+ assert self._routing(report_id) == ("human", "P2", "xhigh")
def test_unknown_persisted_tier_degrades_instead_of_crashing_the_upsert(self) -> None:
# `review_tier` is an unconstrained column, so a newer deploy can persist a tier value this
@@ -258,23 +252,6 @@ class TestUpsertReviewReport(BaseTest):
# The unparseable value is left as-is: the lift is skipped rather than raising or relabeling.
assert ReviewReport.objects.for_team(self.team.id).get(id=report_id).review_tier == "agent_p9_from_the_future"
- def test_tiered_arms_stay_on_the_default_outside_the_rollout_teams(self) -> None:
- # The tier is recorded for every team (so the label stays truthful and the tiers can be
- # compared on their traffic), but only the dogfood teams run the cheaper arm; a gate that
- # leaks the arm would cut review strength for teams nobody enrolled.
- with patch(_INTERNAL_FLAG, return_value=False):
- report_id = upsert_review_report(
- team_id=self.team.id,
- repository="o/r",
- pr_url="u",
- pr_metadata=_pr_metadata(),
- signal_report_id=str(uuid.uuid4()),
- trigger_source=TRIGGER_INBOX,
- signal_priority=ReportPriority.P3,
- )
- assert self._routing(report_id) == ("agent_p3_p4", "P3", "xhigh")
- assert load_review_arm(team_id=self.team.id, report_id=report_id) == DEFAULT_REVIEW_ARM
-
def test_author_login_is_stamped_on_create_and_refreshed_each_turn(self) -> None:
# The "For you" scope's authored-PRs match rides this stamp. It must track the PR's current
# author (the login is the stable fact, not a login→user resolution), and a turn with
diff --git a/products/review_hog/backend/tests/test_resolution_activity.py b/products/review_hog/backend/tests/test_resolution_activity.py
index 85386bf0ab5f..6ee9a6c73dfe 100644
--- a/products/review_hog/backend/tests/test_resolution_activity.py
+++ b/products/review_hog/backend/tests/test_resolution_activity.py
@@ -103,7 +103,7 @@ def _patch_open_branch_and_opted_in_owner(test: SimpleTestCase) -> Mock:
test.enterContext(
patch(
f"{_RESOLUTION}.ResolutionGate.load",
- return_value=ResolutionGate(owner_user_id=1, owner_opted_in=True, internal_features=True),
+ return_value=ResolutionGate(owner_user_id=1, owner_opted_in=True),
)
)
return test.enterContext(
@@ -829,15 +829,14 @@ class TestFailedRunActivity(NonAtomicBaseTest):
class TestResolutionOwnerGate(BaseTest):
@parameterized.expand(
[
- ("owner_opted_in", "octocat", True, True, True),
- ("owner_did_not_opt_in", "octocat", False, True, False),
- ("internal_flag_off", "octocat", True, False, False),
+ ("owner_opted_in", "octocat", True, True),
+ ("owner_did_not_opt_in", "octocat", False, False),
# The run user's opt-in never writes to a pull request nobody owns.
- ("no_owner", "ghost", True, True, False),
+ ("no_owner", "ghost", True, False),
]
)
def test_resolution_writes_only_where_the_pr_owner_opted_in(
- self, _name: str, author_login: str, opted_in: bool, internal: bool, prepared: bool
+ self, _name: str, author_login: str, opted_in: bool, prepared: bool
) -> None:
sync_canonical_resolution(self.team)
UserSocialAuth.objects.create(user=self.user, provider="github", uid="gh-1", extra_data={"login": "octocat"})
@@ -851,7 +850,6 @@ class TestResolutionOwnerGate(BaseTest):
)
metadata = _pr_metadata().model_copy(update={"author": author_login})
with (
- patch("products.review_hog.backend.internal_features.posthog_feature_flag_enabled", return_value=internal),
patch(f"{_RESOLUTION}._installation_for", return_value=_mock_installation()),
patch(f"{_RESOLUTION}._fetch_pr_metadata", return_value=metadata),
patch(f"{_RESOLUTION}.fetch_unresolved_threads", return_value=[thread]),
diff --git a/products/review_hog/backend/tests/test_review_completed_tracking.py b/products/review_hog/backend/tests/test_review_completed_tracking.py
index 59ebcf794fd6..4d031abc3690 100644
--- a/products/review_hog/backend/tests/test_review_completed_tracking.py
+++ b/products/review_hog/backend/tests/test_review_completed_tracking.py
@@ -44,8 +44,6 @@ from products.review_hog.backend.temporal.activities import (
from products.review_hog.backend.temporal.types import TRIGGER_INBOX, TRIGGER_LABEL
from products.signals.backend.enums import ReportPriority
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
-
_PR_URL = "https://github.com/o/r/pull/7"
@@ -411,10 +409,9 @@ class TestTrackReviewCompleted(BaseTest):
# the report's first turn. The started event is the third event of a turn: a dashboard
# compares it against completed to see a lift, so it must carry the same labels.
signal_report_id = str(uuid.uuid4())
- with patch(_INTERNAL_FLAG, return_value=True):
- report_id = self._review_report(
- signal_report_id=signal_report_id, trigger_source=TRIGGER_INBOX, signal_priority=ReportPriority.P3
- )
+ report_id = self._review_report(
+ signal_report_id=signal_report_id, trigger_source=TRIGGER_INBOX, signal_priority=ReportPriority.P3
+ )
with patch("products.review_hog.backend.temporal.activities.posthoganalytics.capture") as capture:
_track_review_completed(self._tracking_input(report_id, turn_trigger_source=TRIGGER_LABEL))
diff --git a/products/review_hog/backend/tests/test_settings_api.py b/products/review_hog/backend/tests/test_settings_api.py
index e9f9a6a579d4..bdb6f3bdf116 100644
--- a/products/review_hog/backend/tests/test_settings_api.py
+++ b/products/review_hog/backend/tests/test_settings_api.py
@@ -12,8 +12,6 @@ from products.review_hog.backend.models import ReviewProjectSettings, ReviewUser
from products.skills.backend.models.skills import LLMSkill
from products.stamphog.backend.facade.testing import seed_repo_config
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
-
class TestReviewUserSettingsAPI(APIBaseTest):
# The serializer resolves stamphog_connected off the stamphog product DB on every response.
@@ -106,8 +104,7 @@ class TestReviewUserSettingsAPI(APIBaseTest):
connected_by_user_id=connected_by_user_id,
)
- with patch(_INTERNAL_FLAG, return_value=True):
- res = self.client.get(self.url)
+ res = self.client.get(self.url)
assert res.status_code == 200
assert res.json()["stamphog_connected"] is expected
diff --git a/products/review_hog/backend/tests/test_ui_trigger_api.py b/products/review_hog/backend/tests/test_ui_trigger_api.py
index a778d400906c..6a4091914119 100644
--- a/products/review_hog/backend/tests/test_ui_trigger_api.py
+++ b/products/review_hog/backend/tests/test_ui_trigger_api.py
@@ -25,7 +25,6 @@ _START_RESOLUTION = "products.review_hog.backend.requested_reviews.start_resolut
_ACCESS = "products.review_hog.backend.requested_reviews.GitHubIntegration.first_for_team_repository"
_META = "products.review_hog.backend.requested_reviews.fetch_pr_metadata"
_BUSY = "products.review_hog.backend.requested_reviews.workflow_running"
-_INTERNAL_FLAG = "products.review_hog.backend.internal_features.posthog_feature_flag_enabled"
def _pr_meta(**overrides: object) -> MagicMock:
@@ -100,8 +99,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
# the workflow as an explicit False — passing None would fall back to the user's setting, and
# a flash review that resolved would write code. Flash must also carry its mode, or the
# workflow runs the full pipeline under a flash label.
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
+ resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
self.assertEqual(resp.status_code, status.HTTP_202_ACCEPTED, resp.content)
self.assertIs(mock_start.call_args.kwargs["resolve_comments"], False)
@@ -121,21 +119,20 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
teammate = User.objects.create_and_join(self.organization, "[email protected]", None)
UserSocialAuth.objects.create(user=teammate, provider="github", uid="gh-2", extra_data={"login": "teammate"})
- with patch(_INTERNAL_FLAG, return_value=True):
- review = request_pr_review_from_comment(
- team_id=self.team.id,
- requester_id=self.user.id,
- repository="PostHog/posthog.com",
- pr_number=123,
- run_mode="review",
- )
- resolve_only = request_pr_review_from_comment(
- team_id=self.team.id,
- requester_id=self.user.id,
- repository="PostHog/posthog.com",
- pr_number=123,
- run_mode="resolve_only",
- )
+ review = request_pr_review_from_comment(
+ team_id=self.team.id,
+ requester_id=self.user.id,
+ repository="PostHog/posthog.com",
+ pr_number=123,
+ run_mode="review",
+ )
+ resolve_only = request_pr_review_from_comment(
+ team_id=self.team.id,
+ requester_id=self.user.id,
+ repository="PostHog/posthog.com",
+ pr_number=123,
+ run_mode="resolve_only",
+ )
self.assertEqual(review.workflow_id, "wf-comment-1")
self.assertEqual(mock_start.call_args.kwargs["trigger_source"], "comment")
@@ -162,22 +159,6 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
self.assertEqual(outcome.status, PRReviewRequestStatus.NOT_ALLOWED)
mock_start.assert_not_called()
- @parameterized.expand([("flash",), ("resolve_only",)])
- @patch(_META, return_value=_pr_meta())
- @patch(_ACCESS, return_value=object())
- @patch(_START_RESOLUTION)
- @patch(_START, return_value="wf-ui-1")
- def test_internal_run_modes_are_refused_without_the_internal_flag(
- self, run_mode: str, mock_start: MagicMock, mock_start_resolution: MagicMock, *_mocks: MagicMock
- ) -> None:
- with patch(_INTERNAL_FLAG, return_value=False):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
-
- self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN, resp.content)
- self.assertEqual(resp.json()["code"], "internal_feature")
- mock_start.assert_not_called()
- mock_start_resolution.assert_not_called()
-
@patch(_META, return_value=_pr_meta())
@patch(_ACCESS, return_value=object())
@patch(_START, return_value="wf-ui-1")
@@ -265,8 +246,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
base_branch="master",
published_head_sha="abc123",
)
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123/files", run_mode="resolve_only")
+ resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123/files", run_mode="resolve_only")
self.assertEqual(resp.status_code, status.HTTP_202_ACCEPTED, resp.content)
self.assertEqual(resp.json(), {"workflow_id": "wf-resolve-1", "status": "started"})
@@ -305,8 +285,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
# ids, so a dropped (or wrong-id) probe means a review racing the resolution session's
# pushes — the incident class this refusal exists for. Blocked, not queued.
self.mock_busy.return_value = True
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
+ resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
self.assertEqual(resp.status_code, status.HTTP_409_CONFLICT, resp.content)
self.assertIn(error_fragment, resp.json()["error"])
@@ -350,8 +329,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
review_initial_permission_mode=original_arm.initial_permission_mode,
)
self.mock_busy.side_effect = lambda workflow_id: workflow_id.startswith("review-pr:")
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
+ resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123", run_mode=run_mode)
self.assertEqual(resp.status_code, status.HTTP_202_ACCEPTED, resp.content)
self.assertEqual(resp.json(), {"workflow_id": "wf-ui-1", "status": "joined_running_review"})
@@ -368,10 +346,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
def test_resolve_only_mode_keeps_the_synchronous_pr_gates(self, mock_start, mock_start_resolution, _mock_access):
# Resolve-only shares the sync UX checks: a closed PR must be rejected here, in the UI,
# not die async in the resolution workflow's prepare step where nothing surfaces.
- with (
- patch(_INTERNAL_FLAG, return_value=True),
- patch(_META, return_value=_pr_meta(state="closed")),
- ):
+ with patch(_META, return_value=_pr_meta(state="closed")):
resp = self._trigger("https://github.com/PostHog/posthog.com/pull/7", run_mode="resolve_only")
self.assertEqual(resp.status_code, status.HTTP_400_BAD_REQUEST, resp.content)
@@ -421,13 +396,12 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
("get", "resolution/", {}),
("patch", "resolution/review-hog-resolution-criteria/", {"active": True}),
]
- with patch(_INTERNAL_FLAG, return_value=True):
- for method, path, data in endpoints:
- with self.subTest(method=method, path=path, data=data):
- response = getattr(self.client, method)(
- f"/api/projects/{self.team.id}/review_hog/{path}", data, format="json"
- )
- self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN, response.content)
+ for method, path, data in endpoints:
+ with self.subTest(method=method, path=path, data=data):
+ response = getattr(self.client, method)(
+ f"/api/projects/{self.team.id}/review_hog/{path}", data, format="json"
+ )
+ self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN, response.content)
mock_start.assert_not_called()
mock_start_resolution.assert_not_called()
@@ -438,8 +412,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
@patch(_START)
def test_non_pr_github_url_rejected(self, mock_start):
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog/issues/1")
+ resp = self._trigger("https://github.com/PostHog/posthog/issues/1")
self.assertEqual(resp.status_code, status.HTTP_400_BAD_REQUEST)
mock_start.assert_not_called()
@@ -447,8 +420,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
@patch(_ACCESS, return_value=None)
@patch(_START)
def test_inaccessible_repository_rejected_without_starting_a_workflow(self, mock_start, _mock_access):
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/other-org/private-repo/pull/5")
+ resp = self._trigger("https://github.com/other-org/private-repo/pull/5")
self.assertEqual(resp.status_code, status.HTTP_400_BAD_REQUEST)
self.assertIn("can't access other-org/private-repo", resp.json()["error"])
@@ -468,10 +440,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
# exists — the UI shows "started" and then nothing ever appears.
side_effect = meta_or_error if isinstance(meta_or_error, Exception) else None
return_value = None if side_effect else meta_or_error
- with (
- patch(_INTERNAL_FLAG, return_value=True),
- patch(_META, side_effect=side_effect, return_value=return_value),
- ):
+ with patch(_META, side_effect=side_effect, return_value=return_value):
resp = self._trigger("https://github.com/PostHog/posthog.com/pull/7")
self.assertEqual(resp.status_code, status.HTTP_400_BAD_REQUEST, resp.content)
@@ -513,8 +482,7 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
published_head_sha=published_head_sha,
published_heads_by_mode=published_modes,
)
- with patch(_INTERNAL_FLAG, return_value=True):
- resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123")
+ resp = self._trigger("https://github.com/PostHog/posthog.com/pull/123")
self.assertEqual(resp.status_code, expected_status, resp.content)
self.assertEqual(resp.json()["status"], expected_marker)
@@ -531,7 +499,6 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
# Both GitHub calls must map through github_rate_limited_response — an unwrapped call
# surfaces a 500 to the person clicking Review, exactly during retry-prone windows.
with (
- patch(_INTERNAL_FLAG, return_value=True),
patch(_ACCESS, return_value=object()),
patch(rate_limited_call, side_effect=GitHubRateLimitError("rate limited", retry_after=30)),
):
@@ -541,15 +508,3 @@ class TestReviewHogUiTriggerApi(APIBaseTest):
self.assertEqual(resp.json()["code"], "rate_limited")
self.assertEqual(resp["Retry-After"], "30")
mock_start.assert_not_called()
-
- @parameterized.expand([("internal_project", True), ("other_project", False)])
- @patch("products.review_hog.backend.api.settings.has_reviewable_repo_config", return_value=True)
- def test_settings_query_stamphog_only_in_internal_projects(
- self, _name: str, internal: bool, mock_stamphog: MagicMock
- ) -> None:
- with patch(_INTERNAL_FLAG, return_value=internal):
- resp = self.client.get(f"/api/projects/{self.team.id}/review_hog/settings/")
-
- self.assertEqual(resp.status_code, status.HTTP_200_OK)
- self.assertEqual(resp.json()["stamphog_connected"], internal)
- self.assertEqual(mock_stamphog.called, internal)
diff --git a/products/review_hog/frontend/CodeReviewScene.stories.tsx b/products/review_hog/frontend/CodeReviewScene.stories.tsx
index 83fa989d4f4f..5ba1a331664c 100644
--- a/products/review_hog/frontend/CodeReviewScene.stories.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.stories.tsx
@@ -345,7 +345,6 @@ const meta: Meta<typeof CodeReviewScene> = {
beforeEach: ({ parameters }) => {
storyState.settings = {
...defaultSettings,
- stamphog_connected: parameters.showInternalFeatures ?? false,
...parameters.savedSettings,
}
storyState.project = projectSettings(parameters.claimScope ?? 'all', parameters.canEdit ?? true)
@@ -552,9 +551,6 @@ export const Settings: Story = {
await expect(canvas.getByText('You can edit: project admin')).toBeVisible()
await expect(canvas.getByText('Full review settings')).toBeVisible()
await expect(canvas.queryByText('Review a pull request')).not.toBeInTheDocument()
- await expect(
- canvas.queryByLabelText('Review PRs the agent opens for Inbox reports assigned to me')
- ).not.toBeInTheDocument()
await expect(canvas.getByLabelText('Resolve comments on my pull requests')).toBeVisible()
},
}
@@ -570,28 +566,16 @@ export const SettingsForMember: Story = {
},
}
-export const InternalFeatures: Story = {
- parameters: {
- featureFlags: [FEATURE_FLAGS.REVIEW_HOG, FEATURE_FLAGS.REVIEW_HOG_INTERNAL],
- savedSettings: { stamphog_connected: true },
- tab: 'settings',
- },
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement)
- await expect(
- await canvas.findByLabelText('Review PRs the agent opens for Inbox reports assigned to me')
- ).toBeVisible()
- await expect(canvas.getByLabelText('Let Stamphog review my Inbox PRs')).toBeVisible()
- },
-}
-
export const SavedInboxOptIns: Story = {
parameters: { savedSettings: { review_inbox_prs: true, stamphog_review_inbox_prs: true }, tab: 'settings' },
play: async ({ canvasElement }) => {
const canvas = within(canvasElement)
- const inboxSwitch = await canvas.findByLabelText('Review PRs the agent opens for Inbox reports assigned to me')
+ const inboxLabel = 'Review PRs the agent opens for Inbox reports assigned to me'
+ // The Inbox section renders before the settings load and can re-render with new nodes,
+ // so query again on every attempt until the saved values arrive.
+ await waitFor(() => expect(canvas.getByLabelText(inboxLabel)).toBeChecked(), { timeout: 5000 })
+ const inboxSwitch = canvas.getByLabelText(inboxLabel)
const stamphogSwitch = canvas.getByLabelText('Let Stamphog review my Inbox PRs')
- await expect(inboxSwitch).toBeChecked()
await expect(inboxSwitch).toBeEnabled()
await expect(stamphogSwitch).toBeChecked()
await expect(stamphogSwitch).toBeEnabled()
diff --git a/products/review_hog/frontend/CodeReviewScene.tsx b/products/review_hog/frontend/CodeReviewScene.tsx
index 4f377d7fc386..412c05db46c3 100644
--- a/products/review_hog/frontend/CodeReviewScene.tsx
+++ b/products/review_hog/frontend/CodeReviewScene.tsx
@@ -661,8 +661,6 @@ function RecentReviewsSection(): JSX.Element | null {
function TriggerReviewSection(): JSX.Element {
const { triggerPrUrl, triggeringReview, triggerUrlResolving, triggerUrlHasFullReview } =
useValues(reviewHogSettingsLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- const showInternalFeatures = !!featureFlags[FEATURE_FLAGS.REVIEW_HOG_INTERNAL]
const { setTriggerPrUrl, submitTriggerReview } = useActions(reviewHogSettingsLogic)
const noUrlReason = !triggerPrUrl.trim() ? 'Paste a pull request URL first' : undefined
@@ -714,29 +712,23 @@ function TriggerReviewSection(): JSX.Element {
>
Review without resolving comments
</LemonButton>
- {showInternalFeatures && (
- <LemonButton
- fullWidth
- onClick={() =>
- submitTriggerReview(ReviewTriggerRequestRunModeEnumApi.ResolveOnly)
- }
- tooltip="Skip the review and only work through the pull request's existing unresolved comment threads."
- >
- Only resolve existing comments
- </LemonButton>
- )}
- {showInternalFeatures && (
- <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."
- disabledReason={flashAfterFullReason}
- >
- Review in Flash mode
- </LemonButton>
- )}
+ <LemonButton
+ fullWidth
+ onClick={() =>
+ submitTriggerReview(ReviewTriggerRequestRunModeEnumApi.ResolveOnly)
+ }
+ tooltip="Skip the review and only work through the pull request's existing unresolved comment threads."
+ >
+ Only resolve existing comments
+ </LemonButton>
+ <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."
+ disabledReason={flashAfterFullReason}
+ >
+ Review in Flash mode
+ </LemonButton>
</>
),
},
diff --git a/products/review_hog/frontend/generated/api.schemas.ts b/products/review_hog/frontend/generated/api.schemas.ts
index ab6f0bcf695d..1171bc52845f 100644
--- a/products/review_hog/frontend/generated/api.schemas.ts
+++ b/products/review_hog/frontend/generated/api.schemas.ts
@@ -1068,24 +1068,21 @@ export interface ReviewTriggerResponseApi {
/**
* * `flash_after_full` - Flash after a published Full review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
- * * `internal_feature` - Not available in this project
*/
export type ReviewRequestRefusalEnumApi = (typeof ReviewRequestRefusalEnumApi)[keyof typeof ReviewRequestRefusalEnumApi]
export const ReviewRequestRefusalEnumApi = {
FlashAfterFull: 'flash_after_full',
ResolutionNotOptedIn: 'resolution_not_opted_in',
- InternalFeature: 'internal_feature',
} as const
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), 'internal_feature' (the run mode is not available in this project). 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 Full 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
- * * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
- * * `internal_feature` - Not available in this project */
+ * * `resolution_not_opted_in` - The pull request owner has not opted in to resolution */
code?: ReviewRequestRefusalEnumApi
}
diff --git a/products/review_hog/frontend/settings/InboxSection.tsx b/products/review_hog/frontend/settings/InboxSection.tsx
index 5256a5d7dd0a..63b6e79ef62d 100644
--- a/products/review_hog/frontend/settings/InboxSection.tsx
+++ b/products/review_hog/frontend/settings/InboxSection.tsx
@@ -2,30 +2,15 @@ import { useActions, useValues } from 'kea'
import { LemonSwitch } from '@posthog/lemon-ui'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
-
import { YouMark } from 'products/review_hog/frontend/repositories/YouMark'
import { reviewHogSettingsLogic } from 'products/review_hog/frontend/reviewHogSettingsLogic'
import { SettingRow } from './SettingRow'
import { SettingsTable } from './SettingsTable'
-/**
- * Inbox reviews are internal for now. A switch that is on stays visible anywhere, so the user can
- * still turn it off.
- */
-export function InboxSection(): JSX.Element | null {
+export function InboxSection(): JSX.Element {
const { settings, settingsLoading } = useValues(reviewHogSettingsLogic)
const { updateSettings } = useActions(reviewHogSettingsLogic)
-
- const { featureFlags } = useValues(featureFlagLogic)
- const internal = !!featureFlags[FEATURE_FLAGS.REVIEW_HOG_INTERNAL]
- const showInbox = internal || (settings?.review_inbox_prs ?? false)
- const showStamphog = internal || (settings?.stamphog_review_inbox_prs ?? false)
- if (!showInbox && !showStamphog) {
- return null
- }
const disabledReason = settings === null ? 'Loading…' : settingsLoading ? 'Saving…' : undefined
return (
@@ -33,50 +18,46 @@ export function InboxSection(): JSX.Element | null {
title="Inbox"
description="Pull requests the PostHog agent opens for Inbox reports. The PostHog app authors them, so the report's assigned reviewer counts as their owner."
>
- {showInbox && (
- <SettingRow
- title="Review PRs the agent opens for Inbox reports assigned to me"
- description="Full review today. Moves to Flash once Flash is stable."
- project={<span className="text-xs text-secondary">Default: off</span>}
- mine={
- <>
- <YouMark shown={settings?.review_inbox_prs ?? false} />
- <LemonSwitch
- aria-label="Review PRs the agent opens for Inbox reports assigned to me"
- checked={settings?.review_inbox_prs ?? false}
- onChange={(checked) => updateSettings({ review_inbox_prs: checked })}
- disabledReason={disabledReason}
- data-attr="review-hog-review-inbox-prs"
- />
- </>
- }
- />
- )}
- {showStamphog && (
- <SettingRow
- title="Let Stamphog review my Inbox PRs"
- description="Stamphog reviews the same pull requests and approves them when they pass."
- project={<span className="text-xs text-secondary">Default: off</span>}
- mine={
- <>
- <YouMark shown={settings?.stamphog_review_inbox_prs ?? false} />
- <LemonSwitch
- aria-label="Let Stamphog review my Inbox PRs"
- checked={settings?.stamphog_review_inbox_prs ?? false}
- onChange={(checked) => updateSettings({ stamphog_review_inbox_prs: checked })}
- disabledReason={
- // A switch that is already on stays usable while disconnected, so
- // turning it off never requires connecting Stamphog first.
- settings && !settings.stamphog_connected && !settings.stamphog_review_inbox_prs
- ? 'Connect a repository to Stamphog first. Stamphog is not set up for this project yet.'
- : disabledReason
- }
- data-attr="review-hog-stamphog-review-inbox-prs"
- />
- </>
- }
- />
- )}
+ <SettingRow
+ title="Review PRs the agent opens for Inbox reports assigned to me"
+ description="Full review today. Moves to Flash once Flash is stable."
+ project={<span className="text-xs text-secondary">Default: off</span>}
+ mine={
+ <>
+ <YouMark shown={settings?.review_inbox_prs ?? false} />
+ <LemonSwitch
+ aria-label="Review PRs the agent opens for Inbox reports assigned to me"
+ checked={settings?.review_inbox_prs ?? false}
+ onChange={(checked) => updateSettings({ review_inbox_prs: checked })}
+ disabledReason={disabledReason}
+ data-attr="review-hog-review-inbox-prs"
+ />
+ </>
+ }
+ />
+ <SettingRow
+ title="Let Stamphog review my Inbox PRs"
+ description="Stamphog reviews the same pull requests and approves them when they pass."
+ project={<span className="text-xs text-secondary">Default: off</span>}
+ mine={
+ <>
+ <YouMark shown={settings?.stamphog_review_inbox_prs ?? false} />
+ <LemonSwitch
+ aria-label="Let Stamphog review my Inbox PRs"
+ checked={settings?.stamphog_review_inbox_prs ?? false}
+ onChange={(checked) => updateSettings({ stamphog_review_inbox_prs: checked })}
+ disabledReason={
+ // A switch that is already on stays usable while disconnected, so
+ // turning it off never requires connecting Stamphog first.
+ settings && !settings.stamphog_connected && !settings.stamphog_review_inbox_prs
+ ? 'Connect a repository to Stamphog first. Stamphog is not set up for this project yet.'
+ : disabledReason
+ }
+ data-attr="review-hog-stamphog-review-inbox-prs"
+ />
+ </>
+ }
+ />
</SettingsTable>
)
}
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 9398ff6ced04..c7c3368025bd 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -95895,7 +95895,6 @@ export namespace Schemas {
/**
* * `flash_after_full` - Flash after a published Full review
* * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
- * * `internal_feature` - Not available in this project
*/
export type ReviewRequestRefusalEnum = typeof ReviewRequestRefusalEnum[keyof typeof ReviewRequestRefusalEnum];
@@ -95903,7 +95902,6 @@ export namespace Schemas {
export const ReviewRequestRefusalEnum = {
FlashAfterFull: 'flash_after_full',
ResolutionNotOptedIn: 'resolution_not_opted_in',
- InternalFeature: 'internal_feature',
} as const;
/**
@@ -95937,11 +95935,10 @@ 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), 'internal_feature' (the run mode is not available in this project). 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 Full 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
- * * `resolution_not_opted_in` - The pull request owner has not opted in to resolution
- * * `internal_feature` - Not available in this project */
+ * * `resolution_not_opted_in` - The pull request owner has not opted in to resolution */
code?: ReviewRequestRefusalEnum;
}