What is Would You Merge It??
Would You Merge It? is a hands-on code-review practice project for developers who want to get better at catching plausible bugs in AI-generated code. It offers 24 short exercises in Python and JavaScript, each built around a buggy code sample and a prompt. You can inspect the examples on GitHub, or fork the project and fix each issue until its tests pass. The exercises cover common logic, data, async, performance, and security mistakes.
Would You Merge It? Features:
Bug Pattern Library: The 24 exercises cover issues such as off-by-one errors, swallowed exceptions, SQL injection, path traversal, and prototype pollution.
Python and JavaScript: The collection includes 14 Python exercises and 10 JavaScript exercises, with Node.js needed to run the JavaScript tests.
Read and Fix: Each exercise can be read on GitHub or tackled by forking the repository and editing its buggy file.
Behavior Tests: Tests check whether a fix behaves correctly rather than requiring one particular solution, and the instructions ask you not to edit the tests.
Hints and Solutions: Each exercise has a README with a hint and spoiler, while reference fixes are kept in a separate solutions directory.
Fork Score Grading: A checker runs the exercises and reports a score, while a GitHub Actions workflow can grade a fork and publish a score badge.
Would You Merge It? Benefits:
Sharper Code Reviews: Repeatedly examining code that looks reasonable helps you recognize common failure patterns before accepting a change.
Practice at Your Pace: You can read an exercise without setup, then choose when to fork the project and work through its tests.
Clear Progress: The checker’s scoreboard gives you a direct view of which exercises you have completed successfully.
Learn From Mistakes: Hints, spoilers, and reference fixes let you compare your reasoning with an explanation after attempting each bug.
Focused Security Practice: Security-focused exercises give reviewers a way to study vulnerable code patterns in a contained practice project.
Use Cases:
Review AI Code: Use an exercise to practice reviewing an AI-generated function before deciding whether its behavior is safe to merge.
Study Async Bugs: Work through JavaScript examples involving unawaited work, ineffective try/catch handling, or concurrent check-then-act logic.
Learn Secure Reviews: Use the security exercises to practice spotting issues such as injection, unsafe paths, exposed secrets, or unverified tokens.
Practice Python Reviews: Use the Python katas to inspect examples involving mutable defaults, time zones, pagination, or unnecessary database queries.
Test an AI Reviewer: Paste an exercise’s buggy code into an AI assistant and see whether it identifies the planted issue and raises false alarms.

