## Problem Pre-commit hook gagal review PR dengan diff besar (262K chars, max 51200), tapi **tidak block** — hanya warning. Commit tetap jalan tanpa Cora review. ``` Warning: Cora stderr: Error: Diff too large (262187 chars, max 51200). Use --base to review a specific branch, or increase hook.max_diff_size. ``` Ini artinya PR bisa merge tanpa code review sama sekali. ## Root Cause Pre-commit hook `on_violation` default ke `warn`, bukan `disallow`. Jadi Cora skip tapi push tetap lolos. ## Proposal ### 1. `.cora.yaml` — `disallow` option for `on_violation` ```yaml hooks: pre-commit: max_diff_size: 51200 on_violation: disallow # NEW: block commit, not just warn ``` When `disallow`: `git commit` fails with exit code 1. Dev can override with `git commit --no-verify` (manual escape hatch). ### 2. CI mode: `cora review --base <branch>` Add `--base` flag support for CI workflows: ```yaml # .github/workflows/ci.yml - name: Cora Review run: cora review --base ${{ github.base_ref }} env: CORA_API_KEY: ${{ secrets.CORA_API_KEY }} ``` This compares full PR diff against target branch — no `max_diff_size` limit in CI mode. Becomes a required GitHub check. ### 3. Workflow support in config ```yaml ci: base: ${{ github.base_ref }} # auto-detect in CI required: true # fail workflow if cora finds issues ``` ### Trade-offs | Aspect | Pro | Con | |--------|-----|-----| | `disallow` on large diff | Forces small, reviewable PRs | Annoying for legitimate large changes | | `--no-verify` escape hatch | Flexibility | Can be abused | | CI `--base` mode | Always review, no size limit | Uses API quota per PR | | Required check | Cannot merge without review | CI must pass first | ### Trigger Triggered by: ajianaz/uteke PR #160 (262K diff, cora skipped via pre-commit warning) Co-Authored-By: codecoradev <noreply@github.com>
Activity
fix: regex panic on optional hunk groups + raise max diff to 5MB
fix: regex panic on optional hunk groups + raise max diff to 5MB
feat(website): landing page redesign — CSS, components, animations (#171