Commit 46f42cc
feat: US-018 - MCP retrieval metrics extractor (baseline + MCP compatible)
Implements scripts/ccb_metrics/retrieval.py — stdlib-only oracle coverage
extractor for both baseline and MCP-Full agent configs.
Key functions:
- load_oracle_items(task_spec_path): loads required_files, required_symbols,
dependency_chain steps from task_spec.json artifacts.oracle
- extract_retrieval_metrics(task_dir, oracle_items): parses trajectory.json
or claude-code.txt to compute oracle_coverage, time_to_first_oracle_hit_ms,
unique_repos/orgs_touched, and tool_call_counts split by MCP vs local
MCP hit detection via read_file (repo+path), find_references/go_to_definition
(repo+path+symbol). Local hit detection via Read (path suffix), Grep/Glob
(symbol in pattern), Bash (path in cmd). Repo names normalized to strip
github.com/ host prefix for consistent deduplication.
18 doctests pass; py_compile succeeds; CLI writes retrieval_metrics.json.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5969025 commit 46f42cc
File tree
3 files changed
+679
-1
lines changed- ralph-mcp-unique
- scripts/ccb_metrics
3 files changed
+679
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
0 commit comments