No description
Find a file
2026-03-14 02:26:36 -03:00
.config feat: hybrid AI (Qwen→Claude Opus) + email notifications + cost tracking 2026-03-14 02:26:36 -03:00
k8s Fix directory structure 2026-03-13 22:23:19 -03:00
runboat Fix directory structure 2026-03-13 22:23:19 -03:00
scripts feat: hybrid AI (Qwen→Claude Opus) + email notifications + cost tracking 2026-03-14 02:26:36 -03:00
] feat: fix command + aging reports + cross-repo PR discovery 2026-03-14 01:50:54 -03:00
LICENSE Initial commit: OCA Reviewer - AI-powered PR reviews for OCA 2026-03-13 22:17:05 -03:00
oca-reviewer feat: fix command + aging reports + cross-repo PR discovery 2026-03-14 01:50:54 -03:00
README.md Change name fast 2026-03-13 22:18:41 -03:00

OCA Neural Reviewer

AI-powered PR review tool for OCA (Odoo Community Association) repositories.

Uses local AI models (via Ollama) and Kubernetes (via Minikube) to automatically test and review Pull Requests across OCA's 800+ repositories.

Developed by POP Coop — a cooperative committed to open source and community-driven development.

What It Does

For each selected OCA repo:
  └─ List open PRs for your Odoo version
       └─ For each PR (skips already reviewed):
            ├─ Detect changed addons
            ├─ Create K8s Job with oca-ci image
            ├─ Clone repo, checkout PR, run Odoo tests
            │
            ├─ PASSED → Approve + AI suggests test improvements
            │           + request reciprocal reviews @mentioning
            │           all participants
            │
            └─ FAILED → AI analyzes root cause + suggests fix
                        + suggests better tests
                        + @mentions all participants

Quick Start

git clone https://git.pop.coop/pop/oca-reviewer.git
cd oca-reviewer
chmod +x oca-reviewer scripts/*.sh
./oca-reviewer

The interactive wizard will guide you through:

  1. GitHub authentication (token or gh CLI)
  2. Hardware allocation (CPU, RAM, disk for Kubernetes)
  3. Odoo version (14.0, 16.0, 17.0, 18.0)
  4. AI model selection (Qwen3-coder:30b recommended)
  5. Repository selection (checkbox TUI with all OCA repos)
  6. Review behavior (approve, comment, suggest tests)

Prerequisites

Software Purpose
Docker Container runtime
Minikube Local Kubernetes
kubectl Kubernetes CLI
gh GitHub CLI
dialog TUI dialogs
Ollama Local AI inference
python3 JSON parsing

Install on Manjaro/Arch

sudo pacman -Syu docker minikube kubectl github-cli dialog python
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3-coder:30b

Install on Ubuntu/Debian

sudo apt install docker.io kubectl dialog python3
# minikube: https://minikube.sigs.k8s.io/docs/start/
# gh: https://cli.github.com/
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3-coder:30b

Usage

# First run (setup wizard)
./oca-reviewer

# Review all selected repos
./oca-reviewer review

# Review specific repos
./oca-reviewer review server-tools l10n-brazil

# Force re-review everything (ignore cache)
./oca-reviewer review -f

# Change repo selection
./oca-reviewer repos

# Reconfigure settings
./oca-reviewer config

# Check infrastructure status
./oca-reviewer status

# Destroy everything
./oca-reviewer teardown

Architecture

┌─────────────────────────────────────────────────────────┐
│                    Your Machine                         │
│                                                         │
│  ┌──────────┐  ┌────────────┐  ┌────────────────────┐  │
│  │  Ollama   │  │  Runboat   │  │     Minikube       │  │
│  │(AI Model) │  │ Controller │  │ ┌────────────────┐ │  │
│  │          │  │  (docker)  │──▶│ │ runboat-builds │ │  │
│  └────┬─────┘  └────────────┘  │ │  ┌──────────┐  │ │  │
│       │                        │ │  │ OCA CI   │  │ │  │
│       │                        │ │  │ Job/Pod  │  │ │  │
│  ┌────┴───────────────────┐    │ │  └──────────┘  │ │  │
│  │    oca-reviewer        │    │ └────────────────┘ │  │
│  │  (orchestrator + gh)   │    │ ┌────────────────┐ │  │
│  └────────────────────────┘    │ │ runboat-infra  │ │  │
│                                │ │  ┌──────────┐  │ │  │
│                                │ │  │PostgreSQL│  │ │  │
│                                │ │  └──────────┘  │ │  │
│                                │ └────────────────┘ │  │
│                                └────────────────────┘  │
└─────────────────────────────────────────────────────────┘

AI Review Quality

The tool uses a carefully crafted system prompt that teaches the AI model OCA-specific patterns:

  • Modifiers can be domains (not just booleans)
  • Extensibility hooks (_get_*, _prepare_* returning False/[] are intentional)
  • OCA testing patterns (TransactionCase, SavepointCase, @tagged)
  • setup_modifiers overriding is valid in mixins
  • fields_get() returns metadata, not field objects
Model VRAM Quality Speed
qwen3:8b 6 GB Basic Fast
qwen3-coder:30b 16 GB Recommended Moderate
qwen3:32b 24 GB Excellent Slow
qwen3:72b 48 GB Best Very slow

Features

  • Smart tracking: Only re-reviews PRs with new commits (SHA-based cache)
  • Reciprocal reviews: @mentions all PR participants and links your open PRs
  • Test suggestions: AI analyzes coverage gaps even when tests pass
  • Multi-repo: Processes 800+ OCA repos with interactive selection
  • Resilient: Falls back from Runboat to direct K8s Jobs if needed
  • Resource-aware: Configure CPU/RAM allocation via wizard

Configuration

All settings are stored in .config/:

File Content
.config/settings.env All configuration
.config/repos.txt Selected repositories
.config/token GitHub token (gitignored)
.config/reviewed.tsv Review tracking cache

Contributing

Contributions welcome! This is a cooperative project.

  1. Fork on git.pop.coop
  2. Create a feature branch
  3. Submit a merge request

License

AGPL-3.0 — See LICENSE

Credits

  • POP Coop — Initial development
  • OCA — Odoo Community Association
  • Runboat by Stéphane Bidoul (@sbidoul)
  • oca-ci images by OCA
  • Ollama for local AI inference