Skip to content

Commit c56aceb

Browse files
sjarmakclaude
andcommitted
feat: US-002 - Repo-set fixture schema and format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dbffee9 commit c56aceb

File tree

4 files changed

+199
-2
lines changed

4 files changed

+199
-2
lines changed

fixtures/repo_sets/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Repo-Set Fixtures
2+
3+
Repo-set fixtures define which repositories are available in each MCP-unique
4+
benchmark task. Each fixture specifies:
5+
6+
- **Repos**: The full set of repositories relevant to the task
7+
- **Access modes**: Which repos are available locally (baseline) vs MCP-only
8+
- **Cross-org flag**: Whether repos span multiple GitHub organizations
9+
- **Sourcegraph indexing**: Whether repos are natively indexed or need mirrors
10+
11+
## Schema
12+
13+
All fixtures validate against `schemas/repo_set_fixture.schema.json`.
14+
15+
## Directory Structure
16+
17+
```
18+
fixtures/repo_sets/
19+
kubernetes-ecosystem.json # k8s core + client-go + api + etcd
20+
nodejs-web-stack.json # node + express + lodash + prisma
21+
python-ml-stack.json # scikit-learn + numpy + pandas + scipy
22+
grafana-observability.json # grafana + loki + mimir
23+
multi-org-go.json # k8s + etcd + grafana (cross-org Go)
24+
```
25+
26+
## Access Mode Semantics
27+
28+
| Mode | Baseline Config | MCP-Full Config |
29+
|------|----------------|-----------------|
30+
| `local_checkout` | Full repo in `/workspace` | Truncated; agent uses MCP |
31+
| `mcp_only` | Not available | Agent discovers via MCP |
32+
| `both` | Full repo in `/workspace` | Also available via MCP |
33+
34+
## Adding a New Fixture
35+
36+
1. Create `fixtures/repo_sets/<name>.json` following the schema
37+
2. Verify all repos are Sourcegraph-indexed (use `mcp__sourcegraph__keyword_search`)
38+
3. For unindexed repos, create an `sg-benchmarks` mirror and set `sourcegraph_mirror`
39+
4. Pin every repo to a specific `revision` (SHA or tag) for reproducibility
40+
5. Run: `python3 -c "import json; json.load(open('fixtures/repo_sets/<name>.json'))"`
41+
6. Validate: ensure `local_checkout_repos` and `mcp_only_repos` are consistent with repo `access_mode`
42+
43+
## Mirror Conventions
44+
45+
Repos not natively indexed in Sourcegraph use `sg-benchmarks` mirrors:
46+
- Mirror naming: `sg-benchmarks/<org>-<repo>` (e.g. `sg-benchmarks/kubernetes-client-go`)
47+
- Mirror revisions tracked in `configs/sg_mirror_revisions.json`
48+
- Use orphan-commit approach for large repos (>2GB)

ralph-mcp-unique/prd.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"project": "MCP-Unique Org-Scale Context Retrieval Benchmark Extension",
3-
"branchName": "ralph/mcp-unique-benchmark",
43
"description": "Extend CodeContextBench with an 'MCP-unique / org-scale context retrieval' layer measuring what local-only agents cannot do: cross-repo + cross-org discovery, symbol-resolution, dependency tracing, and deep-search-driven investigation in polyrepo environments. Key differentiators vs existing cross-repo tasks: org-scale quantity (5-20 repos per task), structured closed-world oracle evaluation, customer-framed prompts from GTM use cases, and Deep Search-specific task variants.",
54
"nonGoals": [
65
"Do not rebuild the existing benchmark framework — extend it",
@@ -82,7 +81,7 @@
8281
"python3 -c \"import json; json.load(open('schemas/repo_set_fixture.schema.json'))\" succeeds"
8382
],
8483
"priority": 2,
85-
"passes": false,
84+
"passes": true,
8685
"notes": "Simplified from v1: host is just a string (not an enum of hosts) since we're deferring cross-host. cross_org boolean replaces the old multi-host requirement. The sourcegraph_mirror field is critical for repos that aren't natively indexed — it points to the sg-benchmarks mirror name."
8786
},
8887
{

ralph-mcp-unique/progress.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,19 @@
4141
- additionalProperties: false on entries catches typos early
4242
- 'tbd' oracle_type needed for stub categories (C, F, G, H, I, J)
4343
---
44+
[2026-02-20 19:47:16 UTC] Ralph start | tool=claude | max_iterations=20 | timeout_sec=900
45+
[2026-02-20 19:47:16 UTC] Iteration 1 started
46+
47+
## 2026-02-20 - US-002: Repo-set fixture schema and format
48+
- Created `schemas/repo_set_fixture.schema.json` (JSON Schema draft 2020-12)
49+
- Top-level required fields: repo_set_id, description, repos, local_checkout_repos, mcp_only_repos, cross_org, language_mix, primary_language
50+
- Repo entry fields: host (default github.com), org, repo_name, full_name, revision, logical_name, access_mode (enum: local_checkout/mcp_only/both), sourcegraph_indexed (boolean), sourcegraph_mirror (optional string)
51+
- Created `fixtures/repo_sets/` directory with README.md documenting structure, access mode semantics, and mirror conventions
52+
- All acceptance criteria verified programmatically
53+
- Files changed: `schemas/repo_set_fixture.schema.json` (new), `fixtures/repo_sets/README.md` (new)
54+
- **Learnings for future iterations:**
55+
- US-001 schema was committed to project root `schemas/` (not ralph-mcp-unique/schemas/) — follow same pattern
56+
- cross_org boolean replaces cross-host requirement (cross-host deferred)
57+
- sourcegraph_mirror is the critical field linking to sg-benchmarks mirrors
58+
- access_mode on each repo entry is the authoritative source; local_checkout_repos/mcp_only_repos are convenience arrays
59+
---
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://codecontextbench.dev/schemas/repo_set_fixture.schema.json",
4+
"title": "MCP-Unique Repo-Set Fixture",
5+
"description": "Schema for repo-set fixtures specifying which repositories are available locally vs via MCP only. Supports cross-org discovery (different GitHub orgs). Cross-host (different code hosts) is deferred.",
6+
"type": "object",
7+
"required": [
8+
"repo_set_id",
9+
"description",
10+
"repos",
11+
"local_checkout_repos",
12+
"mcp_only_repos",
13+
"cross_org",
14+
"language_mix",
15+
"primary_language"
16+
],
17+
"properties": {
18+
"repo_set_id": {
19+
"type": "string",
20+
"minLength": 1,
21+
"pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
22+
"description": "Unique identifier for this repo set (e.g. 'kubernetes-ecosystem'). Used as reference in use case registry."
23+
},
24+
"description": {
25+
"type": "string",
26+
"minLength": 1,
27+
"description": "Human-readable description of this repo set and its purpose."
28+
},
29+
"repos": {
30+
"type": "array",
31+
"minItems": 1,
32+
"items": {
33+
"$ref": "#/$defs/repo_entry"
34+
},
35+
"description": "List of all repositories in this fixture."
36+
},
37+
"local_checkout_repos": {
38+
"type": "array",
39+
"items": {
40+
"type": "string",
41+
"description": "Full name (org/repo_name) of a repo available via local checkout in baseline config."
42+
},
43+
"description": "Repos available locally in baseline config. Subset of repos[].full_name values."
44+
},
45+
"mcp_only_repos": {
46+
"type": "array",
47+
"items": {
48+
"type": "string",
49+
"description": "Full name (org/repo_name) of a repo only accessible via MCP/Sourcegraph."
50+
},
51+
"description": "Repos only accessible via MCP tools. Baseline agents cannot access these."
52+
},
53+
"cross_org": {
54+
"type": "boolean",
55+
"description": "True when repos span multiple GitHub organizations. Enables cross-org discovery tasks."
56+
},
57+
"language_mix": {
58+
"type": "array",
59+
"items": {
60+
"type": "string"
61+
},
62+
"minItems": 1,
63+
"uniqueItems": true,
64+
"description": "Programming languages present across the repos in this fixture."
65+
},
66+
"primary_language": {
67+
"type": "string",
68+
"minLength": 1,
69+
"description": "The dominant programming language across the repo set."
70+
}
71+
},
72+
"additionalProperties": false,
73+
"$defs": {
74+
"repo_entry": {
75+
"type": "object",
76+
"required": [
77+
"host",
78+
"org",
79+
"repo_name",
80+
"full_name",
81+
"revision",
82+
"logical_name",
83+
"access_mode",
84+
"sourcegraph_indexed"
85+
],
86+
"properties": {
87+
"host": {
88+
"type": "string",
89+
"default": "github.com",
90+
"description": "Code host domain. Defaults to github.com. Cross-host support deferred."
91+
},
92+
"org": {
93+
"type": "string",
94+
"minLength": 1,
95+
"description": "Organization or owner on the code host (e.g. 'kubernetes', 'grafana')."
96+
},
97+
"repo_name": {
98+
"type": "string",
99+
"minLength": 1,
100+
"description": "Repository name within the org (e.g. 'kubernetes', 'client-go')."
101+
},
102+
"full_name": {
103+
"type": "string",
104+
"minLength": 1,
105+
"description": "Combined org/repo_name (e.g. 'kubernetes/kubernetes'). Used as key in local_checkout_repos and mcp_only_repos."
106+
},
107+
"revision": {
108+
"type": "string",
109+
"minLength": 1,
110+
"description": "Git ref to pin this repo to (commit SHA, tag, or branch). Ensures reproducibility."
111+
},
112+
"logical_name": {
113+
"type": "string",
114+
"minLength": 1,
115+
"description": "Human-friendly name for this repo's role in the fixture (e.g. 'core-api-server', 'go-client-library')."
116+
},
117+
"access_mode": {
118+
"type": "string",
119+
"enum": ["local_checkout", "mcp_only", "both"],
120+
"description": "How the agent can access this repo. 'local_checkout' = available in workspace, 'mcp_only' = only via Sourcegraph MCP, 'both' = available both ways."
121+
},
122+
"sourcegraph_indexed": {
123+
"type": "boolean",
124+
"description": "Whether this repo is indexed in Sourcegraph (either natively or via mirror)."
125+
},
126+
"sourcegraph_mirror": {
127+
"type": "string",
128+
"description": "Name of the sg-benchmarks mirror if the public repo is not natively indexed (e.g. 'sg-benchmarks/kubernetes-client-go'). Only needed when sourcegraph_indexed=true via a mirror."
129+
}
130+
},
131+
"additionalProperties": false
132+
}
133+
}
134+
}

0 commit comments

Comments
 (0)