alibaba / alibaba/open-code-review

ocr timed out and failed for some files, but status code=0

Open
#1,027 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
24.4k
Forks
1.8k
Avg merge
2d 6h
Merged PRs (30d)
105

Description

### OpenCodeReview Version

v1.9.8 (9c5e90d0b) linux/amd64

### Operating System

Linux (x86_64)

### Installation Method

GitHub Release binary

### LLM Provider

Other OpenAI-compatible endpoint

### Bug Description

When ocr is run with --timeout set and timeout happens I expect that ocr would finish with non-zero return code.

Having non-zero return code is critical for detecting ocr and CI harness misconfiguration on CI.

### Steps to Reproduce

Set timeout and run on slow LLM:
```
$ ocr review --commit HEAD --concurrency 1 --timeout 10 --audience agent
[ocr] Summary: 2 file(s) reviewed, 0 comment(s), ~251232 token(s) used (input: ~232407, output: ~18825), cache(read: ~200118, write: ~0), 10m48s elapsed
[ocr] Session: 496b007a-1dc5-4a77-8b71-aaeb928f9e13
Review partially complete: 0 finding(s); 1 of 2 selected item(s) failed.

LLM retry report: 0/16 requests retried, 0 retries, 0 recovered, 1 failed, 0 cancelled
- myfile.c / main_task #13: timeout -> failed

$ echo $?
0
```

### Expected Behavior

```
$ echo $?
1
```

### Logs / Error Output

```shell

```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the `ocr review` command and trace how a timed-out file is reported through to the process exit status. Reproduce the command with `--timeout 10` and `--concurrency 1`, then verify that a partially completed review with a failed item exits non-zero while a fully successful review still exits zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.