Greedy evaluation double-counts late verification results and can hang

Open Beginner friendly
#14 0 comments 0 reactions 0 assignees View on GitHub

@JunkaiWang-TheoPhy is already working on this.

Since Nov 1, 2026.

  • #15 by @JunkaiWang-TheoPhy — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the _recorder method of BasicEvaluator and the first-success branch that adds n - recorded_attempts to all_done when greedy_mode is set. Run the offline reproduction from the issue: two problems, n=2, a preloaded result queue, and a StringIO output. Done means the counts stay at 4/4 and the recorder exits. Then add a guard that ignores later results for an already-succeeded problem, and check the regression test passes.

Written by the indexing model from the issue text.

Description

Problem

With --greedy-mode and multiple attempts per problem, completed verification results can make the recorder's task count exceed its total and prevent evaluation from terminating.

Baseline: current master, c67e4213597b1477351d9ef5ca37fb622084cc78.

The first successful result adds n - recorded_attempts to all_done to account for that problem's skipped attempts. A generation/verification task may already be in flight when this happens: the worker checks success before the network/proof operation, not when it completes. Its completed result can therefore already be queued. The recorder does not repeat the greedy-success check and counts that result again.

Deterministic reproduction

No model or Lean server is needed to reproduce the recorder state. Instantiate BasicEvaluator with greedy_mode=True and n=2, create two EvaluationResult records, and preload its result queue with:

  1. Problem A: success.
  2. Problem A: another completed success or failure.
  3. Problem B: failure.
  4. Problem B: success.

Run the actual _recorder against this queue and a StringIO output. The initial all_tasks is 4; the resulting all_done is 5. Once the queue is empty, the recorder remains alive until explicitly interrupted because it only exits when all_done == all_tasks.

I reproduced both variants of the late A result. The same setup without greedy mode terminates normally and retains each attempted result.

Expected behavior and proposed fix

After the first success, ignore later results for that problem in the recorder while holding its existing lock. Those attempts have already been accounted for. In the example above, the count should remain 4/4, with one recorded attempt for A and two for B, and the recorder should terminate.

A minimal three-line guard and an offline regression are prepared. With the tests retained on unchanged master: 2 failed, 1 passed; with the guard: 3 passed. No mathematical formalization or proof-verification result is involved.

AI assistance: investigation and local reproduction used OpenAI Codex.

Dominant language
Lean
Stars
56
Forks
13
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MoonshotAI/CombiBench

All issues in MoonshotAI/CombiBench

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.