Skip to content

P0: Make accuracy benchmarks fail closed and measure real incremental latency #283

Description

@shaggitza

Priority

P0 — trustworthy accuracy and performance claims.

Problem

Current benchmark ingestion and reporting can hide invalid input, overstate coverage, and label cold no-cache execution as incremental latency.

Evidence:

  • benchmarks/real_world/evaluate.py:437-463,620-648,703,771-777
  • benchmarks/real_world/run_current.py:433-670
  • src/fastapi_endpoint_detector/analyzer/scip_analyzer.py:133-161
  • benchmarks/results/verification-v1/mypy/evaluation.json
  • benchmarks/results/verification-v1/scip/evaluation.json
  • benchmarks/results/verification-v1/route-census/findings.md

Checked-in verification evidence currently reports:

  • mypy normalized TP=3, FP=0, FN=68 (4.23% recall);
  • SCIP normalized TP=0, FP=0, FN=71;
  • 48 normalized false negatives attributed to discovery and 20/19 to propagation;
  • one stress PR contributes 106 of 177 normalized FastAPI atoms.
    These artifacts may represent an older code revision and should not be advertised as current performance without provenance.

Integrity defects:

  • Duplicate (repository, PR) truth or prediction rows silently overwrite in dictionaries.
  • Runner always uses --no-cache, reports the wall clock as incremental_seconds, hardcodes index time to zero, and SCIP force-reindexes.
  • Prediction coverage only checks record presence, even for unresolved/empty records.
  • Empty truth/empty prediction PRs receive zero macro scores rather than contributing negative-control specificity.

Required design

  • Validate schemas, unique keys/candidate IDs, confidence values, finite timing, and exact selected-key coverage before scoring.
  • Record source revision, tool/version, configuration, source inventory, and cache/index fingerprints.
  • Separate cold build, warm no-change query, one-file incremental update, baseline+target preparation, peak RSS, and cache size.
  • Report p50/p95/max, record/completed/inventory/changed-symbol coverage, unresolved hunk rate, discovery vs propagation FNs, confidence-tier precision, and negative-control specificity.
  • Keep raw exact and normalized metrics separate; never treat missing/not-evaluable labels as negatives.

Accuracy gates

  • Supported generated typed DAG subset: 100% precision and recall.
  • Dead-code/unrelated-change controls: zero HIGH/MEDIUM candidates.
  • First milestone: normalized recall >=20%, precision >=90%, no new negative-control FP.
  • Propagation milestone: recall >=50%, precision >=90%, every repository non-zero recall.
  • Fresh blind release corpus: recall >=80%, precision >=90%, per-repo recall >=70%, resolved coverage >=95%.
  • HIGH direct evidence precision remains 100%; LOW remains report-only.
  • Paired 10,000-sample PR bootstrap guards against >2-point precision regression.
  • Incremental p95 <=30s for the documented medium-project class; cold build and memory reported separately.

The repeatedly inspected 60-PR corpus should be treated as regression/training data; publication claims require a fresh prediction-blind corpus.

Related: #100, #103, #144, #148.

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarkBenchmark and corpus workbugSomething isn't workingpriority: P0Highest priority: correctness or release-blocking workresearchResearch or experiment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions