r/codereview • • 8h ago

javascript Review my verdict logic: when should a verification check be allowed to block a merge?

2 Upvotes

Context, honestly stated: I'm the founder of a small dev-tool (SolveLang) and this is the verdict module from the GitHub check we just shipped to production. It decides whether a pull request gets a red or green verification check. I'm posting the code for review, not pitching — no links. I want the design attacked.

The check grades evidence about a PR (policy evaluation, the head's own CI state, required checks) into verified / failed / unverified. This module turns that into a blocking decision. The design rule I started from: only *failed* evidence may block — "unverified" means "not established," and blocking on it would block nearly every PR.

```js

// What blocks (each is a *failed* evidence state, never a mere

// unverified one):

// 1. the PR Gate policy evaluation failed;

// 2. the PR Gate route failed or did not run (blast-radius evidence

// unusable — the receipt records the route as a failed finding);

// 3. the head's own CI has failing or timed-out check runs;

// 4. a config-named required check is absent, unfinished, or not

// successful on the head.

export function computeBlocking({ gateRoute, checkRuns, requiredChecks, ownCheckName }) {

const reasons = [];

if (gateRoute?.status === "failed") {

reasons.push(

"PR Gate route failed — blast-radius and policy evidence is unusable (the receipt records this as a failed finding)."

);

} else if (gateRoute?.status === "not-run") {

reasons.push("PR Gate route was not run — blast-radius evidence was not produced.");

} else if (gateRoute?.status === "ran") {

const summary = gateRoute.summary;

const failedRules = (summary?.policyVerdicts ?? [])

.filter((verdict) => verdict.status === "fail")

.map((verdict) => verdict.rule);

if (summary && summary.policyPassed === false && failedRules.length > 0) {

reasons.push(`PR Gate policy failed: ${failedRules.join(", ")}.`);

}

if (summary && summary.integrityVerified === false) {

reasons.push("Solve Graph integrity did not verify — the blast-radius output is not relied on.");

}

}

const others = (checkRuns ?? []).filter((run) => run.name !== ownCheckName);

const failing = others.filter(

(run) => run.conclusion === "failure" || run.conclusion === "timed_out"

);

if (failing.length > 0) {

reasons.push(

`Head CI has failing check run(s): ${failing.map((run) => `${run.name} (${run.conclusion})`).join(", ")}.`

);

}

for (const name of requiredChecks ?? []) {

const run = others.find((candidate) => candidate.name === name);

if (!run) {

reasons.push(`Required check not present on the head: ${name}.`);

} else if (run.status !== "completed") {

reasons.push(`Required check not completed: ${name} (${run.status}).`);

} else if (run.conclusion !== "success") {

reasons.push(`Required check not successful: ${name} (${run.conclusion ?? "no conclusion"}).`);

}

}

return { blocked: reasons.length > 0, reasons };

}

```

Three decisions I specifically want challenged:

  1. **Case 2 bothers me.** If *our* gate route fails to run, the PR blocks in enforce mode — that's the author's PR going red because our tool broke, not because their code failed. I kept it because silently passing when evidence is missing felt dishonest. Is fail-closed right here, or should tool failure be neutral-with-a-loud-warning?
  2. **In report-only mode the check concludes "success" even when blocking evidence exists** (the title and summary state the evidence plainly). That mirrors how our PR Gate Action behaves, but is a green check with "blocking evidence found" in the title honest — or is it exactly the kind of green-washing that makes people distrust checks?
  3. **A malformed repo config falls back to defaults (report-only) and just says so in the summary.** A typo can silently downgrade a team's enforce mode to advisory. Should config defects themselves block?

Roast away — especially if the whole "only failed evidence blocks" premise is wrong.


r/codereview • • 5h ago

PostgreSQL persistent task queue: concurrency, idempotency and restart recovery

1 Upvotes

Hello everyone,

I'm extending an existing Python application that uses PostgreSQL and Supabase for multichain blockchain research.

We have implemented an offline candidate queue with duplicate prevention, retry limits, expiration and restart recovery.

During testing, we identified a potential issue where a stale processing result could affect a newly queued instance of the same candidate.

I would appreciate technical guidance on:

  • Using FOR UPDATE SKIP LOCKED for concurrent processing.
  • Preventing stale worker results through unique claim identifiers.
  • Maintaining idempotency and reliable restart recovery.
  • Choosing appropriate indexes and expiration strategies.

Would a dedicated PostgreSQL queue table be the recommended approach?

Any technical feedback or suggestions would be appreciated. Thank you.


r/codereview • • 13h ago

ts/react: would you review the danger rules on my tribe-card urgency strip?

2 Upvotes

looking for eyes on one ui piece of my open source civ sim (react on top of a rust/wasm worker). this is not the rust action-registry post i made here in october.

when a tribe is in danger, its card grows a strip: a cause (famine, thirst, war, plague, or "in danger"), a body count like "lost 7 of 31 this season", a shrinking bar for the share still alive, and a trend arrow. the rust sim didn't change. the widget reads fields the frame already had (losses this season, who's in peril, food).

danger means any one of: the tribe is marked in peril, average food is under the famine-risk line (0.3), anyone starved this season, or at least 2 deaths and 10% of the tribe from causes other than old age. calm tribes, and tribes only losing elders, stay clean. the strip holds for a day (600 ticks) after the danger lapses, so a tribe on the line doesn't blink. the arrow compares against the body count from about a day ago, because comparing raw population flipped whenever migrants arrived. prefers-reduced-motion turns the transitions and the pulse off.

tests live next to the code, named in PR 1142: game/model/tribe-urgency.test.ts (the rules) and ui/panels/TribeUrgency.test.tsx (the rendering). please confirm those paths on main before reviewing.

what i'd like opinions on:

  • is that priority for picking a "kind" (peril cause, then low food / starvation, then the worst violent cause) sane, or would you flatten it?
  • is a one-day hold the right way to stop blinking, or would you rather fade it or latch until the next season?
  • any smell in keeping this entirely on the ui side so the sim and the save fingerprint stay untouched?

repo (mit): https://github.com/1homsi/thehumanbox/pull/1142 running build if you want context: https://thehumanbox.com/?utm_source=reddit&utm_medium=social&utm_campaign=codereview

built with ai-assisted coding tools: they helped with parts of the code, and an ai assistant helped draft this post.


r/codereview • • 1d ago

GitHub - Vibernt/cupel: Know which tests protect you. CLI and MCP for people and coding agents.

Thumbnail github.com
0 Upvotes

I've been building Cupel in the open: it runs your own tests, records which lines each test runs, plants small faults and reports which tests notice. From that it guards pull requests, audits suites and gives agents evidence. It has no dependencies, no telemetry and no network calls, and it never changes your code.

0.5.0 adds:

  • Rust builds kept between runs and shared across CI slices;
  • likely-catchers-first ordering in every runner;
  • Go and Ruby fault testing on par with the other runners;
  • a docs site and CI on Linux, macOS and Windows.

Every number in the docs says what machine it was measured on, and the release notes list what isn't verified yet.

Contributions and bug reports welcome: https://github.com/Vibernt/cupel · Docs: https://vibernt.github.io/cupel/


r/codereview • • 1d ago

I built a place to roast your rough ideas. Can you roast the app itself?

2 Upvotes

I built Roast & Toast for that awkward stage where you have an idea but don’t know what to test first.

The video example is a shared tool library for apartment buildings. One question makes the pitch immediately more useful: What happens when someone breaks the drill? Now there’s something specific to test in one building.

I’d love feedback on two things. Would you share a genuinely rough idea here? And where would you hesitate in the flow?

Try Roast & Toast


r/codereview • • 1d ago

Python Python RPG tester - constructive criticism welcomed

Post image
1 Upvotes

In the original post the github repository should be accessible, however I will still link towards it. This program is a very simple RPG as just a tester of my coding skills.

https://discord.com/channels/267624335836053506/1574896722449137816/1574896722449137816


r/codereview • • 2d ago

My second R personal project. This time it's based on nuclear energy. Hoping for some feedback. I'm fairly new(only learned R last semester)

Thumbnail github.com
1 Upvotes

r/codereview • • 2d ago

Review in Dependency Order: A Method for Large (and AI-Written) Pull Requests

Thumbnail kiransaidev.hashnode.dev
1 Upvotes

r/codereview • • 2d ago

"Claude Ship" reviews one repo at a time. How are poly-repo teams handling PRs that span repos?

Thumbnail reddit.com
0 Upvotes

r/codereview • • 2d ago

Rust Code review request : multi-tenant isolation & state handling for Telegram back-office (daybook)

2 Upvotes

I'm building Daybook in Rust—a self-hosted Telegram bot, Axum web console, SQLite layer, and MCP endpoint for selling paid-channel access, bookings, and activation codes. It's currently Alpha and not used with real customer funds yet (tracking pre-real-money items in issue #1).

I'd love a second pair of eyes on src/web/finance.rs (payout,reund) execute state handling , src/web/admin_console.rs and src/db.rs

Specifically, I'm looking for feedback on:

  1. Any subtle ways a seller/user could cross tenant or permission boundaries.
  2. Edge cases or race conditions in state transitions / async tasks.
  3. Any Rust/Axum/SQLite patterns that look overly complex or brittle.

Repo: https://github.com/meshdev26/daybook

Even a quick note on one module or pattern would be super helpful.


r/codereview • • 3d ago

T-Bot - Python validation and evidence-integrity toolkits with 141 tests, looking for code revie

Thumbnail github.com
1 Upvotes

I've been independently developing a Solana trading system since June while learning Python and software engineering with AI assistance.

I've started publishing selected standalone components for developers to inspect and challenge.

The GitHub repository currently includes:

- Four Python input validators and 57 tests.

- An evidence-integrity toolkit with 84 tests.

- A standalone educational contributor lab.

- Beginner-friendly tasks and structured review assignments.

I'm especially interested in independent developers who can identify incorrect assumptions, missing edge cases and bugs the existing tests might overlook.

The public components are available to review and improve. The operational trading application remains private.

GitHub: https://github.com/processoverprofit-sys/T-Bot

Starter tasks: https://github.com/processoverprofit-sys/T-Bot/blob/main/community/START_HERE.md

I'd appreciate any constructive technical feedback. Contributions are voluntary and unpaid.


r/codereview • • 3d ago

Building an open-source C# game engine – would love some feedback!

1 Upvotes

Hey everyone!

I've been working on an open-source 3D game engine called Auralis, written in C#/.NET, and I'd love to get some feedback from people with experience in graphics programming and game engine development!

The engine is designed to support multiple graphics APIs. I'm currently working on the OpenGL/OpenGL ES backend using Silk.NET, with Vulkan and DirectX 12 also planned as graphics backends.

Here's the pull request for the current OpenGL implementation:
https://github.com/AuralisEngine/Auralis/pull/11

I'd really appreciate it if some of you could take a look and share your thoughts!

I'm particularly interested in feedback on the architecture, graphics API abstractions, resource management, synchronization, performance, and overall code quality.

I'm still actively developing the engine, so constructive criticism and suggestions are more than welcome. I'd rather catch potential design problems early than build more features on top of a flawed foundation.

Thanks in advance to anyone willing to spend some time looking through the code. I really appreciate it! ❤️


r/codereview • • 3d ago

PhonePe Arnold: self-hosted AI code review platform for GitLab (works with self-managed instances), and support Github

Thumbnail reddit.com
0 Upvotes

r/codereview • • 3d ago

C/C++ The end of manual code review?

Thumbnail leaddev.com
0 Upvotes

JetBrains CEO gives it two years.


r/codereview • • 5d ago

I'm building an open-source research

2 Upvotes

Hi everyone,

​I'm building an open-source research and risk-intelligence platform (Python + PostgreSQL) and looking for an independent volunteer security reviewer before we move toward remote database provisioning.

​What needs review (scoped, ~30–45 min):

​Automated tests are passing, and we've put together a self-contained, reproducible review package—no production access, live credentials, or paid infrastructure required.

​Review issue & checklist: https://github.com/fervent7/ai-meme-radar/issues/4

​If you have experience hardening PostgreSQL with Python and can spare a bit of time—or can point me to someone who might—I'd really appreciate the feedback.

​Thanks!


r/codereview • • 5d ago

Seeking feedback on my niche TS code review tool(PRSense)

Thumbnail reddit.com
0 Upvotes

r/codereview • • 5d ago

Before you trust an AI code reviewer, feed it a clean PR first

Thumbnail reddit.com
0 Upvotes

r/codereview • • 5d ago

The bug that scared me most wasn't an error. It was my AI quietly "cleaning up" my payment code.

Thumbnail reddit.com
0 Upvotes

r/codereview • • 6d ago

Feedback on my python project

Thumbnail reddit.com
1 Upvotes

r/codereview • • 6d ago

Need backend QA engineer / Backend auditor to audit the codebase of my app.

0 Upvotes

Hi ,
I'm working on a social marketplace app. Code has been built.
I need a backend QA engineer to do the database audit , API audit , Payment audit , Refund audit , Security audit , Performance audit .
It will be a paid gig . 50$ .
DM with your experience.


r/codereview • • 6d ago

Who reviewed each merged PR in 393 popular open-source repos over 12 months

Post image
0 Upvotes

I checked every merged PR from the last 12 months in the 50 most-starred active repos for each of nine languages (393 repos had enough PRs to count). For each PR: did another person review it, approve it without a comment, or discuss it? Bots and the author's own replies don't count.

In the median repo:

  • 39.5% of merged PRs had no review from anyone but the author
  • 27.9% were approved by someone with no human comment
  • 20.8% were reviewed with comments

Who runs the repo matters more than the language. In repos run by an organization, 22% of PRs had no other review. In one person's repos it was 91%.

AI PRs (the ones with a tool's signal, like a Co-authored-by: Claude trailer or a copilot/ branch) weren't waved through. In 102 of 160 repos they were discussed more often than the same repo's other PRs. They're also 1.6× bigger, which may be all that is.

Silent approvals weren't fixed later more often than discussed PRs. Up to 20 lines there was no gap at all. For bigger PRs, discussed ones got fixed more, but they're also bigger, so size explains most of it.

Caveats: a comment on GitHub isn't the same as a careful review, and teams can review on calls or in pairs. Most-starred repos aren't a random sample of open source. AI PRs without a signal count as "the rest".

Full write-up with per-language tables and a CSV for every repo: https://coderot.ai/blog/pr-review-in-open-source (I'm building coderot, the tool that measured this.)

Does the 28% silent-approval number match your team? Is an approval with no comment a real review where you work?


r/codereview • • 7d ago

Ir a TrueOpenSourcer/TrueOpenSource•hace 3 díasu/Seerendo-01Building Grafeno Agent — an open-source AI agent orchestrator using official CLIs and APIs

1 Upvotes

Hey everyone!

I'm building Grafeno Agent, an open-source AI agent orchestrator that aims to connect multiple AI providers through their official CLIs, SDKs, and APIs.

The idea is to reuse existing subscriptions where permitted (Claude Code, Codex, GitHub Copilot, Qwen, Kimi, etc.), while keeping orchestration, MCP tools, and persistent memory independent of the underlying models.

I'm also working on smarter model routing based on task complexity, capabilities, and cost.

The project is still under active development, and there's an important aspect I'm validating: whether providers actually permit third-party orchestrators to invoke their official CLIs using personal subscriptions.

I've contacted Anthropic about this, and I'm currently waiting for clarification from their human support team. I'm not treating the lack of an explicit restriction as permission.

The goal is to use official interfaces without extracting OAuth tokens, impersonating clients, or bypassing provider restrictions. Each integration is modular, so it can be disabled if its terms don't allow this usage.

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

I'd love to hear from developers who've experimented with similar architectures, especially around CLI integrations, subscription terms, and multi-model orchestration.

Feedback and contributions are welcome! 😁


r/codereview • • 7d ago

Python Reaper: Evidence-Based Dead Code Detection & Analysis

Thumbnail github.com
0 Upvotes

Built with: Python + Graphify + Llama.cpp + Docker + GitHub Actions

As codebases grow, they inevitably accumulate unused functions, abandoned implementations, outdated helpers, and code that no longer serves any purpose. We call this dead code.

With AI coding assistants like GitHub Copilot, Cursor, and Claude becoming part of everyday development, unnecessary code creates another problem: wasted context, tokens, and time spent understanding code that isn't even used.

Reaper is an open-source, language-agnostic tool that helps identify and analyse potentially unused code in your repositories.

Instead of relying on simple text searches or asking an LLM to understand the entire codebase, Reaper takes an evidence-first approach. It builds a graph of your codebase using Graphify, identifies suspicious functions with no incoming connections, and uses a local LLM powered by llama.cpp to investigate them.

How it works

  • Repository Scanning: Uses Graphify to build a graph representing code elements and their relationships.
  • Candidate Detection: Identifies potentially unused functions and callables based on their graph connections.
  • LLM-Powered Analysis: Uses a local LLM to review suspicious candidates with focused source code and relationship evidence.
  • Evidence-Based Reports: Classifies findings into Likely Dead, Needs Review, and Likely Used.

What makes Reaper different?

  • Language-agnostic analysis approach.
  • Graph-based code relationship analysis.
  • Local LLM integration through llama.cpp.
  • Evidence-backed findings instead of blindly flagging unused functions.
  • No source code modifications or automatic deletions.
  • Generated reports that developers and AI coding assistants can use for further investigation.

Generated Reports

Reaper produces three files:

  • reaper-report.md — Human-readable analysis and findings.
  • reaper-report.json — Structured results for further processing.
  • refactor-prompt.md — A reusable prompt for safe code cleanup with your preferred AI coding assistant.

The goal isn't to automatically delete code. It's to help developers understand what might be safe to remove, backed by evidence rather than assumptions.

GitHub: https://github.com/nikhil25803/reaper

Open-source, evidence-first dead code analysis for the age of AI-assisted development.


r/codereview • • 8d ago

Designers/devs who build UI in code: how do you review it? Looking for feedback on a tool I'm building

Thumbnail reddit.com
2 Upvotes