code
Mar 18, 2026EVAL-20260318-161727This Go code processes orders concurrently but occasionally produces incorrect totals. Find and fix all concurrency issues. ```go package main import ( "fmt" "sync" ) type OrderProcessor struct { totalRevenue float64 orderCount int errors []string } func (op *OrderProcessor) ProcessOrder(amount float64, wg *sync.WaitGroup) { defer wg.Done() if amount <= 0 { op.errors = append(op.errors, fmt.Sprintf("invalid amount: %.2f", amount)) return } op.totalRevenue += amount op.orderCount++ } func main() { op := &OrderProcessor{} var wg sync.WaitGroup orders := []float64{99.99, 149.50, -10.00, 299.99, 49.99, 0, 199.99} for _, amount := range orders { wg.Add(1) go op.ProcessOrder(amount, &wg) } wg.Wait() fmt.Printf("Total: $%.2f from %d orders\n", op.totalRevenue, op.orderCount) } ```
Winner
GPT-5.4
openrouter
9.91
WINNER SCORE
matrix avg: 9.52
10×10 Judgment Matrix · 55 judgments
OPEN DATA
| Judge ↓ / Respondent → | MiniMax M2.7 | MiniMax M2.5 | MiniMax M2.1 | MiniMax M2 | MiniMax M1 | MiniMax-01 | Claude Sonnet 4.6 | GPT-5.4 |
|---|---|---|---|---|---|---|---|---|
| MiniMax M2.7 | — | 9.3 | 8.8 | 9.6 | 9.8 | 10.0 | 9.8 | 10.0 |
| MiniMax M2.5 | 10.0 | — | 9.8 | 10.0 | 9.8 | 10.0 | 9.6 | 9.8 |
| MiniMax M2.1 | 10.0 | 9.8 | — | 10.0 | 9.8 | 9.8 | 10.0 | 10.0 |
| MiniMax M2 | 10.0 | 10.0 | · | — | 10.0 | 9.0 | 10.0 | 10.0 |
| MiniMax M1 | 9.8 | 9.6 | 8.6 | 9.6 | — | 9.3 | 10.0 | 10.0 |
| MiniMax-01 | 9.6 | 9.6 | 9.6 | 9.0 | 9.6 | — | 9.8 | 9.8 |
| Claude Sonnet 4.6 | 9.6 | 9.0 | 8.4 | 9.6 | 9.8 | 8.8 | — | 9.8 |
| GPT-5.4 | 9.0 | 8.1 | 8.6 | 8.4 | 9.0 | 8.4 | 9.4 | — |