Skip to content

Code Lab

Alibaba Open Code Review Explained: Review Modes, Costs and Actual Source

By Miles Park·
GitHub repository preview for alibaba/open-code-review

CODE LAB · PROJECT SPOTLIGHT

Open Code Review Go · Apache 2.0

Understand diff scope, native versus delegated models and structured findings.

Repository preview/artwork: alibaba/open-code-review · creator-supplied image.

Alibaba’s Open Code Review analyzes repository changes and produces structured findings. Its central distinction is a hybrid workflow: code determines parts of file selection, rules and reporting, while a model reasons about changes and retrieves context.

That is more specific than dropping a diff into a chat window. It also introduces choices about which changes are included, which model performs the review and where repository content is sent. We inspected the official source and documentation; we did not run a model-backed review.

Choose the review scope first

ScopeDocumented commandBoundary
Current workspaceocr reviewThe documented workspace mode includes staged, unstaged and untracked changes.
Branch changesocr review –from main –to feature-branchConfirm the base: the documented range uses the divergence point.
One commitocr review –commit abc123Replace the example with the intended real commit.
Whole filesocr scan –path internal/agentA full-file scan is different from reviewing only a diff.

A clean diff review does not establish that untouched files are correct. A full-file scan can reveal more concerns, but also creates more findings to triage. Record the scope with the report so its coverage is not overstated.

Native and delegation modes have different costs

ModeWho calls the model?Configuration
NativeOpen Code Review’s own agent and pipelineAn OCR provider and model, using a supported authentication route.
DelegationThe coding agent you already useThe host agent’s existing model/authentication, plus the OCR CLI and delegation skill.

Delegation avoids a separate OCR model-provider setup. It does not make the host agent’s subscription, limits or usage free. The README also distinguishes delegation from the complete native pipeline: the host agent performs analysis and reporting within the supplied workflow.

For native mode, choose which provider may receive repository material. A coding-assistant subscription login is not automatically an API credential for another application.

Install the CLI, then follow the chosen route

The documented prerequisite is Git 2.41 or newer. The npm installation route and native-mode configuration commands are:

npm install -g @alibaba-group/open-code-review
ocr config provider
ocr config model

Delegation follows its own instructions instead of those provider setup steps. Use the official mode comparison ↗ for the selected route. An installed skill alone does not verify that the required CLI and model path work.

When configured, the documented output options can save a machine-readable report:

ocr review --format json --output result.json

This is a usage example, not an output we produced. Inspect the chosen files and findings before posting review comments or applying changes.

Read the author benchmark carefully

Alibaba Open Code Review author benchmark comparing precision, recall and review cost
Alibaba’s published benchmark table. These are author-reported results under the stated models and evaluation conditions, not a reproduction by Tech Trend Insight. Creator source ↗ · Larger image ↗

Precision asks how many reported issues are real. Recall asks how many real issues were found. A reviewer that emits fewer confident comments can reduce noise while missing other defects. F1 combines those measures, but does not replace inspecting actual findings for your language and repository.

The README describes a precision-versus-recall trade-off and presents token and timing comparisons. Those apply to the author’s evaluation. We did not reproduce them, and lower token consumption is not a universal price quote across providers or codebases.

Inside the source: a comment needs a usable path

This excerpt is part of the comment parser. It supplies a fallback path and checks the basic fields needed to retain a finding:

● ● ● alibaba/open-code-reviewGo · actual source
Go internal/tool/code_comment.go
		if pathVal, ok := obj["path"].(string); ok && pathVal != "" {			cm.Path = normalizeCommentPath(pathVal)		}		if cm.Path == "" {			cm.Path = normalizeCommentPath(defaultPath)		}		if cm.Path == "" || cm.Content == "" {			continue		}		comments = append(comments, cm)	}	return comments, repair, ""}
Lines 154–168 · ed65815View original on GitHub ↗

The parser normalizes an explicitly supplied path. If no path remains, it tries the caller’s default. A comment without a path or content is skipped; otherwise it is appended to the parsed result.

These checks improve handling and display. They do not prove the defect exists, validate every line reference or establish that a suggested patch is correct. Structured output is useful plumbing, not a correctness certificate.

Actual source: Copyright 2026 alibaba/open-code-review Contributors, alibaba/open-code-review at the linked commit. Apache License 2.0; original line numbers and syntax coloring added. Repository license ↗

Make the first evaluation small enough to verify

Use a change whose behavior you understand. Preserve the exact base and target, selected rules, model and output. For each finding, inspect the cited code and determine whether its stated consequence can occur. If you revise the code, check the relevant behavior and tests instead of treating the number of comments as a success metric.

The release listing showed v1.13.11, dated November 17. The repository uses Apache 2.0; model inference and agent subscriptions remain separate costs. Promotional adoption claims do not establish quality for a new codebase.

For observing a browser bug after reviewing its code, our Chrome DevTools MCP guide covers runtime evidence. Use the repository ↗ and official releases ↗ for installation and version details.

Reviewed November 17, 2026. Discovery lead: Mindung’s Short ↗. Primary documentation and source checked independently. No provider was configured and no live review or benchmark reproduction is claimed.

Join the discussion

Your email address will not be published. Required fields are marked *