Expand description
Differential resolution benchmark (SCC-126): how much does LSP resolution
improve on the native resolver? For each fixture repo in
benchmarks/tasks.json the benchmark:
- indexes a fresh copy (in-process,
cmd_index --quiet), - snapshots the native state:
native_resolvedRESOLVED call edges andnative_externalEXTRACTED call edges toexternal_apientities, - runs the pyright LSP pass (
start_pyright+resolve_call_definitions, the same loopscc resolve --lspuses), - diffs the store afterwards:
lsp_upgrades= edges that were EXTRACTED before and are RESOLVED now (matched on the preserved evidence id),lsp_unresolved= EXTRACTED edges remaining,agreement= native RESOLVED edges left untouched, - records resolution conflicts (SCC-125) as drift findings.
Gate: upgrades > 0 across the corpus and unresolved / external < min_agreement (default 0.30 — at most 30% of external call candidates may
stay unresolved).
Structs§
- External
Call Edge - One native EXTRACTED call edge captured before the LSP pass.
- Repo
Resolution - Differential numbers for one repository.
- Resolution
Summary - Corpus totals plus per-repo table.
Constants§
- DEFAULT_
MIN_ AGREEMENT - Default maximum allowed fraction of external call candidates that remain unresolved after the LSP pass. Default unresolved-ratio limit. Corpus externals are mostly third-party packages no LSP resolves without installs, so the default gate is conflicts-only (ratio limit 1.0 = never fails on third-party imports); the benchres fixture test exercises the strict ratio gate on an upgradeable repo.
Functions§
- check_
gate - The resolution benchmark gate (SCC-126): at least one upgrade across the
corpus, and fewer than
min_agreement(default 0.30) of external call candidates left unresolved. - collect_
external_ edges - Collect every EXTRACTED
callsedge currently in the store, with the evidence-derived callee/line needed for conflict records. - diff_
repo - Full differential for one fixture repo: index, run the LSP pass, diff, and persist resolution-conflict drift findings. Skips the LSP pass gracefully when pyright is not installed.
- diff_
upgrades - Diff the post-LSP store against pre-LSP EXTRACTED edges: every RESOLVED
edge whose evidence id matches a captured EXTRACTED edge is an upgrade.
Returns
(source file, upgrade record)pairs. - print_
summary - run_
resolution_ benchmark - Run the differential resolution benchmark over every repo referenced in
benchmarks/tasks.jsonand apply the gate.