Add structural-discovery ROI comparison to research-eval (closes #311)#335
Conversation
Implements a deterministic, no-network eval harness that proves MAP minimality is active and isolated without live model calls: - build_doctrine_block() mirrors _minimality_doctrine_block() from map_step_runner so each arm's context can be verified independently. - Three fixture tasks: OVER_BUILD_TRAP (stdlib reuse), SAFETY_GUARD (path-traversal invariant must survive), IRREDUCIBLE (convergence expected; warns not fails on LOC swing). - Contamination check: off arm context must lack <MAP_Minimality_Doctrine>; lite/full/ultra arms must have it — hard FAIL on mismatch. - Safety check: required_patterns must appear in both arm outputs — hard FAIL when a pattern is dropped. - LOC delta: warns (not fails) when treatment adds lines vs baseline. - Report persisted as JSON to .map/eval-runs/minimality/<timestamp>.json. - 28 tests (VC1–VC14); ruff + pyright clean; make check green (3370 tests). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
Implements `research_eval_compare` module with side-by-side A/B comparison of two ResearchEvidence runs (baseline vs treatment), scoring quality metrics (precision/recall/F1) and exploration-cost metrics (location_count, stale_count, overbroad_count, avg_span) independently so token/LOC reductions cannot mask lower localization quality. - `src/mapify_cli/research_eval_compare.py`: DiscoveryMetrics, ArmScore, CompareReport dataclasses; compare_research_runs() / compare_research_files() public API; default_compare_path(); FIXTURE_* constants for tests. Hard failures: QUALITY_FLOOR (treatment F1 below floor), STALE_REGRESSION (new missing-file paths vs baseline). Advisory warnings: QUALITY_REGRESSION, OVERBROAD_INCREASE. - `tests/test_research_eval_compare.py`: 20 fixture-only tests (VC1-VC11), no live model calls. - `src/mapify_cli/__init__.py`: `mapify research-eval compare` CLI command with --min-file-f1, --min-line-f1, --max-stale-regression, --out flags; exits 0=pass, 1=hard failure, 2=input error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ 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 |
Summary
research_eval_comparemodule: side-by-side A/B comparison of two ResearchEvidence runs (baseline vs treatment), scoring quality (precision/recall/F1) and exploration-cost (location_count, stale_count, overbroad_count, avg_span) metrics independently. Token/LOC reduction cannot mask lower localization quality.mapify research-eval compareCLI command with quality floor, stale-regression, and overbroad-warning flags.Files changed
src/mapify_cli/research_eval_compare.py— new module:DiscoveryMetrics,ArmScore,CompareReportdataclasses;compare_research_runs()/compare_research_files()public API;default_compare_path(); fixture constants.tests/test_research_eval_compare.py— 20 tests covering hard failures (QUALITY_FLOOR, STALE_REGRESSION), advisory warnings (QUALITY_REGRESSION, OVERBROAD_INCREASE), delta keys, JSON serialization, CLI flags.src/mapify_cli/__init__.py— addedmapify research-eval compareTyper command.Hard failure criteria
Advisory warnings
Test plan
uv run pytest tests/test_research_eval_compare.py -v→ 20 passeduv run python -m pyright src/mapify_cli/research_eval_compare.py tests/test_research_eval_compare.py src/mapify_cli/__init__.py→ 0 errorsmake check→ 3390 passed, 4 skippedCloses #311
Generated by Claude Code