Skip to content

Add LiveCodeBench: contamination-resistant competitive programming - #17

Open
DogukanUrker wants to merge 2 commits into
mainfrom
claude/livecodebench-integration-rvytct
Open

Add LiveCodeBench: contamination-resistant competitive programming#17
DogukanUrker wants to merge 2 commits into
mainfrom
claude/livecodebench-integration-rvytct

Conversation

@DogukanUrker

@DogukanUrker DogukanUrker commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Adds LiveCodeBench as a new benchmark suite, bringing contamination-resistant code generation evaluation to BenchKit. LiveCodeBench timestamps its problems, allowing runs to be restricted to problems published after a model's training cutoff—making it the first suite in BenchKit that can definitively separate memorization from capability.

Key Changes

  • New benchmark module (src/benchkit/benchmarks/livecodebench.py): Complete implementation of LiveCodeBench integration including:

    • Dataset preparation and caching (downloads code_generation_lite release on demand)
    • Contest-date windowing via BENCHKIT_LCB_AFTER and BENCHKIT_LCB_BEFORE environment variables
    • Problem prompt building for both functional and stdin-based problems
    • Code extraction from model responses (handles multiple code blocks, reasoning tags)
    • Sandbox harness for executing and testing solutions with timeout budgets
    • Support for both public and private test cases with configurable limits
  • CLI enhancements (src/benchkit/cli.py):

    • New lcb-prepare command to download and cache the dataset
    • --lcb-after and --lcb-before flags for contest-date windowing
    • Graceful handling of suites that fetch datasets on demand (no count until run)
    • Per-group breakdown reporting in headless output
  • Engine updates (src/benchkit/engine.py):

    • group_breakdown() function to compute per-group pass rates for labeled benchmarks
    • TaskRecord.group field to track task grouping (e.g., difficulty level)
    • Results now include structured group breakdowns
  • Report generation (src/benchkit/report.py):

    • group_summary() function for readable per-group score formatting
    • HTML and CSV reports now include group breakdowns
    • Markdown reports include detailed per-group tables
  • Documentation and configuration:

    • Updated README with LiveCodeBench overview and usage examples
    • Added dataset attribution documentation
    • Extended .env.example with LiveCodeBench configuration options
    • Updated benchmark registry and TUI setup screens

Fixes #2

Notable Implementation Details

  • Security: Custom unpickler (_NoGlobalsUnpickler) prevents code execution when decoding test cases from the downloaded dataset
  • Caching strategy: Prepared dataset stored separately from raw downloads; cache format versioning prevents stale data issues
  • Test case handling: Supports multiple encodings (JSON, pickled+compressed), public cases prioritized, configurable per-problem limits
  • Timeout management: Per-test and total budgets prevent runaway solutions; sandbox gets slight slack over harness budget
  • Contamination resistance: Default window (2024-08 onwards) targets most 4-35B models; --lcb-after all enables full-release scoring for transparency
  • Flexible sourcing: Supports local dataset via BENCHKIT_LCB_DATASET, custom base URL via BENCHKIT_LCB_BASE_URL, or automatic download from HuggingFace

The implementation treats LiveCodeBench as a first-class benchmark with full integration into BenchKit's evaluation pipeline, reporting infrastructure, and TUI.

https://claude.ai/code/session_015DBjLyFRpnqpDtWWU1edH7

Summary by CodeRabbit

  • New Features
    • Added LiveCodeBench as a supported benchmark with configurable contest-date filtering and dataset caching.
    • Added preparation commands, difficulty breakdowns, grouped score summaries, and benchmark notes.
    • Added sandboxed code evaluation for functional and stdin-based tasks.
    • Added optional dataset path and date-window configuration.
  • Documentation
    • Documented LiveCodeBench setup, limitations, caching, configuration, and reporting options.
  • Bug Fixes
    • Improved benchmark setup for datasets loaded on demand and clearer unavailable-dataset errors.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@DogukanUrker, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66666b4e-3be9-45d3-84e5-f5ac49575daf

📥 Commits

Reviewing files that changed from the base of the PR and between 3e72ad1 and 1b0516b.

📒 Files selected for processing (11)
  • .env.example
  • README.md
  • src/benchkit/benchmarks/__init__.py
  • src/benchkit/benchmarks/livecodebench.py
  • src/benchkit/cli.py
  • src/benchkit/datasets/README.md
  • src/benchkit/engine.py
  • src/benchkit/report.py
  • src/benchkit/templates/report.html
  • src/benchkit/tui/screens/setup.py
  • tests/test_livecodebench.py
📝 Walkthrough

Walkthrough

BenchKit adds LiveCodeBench with date filtering, dataset preparation and caching, sandboxed evaluation, CLI support, and difficulty-based reporting. Engine and report formats now support grouped task results and benchmark notes.

Changes

LiveCodeBench integration

Layer / File(s) Summary
Dataset preparation and benchmark evaluation
src/benchkit/benchmarks/livecodebench.py, tests/test_livecodebench.py
Adds dataset decoding, caching, date filtering, prompt construction, code extraction, sandboxed functional and stdin evaluation, task metadata, and comprehensive tests.
CLI configuration and benchmark wiring
.env.example, src/benchkit/benchmarks/__init__.py, src/benchkit/cli.py, src/benchkit/tui/screens/setup.py
Registers LiveCodeBench, adds the fresh tag, exposes preparation and date-window commands, and updates benchmark setup handling.
Grouped results and report rendering
src/benchkit/engine.py, src/benchkit/cli.py, src/benchkit/report.py, src/benchkit/templates/report.html
Adds task groups, ordered score breakdowns, report notes, and grouped CLI, CSV, Markdown, and HTML output.
Benchmark and dataset documentation
README.md, src/benchkit/datasets/README.md
Documents LiveCodeBench configuration, preparation, caching, scoring, limitations, tags, and grouped reporting.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant LiveCodeBench
  participant DatasetCache
  participant Sandbox
  CLI->>LiveCodeBench: prepare or load tasks
  LiveCodeBench->>DatasetCache: download, normalize, and read cached data
  CLI->>LiveCodeBench: evaluate response
  LiveCodeBench->>Sandbox: execute generated code against tests
  Sandbox-->>LiveCodeBench: return pass or fail results
Loading

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.64% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the new LiveCodeBench benchmark and its contamination-resistant purpose.
Description check ✅ Passed The description thoroughly covers the implementation and user-visible changes, but it omits explicit validation commands and template headings.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/livecodebench-integration-rvytct

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/benchkit/cli.py (1)

283-295: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid suppressing non-dataset failures in the headless count fallback.

The execute 1 path catches every task_count exception and defaults total = 0, so a malformed registry entry or import error prints a warning and skips argument validation instead of failing fast. Limit the fallback to the known “uncached dataset” failure and raise or exit for other count errors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/benchkit/cli.py` around lines 283 - 295, Restrict the exception fallback
around task_count in the execute 1 flow to the known uncached-dataset failure
only, preserving total = 0 for that case so slice syntax can still be checked.
For malformed registry entries, import errors, and other task_count exceptions,
propagate the error or exit instead of printing the warning and continuing;
update the handling near task_count, SliceError, and specs.append.
🧹 Nitpick comments (5)
src/benchkit/benchmarks/livecodebench.py (1)

370-381: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Silence the Ruff S324 hash warning explicitly.

Ruff reports S324 at line 380. The digest here disambiguates file names only. It is not a security control. Pass usedforsecurity=False so the intent is explicit and the lint gate stays green.

♻️ Proposed change
-    digest = hashlib.sha1(question_id.encode("utf-8")).hexdigest()[:8]
+    digest = hashlib.sha1(
+        question_id.encode("utf-8"), usedforsecurity=False
+    ).hexdigest()[:8]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/benchkit/benchmarks/livecodebench.py` around lines 370 - 381, Update the
hashlib.sha1 call in _safe_name to pass usedforsecurity=False, preserving the
existing UTF-8 input and eight-character digest used for filename
disambiguation.

Source: Linters/SAST tools

tests/test_livecodebench.py (2)

222-224: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Shorten the timeout for the non-terminating test.

This test runs the real sandbox until the budget expires. stdin-1 has two test cases, so evaluate sets budget = min(90, 6 * 2) = 12 and calls execute with timeout=17. The single test therefore blocks for about 17 seconds on every run. Patch PER_TEST_TIMEOUT_S down for this case to keep the suite fast while still proving the timeout path.

♻️ Proposed change
+    def test_code_that_never_terminates_fails(self) -> None:
+        response = "```python\nwhile True:\n    pass\n```"
+        with unittest.mock.patch(
+            "benchkit.benchmarks.livecodebench.PER_TEST_TIMEOUT_S", 1
+        ):
+            self.assertFalse(self.bench.evaluate(self._task("stdin-1"), response))
-    def test_code_that_never_terminates_fails(self) -> None:
-        response = "```python\nwhile True:\n    pass\n```"
-        self.assertFalse(self.bench.evaluate(self._task("stdin-1"), response))

Add import unittest.mock at the top of the file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_livecodebench.py` around lines 222 - 224, Update
test_code_that_never_terminates_fails to patch
benchkit.benchmarks.livecodebench.PER_TEST_TIMEOUT_S to 1 around the evaluate
call, preserving the existing non-termination assertion. Add the unittest.mock
import required for the patch.

60-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Restore the previous environment instead of deleting it.

setUp and tearDown remove BENCHKIT_LCB_AFTER and BENCHKIT_LCB_BEFORE from the process environment permanently. A developer who exports either variable loses it for every test that runs after this class. DatasetTests already snapshots and restores os.environ. Use the same pattern here.

♻️ Proposed change
 class WindowTests(unittest.TestCase):
     def setUp(self) -> None:
+        self._environ = dict(os.environ)
         for name in ("BENCHKIT_LCB_AFTER", "BENCHKIT_LCB_BEFORE"):
             os.environ.pop(name, None)
 
-    tearDown = setUp
+    def tearDown(self) -> None:
+        os.environ.clear()
+        os.environ.update(self._environ)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_livecodebench.py` around lines 60 - 64, Update DatasetTests’
environment handling around setUp and tearDown to snapshot the original
BENCHKIT_LCB_AFTER and BENCHKIT_LCB_BEFORE values before each test and restore
them afterward, including removing only variables that were originally absent.
Do not permanently delete values inherited from the developer’s environment.
.env.example (1)

34-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the remaining LiveCodeBench variables.

src/benchkit/benchmarks/livecodebench.py also reads BENCHKIT_LCB_CACHE (line 95) and BENCHKIT_LCB_MAX_TESTS (line 103). The cache location and the per-problem test cap both change disk usage and run time. Add commented entries so users can find them here.

♻️ Proposed addition
 # Reuse an already-downloaded release instead of fetching it
 # BENCHKIT_LCB_DATASET=~/datasets/code_generation_lite
+# Where the prepared release is cached (default: ~/.cache/benchkit/livecodebench)
+# BENCHKIT_LCB_CACHE=
+# Maximum test cases kept per problem (default: 25)
+# BENCHKIT_LCB_MAX_TESTS=25
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example around lines 34 - 38, Update the LiveCodeBench
environment-variable section in .env.example to document BENCHKIT_LCB_CACHE and
BENCHKIT_LCB_MAX_TESTS as commented entries, with concise descriptions covering
the cache location and per-problem test limit. Keep the existing variables and
formatting unchanged.
src/benchkit/cli.py (1)

606-609: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Validate the LiveCodeBench window only when a command uses it.

_apply_livecodebench_window runs before every dispatch and calls window(), which parses BENCHKIT_LCB_AFTER from the environment and from .env. A malformed value therefore makes benchkit perf, benchkit --list, and the TUI exit 1, even though none of them touch LiveCodeBench. Set the environment variables here, and validate the window in _lcb_prepare and in the run paths that need it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/benchkit/cli.py` around lines 606 - 609, Remove the unconditional
_apply_livecodebench_window call from main so unrelated commands do not parse
LiveCodeBench configuration; set the relevant environment variables there
instead. Move window validation into _lcb_prepare and each run path that uses
LiveCodeBench, preserving existing behavior for commands that require the
window.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 293-295: Update the fenced example in README.md around the
livecodebench entry to include an appropriate language identifier on the opening
fence, such as text, while preserving the example content.
- Line 255: Update the LiveCodeBench documentation at README.md lines 255-255,
272-277, 285-286, and 341-342 to describe contamination protection using the
operator-provided after/before date window, not the selected model’s training
cutoff. Clarify that the lower bound must be later than the model cutoff for the
guarantee, while the all option removes the lower bound and scores the whole
release.

In `@src/benchkit/benchmarks/livecodebench.py`:
- Around line 613-626: Update JobSpec.planned_total() in the job construction
flow to handle DatasetUnavailable from LiveCodeBench.task_count without
propagating the exception. Treat the count as unknown or zero so job
construction continues, or ensure LiveCodeBench is prepared before building the
job; preserve existing count behavior when the dataset is cached.

In `@src/benchkit/cli.py`:
- Around line 581-603: Separate the `prepare()` and
`LiveCodeBench().load_tasks()` handling in the CLI flow so `DatasetUnavailable`
does not use the preparation-failure path. Import `DatasetUnavailable` from
`benchkit.benchmarks.livecodebench`, preserve the successful `manifest` output
when loading tasks reports an empty window, and then report the window as empty
without exiting as a preparation failure; retain the existing error handling for
`RuntimeError`, `ValueError`, and `OSError`.

---

Outside diff comments:
In `@src/benchkit/cli.py`:
- Around line 283-295: Restrict the exception fallback around task_count in the
execute 1 flow to the known uncached-dataset failure only, preserving total = 0
for that case so slice syntax can still be checked. For malformed registry
entries, import errors, and other task_count exceptions, propagate the error or
exit instead of printing the warning and continuing; update the handling near
task_count, SliceError, and specs.append.

---

Nitpick comments:
In @.env.example:
- Around line 34-38: Update the LiveCodeBench environment-variable section in
.env.example to document BENCHKIT_LCB_CACHE and BENCHKIT_LCB_MAX_TESTS as
commented entries, with concise descriptions covering the cache location and
per-problem test limit. Keep the existing variables and formatting unchanged.

In `@src/benchkit/benchmarks/livecodebench.py`:
- Around line 370-381: Update the hashlib.sha1 call in _safe_name to pass
usedforsecurity=False, preserving the existing UTF-8 input and eight-character
digest used for filename disambiguation.

In `@src/benchkit/cli.py`:
- Around line 606-609: Remove the unconditional _apply_livecodebench_window call
from main so unrelated commands do not parse LiveCodeBench configuration; set
the relevant environment variables there instead. Move window validation into
_lcb_prepare and each run path that uses LiveCodeBench, preserving existing
behavior for commands that require the window.

In `@tests/test_livecodebench.py`:
- Around line 222-224: Update test_code_that_never_terminates_fails to patch
benchkit.benchmarks.livecodebench.PER_TEST_TIMEOUT_S to 1 around the evaluate
call, preserving the existing non-termination assertion. Add the unittest.mock
import required for the patch.
- Around line 60-64: Update DatasetTests’ environment handling around setUp and
tearDown to snapshot the original BENCHKIT_LCB_AFTER and BENCHKIT_LCB_BEFORE
values before each test and restore them afterward, including removing only
variables that were originally absent. Do not permanently delete values
inherited from the developer’s environment.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 19b83fe0-5c06-4b67-bd5c-d348f2366532

📥 Commits

Reviewing files that changed from the base of the PR and between 5c23e5e and 513054e.

📒 Files selected for processing (11)
  • .env.example
  • README.md
  • src/benchkit/benchmarks/__init__.py
  • src/benchkit/benchmarks/livecodebench.py
  • src/benchkit/cli.py
  • src/benchkit/datasets/README.md
  • src/benchkit/engine.py
  • src/benchkit/report.py
  • src/benchkit/templates/report.html
  • src/benchkit/tui/screens/setup.py
  • tests/test_livecodebench.py

Comment thread README.md
Comment thread README.md
Comment thread src/benchkit/benchmarks/livecodebench.py
Comment thread src/benchkit/cli.py
Comment on lines +581 to +603
try:
manifest = prepare()
counts = Counter(
str(task.metadata.get("difficulty", "unknown"))
for task in LiveCodeBench().load_tasks()
)
except (RuntimeError, ValueError, OSError) as exc:
console.print(f"[red]LiveCodeBench preparation failed:[/red] {exc}")
sys.exit(1)

console.print(
f"[dim]Cached:[/dim] {manifest['problems']:,} problems "
f"({manifest['first_contest_date']} to {manifest['last_contest_date']}) "
f"· up to {manifest['max_tests']} tests each"
)
in_window = sum(counts.values())
breakdown = " · ".join(
f"{name} {counts[name]}" for name in DIFFICULTIES if counts.get(name)
)
console.print(
f"[white]{in_window:,}[/white] problems in {active.label}"
+ (f" [dim]({breakdown})[/dim]" if breakdown else "")
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Separate an empty window from a preparation failure.

prepare() and LiveCodeBench().load_tasks() share one try block. load_tasks raises DatasetUnavailable when no problem falls inside the window (src/benchkit/benchmarks/livecodebench.py lines 604-607). In that case the download and normalization already succeeded, but the command prints "LiveCodeBench preparation failed" and exits 1. Report the cached release, then report the empty window separately.

🐛 Proposed fix
     try:
         manifest = prepare()
-        counts = Counter(
-            str(task.metadata.get("difficulty", "unknown"))
-            for task in LiveCodeBench().load_tasks()
-        )
     except (RuntimeError, ValueError, OSError) as exc:
         console.print(f"[red]LiveCodeBench preparation failed:[/red] {exc}")
         sys.exit(1)
 
     console.print(
         f"[dim]Cached:[/dim] {manifest['problems']:,} problems "
         f"({manifest['first_contest_date']} to {manifest['last_contest_date']}) "
         f"· up to {manifest['max_tests']} tests each"
     )
+    try:
+        counts = Counter(
+            str(task.metadata.get("difficulty", "unknown"))
+            for task in LiveCodeBench().load_tasks()
+        )
+    except DatasetUnavailable as exc:
+        console.print(f"[yellow]{exc}[/yellow]")
+        return
     in_window = sum(counts.values())

Import DatasetUnavailable from benchkit.benchmarks.livecodebench.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
try:
manifest = prepare()
counts = Counter(
str(task.metadata.get("difficulty", "unknown"))
for task in LiveCodeBench().load_tasks()
)
except (RuntimeError, ValueError, OSError) as exc:
console.print(f"[red]LiveCodeBench preparation failed:[/red] {exc}")
sys.exit(1)
console.print(
f"[dim]Cached:[/dim] {manifest['problems']:,} problems "
f"({manifest['first_contest_date']} to {manifest['last_contest_date']}) "
f"· up to {manifest['max_tests']} tests each"
)
in_window = sum(counts.values())
breakdown = " · ".join(
f"{name} {counts[name]}" for name in DIFFICULTIES if counts.get(name)
)
console.print(
f"[white]{in_window:,}[/white] problems in {active.label}"
+ (f" [dim]({breakdown})[/dim]" if breakdown else "")
)
try:
manifest = prepare()
except (RuntimeError, ValueError, OSError) as exc:
console.print(f"[red]LiveCodeBench preparation failed:[/red] {exc}")
sys.exit(1)
console.print(
f"[dim]Cached:[/dim] {manifest['problems']:,} problems "
f"({manifest['first_contest_date']} to {manifest['last_contest_date']}) "
f"· up to {manifest['max_tests']} tests each"
)
try:
counts = Counter(
str(task.metadata.get("difficulty", "unknown"))
for task in LiveCodeBench().load_tasks()
)
except DatasetUnavailable as exc:
console.print(f"[yellow]{exc}[/yellow]")
return
in_window = sum(counts.values())
breakdown = " · ".join(
f"{name} {counts[name]}" for name in DIFFICULTIES if counts.get(name)
)
console.print(
f"[white]{in_window:,}[/white] problems in {active.label}"
(f" [dim]({breakdown})[/dim]" if breakdown else "")
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/benchkit/cli.py` around lines 581 - 603, Separate the `prepare()` and
`LiveCodeBench().load_tasks()` handling in the CLI flow so `DatasetUnavailable`
does not use the preparation-failure path. Import `DatasetUnavailable` from
`benchkit.benchmarks.livecodebench`, preserve the successful `manifest` output
when loading tasks reports an empty window, and then report the window as empty
without exiting as a preparation failure; retain the existing error handling for
`RuntimeError`, `ValueError`, and `OSError`.

@DogukanUrker

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

claude added 2 commits August 5, 2026 23:18
LiveCodeBench timestamps its problems, so a run can be restricted to
problems published after a model's training cutoff. That window is the
point of the suite, so it is always applied: it defaults to 2024-08
onwards, moves with --lcb-after / --lcb-before, and is printed with the
results so a score documents itself.

The code_generation_lite release is fetched on demand and cached rather
than bundled, the way the EvalPlus suites get their data; `benchkit
lcb-prepare` does it ahead of a run. Hidden tests run in the existing
sandbox and cover both call-a-function and stdin/stdout problems.

Scores are reported per difficulty as well as in aggregate, through a
generic hook: a task metadata `group` gives any benchmark a breakdown in
the CLI summary, results.json, results.csv, results.md and results.html,
and a `report_note` documents how the suite was configured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DBjLyFRpnqpDtWWU1edH7
The picker showed a bare "unavailable" for any suite whose tasks could
not be counted, which is exactly what LiveCodeBench does before its
dataset is cached - correct, since browsing benchmarks must never start a
several-hundred-megabyte download, but unhelpful. The count worker now
carries the reason onto the row, and `--list` shows LiveCodeBench's
`list_note` pointing at `benchkit lcb-prepare`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DBjLyFRpnqpDtWWU1edH7
@DogukanUrker
DogukanUrker force-pushed the claude/livecodebench-integration-rvytct branch from 5eeea68 to 1b0516b Compare August 5, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: integrate LiveCodeBench

2 participants