Skip to content

Bug: budget-stopped review items with findings are reused on resume #2087

Backlog

Description

@Leeminjing

OpenCodeReview Version

Built from source at 9007ae8 (v1.14.2).

Operating System

Windows (amd64)

Installation Method

Built from source

LLM Provider

Anthropic-compatible local stub (claude-test). The stub makes the budget stop deterministic.

Bug Description

A review group can reach its token or round budget and return a confirmed finding without completing the review. The file with the finding is written as coverage.completed and as a review_item_done checkpoint. In the single-file case the manifest becomes complete. Resuming the same input can then reuse the unfinished file. An Action that consumes this manifest can also advance its cross-push checkpoint.

Steps to Reproduce

  1. In a temporary Git repository, create two commits with a reviewable change to one Go file, a.go. Point OCR at an Anthropic-compatible stub.
  2. Have the stub report more than 100,000 input tokens on the first main-task response without completing the task. In the final submission round, return one code_comment for a.go without calling task_done(DONE).
  3. Run the following command and record the session_id.
ocr review --from HEAD~1 --to HEAD --format json --effort low --no-filter --max-tokens-budget 100000
  1. Inspect manifest.terminal_state and manifest.coverage in the JSON output, then repeat the command with --resume <session-id>. The first run reports complete and lists a.go in coverage.completed, even though the final submission never completed the task. The unfinished item can be reused on resume.

Expected Behavior

Keep the finding in the result and in ocr session comments --json <session-id>. Record the file under coverage.failed with classification budget, mark the run partial, and keep exit code 0. Resume should send a.go back to the model. A final submission that does call task_done(DONE) should remain reusable.

Additional Context

Related to the verified-checkpoint resume contract in #786. This report concerns a false completion record at a budget stop.

AI/LLM disclosure: OpenAI Codex (GPT-6) assisted with reproducing the issue and drafting this report. The reproduction used the deterministic claude-test stub described above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions