alibaba / alibaba/open-code-review
Workspace review skips staged newly added files
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 1.8k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 105
Description
## Environment
- OCR: v1.11.1
- Mode: workspace
- Output: `--audience agent --format json`
- Git state: one modified tracked file and seven staged newly added files
## Command
```sh
ocr review --audience agent --format json --timeout 15 --concurrency 4 --background "..."
```
## Expected
Workspace mode reviews staged, unstaged, and untracked changes, including newly added files.
## Actual
The run completed successfully but selected only the modified tracked file:
```json
{
"message": "Review complete: 0 finding(s) across 1 selected item(s).",
"summary": { "files_reviewed": 1 },
"groups": [{ "label": "src/ui_gpui/mod.rs", "files": ["src/ui_gpui/mod.rs"] }]
}
```
The seven staged additions were absent from `manifest.coverage.selected`. They included six text files and one 3,478-line Rust file, so the omission was not caused only by binary detection. The command exited 0 and stderr was empty.
`git status --short` immediately before the run showed:
```text
M src/ui_gpui/mod.rs
A src/ui_gpui/vendor/gpui_base_selection/LICENSE-APACHE
A src/ui_gpui/vendor/gpui_base_selection/auto_scroll.rs
A src/ui_gpui/vendor/gpui_base_selection/global_state.rs
A src/ui_gpui/vendor/gpui_base_selection/mod.rs
A src/ui_gpui/vendor/gpui_base_selection/text_boundary.rs
A src/ui_gpui/vendor/gpui_base_selection/text_selection.rs
A src/ui_gpui/vendor/mod.rs
```
The run manifest reported workspace mode with `resolved_base` equal to HEAD.
Contributor guide
Research direction
Reproduce the workspace-mode command and inspect the run manifest, especially manifest.coverage.selected and the resolved_base value. Trace the workspace file-selection entry point; done means staged additions are included alongside modified, unstaged, and untracked files, with files_reviewed reflecting all selected eligible files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100