Repository navigation
Description
Description
If OCR selects 10 files, reviews 8, and reports 3 findings before the budget runs out, the first thing a reviewer sees today can be just “found 3 issues.” That describes the findings but says nothing about the two files OCR did not finish. The summary should report both facts, for example:
Partial review: 8 of 10 selected files reviewed. 3 findings.
Not completed:
src/a.go(budget),src/b.go(budget).
This affects both integrations. When findings exist, both lead with comment publication statistics rather than review coverage. With no findings, GitLab already warns on partial/failed; GitHub chooses its icon from the warnings list, not the run status. GitHub also skips posting entirely when OCR exits non-zero, even if this run produced a usable report. A reviewer can then see a previous run's sticky summary instead of the current result.
Scope
- GitHub: update the publisher in
scripts/github-actions/post-review-comments.jsand the posting/failure step order inaction.yml. The GitHub example already calls this Action; it does not need a second publisher. - GitLab: update the summary in
examples/gitlab_ci/post_review.py. The example pipeline already attempts publication before propagating the OCR exit status. - Use the status and coverage recorded in this run's review JSON. This is a reporting change, not a new merge policy: do not add
ocr gate, a severity threshold, or change which review outcomes fail CI. Correcting an inaccurate source manifest is a separate issue.
Acceptance Criteria
- On both platforms, a
partialorfailedreport is identified as such at the top of the PR/MR summary, with or without findings or warnings. An incomplete review never gets a success check mark or an LGTM fallback. - When coverage is available, show how many selected files were covered and list the unfinished paths with their recorded reasons where available. Count reused coverage as covered, not as work performed in this run; do not count excluded files in the denominator or waived files as reviewed. If coverage details are missing, say so rather than inventing counts or causes.
- Keep findings visible through the existing inline/summary routes. On GitHub, a non-zero review exit with a valid report from this invocation still attempts publication before the job fails with the original review exit code. A budget-only partial that previously exited zero does not become a failing check. Do not advance a checkpoint for an incomplete run.
- Add publisher tests for partial reports with and without findings, including an empty warnings list, and a GitHub Action contract test for a non-zero review exit with usable output. Verify that complete reviews still render normally. Run
npm run test:github-actions,python3 -m unittest discover -s examples/gitlab_ci -p '*_test.py', andmake check.
Expected summary example
Illustrative GitHub PR or GitLab MR comment. Keep the outcome visible without expanding anything. Use Review info only for the actual commit range and per-file results (unfinished files first); leave CI links and run configuration out of the comment.
OpenCodeReview · Partial review: 8 of 10 selected files covered
3 findings: 2 posted inline · 1 in this summary. The remaining 2 files were not reviewed because the review budget was exhausted.
Finding in this summary · src/config.go
The configuration accepts a negative retry count, but the worker treats it as zero and never attempts the operation. Reject negative values when loading the configuration.
Shown here because the finding has no line location.
Review info
Reviewed commits: 45c2e91 → f3d80b6
Files selected for review: 10
| File | Result |
|---|---|
src/a.go |
Not reviewed — budget exhausted |
src/b.go |
Not reviewed — budget exhausted |
src/config.go |
Reviewed |
src/config_test.go |
Reviewed |
src/handler.go |
Reviewed |
src/handler_test.go |
Reviewed |
src/queue.go |
Reviewed |
src/worker.go |
Reviewed |
src/worker_test.go |
Reviewed |
src/types.go |
Covered by a previous run — result reused |
Context
The user report on #1489 describes the GitLab case. #1999 fixed the zero-finding GitLab success message, not the case with findings. This issue concerns how integrations display the report they receive, independently of the CI policy proposals in #1457 and #1461 and the underlying model-response truncation tracked in #1581.
AI disclosure: OpenAI Codex CLI (gpt-6.2-astra) was used to inspect the integration code and draft this issue.
Activity
wzxsdf commentedon Nov 26, 2026
Hi, I'd like to take this one.
Plan:
post-review-comments.js,post_review.py): add one coverage banner, rendered frommanifest.terminal_state(top-levelstatuswhen there is no manifest) andmanifest.coverage. It goes at the top of the zero-finding summary, the pre-review anchor and the final summary, so apartialorfailedreport never gets ✅ or the LGTM fallback.completed + reusedoverselected, withwaivedstated separately andexcludedleft out. Unfinished paths come fromcoverage.failed[]with their recordedclassification/reason. Without coverage the banner says so.action.yml: runPost review commentsbeforeFail job on OCR errorand on a non-zero exit too, as the GitLab example already does. The job still fails with the original review exit code. Checkpoint logic is unchanged; it already advances only oncomplete.warningsincluded) in both publishers, an Action contract test for a non-zero review exit with usable output, and complete reviews rendering as before.Two points the criteria leave open. I'll go with these unless you'd prefer different:
completed + reused + failedis smaller thanselected, so the banner gives the waived count on its own to keep the numbers adding up.statusiscompleted_with_errorsis also treated as incomplete (