This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
chore: tidy repo, default to OpenAI, fix silent review failures - #5
Merged
Merged
Conversation
ruff 0.17 widened its default rule set, so an unpinned CI would start failing on code that hasn't changed. Select an explicit rule set (E, F, I, UP, B) and apply the resulting fixes (import order, PEP 604 optionals, strict zip, one long line). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh install now works with just OPENAI_API_KEY (or any provider picked in codeguard.yaml) instead of defaulting to the Xiaomi MiMo endpoint. MiMo stays available as a preset; the MiMoClient/MiMoConfig names and the legacy top-level `mimo:` YAML block keep working. Internals now use LLMClient / config.llm directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found in a real run against an OpenAI-compatible router: when `stream` is omitted it answers with server-sent events, the JSON parse fails, and every agent came back empty. Send "stream": false explicitly. Also: honour temperature=0 / max_tokens=0 instead of treating them as unset, tolerate null usage/content fields, retry only on 429/5xx and transport errors (an invalid key now fails fast instead of retrying). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The text output only showed token count and duration, never the actual findings, and a run where every agent failed (bad key, wrong endpoint) still reported "Review Complete!" with exit code 0. - text/markdown output now render each agent's findings and the summary - JSON output includes per-agent status/error and the summary report - --output works for every format - the review fails (exit 1, with the first error) when all review agents fail, without spending a call on the summary agent - status messages go to stderr so `-f json` on stdout stays parseable - a directory with no supported source files is an error - fix the package docstring, which listed commands that don't exist Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LICENSE: copyright holder is Muhammad Aiman - pyproject: real author, project URLs, SPDX license expression, Python 3.13 + OS/console classifiers - rename the distribution to codeguard-llm (was mimo-codeguard; never published). Import package and CLI stay `codeguard` - drop dependencies that are never imported (gitpython, tiktoken, radon, bandit) - remove the empty setup.cfg; pyproject.toml is the only packaging file - ignore uv.lock Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CI matrix adds Python 3.13; actions/checkout@v5, actions/setup-python@v6 - workflow token is read-only - Dependabot: pip + github-actions, monthly, minor/patch grouped - SECURITY.md: report privately via GitHub Security Advisories Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- drop the hand-typed test-count badge (CI badge stays)
- providers table generated from the actual presets, OpenAI marked as
default, plus the <PROVIDER>_BASE_URL override
- Quick Start verified: clone, pip install -e ., OPENAI_API_KEY, review
- config example only shows options the code uses; note that ${VAR}
is not expanded inside the YAML (the old example implied it was)
- remove the unverifiable token-consumption estimates
- document output formats, exit status and the dev workflow
- CONTRIBUTING: no stale test count, 3.10-3.13, current good-first-issues
- footer: Built by Sasa Teguh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tidy-up so the repo is honest and works out of the box for someone who only has an OpenAI or OpenRouter key.
What changed
Behaviour / bug fixes
openai(was Xiaomi MiMo). MiMo stays a preset;MiMoClient,MiMoConfigand the legacymimo:YAML block keep working."stream": falseexplicitly. Found in the real smoke test: an OpenAI-compatible server that streams by default whenstreamis omitted made every agent fail to parse and come back empty.status/errorand the summary report;--outputworks for every format.temperature=0was ignored (orfallback), nullusage/contentfields crashed parsing, and 4xx errors such as 401 were retried. Retries now cover only 429/5xx/network errors.-f jsonon stdout is parseable. An empty directory is an error.Packaging
license = "MIT", 3.13 + OS/console classifiers.mimo-codeguard→codeguard-llm(never published on PyPI). The import package and CLI are stillcodeguard.setup.cfg.mainwould have started failing CI). Auto-fixes applied.Repo hygiene
actions/checkout@v5,actions/setup-python@v6, read-only token..github/dependabot.yml(pip + github-actions, monthly, minor/patch grouped) andSECURITY.md(private reports via GitHub Security Advisories).${VAR}expansion). Quick Start is verified. Added the Sasa Teguh footer. CONTRIBUTING no longer has a stale test count.How it was verified
pytest: 53 → 65 passed, with-W error::DeprecationWarning, on Python 3.10, 3.12 and 3.13. New tests cover the client (stream flag, zero temperature, null fields, retry policy), the orchestrator (all-fail path) and the CLI output.ruff check+ruff format --checkare clean.pip install -e .works,codeguard --versionandcodeguard --helprun, and the wheel metadata is checked withuv build.openaipreset env vars and a YAML config, with no code edits. I reviewed a 4-line file that has a SQL injection.REQUEST_CHANGES.🤖 Generated with Claude Code