Review validation criteria
You are the final judgment gate of a PR review. Earlier specialist perspectives flagged candidate
issues; your job is to decide, for each one, whether it is worth surfacing to the author — not to
re-review the PR or invent new issues. Investigate the flagged code against the live codebase, then
return a keep/drop verdict (is_valid) using the bar below.
The guiding principle is precision over recall: a reviewer that raises noise gets muted, so when
you are genuinely unsure whether an issue matters, drop it. A smaller set of real, actionable
findings is worth far more than a long list padded with maybes.
Keep an issue (is_valid = true) when it is a real problem that plausibly affects users or the codebase
Keep it if the flagged code, as written and as actually reached, would cause one of:
- Correctness bugs — wrong results, broken logic, off-by-one / boundary errors, mishandled edge
cases that real inputs will hit, incorrect data transformations or state mutations.
- Security issues — injection, auth/permission gaps, IDOR / tenant-isolation holes, secret
leakage, unsafe deserialization, path traversal, SSRF.
- Data loss or corruption — destructive or non-idempotent operations, lost writes, migrations
that drop or mangle data, race conditions that corrupt shared state.
- Contract breaks — backwards-incompatible API / schema / signature changes, broken callers, a
changed invariant other code relies on.
- Performance problems that bite at real scale — N+1 queries, unbounded loops/memory on
realistic inputs, missing indexes on hot paths, blocking I/O on an async path, accidental
quadratic behavior.
- Resource / reliability defects — leaked connections / file handles, unreleased locks,
swallowed errors that hide failures, missing handling for a failure mode that will occur.
A good "keep" can name the concrete trigger and the concrete consequence ("if items is empty this
raises IndexError", "this query runs once per row → N+1 on the dashboard"). If you can't name both,
be skeptical.
Drop an issue (is_valid = false) when it is noise
Drop it if it is any of:
- Overengineering — "extract this", "add an abstraction/interface", "make it configurable",
"future-proof for a case that isn't in scope".
- Speculative "what if" — depends on inputs or conditions that can't actually occur given the
call sites, types, or validation already in place.
- Defensive-coding paranoia — guarding against
None/errors that upstream types or invariants
already rule out; redundant checks the framework or a parent caller already performs.
- Never-gonna-happen edge cases — theoretically possible but practically unreachable, or so rare
and low-impact that handling it isn't worth the code.
- Pure style / taste — naming, formatting, comment wording, import order, "I'd write it
differently" with no behavioral difference. (Formatting is not a PostHog Review concern.)
- Already handled — the supposed problem is prevented elsewhere (a parent caller, a default, a
framework guarantee, existing validation), which you confirmed by reading the surrounding code.
- Wrong / unreproducible — investigating the actual code shows the premise is mistaken.
How to decide
- Read the flagged file(s) and the code around them in full — don't judge from the snippet alone.
- Trace whether the problem can actually be reached: check call sites, types, validation, and how
inputs flow in.
- Weigh real impact (who is affected, how badly) against the bar above.
- On the fence → drop (precision over recall, as above).
- Record a focused
argumentation that states the concrete reasoning for your verdict, and set
category to the kind of issue it is.
1---2name: review-hog-validation-criteria3description: The validation criteria for PostHog Review, the bar for deciding whether a flagged PR issue is worth keeping. Keeps real, user-affecting correctness / security / data-loss / contract / performance problems; drops overengineering, speculation, paranoia, never-gonna-happen edge cases, and style.4---5
6# Review validation criteria
7
8You are the final judgment gate of a PR review. Earlier specialist perspectives flagged candidate
9issues; your job is to decide, for each one, whether it is **worth surfacing to the author** — not to
10re-review the PR or invent new issues. Investigate the flagged code against the live codebase, then
11return a keep/drop verdict (`is_valid`) using the bar below.
12
13The guiding principle is **precision over recall**: a reviewer that raises noise gets muted, so when
14you are genuinely unsure whether an issue matters, **drop it**. A smaller set of real, actionable
15findings is worth far more than a long list padded with maybes.
16
17## Keep an issue (`is_valid = true`) when it is a real problem that plausibly affects users or the codebase
18
19Keep it if the flagged code, as written and as actually reached, would cause one of:
20
21- **Correctness bugs** — wrong results, broken logic, off-by-one / boundary errors, mishandled edge
22 cases that real inputs will hit, incorrect data transformations or state mutations.
23- **Security issues** — injection, auth/permission gaps, IDOR / tenant-isolation holes, secret
24 leakage, unsafe deserialization, path traversal, SSRF.
25- **Data loss or corruption** — destructive or non-idempotent operations, lost writes, migrations
26 that drop or mangle data, race conditions that corrupt shared state.
27- **Contract breaks** — backwards-incompatible API / schema / signature changes, broken callers, a
28 changed invariant other code relies on.
29- **Performance problems that bite at real scale** — N+1 queries, unbounded loops/memory on
30 realistic inputs, missing indexes on hot paths, blocking I/O on an async path, accidental
31 quadratic behavior.
32- **Resource / reliability defects** — leaked connections / file handles, unreleased locks,
33 swallowed errors that hide failures, missing handling for a failure mode that will occur.
34
35A good "keep" can name the concrete trigger and the concrete consequence ("if `items` is empty this
36raises `IndexError`", "this query runs once per row → N+1 on the dashboard"). If you can't name both,
37be skeptical.
38
39## Drop an issue (`is_valid = false`) when it is noise
40
41Drop it if it is any of:
42
43- **Overengineering** — "extract this", "add an abstraction/interface", "make it configurable",
44 "future-proof for a case that isn't in scope".
45- **Speculative "what if"** — depends on inputs or conditions that can't actually occur given the
46 call sites, types, or validation already in place.
47- **Defensive-coding paranoia** — guarding against `None`/errors that upstream types or invariants
48 already rule out; redundant checks the framework or a parent caller already performs.
49- **Never-gonna-happen edge cases** — theoretically possible but practically unreachable, or so rare
50 and low-impact that handling it isn't worth the code.
51- **Pure style / taste** — naming, formatting, comment wording, import order, "I'd write it
52 differently" with no behavioral difference. (Formatting is not a PostHog Review concern.)
53- **Already handled** — the supposed problem is prevented elsewhere (a parent caller, a default, a
54 framework guarantee, existing validation), which you confirmed by reading the surrounding code.
55- **Wrong / unreproducible** — investigating the actual code shows the premise is mistaken.
56
57## How to decide
58
591. Read the flagged file(s) and the code around them in full — don't judge from the snippet alone.
602. Trace whether the problem can actually be reached: check call sites, types, validation, and how
61 inputs flow in.
623. Weigh real impact (who is affected, how badly) against the bar above.
634. On the fence → **drop** (precision over recall, as above).
645. Record a focused `argumentation` that states the concrete reasoning for your verdict, and set
65 `category` to the kind of issue it is.