Skip to content

fix(reviewhog): rename reviewing-stage progress label to match its counter - #71036

Merged
sortafreel merged 4 commits into
masterfrom
posthog-code/reviewhog-progress-label-review-passes
Jul 15, 2026
Merged

fix(reviewhog): rename reviewing-stage progress label to match its counter#71036
sortafreel merged 4 commits into
masterfrom
posthog-code/reviewhog-progress-label-review-passes

Conversation

@sortafreel

Copy link
Copy Markdown
Contributor

Problem

The ReviewHog PR status comment showed Step 3/6 · Reviewing chunks · 2/3 on a 63-addition PR (#71025), which reads as "this tiny PR was split into 3 chunks" and looks like the deterministic single-chunk gate (SINGLE_CHUNK_GATE_ADDITIONS = 400) failed.

It hadn't. That run's persisted perspective-selection artefact shows exactly one chunk, and no chunking LLM call ran for the PR. The reviewing-stage counter counts (perspective, chunk) review units - 2 selected perspectives plus the blind-spot pass = 3 units on one chunk, 2 done at that moment - but the comment glued that counter onto a chunk-flavored label. The in-app UI renders a percentage, so only the PR comment invited the misread.

Why: a ReviewHog user read the status comment as the chunking gate breaking on a small PR and asked for an investigation - the gate works, the copy was the bug.

Changes

  • Reviewing-stage label is now Step 3/6 · Running review passes in both the PR status comment (_STAGE_LABELS) and the in-app progress row (progressLabel), so the raw done/total counter names its true unit. The two surfaces intentionally keep telling the same story.
  • ARCHITECTURE.md: fixed the Preflight section's stale chunking-path numbers (still described the old ≤1000 single-chunk gate; the code's gate is ≤400 reviewable additions) and logged this change as a dated entry.

How did you test this code?

  • Updated the existing parameterized expectation in test_status_comment.py to the new label (copy change only, no new tests - the existing test already covers the stage-line rendering).
  • ruff check and ruff format --check pass on the touched Python files. The sandbox had no runnable Python/Django test env or hogli venv, so the backend test run is left to CI; the frontend change is a string literal inside an existing template literal.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

Covered in this PR (ARCHITECTURE.md).

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

I (well, Claude via PostHog Code) traced the reported "3 chunks on a 60-line PR" from the status-comment screenshot to the run's actual telemetry: the run's perspective-selection output recorded a single chunk with 2 perspectives selected, and only 3 one-shot chunking calls existed in the whole 2-day window - none for this PR. So the deterministic gate engaged as designed and the "3" was the expected review-unit total. Fix options were confirmed with the driver before implementing: rename on both surfaces (chosen), versus naming the unit in the counter or switching the comment to a percentage; adding the chunk count to the line was offered and declined to keep the copy lean.


Created with PostHog Code

…unter

The status comment's reviewing-stage line rendered a review-unit counter
(perspective passes + blind-spot per chunk) next to the label "Reviewing
chunks", so "· 2/3" on a single-chunk PR read as "split into 3 chunks".
Rename the stage label to "Running review passes" on both the PR comment
and the in-app progress row, and fix ARCHITECTURE.md's stale chunking-path
gate numbers (the single-chunk gate is 400 reviewable additions, not 1000).

Generated-By: PostHog Code
Task-Id: e96ff782-c328-4484-9eae-af601dff8865
@sortafreel sortafreel self-assigned this Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hey @sortafreel! 👋

It looks like your git author email on this PR isn't your @posthog.com address (woutut@gmail.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Bundle size — 🔺 +5 B (+0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 64.77 MiB · 🔺 +5 B (+0.0%)

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.22 MiB · 22 files no change ███░░░░░░░ 28.4% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.15 MiB · 2,978 files no change █████████░ 88.1% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
762 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
281.1 KiB ../node_modules/.pnpm/posthog-js@1.401.0/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
235.5 KiB src/taxonomy/core-filter-definitions-by-group.json
222.7 KiB ../node_modules/.pnpm/posthog-js@1.401.0/node_modules/posthog-js/dist/module.js
164.0 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
106.1 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
92.7 KiB ../packages/quill/packages/quill/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

Dist folder size — 🔺 +10 B (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1308.10 MiB · 🔺 +10 B (+0.0%)

@sortafreel
sortafreel marked this pull request as ready for review July 15, 2026 11:49
Copilot AI review requested due to automatic review settings July 15, 2026 11:49
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ✅ ready

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds — a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit 9f600e9 · box box-bdb033d6fcef · ready in 792s (push → usable) · build log · rebuilds on every push, torn down on close

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 15, 2026 11:50
@sortafreel sortafreel added the stamphog Request AI approval (no full review) label Jul 15, 2026
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(reviewhog): rename reviewing-stage p..." | Re-trigger Greptile

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure copy-label rename (status comment + matching FE string) with docs and test updated to match; no behavior, schema, or API change, and it's outside risky territory with a STRONG-familiarity owning-team author.

  • Author wrote 100% of the modified lines and has 3 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 4L, 2F substantive, 25L/4F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (25L, 4F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 71c32c4 · reviewed head daed48a

@trunk-io

trunk-io Bot commented Jul 15, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a misleading ReviewHog “reviewing” stage label so the done/total counter shown in the PR status comment is not misread as a chunk counter, and aligns the same label in the in-app UI. It also updates ReviewHog architecture documentation to reflect the current single-chunk gate threshold.

Changes:

  • Renamed the “reviewing” stage progress label to “Step 3/6 · Running review passes” in both the backend PR status comment and the frontend progress UI.
  • Updated the backend status-comment rendering test expectation to match the new label.
  • Updated ReviewHog ARCHITECTURE.md preflight chunking-path numbers and added a dated changelog entry describing the label change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
products/review_hog/frontend/CodeReviewScene.tsx Updates the in-app progress label for the reviewing stage.
products/review_hog/backend/tests/test_status_comment.py Updates the stage-line expectation to match the new label.
products/review_hog/backend/reviewer/status_comment.py Updates the PR status comment _STAGE_LABELS mapping for the reviewing stage.
products/review_hog/ARCHITECTURE.md Updates documented chunking thresholds and records the label change in the build log.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
github-actions Bot requested a deployment to preview-pr-71036 July 15, 2026 12:08 In progress
@sortafreel
sortafreel enabled auto-merge (squash) July 15, 2026 12:09
…ew-passes

Generated-By: PostHog Code
Task-Id: e96ff782-c328-4484-9eae-af601dff8865
@sortafreel
sortafreel merged commit 9992253 into master Jul 15, 2026
254 checks passed
@sortafreel
sortafreel deleted the posthog-code/reviewhog-progress-label-review-passes branch July 15, 2026 13:11
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-15 13:48 UTC Run
prod-us ✅ Deployed 2026-07-15 14:18 UTC Run
prod-eu ✅ Deployed 2026-07-15 14:19 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants