:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(reviewhog): rename reviewing-stage progress label to match its counter (#71036)
Alex Lebedev99922531171e
diff --git a/products/review_hog/ARCHITECTURE.md b/products/review_hog/ARCHITECTURE.mdindex ac8fc3469c8b..3444f647eae1 100644--- a/products/review_hog/ARCHITECTURE.md+++ b/products/review_hog/ARCHITECTURE.md@@ -49,8 +49,8 @@ Check these four things before a local `run_review`; don't re-derive them from cWithout them the Modal sandboxes can't reach the local backend / gateway / MCP.3. **Target PR is reviewable** — non-fork (fork PRs are rejected at fetch) and open. Drafts AREreviewed and published (there is no draft gate) — warn the user before publishing on someone's- draft. The PR's additions count picks the chunking path: ≤1000 single chunk (no chunking LLM),- ≤5000 one-shot LLM chunking, above that sandbox chunking (slowest).+ draft. The PR's reviewable additions count picks the chunking path: ≤400 single chunk (no+ chunking LLM), ≤5000 one-shot LLM chunking, above that sandbox chunking (slowest).4. **Prior state** — check for an existing report so you know whether this is a fresh r1 or are-review (same-SHA re-runs no-op at publish via the marker + `published_head_sha`):@@ -265,6 +265,21 @@ 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'scoverage matrix as the guard); kill if valid findings drop with the noise.+### ✅ BUILT 2026-07-15 — reviewing-stage progress copy: "Reviewing chunks" → "Running review passes"++Live misread on [posthog#71025](https://github.com/PostHog/posthog/pull/71025) (63 additions): the+status comment read "Step 3/6 · Reviewing chunks · 2/3" and the author concluded the deterministic+single-chunk gate had failed and split a tiny PR into 3 chunks. It hadn't — the persisted selection+artefact showed one chunk (2 selected perspectives + the blind-spot unit = 3 review units, 2 done),+and no chunking `$ai_generation` ran for the PR. The reviewing-stage counter has always counted+(pass, chunk) review units, but the PR comment glued it onto a chunk-flavored label; the app UI+renders a percentage, so only the comment invited the misread. Fix: the stage label is now "Running+review passes" on both surfaces (`_STAGE_LABELS` + FE `progressLabel` — they must tell the same+story), so the comment's raw `done/total` counter names its true unit. Grilled with the user+2026-07-15: chunk count deliberately NOT added to the line ("keep it lean" — it stays visible in the+drawer's Chunks tab). Same pass fixed the Preflight section's stale chunking-path numbers (still+said the pre-2026-07-02 ≤1000 gate; the code's `SINGLE_CHUNK_GATE_ADDITIONS` is 400).+### ✅ BUILT 2026-07-08 — GitHub I/O moved to the gated egress transport (PyGithub removed)The `pygithub==2.7.0` dependency is gone; every ReviewHog GitHub call now goes throughdiff --git a/products/review_hog/backend/reviewer/status_comment.py b/products/review_hog/backend/reviewer/status_comment.pyindex da2c4564e819..25a40f2acd34 100644--- a/products/review_hog/backend/reviewer/status_comment.py+++ b/products/review_hog/backend/reviewer/status_comment.py@@ -49,7 +49,7 @@ _STAGE_LABELS = {"fetching": "Step 1/6 · Preparing the diff","chunking": "Step 1/6 · Splitting into chunks","selecting": "Step 2/6 · Picking perspectives",- "reviewing": "Step 3/6 · Reviewing chunks",+ "reviewing": "Step 3/6 · Running review passes","deduplicating": "Step 4/6 · Merging overlapping findings","validating": "Step 5/6 · Validating findings","finalizing": "Step 6/6 · Finalizing the review",diff --git a/products/review_hog/backend/tests/test_status_comment.py b/products/review_hog/backend/tests/test_status_comment.pyindex 8b653db41516..ca38c00695fe 100644--- a/products/review_hog/backend/tests/test_status_comment.py+++ b/products/review_hog/backend/tests/test_status_comment.py@@ -32,7 +32,7 @@ _INTEGRATION = f"{_MODULE}.GitHubIntegration"_STAGE_LINE_CASES: list[tuple[dict[str, Any] | None, str]] = [(None, "Step 1/6 · Preparing the diff"),({"review_stage": "chunking", "done": None, "total": None}, "Step 1/6 · Splitting into chunks"),- ({"review_stage": "reviewing", "done": 7, "total": 18}, "Step 3/6 · Reviewing chunks · 7/18"),+ ({"review_stage": "reviewing", "done": 7, "total": 18}, "Step 3/6 · Running review passes · 7/18"),({"review_stage": "validating", "done": 2, "total": None}, "Step 5/6 · Validating findings"),]diff --git a/products/review_hog/frontend/CodeReviewScene.tsx b/products/review_hog/frontend/CodeReviewScene.tsxindex 87d92cfa95f2..e030b42cee93 100644--- a/products/review_hog/frontend/CodeReviewScene.tsx+++ b/products/review_hog/frontend/CodeReviewScene.tsx@@ -304,7 +304,7 @@ function progressLabel(review: ReviewRecentReviewApi): string {case 'selecting':return 'Step 2/6 · Picking perspectives'case 'reviewing':- return `Step 3/6 · Reviewing chunks${percent}`+ return `Step 3/6 · Running review passes${percent}`case 'deduplicating':return 'Step 4/6 · Merging overlapping findings'case 'validating':