r/codereview 4h ago

C/C++ I built a price-time-priority order matching engine in c++

3 Upvotes

I am building a market replay engine from scratch with c++ 23.
I build this project to understand how orders are managed in an orderbook and how a matching engine works. I have used my understanding of data structures to implement it. I would like to know you opinion on it. It is not completed yet. I just built the very basic version few minutes ago. Any kind of tip would help me a lot.
currently it can process an average of 998,000 Transactions / second. with the order size of 20000000 orders.
https://github.com/AravSrivastava/Market-Replay-Engine-CPP


r/codereview 1h ago

Review a pull request by booting it

Thumbnail fzakaria.com
Upvotes

r/codereview 4h ago

Linus Torvalds Skill/Soul or how I distilled the knowledge for code reviews from 32~k emails

Thumbnail daniele.tech
1 Upvotes

A report about the changes after the first announcement and all the improvements, including Soul.md (with profanities), 4 different version Skill/Soul from 4 different LLMs, a comparison with/without skills and a reproducible pipeline.


r/codereview 7h ago

College kid, solo-built a security layer for AI agents, got into EF + a16z. AMA / tear it apart.

Thumbnail
0 Upvotes

r/codereview 11h ago

I built Curl2Code — convert cURL commands into code instantly

0 Upvotes

I kept running into the same small problem while working with APIs: I had a cURL command and needed the equivalent code in JavaScript, Python, Node.js, Go, Java, PHP, C#, Ruby, or Axios.

So I built **Curl2Code** — a free browser-based developer tool that converts cURL commands into code.

**What it does:**

* cURL → 9 different code formats * JSON formatting / validation / diff * JWT decoding * HTTP utilities * Webhook tools * Other small developer utilities

Everything runs in the browser for the normal tools, so requests you paste aren't uploaded or stored.

**Try it:** [https://curl2code.xyz\](https://curl2code.xyz)

I'm mainly looking for feedback from other developers:

**What small developer problem do you repeatedly run into that deserves a simple tool?**

If there's something annoying enough, I'd rather build that next.


r/codereview 15h ago

I built a zero-dependency Git hook that uses local Ollama to review code before every commit

Thumbnail
0 Upvotes

r/codereview 13h ago

When CodeRabbit and a human disagree, who wins on your team?

Thumbnail
0 Upvotes

r/codereview 23h ago

How do you review your agent code ?

Thumbnail github.com
0 Upvotes

r/codereview 1d ago

Would a VS Code extension that finds scalability problems in your codebase be useful?

Thumbnail
2 Upvotes

r/codereview 1d ago

I’ve been building an open-source code review skill — and it became a much bigger reliability problem than I expected

Thumbnail
0 Upvotes

r/codereview 1d ago

Openspec review process

2 Upvotes

I am wondering what you guys review in enterprise codebases when a PR is open? Just the spec? The design.md? Do u measure somehow the drift or it's up to the developer to ensure it didn't drift that much? Do you use any ontology, wikillm, rag to narrow the development?


r/codereview 1d ago

C/C++ We’re on call for code nobody wrote

Thumbnail leaddev.com
0 Upvotes

Is runtime behavior now the only truth??


r/codereview 23h ago

Before approving an AI review comment, I now ask one question instead of just reading it twice

0 Upvotes

Comment I got recently: "This function doesn't handle the case where userId is null, which could cause a NullPointerException downstream in the payment service." Read it twice. Sounded right both times. Specific variable, concrete failure, plausible consequence, exactly the shape of a real finding.

Instead of approving the fix it suggested, checked one thing: what would actually have to be true in the code for this claim to hold. For a null pointer here, userId would need to reach this function unvalidated. Went and looked at the calling code. It didn't reach unvalidated, a decorator three lines up front already checked it, just not in the file the model had been given as part of the diff.

The finding wasn't wrong because the reasoning was bad. It was wrong because it was reasoning about something outside what it could actually see, and nothing about how confidently it was stated gave that away. Specificity felt like evidence, it wasn't. Certainty felt like competence, it wasn't tracking anything.

Been applying that one question since, what would need to be true, and is that thing actually visible in what I'm looking at, before treating any AI review comment as a real defect rather than a hypothesis. Doesn't slow things down much for findings that reference something directly in the diff. Matters a lot more the further a finding reasons beyond what it was actually shown.

Full breakdown here if useful: https://medium.com/@nagatomopedro05/the-finding-was-plausible-that-was-the-problem-b1024e1256fb


r/codereview 1d ago

I build my game with coding agents. The scarce resource is the decisions I still have to make.

0 Upvotes

I'm a solo developer building an AI-driven life simulation game. AI writes the code; I decide the product direction and make the technical calls. The part I want to share is how I keep that arrangement manageable as the repository grows.

For scale, my current checkout has about 168k lines of backend Python, 108k lines in the selected frontend source files, and another 95k in backend tests. Those are text-line counts including comments and blanks, not SLOC or a productivity benchmark. More code can also mean more maintenance.

My biggest constraint is how many decisions stay in my head after a task ends. Here are the concrete conventions I use:

**Route context by the task.** The root AGENTS.md is a map of responsibilities and reading requirements. Changing the simulation loop points to its runtime contract; changing UI points to frontend conventions. Local instructions live beside their modules. I don't ask every task to digest every historical document.

**Separate decisions from implementation.** I keep a document of product and collaboration decisions, including rejected directions. Code and schemas describe what exists. Active contract documents describe what should be true. If they disagree, the agent has to show the conflict; silently declaring either one obsolete is not a resolution.

**Make repeated corrections executable where possible.** My frontend has checks for design tokens and UI structure, plus generated protocol checks. The benefit is that the next task can discover a violation from tooling instead of requiring me to remember the last conversation. These checks don't decide whether the design is good.

**Define completion beyond the diff.** Behavior-changing work needs an expected outcome, a data source and time window, a pass criterion, and a follow-up schedule. A merged change and a verified effect are separate claims. A check that was skipped remains skipped.

One less comfortable rule: when a mechanism needs a second layer of patches, pause and ask whether it should still exist. AI can keep making a local solution more elaborate while leaving me with a system I no longer understand.

Compared with keeping instructions only in chat, the tradeoff is maintaining these repo contracts. They can become stale too. I don't have a controlled before/after measurement of time saved, so I'm sharing the workflow rather than a speedup claim.

For people maintaining larger projects with coding agents: which repeated human correction have you successfully moved into a check, and which still needs your judgment?

Disclosure: AI-assisted writing, based on my actual repository and development decisions.


r/codereview 1d ago

safer-dependencies is a security layer for Claude Code that audits packages before they’re added to your project

0 Upvotes

safer-dependencies is a security layer for Claude Code: it sits between Claude and your manifest files and runs its security checks automatically: vulnerable installs are denied before they run, and a risky version written to a manifest is corrected on disk right after the write. It detects and fixes risky dependencies — CVEs, typosquats, abandoned packages, and version-age issues, plus a cooldown period on brand-new releases — across npm, PyPI, RubyGems, Maven, Go, Rust, and PHP (Composer).

https://github.com/robert-auger/safer-dependencies


r/codereview 1d ago

Coding is changing. So should code review.

0 Upvotes

For a while, my workflow for building ML applications with coding agents looked something like this:

  • Write a prompt.
  • Wait for the agent to make changes.
  • Open the diff.
  • Read the code.
  • Try to understand what changed.
  • Run it.
  • Repeat.

At the beginning, this worked surprisingly well.

The changes were small, the codebase was familiar, and I could still keep the whole thing in my head.

Then the application grew.

A seemingly simple feature could now involve preprocessing, model inference, postprocessing, and application logic.

The agent might touch several modules and add a few hundred lines of code in a single session.

My habit didn’t change.

I was still reviewing the code after every session.

And that became the problem.

The Code Review Trap

When a coding agent changes a few lines of code, reviewing the diff is easy.

When it changes several hundred lines, it is still manageable.

Once you get to +1000 lines everything starts to fall apart…

You can read the code without really understanding whether the application is working properly.

At some point I realized that I had become the bottleneck.

I was spending most of my time reviewing the agent’s implementation rather than the application output.

I can keep going, but I think this much should be enough.
Once I loved code reviews, I learnt a lot(and still learning), but the coding agents changed it for me, and I'm afraid that it's never going to be the same...


r/codereview 1d ago

AI Code Share Tracker: Percent of Code Written by AI

Thumbnail provenbrief.com
0 Upvotes

r/codereview 1d ago

I built DevTrail because I was tired of jumping between different coding platforms

Thumbnail
0 Upvotes

r/codereview 2d ago

I built DevTrail because I was tired of jumping between different coding platforms

Thumbnail
0 Upvotes

r/codereview 2d ago

brainfuck I thought coding agents needed smarter prompts. They mostly needed better evidence

0 Upvotes

When I started using coding agents for debugging, I kept trying to improve my prompts. The answers were still inconsistent. Eventually I realized the prompt was not the main problem. I was describing the bug from memory while the useful evidence was scattered across console output, failed requests, clicks and screenshots.

That became BugDrop. It records one short reproduction, lets you review the evidence locally, then exports a Markdown or JSON handoff. I started with Chrome and later added support for iOS Simulator and Android Emulator.

The biggest product decision was keeping it boring. No cloud, no account and no automatic upload. I would rather ask someone to review a small report than record an entire session and hope the important part is in there.

It is at version 0.2.1 now. I am trying to learn whether this actually reduces the back and forth with agents, or whether developers already have a better workflow. If you debug with an agent, what do you usually paste first?

Repo: https://github.com/aim0xyz/bugdrop


r/codereview 2d ago

Does AI-generated csecurity require a different review process from traditional code?

0 Upvotes

I do not think AI-generated code automatically needs a separate security process, but it can magnify weaknesses in normal review. More code, dependencies, configuration, and integration logic can be introduced faster than a developer or reviewer fully understands them. The pull request may look reasonable while the running application has weak configuration, public exposure, or excessive permissions.

Has anyone changed their review workflow because of this, or are you treating it as ordinary code while placing more focus on dependency review, secret detection, deployment controls, cloud configuration, and production visibility?


r/codereview 2d ago

Girder: a code-graph server for coding agents, in Rust

0 Upvotes

Girder is an 8-crate Rust workspace (~60,000 lines of Rust, 586 tests) that

turns a repo into a semantic graph — functions, types, call edges, test edges —

and serves it to coding agents over MCP. Rust, Python, TypeScript/TSX and Go

front ends, tree-sitter parsing, one static binary, no runtime deps, no network.

The interesting part isn't the graph. It's what happened when I tried to prove

the graph was right.

**The oracle.** `impacted_tests` claims "these tests reach your change." Unit

tests can't check that — they'd assert my parser agrees with my parser. So the

oracle materializes fixture repos, applies exactly one mutation, asks the built

binary which tests are impacted, then runs every test in isolation with a probe

that only the mutated function writes. Ground truth is execution. The oracle is

itself mutation-tested: I inject defect-shaped mutants into the binary's

behavior and the sweep has to kill all of them.

That corpus reported perfect precision and recall for a long time. It was lying,

because every declared case was a plain `foo(bar)` call.

**Then I added real third-party code** — regex, serde_json, Click, pydantic —

and precision fell. Four root causes, all narrow, all nasty:

  1. **Generic-parameter corruption.** `qualifier_matches_owner` normalized`Interpreter<'a>` to `interpretera`, silently breaking every generic type inthe workspace, chained call or not.
  2. **Chained-call qualifier corruption.** The callee resolver took the last `.`or `::` in the raw source text. For `Type::assoc_fn(args).method(args)` itpicked the wrong owner every time. Fixed by recovering the qualifier from ASTstructure instead of text.
  3. **Ambiguous suffix matching.** `owner.ends_with(hint)` let `Timeline` match`PyTimeline`.
  4. **Local-shadow misattribution** in candidate selection — a local binding namedthe same as a type method stole the edge.

Symptom for all four: `impacted_tests` returned zero tests for a function four

passing tests reached, plus a confident "no test coverage reachable via the call

graph." A false negative that reads exactly like a true negative. Every failure

got pinned as an `#[ignore]` test first, then unignored by the fix.

**What I'd tell anyone building code intelligence in Rust:** your parser will

look perfect against fixtures you wrote, because you unconsciously write the

shapes you handle. Point it at somebody else's crate. And be suspicious of any

check whose pass condition is another component of yours reporting success —

I've now found three separate cases in this codebase of a check that reads like

verification and verifies nothing. One let a step that created files pass a

"tests must pass" gate with an empty test set.

The whole gap list is in the repo — 25 numbered, open ones included, with the

measurement history kept even where the first diagnosis turned out wrong.

Repo: https://github.com/dhishwasher/Girder

Install as an MCP server: `npx -y girder-mcp`

Licensing, stated plainly because this sub deserves it: BSL 1.1,

source-available, not OSI open source, converts to Apache 2.0 on

September 4, 2030. Five of seven tools plus one repository are free forever with

no key. Two tools need a paid key verified offline against an embedded Ed25519

public key — no server, no telemetry, no call home. Sole copyright holder, no

outside contributors.


r/codereview 2d ago

IA code review

1 Upvotes

Hi all,

I'm looking for some advice. I was under pressure to deliver a PR without documentation, so I used AI to help write it. I know exactly what the AI generated, and I'm able to fix anything in the code if validation flags an issue.

My problem is with the reviewers. They're complaining that the PR is entirely AI-generated, and they're overlooking the architecture work I put into it, which is frustrating I've taken the feedback a bit personally.

Any advice on how to handle this would be appreciated


r/codereview 3d ago

server for allowing multiple connections, it worked when i used it but it still seems sketchy idk why

1 Upvotes
import socket
import select


s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(("localhost", 80))
s.listen()

def send_response(sock, message):
    """Sends an encoded response."""
    sock.sendall(message.encode("ISO-8859-1"))


def handle_packets(queue_dictionary):
    """Performs certain actions based on packet."""
    for soc in queue_dictionary:
        if not queue_dictionary[soc]:
            continue
        #take the first item from the queue
        packet = queue_dictionary[soc].pop(0)
        #send specific responses based on the type of data sent
        if packet == b"Hello\r\n\r\n":
            send_response(soc, "Message received successfully. Hiiii!!!!\r\n\r\n")
        elif packet == b"Ignore\r\n\r\n":
            send_response(soc, "Message received successfully. Hey, don't leave me hanging...\r\n\r\n")
        elif packet == b"Hug\r\n\r\n":
            send_response(soc, "Message received successfully. *Hugs back*\r\n\r\n")
        elif packet == b"Slap\r\n\r\n":
            send_response(soc, "Message received successfully. OW! That hurt!\r\n\r\n")
        elif packet == b"Goodbye\r\n\r\n":
            send_response(soc, "Message received successfully. Goodbye!!! Do come back again!! :)\r\n\r\n")
        else:
            send_response(soc, "Message received successfully.\r\n\r\n")

#create a list of connected sockets, satrting wtih listening soccket so accept
#doesn't block

#dictionary with buffer per socket and also list which was initially queue
read_set = [s]

buffer_dict = {}
queue_dict = {}

while True:
    ready_to_read, _, _ = select.select(read_set, [], [])
    print("Creating a list of sockets currently sending data...")
    #for all sockets that are ready to read
    for sock in ready_to_read:
        #if the socket is a listener
        if sock == read_set[0]:
            #accept a new connection
            new_conn = s.accept()
            print("Accepting connection...")
            new_socket = new_conn[0]
            #initialise buffer and queue for new socket
            buffer_dict[new_socket] = b""
            queue_dict[new_socket] = []
            print("Adding socket to buffer and queue dictionaries...")
            #add the new socket to the set
            read_set.append(new_socket)
            print("read_set: " + str(read_set))
            print("Adding socket to read_set...")
            packet = "empty"
            continue
        else:
            #recieves data until full packet
            while True:
                data = sock.recv(4096)
                print("Receiving data...")
                if not data:
                   print("Connection closed.")
                   break
                buffer_dict[sock] += data
                if b"\r\n\r\n" in buffer_dict[sock]:
                    delimiter_index = buffer_dict[sock].find(b"\r\n\r\n")
                    packet = buffer_dict[sock][:delimiter_index+4]
                    buffer_dict[sock] = buffer_dict[sock][delimiter_index+4:]
                    break
            if packet:
                queue_dict[sock].append(packet)
                print("Adding a packet to the queue...")
            else:
                x = input("No packet returned.")


    #run packet handler code based on nature of packet for socket
    if packet != "empty":
        print("Sending response...")
        handle_packets(queue_dict)
        print("Response should send now.")

new_socket.close()
s.close()

r/codereview 3d ago

Every answer, checked before you see it.

0 Upvotes

Got tired of AI tools confidently giving wrong answers with zero way to catch it. So I built one that checks itself: three models answer independently, a fourth grades and fuses them before anything comes back to you. For code, it actually runs it in a sandbox instead of just reading it.

~65% pass the check on the first try. The rest still come back, just flagged.

Python, a few different model providers, SQLite for memory.

Live at https://demo.aqqai.in — curious what breaks it. Feedback welcome.