feat(bench): expansion-gate latency micro-bench harness (#741) - #764
Conversation
There was a problem hiding this comment.
Sorry @robotrocketscience, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR-size soft capThis PR is over the advisory size threshold:
Bigger PRs collide with more open work, which under the parallel-session workflow tends to produce repeated This is advisory only — nothing is blocked. If the size is intentional (large refactor, module removal, generated code), apply the |
|
[claim:review:fermat:2026-05-14T04:42:09Z] |
Standalone script that replays a labelled JSONL fixture against retrieve() in four cells: (gate-on/off) x (bfs-on/off). Per-cell per-label p50/p95 wall-clock + count of LaneTelemetry.expansion_gate_ skipped_bfs fires. Output schema matches the #741 acceptance bullet: benchmarks/results/<run-id>/expansion_gate_bench.json. Seeds aelfrice.benchmark.seed_multihop_corpus so BFS and HRR have real edges to walk. Latency, not recall, is the load-bearing metric; the small corpus is intentional. Gate axis driven by AELFRICE_NO_EXPANSION_GATE; harness clears AELFRICE_FORCE_EXPANSION on every cell to prevent contamination. The #741 acceptance numbers (broad p95 >=30% improvement, narrow p50 no regression) require a 50+50 labelled corpus that lives in the private lab repo. This harness is the public-side replay path.
10 broad + 10 narrow prompts hand-authored from in-repo public sources only (#741 issue body, CHANGELOG, README, source-file paths and identifiers under src/). NOT the acceptance corpus -- this fixture is purely for verifying the harness produces parseable cells and the gate fires on broad-shaped prompts. The real 50+50 labelled corpus is sourced out-of-tree per the gate:lab-corpus convention (see #724). Smoke run on this fixture: gate-on cell skips BFS on 10/10 broad and 1/10 narrow prompts; gate-off cells correctly show zero skips. Sub-millisecond latencies on the 12-belief multihop corpus are noise-floor and are not load-bearing.
Hand-authored 100-row JSONL fixture for the expansion-gate latency acceptance bench. Prompts drawn from in-repo public material (README, CHANGELOG, docs/, src/, tests/) covering retrieval pipeline design, edge-type semantics, gate resolver precedence, and identifier lookups. Smoke run shows the gate-on/bfs-on cell skips BFS on 50/50 broad rows and 0/50 narrow rows, matching the gate's intent.
0e04f31 to
deee6b8
Compare
|
Rebased onto github/main (3 atomic commits, all signed G: harness → stub fixture → 100-row acceptance fixture). Verified: What's clean
Non-blocking nit (worth a follow-up comment, not a fix-before-merge)The PR body says "The 50+50 labelled corpus that the #741 acceptance bullet actually requires ... is sourced out-of-tree per the Labeling |
|
merge-train: merged deee6b8 → |
|
[release:review:fermat:2026-05-14T04:50:37Z] |
Summary
Public-side replay path for the #741 acceptance bullet. Adds a
standalone latency micro-bench at
benchmarks/expansion_gate_bench.pythat runs
retrieve()over a labelled JSONL fixture in four cells:(gate-on/off) × (bfs-on/off). Per cell × label, reports p50/p95wall-clock plus the count of
LaneTelemetry.expansion_gate_skipped_bfsfires.
Also ships a 10+10 stub fixture at
benchmarks/fixtures/expansion_gate_stub.jsonlfor wiring smoketests only — hand-authored from in-repo public sources (#741 body,
CHANGELOG, README, source-file identifiers).
What this does NOT do
The 50+50 labelled corpus that the #741 acceptance bullet actually
requires (broad-prompt p95 ≥ 30% improvement; narrow p50 no regression)
is sourced out-of-tree per the
gate:lab-corpusconvention on #724.This PR is the harness + smoke fixture; numbers come from a follow-up
run against the real corpus.
Smoke run
Output (excerpt):
Confirms the gate fires on broad prompts (10/10) and the cell wiring
is correct. Sub-millisecond latencies on the 12-belief multihop
corpus are noise-floor.
Test plan
benchmarks.expansion_gate_bench.Refs #741.