CRCA-Context: Counterfactual Robustness of Repository Context Retrieval Under Equivalent Issue Descriptions
Abstract
Before a repository-level coding agent edits code, it must identify which project files are relevant to the issue. Current evaluations usually assess this context-selection step from a single issue statement, although users describe the same bug in many equivalent ways. We introduce CRCA-Context, an open benchmark requiring no paid API calls for counterfactual robustness in repository context retrieval. For each SWE-bench Lite issue, we construct deterministic semantics-preserving views through compression, bulletization, user-style wrapping, nuisance instructions, and distractor context. Using changed files from gold patches as proxy file-relevance labels, we evaluate BM25, TF-IDF, and identifier-based retrieval under these views. Proxy documents exclude added patch lines to avoid solution leakage. On all 300 SWE-bench Lite tasks, BM25 falls from 0.203 original F1@5 to 0.187 worst-view F1@5, while TF-IDF falls from 0.210 to 0.190. A deployment-mode Stable Context Selection baseline uses generated companion views from one observed input and slightly improves BM25 robust hit@5 from 0.560 to 0.567. A 50-task repository-corpus validation shows the same qualitative pattern under a harder retrieval setting. CRCA-Context isolates file-level retrieval as a lightweight diagnostic for that step in human-centered coding-agent workflows, alongside benchmarks that score end-to-end patch success.