Rank bounded file evidence before span projection - #205
Open
Skyline-23 wants to merge 5 commits into
Open
Conversation
- Pool complementary query coverage into one lexical anchor per file - Keep graph-only, residual, and sibling candidates at their baseline scores - Preserve score bounds, deterministic queues, and anchor-owned evidence
- Preserve lexical, graph, and rank-factor components until final combination - Add an optional candidate-collapse seam before comparable-scope participation - Keep the default scalar fusion path unchanged when no collapse is supplied
- Add a bounded round-robin projector for already ranked file queues - Stop projection as soon as the requested result prefix is complete - Keep the existing grouping helper and ordering semantics unchanged
- Collapse complete candidate sets into one bounded representative per file - Preserve the exact baseline top hit while projecting distinct file leaders first - Keep concepts, residual nodes, test priors, and multi-scope score ownership intact
- Carry the existing final-list tie key into bounded file ranking - Keep equal-score representatives and secondary queues aligned with baseline order - Cover conflicts between lexical strength and the caller's tie order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The selection-only projection merged in #137 prevents sibling spans from consuming a bounded prefix, but it intentionally preserves the existing file order. A relevant file whose query evidence is split across sibling symbols can still rank below a less complete single-symbol match.
This PR ranks complete file candidate groups before projecting their exact spans, while keeping score ownership on one real candidate.
Fixes #204.
This branch is based directly on current
mainand is independent of #203. It uses the existing filtered PageRank path, so either PR can be reviewed and merged first.Retrieval effect
A 186-case fixed-base comparison across Django, Nest, PocketBase, and Spring Boot produced:
R@10 improved in 7 cases and regressed in 0. The first result was exact in 186/186 cases, with no repository-level or stem-blind regression.
This is a retrieval-quality and context-budget result, not a query-latency claim.
Changes
Safety invariants
Validation
npm ci/ package prepare build: passedgit diff --check: passedThe sole full-suite failure is the existing
viz --tabs: a bad tab name fails loudlyclean-worktree failure. It is unchanged from currentmain, whose CI is already red on Ubuntu and Windows: https://github.com/NanoNets/Graft/actions/runs/32722784307Final diff: 8 files, +1519/-58.