Skip to content

cora review in CI: findings from this session (empty replies, truncated JSON in the comment, BLOCKED with a green job, false positives) #670

Closed

Description

@ajianaz

Closed 2026-11-17 with a status per item (cora-code 0.21.0 and 0.21.1; this repo's CI runs latest):

# Finding Status
1 "Review could not complete" on large diffs (empty reply, finish_reason=length) Fixed upstream: a diff above review.max_chunk_chars is reviewed in chunks of whole files (cora-code#720), an unanswered review is retried in halves down to a quarter (#718), and review.exclude takes the changelog, docs and lockfiles out of the diff. Configured here in #883.
2 Raw truncated JSON after "No issues found" Fixed upstream (#718: model text after the findings array is dropped, an empty array followed by JSON is retried).
3 A BLOCKED verdict leaves the job green Fixed: a blocking review now fails the job (seen on #873: Cora Review and CodeCora failed with a "Blocked" comment), and review.fail_on_incomplete (default true) makes an incomplete review exit 1.
4 One comment per PR, overwritten on every run Not changed upstream. In this repo the merge gate reads the comment's updated_at against the head commit.
5 Stale review versus new head Not changed upstream. Same gate: the verdict must be newer than the head commit (AGENTS.md section 2).
6 sec-hardcoded-url on licence files Fixed upstream (#719).
7 Config drift in .cora.yaml Not addressed upstream as far as the 0.21 changelog shows (cora config validate checks syntax and custom rules, not rules that refer to code that no longer exists).
8 Unpinned CI toolchain (dtolnay/rust-toolchain@stable) Decision: stays floating. Every PR, the push to develop and the nightly runs use the latest stable, so a new clippy lint turns CI red at once and is fixed in one line; a pin would hide it until someone bumps it. Revisit if a lint breaks many PRs again.

Items 4, 5 and 7 are feature requests for codecoradev/cora-code; file them there if they matter.

What this is

Observations about the Cora review workflow (cora review in CI with the review action) collected while reviewing about 60 pull requests with it in this repository and in a private sibling repository that runs the same tool in its own CI. A note first; each item can become its own issue in cora-code or in the review action.

Findings (as filed)

  1. "Review could not complete" because the model runs out of tokens. Large diffs of about 1,850 lines or more are the usual trigger; keeping PRs under about 900 to 1,000 lines avoids it. Rerunning usually produced a verdict.
  2. The comment can carry raw truncated JSON after "No issues found".
  3. A BLOCKED verdict leaves the job green. The job failed only when cora itself failed; findings lived only in the comment.
  4. One comment per PR is overwritten on every run.
  5. Stale review versus new head. The comment can be older than the head commit.
  6. Static rule false positives. sec-hardcoded-url flagged the Apache-2.0 LICENSE.
  7. Config drift. Rules in .cora.yaml can silently become wrong.
  8. Unpinned CI toolchain. A floating stable Rust toolchain in a sibling repo's CI added a new clippy lint and turned every PR red until a one-line fix.
  9. What worked well. The review found real issues that human and agent review had missed, with specific file, line and failure scenario (this session added more: the git tool's inherited-environment and PATH vectors in fix(sandbox): harden the git tool, which runs on the host, when a command consumer is on (#748) #873).

Activity

  1. added
    enhancement
    on Nov 13, 2026
  2. ajianaz commented on Nov 13, 2026

    @ajianaz
    ContributorAuthor

    Items from this note are now filed in cora-code:

    Item 3 (a BLOCKED verdict leaves the job green): cora review --help already has a CI mode that exits 2 on findings, so this is mostly a workflow setting to check in the review action and in the repositories' workflows rather than a cora change. Items 4, 5, 7 and 8 stay here for now.


    Generated by Claude Code

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions