Skip to main content

Open Code Review Toolkit

Open Code Review Toolkit is an unofficial GitLab CI integration layer for Alibaba Open Code Review. It provides bounded repository context generation, 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. It currently targets Python 3.10-3.14 on Linux and macOS; 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.0. 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. Set OCR_REVIEW_LANGUAGE=Russian to use Russian consistently in both OCR configuration and generated review context.

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 context generator supplies them to OCR only when the current merge request is not changing that file. 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

  1. Configure protected/masked GITLAB_API_TOKEN and LLM variables in GitLab.
  2. Pin and checksum the OCR binary.
  3. Install this package.
  4. Run the five helper stages around ocr review:
ocr-ci preflight
ocr-ci configure
ocr-ci mcp-config
ocr-ci context --output .review-context/dependencies.md
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

open_code_review_toolkit-0.3.1.tar.gz (82.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_code_review_toolkit-0.3.1-py3-none-any.whl (102.2 kB view details)

Uploaded Python 3

File details

Details for the file open_code_review_toolkit-0.3.1.tar.gz.

File metadata

  • Download URL: open_code_review_toolkit-0.3.1.tar.gz
  • Upload date:
  • Size: 82.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for open_code_review_toolkit-0.3.1.tar.gz
Algorithm Hash digest
SHA256 aa403ec1b4bc052ae6d3a97980e81bc356e3513dd196cdb37f51488028c1452e
MD5 ef11db8fe3f9288a68b1df272d43c79c
BLAKE2b-256 1829d9c848458ca7a8102535b2bb6f062fa4a6e14ecc0e8c9a7a937c2ce72e77

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_code_review_toolkit-0.3.1.tar.gz:

Publisher: release.yml on xeonvs/open-code-review-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_code_review_toolkit-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for open_code_review_toolkit-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d37233e0f8736418f69b5a26fe1342dbed7b0c16a75962ce7f98200cfd9a71ee
MD5 4f79fde1be796bd3bb1a9bd116ddc345
BLAKE2b-256 5c0ee39ed7c364066a78c6a83ca1e770d4ed083759643d65b7e2d769992157cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_code_review_toolkit-0.3.1-py3-none-any.whl:

Publisher: release.yml on xeonvs/open-code-review-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.0

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page