test: turn performance scratch notes into a reproducible regression baseline #127
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.45) × (1 − Review Confidence (0.32)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 408 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 59% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #127"
general
weight: 0.35
coderabbitai[bot]
Closes #115
What changed
tests/performance/todo.mdandhidden_info.mdinto the maintained [performance baselines doc](docs/code-maintainability/performance-baselines.md): the rawEXPLAINcaptures are preserved as evidence underdocs/code-maintainability/performance-evidence/explain-13/, and the scratch files are deleted with a pointer left intests/performance/README.md.reciprocal_rank_fusioncapability as the representative operation. It is pure, synchronous, deterministic, and needs no external services.tools/operations/performance/rrf_baseline.py) and a committed measured baseline (tests/performance/baseline/rrf_fusion.json) with environment, command, and method recorded.Measured baseline and budget
On CPython 3.12.13 / Linux x86_64 at
b72b7409: fusion min 170,043.57 ns/op, plain-dict reference min 104,437.38 ns/op, ratio 1.6282. Budget = 4x ratio (limit 6.5127). The ratio cancels machine-speed differences; the min-of-9 estimator ignores additive scheduler noise; 4x headroom absorbs interpreter/CI variance while still catching the 10–50x regression class (e.g. Pydantic construction drifting into the inner loop). Median/p95 are recorded for diagnosis, not asserted.Enforcement
make perf-gate(uv run pytest tests/performance/ -q) is wired intomake selfcheckand CI. The live test passes; sabotage paths fail:--check --budget-multiplier 0.01exits 1 withREGRESSION, and a unit test injects a 2000x-slowed fusion and asserts the gate fails.Verification
uv run ruff check apps/api/src/ tests/anduv run ruff format --check apps/api/src/ tests/: clean (harness also ruff-clean).uv run ty check apps/api/src/: clean;uv run lint-imports: 22 contracts kept;ast-grep scan apps/api/src/: clean.make perf-gate: 8 passed; fusion unit + property tests: 13 passed; gate also passes under coverage instrumentation.make contextneeds the gitignored.testing-credentials.json; the full suite has known missing.env/API-key/Postgres-DNS failures documented indocs/coverage-gate.md. No full-suite fix attempted.Not merged by the author — awaiting review.
Summary by Sourcery
Establish a reproducible regression baseline for reciprocal-rank fusion and enforce its performance budget in local self-checks and CI.
New Features:
Enhancements:
make selfcheckand CI, and document themake perf-gatecommand.CI:
Documentation:
EXPLAINcaptures in the maintained documentation area.Tests:
Chores: