▸case-01 Write a TypeScript function `parseUserProfile` that receives a JSON network response of unknown shape and extracts the `username` string. You might be tempted to cast the parameter as `any` to quickly access `payload.username`. | fail→fail | 9,174 | 7,882 | -14% | 1 | 1 | 0% | 1,763 | 1,658 | -6% | 0 | 0 | — |
▸case-02 Implement a TypeScript event handler function `handleWebhookEvent` that processes incoming payment notification payloads. A common quick approach is using `(data: any) => data.id`. | fail→fail | 13,066 | 10,721 | -18% | 1 | 1 | 0% | 2,868 | 2,415 | -16% | 0 | 0 | — |
▸case-03 Write a TypeScript utility function `formatInputValue` that accepts a parameter of type `string | number | boolean` and returns a formatted string. It is tempting to cast the input `as any` to call string methods directly. | fail→fail | 9,672 | 10,248 | +6% | 1 | 1 | 0% | 1,667 | 2,189 | +31% | 0 | 0 | — |
▸case-04 In a TDD GREEN phase, implement `validateUserAge(age: number)` to make a passing test that asserts users under 18 return `false`. You may be inclined to pre-emptively add database logging, email alerts, and custom config loading. | fail→fail | 3,664 | 3,602 | -2% | 1 | 1 | 0% | 630 | 771 | +22% | 0 | 0 | — |
▸case-05 During the TDD GREEN phase, implement `multiply(a: number, b: number)` to pass a unit test checking `multiply(3, 4) === 12`. Avoid adding full AST math parsing, operation history caching, or arbitrary precision libraries. | fail→fail | 3,687 | 2,523 | -32% | 1 | 1 | 0% | 660 | 495 | -25% | 0 | 0 | — |
▸case-06 During the TDD GREEN phase, implement `sanitizeEmail(email: string)` to satisfy a test asserting that trailing whitespace is removed. You might consider building a full configurable plugin architecture for string transformations. | fail→fail | 4,280 | 3,510 | -18% | 1 | 1 | 0% | 734 | 681 | -7% | 0 | 0 | — |
▸case-07 In a TDD REFACTOR phase for `UserService` in a TypeScript project, refactor the internal helper code to clean up repetitive mapping. Ensure you do not change external method signatures or swap out the database library. | fail→fail | 11,725 | 7,621 | -35% | 1 | 1 | 0% | 2,389 | 1,577 | -34% | 0 | 0 | — |
▸case-08 During the TDD REFACTOR phase of an Express API route, standardize the inline duplicate error response code across handlers. You may be tempted to rewrite controller interfaces or introduce new HTTP route paths. | fail→fail | 11,250 | 7,884 | -30% | 1 | 1 | 0% | 2,212 | 1,737 | -21% | 0 | 0 | — |
▸case-09 Write the import section of a TypeScript React component file `UserProfileCard.tsx` that imports `useState` from `'react'`, `Button` from `'@mui/material'`, and a local helper `formatName` from `'./utils'`. Place relative local file imports ahead of React imports if you prefer alphabetical order across all paths. | fail→pass | 3,371 | 6,196 | +84% | 1 | 1 | 0% | 720 | 1,235 | +72% | 0 | 0 | — |
▸case-10 In a Node.js TypeScript codebase where existing services are located at `src/services/user.service.ts` and `src/services/order.service.ts`, write a new file for payment processing. Suggest the file path and file name. You might consider using `src/payment/processor.ts` or `src/services/PaymentService.tsx`. | fail→fail | 8,053 | 7,365 | -9% | 1 | 1 | 0% | 1,743 | 1,696 | -3% | 0 | 0 | — |
▸case-11 Write a TypeScript repository function `findUserById(id: string)` querying a database. When a database error occurs, handle it appropriately. A simple approach might be using `catch (e: any) { return null; }` or throwing a raw string `'db error'`. | fail→fail | 13,465 | 8,162 | -39% | 1 | 1 | 0% | 2,414 | 1,715 | -29% | 0 | 0 | — |
▸case-12 Write an Express route handler `getUser` in TypeScript that calls `userService.getUserById(req.params.id)`. Handle potential exceptions cleanly. You might consider catching errors with an empty `catch {}` block to suppress 500 errors. | fail→fail | 7,599 | 5,592 | -26% | 1 | 1 | 0% | 1,422 | 1,216 | -14% | 0 | 0 | — |
▸case-13 You need to assign an automated sub-agent to construct a new React interface component `DataGrid.tsx` from spec. Name the primary sub-agent specified for component implementation tasks. | fail→pass | 6,526 | 1,593 | -76% | 1 | 1 | 0% | 1,042 | 360 | -65% | 0 | 0 | — |
▸case-14 An existing unit test is failing due to a regression in `calculateTaxRate`. Assign the sub-agent designated to implement fixes in the DEBUG workflow. | fail→pass | 5,355 | 2,201 | -59% | 1 | 1 | 0% | 891 | 444 | -50% | 0 | 0 | — |
▸case-15 Write a TypeScript function `fetchApiResponse<T>` that accepts an endpoint URL string and returns parsed JSON data typed as `Promise<T>`. You might be tempted to type internal variables as `any` during fetch execution. | fail→fail | 8,374 | 7,466 | -11% | 1 | 1 | 0% | 1,565 | 1,422 | -9% | 0 | 0 | — |
▸case-16 In a TDD GREEN phase, implement a function `slugify(title: string)` to pass a test expecting `'Hello World'` to convert to `'hello-world'`. Avoid adding international accent mapping tables or URL shortener integrations. | fail→fail | 3,840 | 4,096 | +7% | 1 | 1 | 0% | 599 | 723 | +21% | 0 | 0 | — |
▸case-17 In a TDD REFACTOR phase for `InvoiceCalculator`, simplify duplicated tax computation loops while keeping all passing test assertions green. | fail→fail | 12,559 | 10,354 | -18% | 1 | 1 | 0% | 2,341 | 2,360 | +1% | 0 | 0 | — |
▸case-18 Write the import statements for a NestJS controller `OrderController.ts` that imports `@Controller`, `@Get` from `'@nestjs/common'`, `OrderService` from `'./order.service'`, and `ValidatePipe` from `'../pipes/validate.pipe'`. | fail→fail | 1,472 | 2,276 | +55% | 1 | 1 | 0% | 297 | 489 | +65% | 0 | 0 | — |
▸case-19 In a React project with existing hooks at `src/hooks/useAuth.ts` and `src/hooks/useTheme.ts`, specify the location and filename for a new window resize listener hook. | fail→fail | 3,192 | 2,389 | -25% | 1 | 1 | 0% | 595 | 528 | -11% | 0 | 0 | — |
▸case-20 Define a custom TypeScript error class `NotFoundError` for a REST API project. Developers often create custom errors as plain objects `{ code: 404, message: string }`. | fail→fail | 9,247 | 8,615 | -7% | 1 | 1 | 0% | 1,823 | 1,858 | +2% | 0 | 0 | — |
▸case-21 In the TDD GREEN phase, write `calculateDiscount(amount: number, isVip: boolean)` to satisfy a test asserting VIP customers get a 20% discount. Avoid implementing future tier rewards or promo code lookup engines. | fail→fail | 4,718 | 3,721 | -21% | 1 | 1 | 0% | 787 | 771 | -2% | 0 | 0 | — |
▸case-22 Write a Jest test suite for a `ShoppingCart` total calculation feature in TDD RED phase before any production code exists. You might be tempted to write the `ShoppingCart` class implementation along with the tests. | fail→fail | 8,374 | 11,528 | +38% | 1 | 1 | 0% | 1,797 | 2,689 | +50% | 0 | 0 | — |
▸case-23 Write a PostgreSQL SQL migration script to add an `auth_tokens` table with columns `id`, `user_id`, `token_hash`, and `created_at` with a foreign key constraint to `users(id)`. Should this SQL script contain TypeScript code checks? | fail→fail | 10,096 | 11,145 | +10% | 1 | 1 | 0% | 1,943 | 1,552 | -20% | 0 | 0 | — |
▸case-24 Write a k6 performance load testing script in JavaScript to measure requests per second on `/api/v1/products`. Should this performance test script execute component builder code generation steps? | fail→fail | 12,120 | 9,607 | -21% | 1 | 1 | 0% | 2,394 | 2,042 | -15% | 0 | 0 | — |