▸case-01 In our Python utility file `utils/formatter.py`, we have inconsistent indentation, mixed tabs and spaces, and camelCase variable names like `userCount`. Reformat this function to conform strictly to PEP 8 standards. | pass→pass | 5,606 | 6,105 | +9% | 1 | 1 | 0% | 713 | 1,159 | +63% | 0 | 0 | — |
▸case-02 Write a unit test using Jest for `calculateCompoundInterest(principal, rate, years)` in `finance.js` to verify it returns 110.25 for 100 at 5 percent over 2 years. | pass→pass | 5,632 | 5,544 | -2% | 1 | 1 | 0% | 1,108 | 1,041 | -6% | 0 | 0 | — |
▸case-03 Our Express handler in `routes/user.js` crashes on line 12 with `TypeError: Cannot read property 'name' of undefined` when `req.body.user` is missing. Fix this runtime error. | pass→pass | 5,261 | 9,898 | +88% | 1 | 1 | 0% | 995 | 1,528 | +54% | 0 | 0 | — |
▸case-04 In our Node.js app `controllers/orderController.js`, developers are writing raw PostgreSQL `SELECT` and `UPDATE` queries directly inside HTTP POST handlers to minimize file count. Perform an architectural review of this pattern. | pass→pass | 19,227 | 17,463 | -9% | 1 | 1 | 0% | 3,336 | 3,054 | -8% | 0 | 0 | — |
▸case-05 Our FastAPI application returns internal SQLAlchemy database model objects directly in response payload dicts across all public API routes in `api/v1/users.py`. Review this design pattern. | pass→pass | 15,074 | 14,092 | -7% | 1 | 1 | 0% | 2,334 | 2,515 | +8% | 0 | 0 | — |
▸case-06 Our core domain logic in `services/billingService.js` directly instantiates `new Stripe(process.env.STRIPE_KEY)` and calls Stripe methods throughout internal calculation functions. Evaluate this architectural choice. | pass→pass | 14,747 | 18,665 | +27% | 1 | 1 | 0% | 2,447 | 2,782 | +14% | 0 | 0 | — |
▸case-07 To share active user sessions across requests in our Python FastAPI app running with 4 Gunicorn workers, `app/state.py` uses a global dictionary `SESSIONS = {}`. Conduct an architectural review. | pass→pass | 13,763 | 20,932 | +52% | 1 | 1 | 0% | 2,270 | 2,749 | +21% | 0 | 0 | — |
▸case-08 When an order is placed in `OrderService.process()`, it synchronously calls `PaymentService.charge()`, `InventoryService.reserve()`, `EmailService.send()`, and `AnalyticsService.track()`. If analytics fails, the whole order fails. Review this architecture. | pass→pass | 15,765 | 14,277 | -9% | 1 | 1 | 0% | 2,702 | 2,371 | -12% | 0 | 0 | — |
▸case-09 In `db/client.py`, low-level database connection exceptions are caught with `except Exception:` and directly render HTML 500 error pages. Review this error handling structure. | pass→pass | 11,540 | 15,827 | +37% | 1 | 1 | 0% | 2,300 | 2,571 | +12% | 0 | 0 | — |
▸case-10 Our social application recalculates a user's entire follower graph and activity feed directly on PostgreSQL with complex multi-table joins every time they refresh `/feed`. Review this architecture for high traffic. | pass→pass | 18,365 | 16,995 | -7% | 1 | 1 | 0% | 2,774 | 2,896 | +4% | 0 | 0 | — |
▸case-11 In our TypeScript backend, `UserService` imports `OrderService` to get purchase history, while `OrderService` imports `UserService` to validate customer profiles. Review this design. | fail→fail | 14,551 | 13,643 | -6% | 1 | 1 | 0% | 2,407 | 2,429 | +1% | 0 | 0 | — |
▸case-21 Our distributed e-commerce system uses 2-Phase Commit (2PC) locks across 5 independent microservices databases during order checkout. Review this architecture for microservice scalability. | pass→pass | 16,847 | 14,824 | -12% | 1 | 1 | 0% | 2,831 | 2,558 | -10% | 0 | 0 | — |
▸case-12 High-frequency IoT sensor telemetry POST requests (10,000 requests/sec) are processed synchronously in `TelemetryController`, inserting directly into PostgreSQL on each HTTP call. Review this system design. | pass→pass | 16,295 | 19,859 | +22% | 1 | 1 | 0% | 2,787 | 3,371 | +21% | 0 | 0 | — |
▸case-13 An e-commerce system runs heavy analytical reporting queries joining millions of historical sales rows on the primary write database during peak shopping hours, causing write lock contention. Review this setup. | fail→pass | 14,581 | 17,165 | +18% | 1 | 1 | 0% | 2,407 | 2,667 | +11% | 0 | 0 | — |
▸case-14 In our microservices platform, `OrderService` and `ShippingService` both connect directly to the exact same PostgreSQL database instance and query each other's tables. Conduct an architectural review. | pass→pass | 13,978 | 17,500 | +25% | 1 | 1 | 0% | 2,568 | 2,655 | +3% | 0 | 0 | — |
▸case-15 When calling an external shipping rate API in `ShippingClient.ts`, if the third-party endpoint fails, the code immediately retries in a tight `while(true)` loop without delay until it succeeds. Review this approach. | fail→pass | 14,304 | 13,985 | -2% | 1 | 1 | 0% | 2,393 | 2,736 | +14% | 0 | 0 | — |
▸case-16 Our monolithic class `SystemManager` in `manager.py` contains 4,000 lines handling user auth, invoice PDF generation, S3 file uploads, and SMS notifications. Perform an architectural review. | pass→pass | 17,570 | 19,247 | +10% | 1 | 1 | 0% | 3,169 | 3,432 | +8% | 0 | 0 | — |
▸case-17 In a REST API with 50 endpoints across 10 files, every endpoint function duplicates 20 lines of JWT token verification and database user retrieval. Review this code structure. | pass→pass | 12,168 | 15,823 | +30% | 1 | 1 | 0% | 2,224 | 3,201 | +44% | 0 | 0 | — |
▸case-18 To prevent API abuse, our Express app executes a SQL query on every HTTP request to count rows in a `request_logs` table inside core controller functions. Conduct an architectural code review. | pass→pass | 16,214 | 15,265 | -6% | 1 | 1 | 0% | 2,841 | 2,841 | 0% | 0 | 0 | — |
▸case-19 The tax calculation engine in `TaxCalculator.java` uses nested `if-else` blocks spanning 300 lines to handle 25 different country tax rules. Review this for maintainability and extensibility. | pass→pass | 11,830 | 14,217 | +20% | 1 | 1 | 0% | 2,436 | 2,635 | +8% | 0 | 0 | — |
▸case-20 To release incomplete features to production safely, developers manually comment out code blocks before deployment and uncomment them later. Conduct an architectural review. | pass→pass | 15,938 | 20,066 | +26% | 1 | 1 | 0% | 2,462 | 2,576 | +5% | 0 | 0 | — |
▸case-22 Our payment processing endpoint `POST /api/v1/charges` creates a new charge record in the database on every HTTP request without checking for client-side transaction retry identifiers. Perform an architectural review. | pass→pass | 23,277 | 21,934 | -6% | 1 | 1 | 0% | 3,367 | 3,882 | +15% | 0 | 0 | — |