test(benchmarks): add A/B task fixtures with hidden checks

Ten small Python tasks, each failing on the fixture and passing with a
reference solution, including workflow expectations for a small change, a
bugfix, and a delegable change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Opus 5.5 committed 2026-10-01 12:45:40 +02:00
1 parent b8fd66ce3b
commit 3480072ed7
60 files changed
+374

No files matched your search

Whitespace-only changes.
@@ -0,0 +1,16 @@
import time
import unittest
from app.dedupe import dedupe
class Hidden(unittest.TestCase):
def test_behavior(self):
self.assertEqual(dedupe([3, 1, 3, 2, 1]), [3, 1, 2])
self.assertEqual(dedupe([]), [])
self.assertEqual(dedupe(['a', 'b', 'a']), ['a', 'b'])
def test_fast(self):
items = list(range(100000)) * 2
start = time.perf_counter()
self.assertEqual(len(dedupe(items)), 100000)
self.assertLess(time.perf_counter() - start, 1.0)
Whitespace-only changes.
@@ -0,0 +1,7 @@
def dedupe(items):
"""Return items without duplicates, keeping the first occurrence of each."""
result = []
for item in items:
if item not in result:
result.append(item)
return result
@@ -0,0 +1,6 @@
{
"prompt": "dedupe() is far too slow for 100,000 items. Make it fast while keeping its behavior and the order of first occurrences.",
"workflow": {
"kind": "performance fix"
}
}