Skip to content
CodeSpider
GitHub
CodeSpider / benchmarks

Benchmarks

Measure pull request review quality with reproducible JSONL suites and explicit context ablation.

Verification status
No independently verified comparative benchmark scores are published on this site yet. Small synthetic suites are not evidence of universal review accuracy.

Metrics measured

CodeSpider's evaluation harness (internal/benchmark, CLI: codespider bench) is compatible with ReviewBench and SWE-PRBench-style JSONL fixtures and reports the following metrics:

Benchmark metric definitions
MetricDefinition
PrecisionTP / (TP + FP) — emitted findings matching a ground-truth issue in the same file and category.
RecallTP / (TP + FN) — ground-truth issues detected across the benchmark split.
F1 ScoreHarmonic mean of Precision and Recall.
False-Positive Rate (FPR)Fraction of clean (zero-issue) PR fixtures receiving at least one spurious finding.
Inline Line AccuracyMatched findings whose reported end_line falls within ±3 lines of ground truth.
Latency & allocationsWall-clock review time per PR and change in runtime.MemStats.TotalAlloc (cumulative bytes allocated, not peak memory).

Context ablation & baseline separation

Following SWE-PRBench methodology, CodeSpider separates deterministic static intelligence from LLM reasoning so teams can isolate static signal from model cost:

  • Offline deterministic baseline (--offline): Measures pure AST, invariant, and secret-scan accuracy with zero LLM calls or token spend.
  • Agentic comparison mode: Evaluates models (such as gpt-5, gpt-5-mini, or local vLLM endpoints) under equivalent max_steps and max_tokens_per_run budgets.

JSONL fixture schema

Benchmark fixture fields
FieldPurpose
id, repo, languageFixture identifier, repository slug, and primary language.
diff & commit_patchesUnified PR diff plus optional intermediate commits for deleted-before-HEAD secret detection.
base_files & filesBefore/after file snapshots for Go AST and type-based contract diffing.
expectedGround-truth array of {file, line, category, severity} objects.

Reproduce the eight-case offline baseline

This local capture ran on 2026-11-27 with go1.27.1 darwin/arm64 at source commit fed7f5c. It makes no LLM calls and uses the pinned JSONL fixture.

Run the pinned benchmark
git clone https://github.com/Eresus-Security-OSS/CodeSpider.git
cd CodeSpider
git checkout fed7f5cc90ec22a8e8a15abe45e61f824a4cf1f4
go run ./cmd/codespider bench --offline --dataset testdata/benchmarks/local_suite.jsonl
Recorded stdout
Benchmark: testdata/benchmarks/local_suite.jsonl (offline-deterministic)
Cases: 8 | TP: 9 | FP: 0 | FN: 0 | FP/PR: 0.000
Precision: 1.000 [0.701..1.000] | Recall: 1.000 [0.701..1.000] | F1: 1.000
FPR: 0.000 [0.000..0.793] | LineAcc: 1.000 | SevAcc: 1.000 | AvgLatencyMs: 8.75

The 8.75 ms figure is a mean for this local offline suite. The sample does not measure model latency, real-world review accuracy or competitor performance. The recorded Gitea walkthrough is a separate validation run.

Read the upstream benchmark methodology