You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(bench)+docs: --depths flag + editorial paper fixes (D)
(1) Multi-depth orchestrator (E from previous review):
`run_final_eval.py --depths L1,L2,...` adds an outer loop over EGO graph
traversal radius. Heavy phase (graph build + scoring) re-runs per depth
because rel_scores depend on radius; budgets within a depth still share
scored state via the existing multi-budget reuse path. Output:
<name>_budget_sweep/L<depth>/b<budget>.checkpoint.jsonl
When --depths is empty, behavior is unchanged from the previous commit
(single depth from MODE.ego_depth_extended). The flag is a no-op for
non-diffctx baselines and non-EGO scoring modes (warning printed).
Per-instance EvalResult.extra now records `ego_depth` when the run
explicitly set the depth, so the aggregator can stratify by L.
The per-manifest dispatcher was extracted into `_process_manifest` /
`_sweep_dir` helpers to keep `main` readable through the depth × manifest
× budgets nested loop. Behavior is bit-identical to the previous
single-budget and single-depth single-budget paths when those flags are
empty.
(2) Editorial paper fixes (D):
a. Post-hoc diff-understanding framing in §1. The intro now states
explicitly that diffctx solves "post-hoc diff understanding" — the
patch is given as input, recall measures coverage of the files the
patch touches plus the dependency neighborhood needed to interpret
them. Distinct from pre-solution issue resolution (the standard
SWE-bench setup); we use those benchmarks' gold patches as known
diffs against which retrieval is scored, never as a target an agent
must generate. Closes the open framing item from external review.
b. "42 languages" downsize. Contributions list and Appendix
tab:language-support now group languages by empirical-validation tier:
Tier 1 (n>=10 in eval): Python, TS, JS, Java, Go, C, Rust, C++.
Tier 2 (semantic edge builders, no large-scale validation):
~30 languages including C#, Ruby, PHP, Swift, Haskell, etc.
Tier 3 (parser only, no semantic edges): YAML, JSON, TOML.
Generic fallback: Markdown, plain text, dotfiles, unparsed.
The original undifferentiated "42 languages" claim conflated three
different levels of support; the tiered table makes the empirical
contribution and the implementation upper bound separately legible.
Copy file name to clipboardExpand all lines: docs/Context-Selection-for-Git-Diff/v2/main.tex
+23-11Lines changed: 23 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -45,13 +45,15 @@ \section{Introduction}
45
45
46
46
We address this gap by formalizing diff context selection as \textbf{budgeted submodular maximization} over Code Property Graphs. Our key insight is that ``understanding a change'' can be operationalized as covering explanatory concepts---definitions, call targets, type signatures, impacted tests---that propagate through structural dependencies with diminishing returns.
47
47
48
+
\paragraph{Task scope: post-hoc diff understanding.} We address \emph{post-hoc diff understanding}: a patch $\Delta$ is given as input, and the task is to retrieve a compact set of explanatory code fragments needed to review or reason about that patch within a token budget. This is distinct from \emph{pre-solution issue resolution} (the standard SWE-bench setup), where an agent must produce $\Delta$ from a problem statement without seeing the gold patch. The benchmarks in Section~\ref{sec:eval} are repurposed from issue-resolution datasets: we use their gold patches as known diffs against which file-level retrieval is scored, never as a target an agent must generate. The patch is on the input side; the recall metric measures whether the retrieved context covers the files the patch touches and the dependency neighborhood needed to interpret them.
49
+
48
50
\paragraph{Contributions.}
49
51
\begin{enumerate}
50
52
\item A formal problem statement casting context selection as budgeted utility maximization over a partition matroid on multi-resolution fragments. We do not claim a new approximation algorithm; we use known optimization structure to make context selection explicit, analyzable, and extensible. An ``algorithm $\times$ constraint $\times$ guarantee'' table (Table~\ref{tab:algo-constraint-guarantee}) separates the deployed heuristic from analyzable variants and from the submodular concept-coverage extension
51
53
\item A typed-edge dependency-graph framework with per-category extraction and treatment (e.g., hub-suppression exemption), generalizing flat code-graph approaches
52
54
\item A pluggable relevance-scoring abstraction $\hat{w}(f, \Delta)$ where three algorithm families (bounded ego-network expansion, Personalized PageRank, BM25) instantiate the abstract signal under a single retrieval framework
53
55
\item An evaluation protocol using file-level recall against annotated golden contexts at a fixed token budget on multi-language software-engineering benchmarks, with paired-bootstrap statistical comparison against external baselines (BM25 over patch identifiers; Aider repo-map)
54
-
\item A reference implementation supporting 42 programming languages and configuration formats (Appendix~\ref{sec:impl-inventory})
56
+
\item A reference implementation with tree-sitter parsing for 42 source and configuration formats and dedicated semantic edge builders for 36 of them (Appendix~\ref{sec:impl-inventory}). Of these, eight (Python, JavaScript, TypeScript, Java, Go, Rust, C, C++) appear in the empirical evaluation with $n{\geq}10$ instances; the rest are supported but unvalidated at scale (Section~\ref{sec:impl-inventory}, Table~\ref{tab:language-support})
55
57
\end{enumerate}
56
58
57
59
\newpage
@@ -792,24 +794,34 @@ \section{Heuristics Annex}
792
794
\section{Language Support}
793
795
\label{sec:impl-inventory}
794
796
795
-
The reference implementation provides dedicated tree-sitter extraction for 42 languages, grouped by domain. Languages without dedicated extractors fall back to a generic strategy (paragraph-level fragmentation for prose-like content, statement-level for code-like content).
797
+
The reference implementation includes tree-sitter parsing for 42 source and configuration formats and dedicated semantic edge builders for 36 of them. Coverage is uneven: a handful of languages have been used extensively in the evaluation; most others are present at the parser/edge-builder level but unvalidated against a benchmark of meaningful size. Table~\ref{tab:language-support} groups languages by tier of empirical exercise so the contribution and the open work are not conflated.
796
798
797
799
\begin{table}[h]
798
800
\centering
799
801
\small
800
-
\begin{tabular}{lp{8.5cm}}
802
+
\begin{tabular}{lp{9.5cm}}
801
803
\toprule
802
-
\textbf{Group} & \textbf{Languages} \\
804
+
\textbf{Tier} & \textbf{Languages} \\
805
+
\midrule
806
+
Tier 1 — empirically validated ($n{\geq}10$ in evaluation) &
\caption{Languages supported by the reference implementation. General-purpose and functional languages have full semantic edge builders (call/import resolution, type references); markup and data formats use schema-aware extractors where applicable.}
824
+
\caption{Tiered coverage of the reference implementation. Tier 1 has both edge builders and per-language recall numbers in Table~\ref{tab:prelim-lang}. Tier 2 implements the same edge builders but is not exercised against a benchmark of meaningful size in this paper; its inclusion is a code-level claim, not an empirical one. Tier 3 supplies parsing only — sufficient to fragment files for selection but not to draw structural edges. Treat the count of supported formats as an implementation upper bound; only Tier 1 carries empirical evidence.}
0 commit comments