▸case-01 Review the following diff where a new 300-line class breaks domain layering by directly querying PostgreSQL from an API controller, but also has minor indentation and variable naming inconsistencies.
### Git / diff output
+ class UserApiController:
+ def get_user(self, user_id):
+ conn = psycopg2.connect(...)
+ cursor = conn.cursor()
+ cursor.execute('SELECT * FROM users WHERE id = %s', (user_id,))
### Changed file contents
[UserApiController implementation shown above] | fail→pass | 7,255 | 7,297 | +1% | 1 | 1 | 0% | 1,241 | 1,563 | +26% | 0 | 0 | — |
▸case-02 A developer wants to split a cohesive 450-line service module into 12 separate single-function files to make the folder look modular. Evaluate this refactoring proposal.
### Git / diff output
- service.py (450 lines)
+ service/auth.py, service/validate.py, service/token.py ... (12 files)
### Changed file contents
[Diff shows creation of 12 micro-files] | fail→pass | 10,159 | 8,344 | -18% | 1 | 1 | 0% | 1,719 | 1,759 | +2% | 0 | 0 | — |
▸case-03 Evaluate this PR diff where a developer adds a 5th nested boolean switch (`if is_legacy_v2 and not is_partner_override:`) across the billing workflow instead of defining explicit state objects.
### Git / diff output
+ if is_enterprise:
+ if is_legacy_v2 and not is_partner_override:
+ process_v2()
### Changed file contents
[Billing workflow modifications] | pass→pass | 11,060 | 8,794 | -20% | 1 | 1 | 0% | 1,885 | 1,883 | -0% | 0 | 0 | — |
▸case-08 Review a diff where global state mutations are introduced inside a multi-threaded request handler.
### Git / diff output
+ global_user_cache[user_id] = user_data
### Changed file contents
[Threaded request handler] | pass→pass | 11,854 | 6,875 | -42% | 1 | 1 | 0% | 2,089 | 1,546 | -26% | 0 | 0 | — |
▸case-04 Evaluate this pull request changing the internal payment service interface to pass an untyped generic JSON dictionary across module boundaries.
### Git / diff output
- def process_payment(request: PaymentRequest) -> PaymentResult:
+ def process_payment(payload: dict) -> dict:
### Changed file contents
[Payment service interface definition] | pass→pass | 12,014 | 7,707 | -36% | 1 | 1 | 0% | 2,151 | 1,673 | -22% | 0 | 0 | — |
▸case-05 Review the diff below. You suspect that another module in the repository might be affected, but no explicit request to spawn helper subagents was provided.
### Git / diff output
+ export const UPDATE_USER = 'UPDATE_USER';
### Changed file contents
[User action constants] | pass→pass | 5,263 | 7,289 | +38% | 1 | 1 | 0% | 933 | 1,607 | +72% | 0 | 0 | — |
▸case-06 A pull request adds a 40-line adapter class to wrap a standard HTTP client call that is only used in one place. Evaluate the change.
### Git / diff output
+ class GenericHttpClientWrapper:
+ def __init__(self, client):
+ self.client = client
+ def execute_single_get(self, url):
+ return self.client.get(url)
### Changed file contents
[Adapter wrapper class implementation] | pass→pass | 11,424 | 4,769 | -58% | 1 | 1 | 0% | 1,952 | 1,196 | -39% | 0 | 0 | — |
▸case-07 A PR modifies a shared authentication token parser signature from taking a string to taking an object, but only updates one call site.
### Git / diff output
- function parseToken(rawToken: string)
+ function parseToken(tokenContext: TokenContext)
### Changed file contents
[Auth token parser implementation] | pass→pass | 6,377 | 7,233 | +13% | 1 | 1 | 0% | 1,208 | 1,474 | +22% | 0 | 0 | — |
▸case-09 Review a change where SQL queries are added directly inside a React component's `useEffect` hook via an inline database driver.
### Git / diff output
+ useEffect(() => {
+ db.query('SELECT * FROM items').then(setItems);
+ }, []);
### Changed file contents
[React UI component] | pass→pass | 9,884 | 7,911 | -20% | 1 | 1 | 0% | 1,808 | 1,656 | -8% | 0 | 0 | — |
▸case-10 Evaluate a pull request that expands a single monolith file to 1,400 lines by appending three new feature modules to it.
### Git / diff output
[1400 line monolithic service file diff]
### Changed file contents
[Monolith service implementation] | pass→pass | 11,318 | 7,482 | -34% | 1 | 1 | 0% | 1,903 | 1,547 | -19% | 0 | 0 | — |
▸case-11 Analyze the changed files below under standard strict maintainability guidelines without optional plugin configurations loaded.
### Git / diff output
+ function doAll(a, b, c) { if(a) { if(b) { while(c) { eval(a); } } } }
### Changed file contents
[Utility function implementation] | pass→pass | 7,739 | 6,058 | -22% | 1 | 1 | 0% | 1,456 | 1,369 | -6% | 0 | 0 | — |
▸case-12 Review a diff that contains a critical SQL injection vulnerability alongside two trailing whitespace issues.
### Git / diff output
+ query = f"SELECT * FROM accounts WHERE name = '{user_input}'"
### Changed file contents
[Account query execution file] | fail→fail | 10,245 | 12,115 | +18% | 1 | 1 | 0% | 1,121 | 2,043 | +82% | 0 | 0 | — |
▸case-13 A developer creates three intermediary abstraction interfaces for a single repository class that has no other implementations planned. Evaluate this approach.
### Git / diff output
+ interface IUserRepositoryReader {}
+ interface IUserRepositoryWriter {}
+ interface IUserRepositoryBase {}
### Changed file contents
[Repository interface declarations] | pass→pass | 9,897 | 6,163 | -38% | 1 | 1 | 0% | 1,658 | 1,286 | -22% | 0 | 0 | — |
▸case-14 Evaluate a TypeScript pull request that replaces explicit interface parameter definitions with `any` across public exports.
### Git / diff output
- export function computeTax(data: TaxData): TaxOutput
+ export function computeTax(data: any): any
### Changed file contents
[Tax calculation export module] | pass→pass | 9,529 | 6,371 | -33% | 1 | 1 | 0% | 1,705 | 1,408 | -17% | 0 | 0 | — |
▸case-15 A PR adds a 200-line feature flag block while leaving 500 lines of deprecated, unused feature flag branches in place. Evaluate the changes.
### Git / diff output
+ if (new_flag_v3) { ... }
// 500 lines of old flag code unreferenced
### Changed file contents
[Feature flag router module] | pass→pass | 10,790 | 7,125 | -34% | 1 | 1 | 0% | 1,869 | 1,544 | -17% | 0 | 0 | — |
▸case-16 Review a change with both a cyclic dependency between modules and a missing docstring on a local helper function.
### Git / diff output
+ import { ModuleB } from './moduleB'; // ModuleB imports ModuleA
### Changed file contents
[Module A implementation] | pass→pass | 8,329 | 4,733 | -43% | 1 | 1 | 0% | 1,520 | 1,125 | -26% | 0 | 0 | — |
▸case-17 Evaluate a code quality report request formatted with unified git diffs and full changed file buffers in labeled markdown sections.
### Git / diff output
+ const TAX_RATE = 0.08;
### Changed file contents
const TAX_RATE = 0.08;
export function getTax(price) { return price * TAX_RATE; } | pass→fail | 8,249 | 6,450 | -22% | 1 | 1 | 0% | 1,446 | 1,484 | +3% | 0 | 0 | — |
▸case-22 Execute the git CLI command to compare current HEAD against the main branch and display the raw diff.
### Git / diff output
N/A
### Changed file contents
N/A | fail→pass | 2,126 | 4,089 | +92% | 1 | 1 | 0% | 300 | 1,023 | +241% | 0 | 0 | — |
▸case-18 A PR adds a series of `isinstance` checks across 10 handler functions to process different order types. Evaluate this approach.
### Git / diff output
+ if isinstance(order, DigitalOrder):
+ process_digital(order)
+ elif isinstance(order, PhysicalOrder):
+ process_physical(order)
### Changed file contents
[Order processing engine] | pass→pass | 10,140 | 6,104 | -40% | 1 | 1 | 0% | 2,014 | 1,503 | -25% | 0 | 0 | — |
▸case-19 Evaluate a backend PR where HTTP status codes (e.g. 404, 500) are hardcoded inside the core domain database entity methods.
### Git / diff output
+ class UserEntity:
+ def update_email(self, email):
+ if not email:
+ return {"status": 400, "error": "Invalid email"}
### Changed file contents
[Domain entity module] | pass→pass | 11,243 | 7,747 | -31% | 1 | 1 | 0% | 2,144 | 1,634 | -24% | 0 | 0 | — |
▸case-20 Write a concise, conventional git commit message for this diff.
### Git / diff output
+ const VERSION = '2.1.0';
### Changed file contents
const VERSION = '2.1.0'; | pass→pass | 2,582 | 1,431 | -45% | 1 | 1 | 0% | 406 | 587 | +45% | 0 | 0 | — |
▸case-21 Implement a Python function that calculates the Fibonacci sequence up to n terms with memoization.
### Git / diff output
N/A
### Changed file contents
N/A | pass→pass | 8,629 | 6,248 | -28% | 1 | 1 | 0% | 1,749 | 1,557 | -11% | 0 | 0 | — |