Skip to content

fix(review): only checkpoint completed review items - #2088

Open
Leeminjing wants to merge 1 commit into
alibaba:mainfrom
Leeminjing:codex/fix-review-completed-checkpoints
Open

Leeminjing wants to merge 1 commit into
alibaba:mainfrom
Leeminjing:codex/fix-review-completed-checkpoints

Conversation

@Leeminjing

@Leeminjing Leeminjing commented Nov 25, 2026 •

Copy link
Copy Markdown

Description

A budget stop could turn a file with a confirmed finding into a completed checkpoint even when its review group never finished. Resuming could skip that file. A single-file run could also appear complete to the GitHub Action and advance the cross-push checkpoint.

  • Record every file in a stopped group as failed with its original classification and reason. Keep confirmed findings in the same session record, where ocr session comments can read them.
  • Keep a run partial when all selected items stopped but there are confirmed findings. The CLI can still exit 0 for a budget-only partial, and the Action can publish findings while carrying forward the existing checkpoint.
  • Redispatch unfinished files on --resume. Files from a successfully completed group remain reusable, including when the final submission completed the group or it had zero findings.
  • Document the behavior and the full-review option for older sessions whose files were recorded as complete.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change
  • Refactoring
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally with the race detector in a Go 1.26.10 Linux container using Git 2.47.3.
  • Manual CLI validation on Windows with an Anthropic-compatible stub. An unfinished final submission returned exit 0 and partial, preserved one session finding, and produced reused_files=0 and rerun_files=1 with one new model request. A successful final submission produced reused_files=1 and no new requests.
  • The pre-commit ocr review --audience agent completed. Its findings concerned hard-failure comment persistence and non-budget exit status. This patch follows the existing hard-failure handling and non-budget exit policy.
  • make check, make build, make coverage (91.5%), and npm run test:github-actions passed. The existing checkpoint carry-forward test now verifies publication, an empty checkpoint_after, and retention of the old checkpoint on the same partial run.

Checklist

  • The changes pass the project's formatting and vet checks.
  • I have performed a self-review of my code.
  • Regression tests cover the fix.
  • New and existing unit tests pass locally.
  • The CLI documentation has been updated.
  • I have signed the CLA.
  • I reviewed the AI output, did not attribute commits to AI, and will answer maintainer questions and review comments myself.

AI/LLM Disclosure

OpenAI Codex (GPT-6) assisted with the implementation, tests, documentation, and contribution drafts. The pre-commit OpenCodeReview run completed with deepseek-flash. A fallback run used deepseek-v4-flash-vision-exp while the primary review was pending.

Related Issues

Closes #2087. Related to the resume contract in #786.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s).

@Leeminjing
Leeminjing marked this pull request as ready for review November 25, 2026 06:28

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant