# ReviewDebt: a practical framework for scoring every pull request — Sachin Gupta, Ebay
<!--
ref: @content/youtube/aie/2026-07-12-reviewdebt-scoring-every-pull-request
version: 3
updated_at: 2026-10-31T19:11:03.869Z
-->

Sachin Gupta (AI Engineer, 2026-07-12): Gupta's claim is narrow and deliberately not anti-AI: coding agents are accumulating a debt nobody is measuring — the gap between code the agent produced and code humans have reviewed, trusted, and understood.

*Synthesized from Sachin Gupta on AI Engineer, 2026-07-12.*

Sachin Gupta is a software engineer at eBay presenting ReviewDebt, a deterministic scoring framework for the gap between what coding agents produce and what humans actually review.

## Core Thesis

Gupta's claim is narrow and deliberately not anti-AI: coding agents are accumulating a debt nobody is measuring — the gap between code the agent produced and code humans have reviewed, trusted, and understood. It behaves less like technical debt than like financial debt, because it compounds and accrues interest paid in human attention. His answer is a deterministic score from 0-100 built from five signal families and ten computable checks, run on every PR, with the *slope* over time mattering more than any single level.

## Key Insights

- **The measurement gap.** GitHub's October 2025 report, covering essentially every public pull request, shows commits up **25% year over year** while comments — the proxy for review activity — dropped **27%** in the same year. Production volume and review attention moved in opposite directions.
- **Faros AI's 2026 benchmark** on AI-adopting teams: median PR review time up **441.5%**, meaning reviewed PRs take **5.4x** longer than before, and **31% more PRs are merged with no review at all**.
- Faros AI's "Acceleration Whiplash" benchmark (April 2026; **22,000 developers, 4,000 teams**) shows PRs per developer up **16%**. The DX 2026 study (**400 organizations, 16 months** of longitudinal data) shows median PR size up **63%** — from **44 lines to 72 lines**. Cycle time open-to-merge is modestly down. PR throughput grew about **8%** while AI usage rose about **65%**.
- Gupta's verdict on those figures: every number is real, and every one is a vanity metric. PR count rises when one PR splits into seven. Growing median PR size is bloating, not benefit. Cycle time falls when reviewers stop pushing back. They measure the speed of production, not the speed of trust — and the actual gain is smaller than the hype.
- The qualitative symptoms he names: reviewer fatigue; **late-night merges** where a PR sits unreviewed for three or four days then gets a thumbs-up at 11 p.m. before a Friday deadline; **test theater**, where tests assert what the code does rather than what it should do, locking in bugs; **architectural drift**, the same problem solved three different ways in three files with nobody holding the line; and **incident lag**, where breakage surfaces weeks or months after merge and is never traced back to the AI-authored change.
- **Three compounding loops.** (1) The agent learns from your codebase via fine-tuning, RAG grounding, and in-context suggestions, so under-reviewed code grounds tomorrow's PR — the debt is *generative*. (2) Reviewers cede architectural calls: when most of a PR was generated, attention contracts to syntax and obvious bugs, and big-picture decisions move from review time to never. (3) Velocity expectations reset — once leadership sees the new throughput, reviewers are not hired in proportion, so no slack remains to repay the debt.
- **Deterministic, explicitly not LLM-judged.** All ten checks compute from a PR and its repository with no language model. Gupta's reasoning: an LLM judge makes the score a moving target (the same PR scores differently after a model change) and makes it indefensible in an engineering review — you cannot put it in front of leadership. Traceability to a deterministic computation is the requirement.
- **Signal family 1 — diff size and coupling.** Net lines changed, files touched, whether changes cluster in one module or sprawl. Agents are biased toward fixing at the call site while a human engineer routes the fix to the root cause, which keeps the diff small; an agent reaches into many files chasing the same symptom. Review cost of a sprawling diff is steeper than proportional, because cross-file coupling explodes the mental model a reviewer must hold.
- **Signal family 2 — test evidence gap.** Test lines added divided by production lines added per PR. AI-authored PRs consistently ship a far lower test-to-code ratio, sometimes with no test file at all. Gupta is explicit that the ratio only measures whether tests showed up; it cannot capture the deeper problem that generated tests assert current behavior including bugs.
- **Signal family 3 — directory and ownership spread.** Count the distinct CODEOWNERS teams whose files appear in the diff. A well-shaped PR concentrates in one team's directory. When a PR spans several, no single human holds the whole mental model, you need multiple approvals across multiple contexts, and the coordination overhead easily exceeds the time the agent saved. Gupta's framing of the economics: the agent gave you three hours of typing, and you spend those three hours in multi-party reviewer attention.
- **Signal family 4 — AI authorship indicators.** Three detection modes: the co-authored footer (e.g. "Co-authored-by: Copilot") — the strongest signal; branch-name patterns with codex / copilot / cursor prefixes; and "generated by" / "assisted by" phrases in PR bodies and commit messages. Across the three scanned repos the co-authored footer scored highest, while repo C registered **0%** despite agent use, presumably because the footers were suppressed.
- Gupta is emphatic this family is not blame. The scanner's own output states the check is information only, not a definitive claim, and not a penalty on its own. It exists so agent-shaped PRs draw extra reviewer attention.
- **Signal family 5 — evidence and rationale gaps.** Does the PR explain the *why* or only the *what*? His high-gap example from a public repo: title "Fix leaky test," PR body **18 characters**, commit message "updates." The low-gap counterpart carries symptom, diagnosis, change, and a link to the benchmark. In his regression fixtures this signal destroys reviewability fastest; in real open-source data it fires rarely because bodies follow conventional-commit format.
- **Scoring bands (0-100, weights are defaults to be recalibrated):** 0-24 very low review burden; 25-49 normal, standard care; 50-74 needs evidence from the author before senior review; 75+ high — split the PR or request more context.
- **Scanner behavior on a clean PR:** score 0/100, low review burden, **6 estimated minutes**, no checks fired, and empty reviewer-focus and author-next-action lists. Gupta's design point: the framework only emits advice when it has something specific to say, so a healthy PR produces a tiny, almost ceremonial report and running it on every PR costs one "looks good" comment.
- **Scanner behavior on a high-debt PR (real, from the regression suite):** score **60/100**, "needs evidence" band, **86 estimated minutes** of review effort. Output is not just a score but a fired-checks list, a reviewer-focus list, and an author-next-action list for bringing the score down. Crucially, the AI-indicator check contributed only **5 of the 60 points** (~8%); the other **55** came from diff size, claim mismatch, and missing tests — signals that would be high-burden on any PR regardless of authorship.
- **Scanner behavior on a well-shaped AI-authored PR:** score **7/100**, low burden, **14 minutes**. Same agent, same kind of work, but tests were added, CI was green, and the risky path was called out in the description. The AI indicator still fires but contributes **2.1** at low severity. This is Gupta's answer to "will this penalize us for using coding agents."
- **Cross-repo scan: 524 PRs across three public repos, 27-90 day windows.** Findings: (1) **Volume is the variable** — AI authorship was flat at a **5-20% steady state**, but burden was not: one repo accumulated **186 senior reviewer hours in 27 days** while another took **43**. (2) The amplifier positioning holds — AI indicators fired on 5-20% of PRs weekly across all three repos, and those PRs did not disproportionately land in the high-burden band. (3) **Complexity drives burden, not authorship** — only **four** of the 524 PRs landed in the needs-evidence or high bands, and all four were structural: large migrations, SDK rewrites, multi-team refactors.
- Aggregate totals: **228 cumulative senior reviewer hours** across the three repos; a sustained **nine PRs per day** merge rate in the high-velocity repo; and a single pull request estimated at **5,036 minutes — 84 hours — of review effort**, scoring **73** in the requires-evidence band.
- Gupta closes on governance: 2026 is the adoption year, 2027 is when the conversation shifts to whether you can trust what you ship, who is accountable when an AI-authored change causes an incident, and where the audit trail is. ReviewDebt is meant as the bridge that lets you have that conversation without giving up the velocity gains.

## Actionable Takeaways

1. **Backfill first, then threshold.** Run the scorer over your last **200 merged PRs** and calibrate the weights against your team's actual reviewer experience — the score has to match your gut before it can be used. Gupta also offers a lighter entry point: score just **20 PRs from last week** by hand against the five signals before building any tooling.
2. **Set a justify line at 50 by default:** any PR scoring 50 or above requires a comment from the author.
3. **Surface, don't block.** Post the score as a PR comment on every pull request for visibility only. Blocking is not part of the rollout.
4. **Aggregate weekly per team and watch the slope, not the level** — the trend line is the leading indicator engineering managers should track. Plot it weekly.
5. **Bring the number to retrospectives and roadmap reviews.** Gupta's framing for leadership: the agent rollout added X% throughput and also Y points of review debt over Z weeks, which at the current slope is roughly N senior engineer hours. That moves the discussion from feeling to measurement.
6. **Five PR habits that lower the score, none of which require new tooling:** one logical change per PR (not "small PRs" in the abstract); tests ship with the change, and the *human author* confirms they assert what the code should do rather than what it does; stay inside one owner's territory and split cross-cutting work into per-team PRs so you get one approval, one context, one mental model; the **author writes the why — the agent must not write the PR body**, because writing it is the moment the human commits to understanding what they are shipping; and apply the same review standard to AI PRs as human ones, since the amplifier stays invisible when the other four signals are strong.
7. **Anti-patterns to stop:** approve-with-comment merges, "the AI did the boring part," "we'll catch it in QA," "PRs are smaller now," and writing LGTM.

## Notable Quotes

> "Review debt is the accumulating gap between code your agent has produced and the code humans have actually reviewed, trusted, and understood." — Sachin Gupta

> "Every one of these numbers is real. None of them is a lie, but every one is a vanity metric." — Sachin Gupta

> "They tell you the speed of production. They do not tell you the speed of trust." — Sachin Gupta

> "The agent gave you three hours of typing. You spend those three hours in multi-party reviewer attention." — Sachin Gupta

> "This is not an anti-AI scorecard. This is a review burden scorecard." — Sachin Gupta

> "The agent did not cause the score, but the shape of the PR the agent created did." — Sachin Gupta

> "The slope of review debt over time matters more than the level." — Sachin Gupta

> "Without a number you're just conversing. With a number it's structured." — Sachin Gupta

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*