Open Code Review Toolkit
Open Code Review Toolkit is an unofficial GitLab CI integration layer for Alibaba Open Code Review. It provides bounded repository evidence, a compact review bootstrap, a built-in read-only MCP server, environment-driven OCR configuration, preflight validation, and safe GitLab merge-request posting. It does not bundle or download the ocr binary.
[!NOTE] The project is under active development; the public API, CLI, environment contract, and generated schemas may evolve before 1.0.
Install
Install the Python package from PyPI and install a supported OCR binary separately:
python -m pip install open-code-review-toolkit
ocr --version
ocr-ci --help
The current compatibility target is OCR 1.8.6. CI should pin the release and verify its published checksum before execution.
The versioned compatibility policy records tested assets and evidence and describes the conservative Dependabot-like qualification workflow for later upstream releases.
Review output defaults to English. OCR_REVIEW_LANGUAGE accepts another explicit language name when a project needs localized review output; for example, OCR_REVIEW_LANGUAGE=Russian.
Stable distributions are published to PyPI and mirrored as checksum-listed, provenance-attested assets in the corresponding GitHub Release. Development snapshots are published only to TestPyPI.
How reviews evolve
On a successful rerun, the toolkit replaces untouched OCR-only notes instead of accumulating stale reviews. A human reply transfers that discussion to the team: the conversation is preserved and a matching finding is suppressed. Reply with /ocr suppress to keep a discussion open without future repeats, or /ocr resolve to suppress it and resolve the discussion after the next successful posting transaction.
Suppression uses both the GitLab diff position and a stable finding fingerprint, so ordinary line shifts do not normally bring the same bug back. A materially changed finding can still receive a new discussion. See GitLab review operations for the complete lifecycle, posting modes, permissions, failure behavior, and Mermaid state diagram.
Project-wide accepted tradeoffs can be recorded separately in .opencodereview/accepted-decisions.md; the evidence collector supplies target-ref decisions to OCR and never lets a source change self-authorize its own review. See Accepted project decisions for the entry format, inline marker convention, security boundary, and limitations.
Project development
The project is evolving from bounded background generation toward a shared Repository Evidence Engine: one deterministic evidence model will support both a compact OCR bootstrap and a built-in read-only MCP server. Development is ordered by outcomes and dependencies rather than speculative dates.
- Toolkit strategy - durable product boundaries, architecture, invariants, and non-goals.
- Roadmap - milestone status, dependencies, outcomes, and completion signals.
- Backlog - inactive implementation-ready work; active execution remains in
PLANS.md.
GitLab CI quick start
- Configure protected/masked
GITLAB_API_TOKENand LLM variables in GitLab. - Pin and checksum the OCR binary.
- Install this package.
- Run the four public helper stages around
ocr review:
ocr-ci preflight
ocr-ci configure
ocr-ci review --result /tmp/ocr-result.json --stderr /tmp/ocr-stderr.log -- ... --format json
ocr-ci post --result /tmp/ocr-result.json --stderr /tmp/ocr-stderr.log
See the fully synthetic examples/gitlab/ocr-review.gitlab-ci.yml, the GitLab setup guide, and GitLab review operations.
Configuration and safety
Configuration is environment-only in v0.1. The configuration reference documents supported OCR_*, CI_*, GITLAB_*, and MCP inputs. Posting requires GITLAB_API_TOKEN; job tokens and legacy aliases are deliberately unsupported.
Repository content, OCR output, and provider responses are untrusted inputs. The toolkit applies bounded reads and writes, secret redaction, Unicode normalization, Markdown/quick-action neutralization, fingerprinted comments, ownership boundaries for human replies, and rollback controls. Review the security and trust model before enabling write access.
Development and release
Licensed under Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_code_review_toolkit-0.4.4.tar.gz.
File metadata
- Download URL: open_code_review_toolkit-0.4.4.tar.gz
- Upload date:
- Size: 120.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9d3dd657ad00f7a54f9a87591667b119585547a6a0c639519b8e484ec1eb930
|
|
| MD5 |
55ef9fceadd28cfc27ee72c0396c1bde
|
|
| BLAKE2b-256 |
44af4e9b905eb411b08a749b12211b63c6e302e6d67c222736eb6769ee82aff7
|
Provenance
The following attestation bundles were made for open_code_review_toolkit-0.4.4.tar.gz:
Publisher:
release.yml on xeonvs/open-code-review-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_code_review_toolkit-0.4.4.tar.gz -
Subject digest:
e9d3dd657ad00f7a54f9a87591667b119585547a6a0c639519b8e484ec1eb930 - Sigstore transparency entry: 2334990248
- Sigstore integration time:
-
Permalink:
xeonvs/open-code-review-toolkit@5025c9d6d702e5f0b2d24610573cf1cd597ce606 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/xeonvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5025c9d6d702e5f0b2d24610573cf1cd597ce606 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file open_code_review_toolkit-0.4.4-py3-none-any.whl.
File metadata
- Download URL: open_code_review_toolkit-0.4.4-py3-none-any.whl
- Upload date:
- Size: 149.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9fd35ea0a41984e804a750475cd2124530cb926b9d28f8fa50cfefb9abc0d98
|
|
| MD5 |
b1cd61246003d823f56c1af98e9c2029
|
|
| BLAKE2b-256 |
197d61a38fd671d72b39670ae6cf0edaeb646c6519856c7a90498196202dacb6
|
Provenance
The following attestation bundles were made for open_code_review_toolkit-0.4.4-py3-none-any.whl:
Publisher:
release.yml on xeonvs/open-code-review-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_code_review_toolkit-0.4.4-py3-none-any.whl -
Subject digest:
c9fd35ea0a41984e804a750475cd2124530cb926b9d28f8fa50cfefb9abc0d98 - Sigstore transparency entry: 2334990250
- Sigstore integration time:
-
Permalink:
xeonvs/open-code-review-toolkit@5025c9d6d702e5f0b2d24610573cf1cd597ce606 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/xeonvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5025c9d6d702e5f0b2d24610573cf1cd597ce606 -
Trigger Event:
pull_request
-
Statement type: