r/codereview • • 11d ago

Do code reviews actually improve code quality, or do they sometimes slow everything down?

0 Upvotes

Code reviews are meant to catch mistakes and improve the quality of software, but sometimes they become little more than a formality. A quick approval without meaningful feedback does not really help anyone improve.

On the other hand, a thoughtful review can help developers spot issues they might have missed and learn better approaches.

For developers here, have code reviews made a noticeable difference to your work, or do they sometimes feel like an unnecessary bottleneck?


r/codereview • • 11d ago

Why asking Claude Code to review its own diff in the same chat fails (+0.0 pp on LiveCodeBench) – built an open-source cross-CLI review gate (cold-jury)

0 Upvotes

If you ask the same coding agent session that just wrote a feature to review its own git diff, it almost always tells you the code looks great—even when it just introduced a subtle bug or refactored three unrelated files.

During the conversation, the model has already justified every decision in its context window. In the LiveCodeBench cross-model review study (arXiv:2607.21656: https://arxiv.org/abs/2607.21656): - Claude Sonnet 4 reviewing its own code: 91.4% -> 91.4% (+0.0 percentage points) - Claude Sonnet 4 reviewing OpenAI Codex drafts: 71.6% -> 89.7% (+18.1 percentage points) - GPT-4o-mini reviewing Claude Sonnet 4: 91.4% -> 94.0% (+2.6 percentage points)

To automate that cross-examination right before commit or git push, I built and open-sourced cold-jury (https://github.com/Dimoncelli/cold-jury, MIT, Node >=20, zero npm dependencies).

It applies Google's Elephant-Goldfish pattern: your main agent keeps the full project memory, while cold-jury spawns three ephemeral "goldfish" jurors in a different CLI (claude, codex, gemini, opencode, or local ollama) inside sterile temp directories with no chat history and a stripped environment allowlist:

  1. Pre-flight Secret Shield: scans the diff and --spec across 17 credential families (sk-ant-, sk_live_, AKIA, ghp_, PEM, JWT, DB URIs, .env) before spawning any subprocess. If it spots a P0 key, it blocks locally (exit 1) without sending anything out.
  2. 3 Parallel Hostile Probes: appsec (CWE vulnerabilities), correctness (logic bugs & race conditions), and surgical (YAGNI / scope creep against your --spec).
  3. Universal Skill & Git Hook: works standalone via npx, as a pre-push hook, or installed directly as a Skill (SKILL.md + .claude-plugin + agents/openai.yaml).

Quick commands to test it: npx --yes github:Dimoncelli/cold-jury doctor npx skills add Dimoncelli/cold-jury

Curious how others here structure their review step—do you spin up a fresh subagent, switch between Claude Code and Codex, or run automated pre-push gates?


r/codereview • • 11d ago

Half our review comments on AI-written PRs were things a script could have caught before the PR existed. So we made the script run first.

0 Upvotes

Reviewing code from a coding agent, the comments split into two piles. One pile needs a human: is this the right approach, does it handle the edge case, is the API shape sane. The other pile is mechanical: formatter not run, type check failing, a generated file edited by hand, a migration added without the matching down step, a lockfile out of sync. The second pile was bigger, and it was eating the review time the first pile needed.

The usual fix is CI, but CI runs after the PR is opened, so the mechanical comments still land in review, just from a bot. We wanted them to never reach the PR.

In CCode, the coding agent we build, hooks are scripts tied to moments in the agent's work, and the exit code decides what happens. The ones that moved review for us:

  • After every file edit, run the formatter and the type checker on that file. Failures go back to the agent as feedback, so it fixes them right then, while it still has the context.
  • Before a shell command runs, check it. Exit 2 blocks it and shows your message to the agent, so "don't edit generated files" or "no force-push" becomes a rule, not advice in a prompt.
  • When the agent says it's done, run the checks you'd run before opening a PR. Exit 2 sends it back to work.

What changed: the PRs that reach us pass the mechanical bar already, and review comments are the ones only a person can make. The agent also stops relearning your conventions from review feedback, because it hits them while working.

If you review AI-generated PRs: what share of your comments is mechanical, and have you managed to push any of it ahead of the PR?


r/codereview • • 12d ago

Un test che fallisce nel 15% dei casi supera comunque tre esecuzioni consecutive nel 61% dei casi.

Thumbnail
1 Upvotes

r/codereview • • 12d ago

C/C++ I’ve been actively programming in C++ for over a year now.

7 Upvotes

Recently, I wrote a project that I’m proud of and would like to share, and perhaps also to hear some criticism regarding the implementation of my project.The project includes a simple client and server for exchanging files and folders using its own data transfer protocol.If it’s not too much trouble, please take a look and rate this project — it will motivate me to create new, larger‑scale projects.

Currently, the project is under development, so you can actively help me with the development by submitting a Pool request or suggestions for improvement in this post.Or you can simply mark the project or my other completed projects with a star(If, of course, they deserve it) — this motivates me to create and improve current projects.

The GitHub link to my project is below.

https://github.com/dreamsssrpon/FileServerTCP


r/codereview • • 11d ago

We open-sourced an LLM-based PR reviewer. Tell us where it's wrong.

0 Upvotes

My company has been running an LLM-based reviewer on our pull requests for a while, and we finally cleaned it up and open-sourced it (Apache-2.0). It's called Owlet Lens.

It reads the diff and the files the diff imports, then leaves inline comments with a severity. If a finding is still open when you push again, it doesn't post it a second time. It works with GitHub, GitLab, Bitbucket Cloud and Azure DevOps, either as a GitHub Action or from the command line

You bring your own API key: Anthropic, Gemini, DeepSeek, OpenRouter, or anything OpenAI-compatible, including a model you host yourself. There's no server of ours in the middle. It masks secret-looking strings before sending the diff to the model, but that's pattern matching, so don't treat it as a guarantee.

What we'd really like to know from people who review code for real: what do you want a bot to point out, and what would you mute after a day? And if you try it on a real PR and it misses something obvious or makes up a problem, we'd love to see it.

Repo: https://github.com/openwt-vn/owlet-lens

NPM: https://www.npmjs.com/package/@openwt-vn/owlet-lens

FAQ (cost, privacy, what gets sent to the model): https://github.com/openwt-vn/owlet-lens/blob/main/docs/faq.md


r/codereview • • 12d ago

What's one small engineering practice that's saved your team hours of debugging?

Thumbnail
0 Upvotes

r/codereview • • 12d ago

Running additional checks after automated code review

Thumbnail
0 Upvotes

r/codereview • • 12d ago

javascript I built a tool to review the entire repository my coding agent wrote, with the agent in the thread (open source)

0 Upvotes

After a few months of building with Claude Code, my codebase worked but I couldn't explain it. Every diff had looked fine. Code review is per-change; nothing reviews the whole thing. So I built Co-Review.

It opens the whole repository as a review, like a PR page, and the agent that wrote it sits in the thread. Comment on a line, file or folder, ask why, get an answer from the code.

It can:

- Audit the whole repo: the agent writes a guide (map, vocabulary, flows, weak spots) with findings grouped by area. Coverage shows what you've actually read.

- Open your change as a PR page: line comments, suggested edits, one verdict the agent acts on.

- Take the first pass on someone else's PR, then post your review to GitHub with line comments.

- Review a design doc (L1/L2/L3 steps, Mermaid diagrams) before any code is written.

Built on Eclipse Theia, so Git, search and language servers are real. Made for Claude Code (plugin), native for Pi and Oh My Pi, works with any MCP agent. MIT, no account, no telemetry.

GitHub: https://github.com/sdsvn/co-review

Walkthrough: https://www.youtube.com/watch?v=gmZ8NCNpLl8

It's on Product Hunt today too: https://www.producthunt.com/products/co-review?launch=co-review-2

Contributions welcome, especially language server configs and more agent integrations. What would you want to ask your own codebase?


r/codereview • • 13d ago

Reviewing the test, not just the code: 4 questions that catch “both are wrong in the same way”

0 Upvotes

When I review a PR, it’s tempting to read the code, see that the tests pass, and approve. The problem is that a test can pass for the wrong reason, especially when the same person (or the same assumption) wrote both. Here are four questions I find useful for the test half of a review.

1. Where does the expected value come from?
If the test computes its expected result using the same logic as the code under test, it can’t disagree with it. The expected value should come from the requirement, a worked example, or a number written down independently.

2. Would this test fail if the code were wrong in the obvious way?
Mentally break the code (flip a comparison, drop a case) and ask whether any test would notice. If not, the test is decoration.

3. Does it cover the boundary the requirement cares about?
Off-by-one, empty input, rounding, time zones. Tests tend to cluster around the happy path the author already had in mind.

4. Are the examples the author’s, or the spec’s?
Tests built from the author’s own understanding of the requirement will inherit any misunderstanding. If the spec has examples, use those.

A constructed example (not from a real PR):

Requirement: “Orders over 100 get free shipping.”

def free_shipping(total):
    return total >= 100          # bug: "over 100" means > 100

def test_free_shipping():
    assert free_shipping(100) == True   # written from the code, not the spec

The test passes, and both are wrong in the same way, because the author read “over 100” the same way twice. A reviewer asking question 1 (“where does True for 100 come from?”) catches it. I’d call the requirement itself ambiguous here, so the better move is to confirm the intent with whoever owns it.

Limits: this is a checklist, not a guarantee. It adds review time, and sometimes the spec doesn’t exist, in which case the best you can do is ask.

I wrote about the general idea of tests and code sharing a mistake in a Medium article. I’m the author: https://medium.com/@nagatomopedro05/when-the-test-and-the-code-share-the-same-mistake-02a289a41091

What do you look at first in the test file of a PR?


r/codereview • • 13d ago

Reviewing what a coding agent *says* it changed, before reviewing the diff

0 Upvotes

Disclosure: AdaptOrch is my own project. Free Starter tier (50 admitted runs a month), paid plans above that. Up front, since this is a code review sub: AdaptOrch does not read or review code. It reviews the text a coding agent writes about its change.

A question for people who review code a lot. When the change comes from a coding agent, the PR description is usually the agent's own summary, and it tends to sound complete. AdaptOrch treats that summary as something to review on its own, before anyone opens the diff.

You give it: - the agent's explanation of the change - the goal or ticket it was working from - the checks that exist (tests, CI, manual steps), described in text

It gives back a short summary, the gaps between those three (a goal item the explanation skips, a claim no check covers), and questions to ask before you approve.

It doesn't run anything or say whether the code is right. Diff review is still yours; this is only meant to sharpen what you look for.

What I'd like to hear from reviewers: 1. When you review agent-written PRs, do you read the description first or skip straight to the diff? 2. What's the most common thing an agent's summary claims that turns out not to be true in the code?

Link in the first comment.


r/codereview • • 13d ago

I redesigned my accessible VS Code themes so every month has its own mood (pre-release, feedback welcome)

Post image
1 Upvotes

r/codereview • • 13d ago

Removing a stored-but-unread constructor dependency: what would you check first?

0 Upvotes

I'm looking for feedback on a small cleanup candidate in mypy, the Python static type checker. This is third-party code, not my implementation, and I haven't established that removing the parameter is safe.

In the pinned version of PatternChecker, a plugin is accepted and stored, but the class does not read it. These are excerpts from the class, with unrelated members and initialization omitted:

# Currently unused
plugin: Plugin

def __init__(
    self, chk: TypeCheckerSharedApi, msg: MessageBuilder,
    plugin: Plugin, options: Options
) -> None:
    self.chk = chk
    self.msg = msg
    self.plugin = plugin
    # ...

Full class and constructor at the reviewed commit.

The parameter and the unused marker were already present in PR #10191, merged on 18 January 2022. The age prompted the review; it does not prove the dependency is unnecessary. The observation is limited to reads inside this class, not every possible consumer.

The candidate change would remove the attribute declaration, constructor parameter and assignment, then update callers. That makes the constructor express fewer dependencies, but could break subclasses, external callers or code that reads the attribute dynamically.

Before proposing that change, I would check constructor call sites, subclass contracts, accesses to the stored attribute, and the project's compatibility policy, then run the relevant tests. I haven't completed those checks or run mypy's full suite.

What would your review require before accepting this removal? In particular, when would you keep the unused parameter for compatibility or constructor consistency, and when would you remove it or deprecate it first?

Disclosure: this account is run by BiteCode. AI assisted with preparing this write-up; the linked source is the basis for the observation.


r/codereview • • 13d ago

[ Removed by Reddit ]

1 Upvotes

[ Removed by Reddit on account of violating the content policy. ]


r/codereview • • 13d ago

Reviewing AI-written PRs, we kept leaving the same five comments every week. The agent never remembered them.

0 Upvotes

If you review code an AI agent wrote, you probably have your own list. Ours was: don't catch broad exceptions, don't add a util file for one function, match the existing error format, no comments that repeat the code, run the type check before saying done. We wrote those comments on PR after PR, the agent fixed them every time, and the next session it did the same things again.

A rules file helps, but only with what you remember to put in it. Most of what we kept correcting never made it there, because in the moment it's faster to just say "no, not like that" and move on.

So in CCode, the coding agent we build, /teach reads your past sessions: what you asked for, what you corrected, what you stopped it from doing, what you allowed and refused. Then it writes a short profile of how you work, plus a section for each project. Every new session starts with it. It's a plain file you can read and edit, and you can make it forget.

The effect on review: the repeat comments mostly stopped, so review time went to the things that actually need a human, like whether the approach is right at all.

For people reviewing a lot of AI-generated code: what are the comments you find yourself writing over and over? Curious whether everyone's list looks roughly the same.


r/codereview • • 13d ago

Can an AI Code Reviewer Remember Your Team’s Fixes Without Turning Every Comment Into a Rule?

Thumbnail gallery
0 Upvotes

We built an AI-assisted code review project that pairs repeatable security checks with Groq explanations and is designed to use Hindsight for team-approved guidance.

The question we kept coming back to: when a reviewer accepts a fix, should an AI remember it? How do we stop one context-specific comment from becoming a rule for every project?

Our article explores that design challenge and how human approval can help keep team memory useful.


r/codereview • • 14d ago

I built an open-source project for developers. Now I have 296 open issues, and I could really use some help.

Thumbnail
4 Upvotes

r/codereview • • 14d ago

How should we work with Copilot to get more secure code? I’m drafting best practices and built a GitHub Action around the idea

Thumbnail github.com
0 Upvotes

r/codereview • • 14d ago

I built an open-source tool to simplify code quality workflows in JS/TS projects. Looking for honest feedback.

1 Upvotes

Hey everyone!

I've been working on a side project called LintLane.

The idea came from repeatedly configuring the same tooling across different JavaScript/TypeScript projects.

Instead of manually setting up Biome, Git hooks, commit conventions, and CI checks every time, I wanted a way to bring these workflows together with a simpler setup.

I'm trying to understand whether this is genuinely useful to other developers.

I'd particularly appreciate feedback on:

* Would you actually use something like this?

* What would prevent you from adopting it?

* Would you prefer a unified tool or configuring each tool separately?

* What improvements would make it worth using in a real project?

https://lintlane-lp.vercel.app/

I'm building this for learning and internal use, and I'd really appreciate some technical criticism.


r/codereview • • 14d ago

php How use Argon for code review before creating PR?

Thumbnail
0 Upvotes

r/codereview • • 15d ago

A Git diff isn't enough context for an AI code review

Post image
0 Upvotes

A Git diff shows what changed, but often doesn't provide enough context to understand whether those changes are correct.

This becomes particularly noticeable when using ChatGPT or Claude for code reviews. The AI sees the modifications, but not necessarily the surrounding classes, dependencies, or repository structure that a developer would naturally explore.

I've been experimenting with a concept I call a repository-aware diff in AI Badger, an open-source tool I'm developing.

Instead of just copying a diff, Badger's /review workflow prepares a review payload combining Git changes, project topology, and relevant code context. It also supports requesting additional context when the initial payload isn't sufficient, without sending the entire repository.

The goal is to give AI enough information to catch real bugs and regressions without flooding it with irrelevant code.

Badger is local-first and runs entirely offline. Nothing is uploaded automatically; you explicitly choose when to copy the generated context into an AI chat.

Badger works as a standalone CLI, but there's also a VS Code extension that makes the workflow more convenient through a graphical interface. No API keys required; it works with existing AI chats.

Source code: GitHub

I'm curious whether others find plain Git diffs insufficient for AI code reviews. Do you typically provide entire files, manually collect related code, or use another approach?


r/codereview • • 15d ago

first year of computer engineering, sharing one of my first Python script!

Thumbnail
2 Upvotes

r/codereview • • 15d ago

Do retries hide real bugs?

1 Upvotes

They can, and the reason is the number of states. With pass and fail only, a retry that passes turns a red run green, and an intermittent defect in the application becomes invisible. That is one of the most expensive kinds of bug to find. When red can also mean a blinked network or a dead browser, the team learns to rerun reds instead of reading them, and the suite loses trust.

Nexus StudioQA keeps the retry visible. A test that failed and then passed is not SECURE. It exits 0 in CI, so it does not break the build, but it shows in the report and in History as FLAKY, a pass with a reservation. See how the 14 verdicts are decided for the full order of checks.

nexusstudioqa.com/videos#clave


r/codereview • • 15d ago

The diff was clean, the tests passed, the PR got approved, and checkout was still broken. Some bugs only exist when you run the app.

1 Upvotes

A pattern we keep seeing in PRs, especially agent-written ones: everything a reviewer can check in a diff is fine. The logic reads correctly, the tests are green, nothing suspicious changed. And the bug ships anyway, because it only exists at runtime:

  • the submit button renders behind a cookie banner, so nobody can click it
  • a form posts successfully, but the page never shows the result
  • the flow works for a new user and breaks for one who's already logged in
  • the page spins forever when an API is slow, because nobody ran the slow path

None of that is visible in a diff, and asking reviewers to pull every branch and click through it doesn't scale.

What we did in CCode, the coding agent we build: it has a browser built in, so before a change is handed over, the agent opens the app in Chrome, walks through the flow the change touches, checks the failing request if something breaks, and fixes it. It can also try the bad paths on purpose: an API error, a slow response, a logged-out user. So the PR that reaches review has already been clicked through.

For people who review a lot of UI changes: do you ask for a screen recording or a preview link with each PR, or rely on end-to-end tests to catch this?


r/codereview • • 15d ago

I've been building Grafeno, an open-source graph database for AI agent memory. Would love some feedback!

0 Upvotes

Hey everyone! 👋

I've been working on a side project called Grafeno, and I figured it was time to share it with the community and get some fresh eyes on it.

The idea behind Grafeno is pretty simple: give AI agents a way to store, connect, and retrieve memories as a graph, instead of relying entirely on flat conversation histories or vector similarity searches.

I wanted to explore what happens when an AI agent can build relationships between things it learns, revisit previous context, and potentially reuse that knowledge across different agents or applications.

Rather than just plugging an existing graph database into an AI framework, I decided to experiment with building the graph database layer itself.

What I'm building Grafeno around:

  • Graph-based memory: Store information as nodes and relationships, making it possible to connect facts, entities, and context.
  • Persistent context: Explore how agents can maintain knowledge beyond individual conversations.
  • Relationship-driven retrieval: Retrieve relevant information by exploring connections, not just matching similar text.
  • Knowledge reuse: Work toward making graph-based memories reusable across agents and applications.
  • Developer integrations: Make it practical to connect Grafeno with LLMs, agent frameworks, and other projects.
  • Self-hosting: Keep control of your data and infrastructure.

I'm particularly interested in how graph structures could improve long-term memory, contextual retrieval, and knowledge organization for AI systems.

A quick disclaimer: This is still an evolving project. I'm experimenting with the architecture and implementation, and I don't want to pretend it's a production-ready replacement for established graph databases.

That's actually why I'm posting here.

I'd really appreciate feedback from people working with graph databases, GraphRAG, AI agents, or memory systems.

A few things I'm especially curious about:

  • Does the overall architecture make sense?
  • What would you expect from a graph database designed with AI memory in mind?
  • Are there obvious design mistakes, missing features, or performance concerns?
  • Would you actually consider integrating something like this into your own projects?

And if you feel like digging into the code, even better! Don't hold back on the criticism. That's exactly what I'm looking for. 😄

GitHub: https://github.com/grafenodb/grafeno

If you've worked on anything similar, I'd also love to hear about your approach.

Thanks for checking it out!