Skip to content

Fix an async job pool (retries, deadlock, error capture) with hidden tests

Exact prompt

# Task: fix the async job pool The repo in your working directory (`jobpool/`) is a small async job pool. Users report: failed jobs crash the whole run, the pool sometimes hangs forever after a few failures, retry counts look off, and the pool breaks when reused. Read README.md for the intended behaviour, fix the library (you may refactor), and add tests for every bug you fix. Keep the public API (`JobPool(concurrency, retries)`, `run()`, `stats`). Don't add dependencies. No network. Run the tests with `python -m pytest -q`.

A small Python async job pool with four reported problems: failed jobs crash the run, the pool can hang after failures, retry counts are off, and reuse breaks. The agent must read the README contract, fix the library, and add tests; hidden tests check retry semantics, the deadlock on failure, and that cancellation is not swallowed. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Success criteria: 1. Hidden test file is copied into tests/ and the full suite (visible + hidden + agent tests) runs with pytest; exit code must be 0 (120 s timeout). 2. Hidden tests check: retries means EXTRA attempts (retries=2 -> up to 3 attempts) with exact stats {ok, failed, attempts}; no deadlock/hang after several failing jobs; concurrency never exceeds the configured bound (and reaches it); the pool can be reused across separate asyncio.run() calls; asyncio.CancelledError propagates instead of being swallowed as a failure. 3. Visible tests must still pass: results returned in job order; failed jobs appear as exception instances and run() never raises. 4. The repo's tests/ must contain at least 4 test functions in total (i.e. the agent added at least 2).

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0090, 40s).

Run this on another model

All runs (5)

100% pass rate across 5 eligible runs: 5 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
OGPT-6.1 Soldefault · thinking on$0.081m0Fully autonomouspassTrust 80%2026-10-22
DDeepSeek V4.1 Flash (Venice)thinking on$0.0240m0Fully autonomouspassTrust 80%2026-10-20
AClaude Haiku 5.5default · thinking on$0.009040s0Fully autonomouspassTrust 80%2026-10-16
AClaude Opus 5.5default · thinking on$0.2658s0Fully autonomouspassTrust 80%2026-10-16
AClaude Sonnet 5.5default · thinking on$0.0927s0Fully autonomouspassTrust 80%2026-10-16

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Fix an async job pool (retries, deadlock, error capture) with hidden tests

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.