|
| 1 | +# RepoBrain vs CodeGraph Benchmark |
| 2 | + |
| 3 | +## Latest v2 multi-repository suite |
| 4 | + |
| 5 | +The v2 suite preserves the original VERL/Excalidraw pilot below and adds a |
| 6 | +manifest-driven comparison over pinned releases of Flask, Vite, ripgrep, |
| 7 | +Prometheus, and Grafana. Grafana is a stress track and must be reported |
| 8 | +separately from the four-repository main track. |
| 9 | + |
| 10 | +The suite pins RepoBrain and CodeGraph as well as every corpus revision. It |
| 11 | +builds each product from an independent worktree. The default |
| 12 | +`unrestricted_native` track models normal IDE use: both agents can read the |
| 13 | +same pinned source tree and use their product's native integration without a |
| 14 | +command budget. The optional `source_free` track isolates retrieval indexes. |
| 15 | +Every run is stored below |
| 16 | +`results/runs/<run-id>/<track>/<repository>/repeat-<n>/<product>/`. |
| 17 | + |
| 18 | +Start with the Flask smoke test: |
| 19 | + |
| 20 | +```bash |
| 21 | +bash benchmarks/codegraph-comparison/scripts/bootstrap.sh --repository flask |
| 22 | + |
| 23 | +benchmarks/codegraph-comparison/.work/v2/tools/repobrain-venv/bin/python \ |
| 24 | + benchmarks/codegraph-comparison/scripts/prepare_corpora.py \ |
| 25 | + --repository flask |
| 26 | + |
| 27 | +benchmarks/codegraph-comparison/.work/v2/tools/repobrain-venv/bin/python \ |
| 28 | + benchmarks/codegraph-comparison/scripts/run_benchmark_v2.py \ |
| 29 | + --run-id flask-unrestricted-smoke \ |
| 30 | + --track unrestricted_native \ |
| 31 | + --repository flask \ |
| 32 | + --limit 1 \ |
| 33 | + --workers 1 \ |
| 34 | + --restart |
| 35 | + |
| 36 | +benchmarks/codegraph-comparison/.work/v2/tools/repobrain-venv/bin/python \ |
| 37 | + benchmarks/codegraph-comparison/scripts/render_benchmark_v2_report.py \ |
| 38 | + benchmarks/codegraph-comparison/results/runs/flask-unrestricted-smoke/unrestricted_native/results.json \ |
| 39 | + benchmarks/codegraph-comparison/results/runs/flask-unrestricted-smoke/unrestricted_native/report.md |
| 40 | +``` |
| 41 | + |
| 42 | +For a formal main-track run, prepare the four non-stress repositories and use |
| 43 | +`--repeat 3 --workers 1`. Run Grafana under a different run id. Compare final |
| 44 | +evidence correctness, total wall time, and Trae token usage. Monetary cost is |
| 45 | +reported only when Trae emits it; otherwise it remains explicitly unavailable. |
| 46 | +For `source_free`, a generated corpus manifest records that source files are |
| 47 | +absent from the query directory; this is auditable isolation, not an |
| 48 | +OS/container security boundary. |
| 49 | + |
| 50 | +The v2 entrypoints are: |
| 51 | + |
| 52 | +- `config/manifest-latest-v2.json`: tool and corpus pins |
| 53 | +- `config/questions-v2.json`: 23 repository-specific questions |
| 54 | +- `scripts/bootstrap.sh`: pinned tool/worktree setup |
| 55 | +- `scripts/prepare_corpora.py`: public index builds and source-free publication |
| 56 | +- `scripts/run_benchmark_v2.py`: repeated fair-E2E runner |
| 57 | +- `scripts/render_benchmark_v2_report.py`: multi-repository report |
| 58 | + |
| 59 | +## Legacy pilot |
| 60 | + |
| 61 | +The legacy files contain the original historical comparison of: |
| 62 | + |
| 63 | +- RepoBrain `main` at `b0ebc36b611305dcbdda7343fc8e0136fa7f2686` |
| 64 | +- CodeGraph `1.5.0` |
| 65 | + |
| 66 | +The primary corpora are: |
| 67 | + |
| 68 | +- `verl-project/verl` at `8f8b122195ecf43475679fb6ee0204ee33f387c5` |
| 69 | +- `excalidraw/excalidraw` at `4a6f4e7a32ce3d3360d4d209d14105acc144d8c7` |
| 70 | + |
| 71 | +OpenClaw was also attempted at |
| 72 | +`1e6844b71aa2299c082d23cf66dce38ff00b2211`. Its CodeGraph run is excluded |
| 73 | +because a corporate endpoint policy terminated Node processes operating on an |
| 74 | +OpenClaw checkout. The RepoBrain result is retained only as a scalability |
| 75 | +observation, not as a paired comparison. |
| 76 | + |
| 77 | +## Layout |
| 78 | + |
| 79 | +- `config/manifest.json`: pinned tool, repository, and machine versions |
| 80 | +- `config/questions.json`: shared pilot question set and answer atoms |
| 81 | +- `PROTOCOL.md`: comparison rules and metric definitions |
| 82 | +- `scripts/`: repeatable index and query commands |
| 83 | +- `results/`: normalized summaries and reports |
| 84 | +- `.work/`: ignored third-party checkouts, virtual environments, and indexes |
| 85 | + |
| 86 | +## Run |
| 87 | + |
| 88 | +From the repository root: |
| 89 | + |
| 90 | +```bash |
| 91 | +bash benchmarks/codegraph-comparison/scripts/bootstrap.sh |
| 92 | +bash benchmarks/codegraph-comparison/scripts/run_index_benchmark.sh |
| 93 | +bash benchmarks/codegraph-comparison/scripts/run_retrieval_benchmark.sh |
| 94 | +``` |
| 95 | + |
| 96 | +The scripts do not install anything globally. CodeGraph telemetry and update |
| 97 | +checks are disabled for benchmark runs. |
| 98 | + |
| 99 | +The historical results separate behavior of their pinned RepoBrain commit from |
| 100 | +a ceiling track. That old commit marked deterministic host-runner Git insights |
| 101 | +`partial` and removed the unpromoted generation. Current RepoBrain fixed the |
| 102 | +public full-refresh path; do not mix the old report with latest-v2 results. |
| 103 | + |
| 104 | +The detailed 15-question accuracy table is in |
| 105 | +`results/expanded-question-report.md`. |
| 106 | + |
| 107 | +## Interpretation |
| 108 | + |
| 109 | +RepoBrain scan-only and CodeGraph index different semantic units. Their raw |
| 110 | +node and edge counts are therefore descriptive, not directly comparable. |
| 111 | +Compare: |
| 112 | + |
| 113 | +- cold build wall time and peak RSS |
| 114 | +- index disk size |
| 115 | +- indexed-file coverage relative to tracked source files |
| 116 | +- retrieval answer-atom recall and citation validity |
| 117 | +- output size and query latency |
| 118 | +- explicit incremental update time and freshness |
| 119 | + |
| 120 | +Do not collapse these dimensions into one score. |
0 commit comments