Repository navigation
index: preserve matched branches in filename-only searches - #1297
Open
perfloop-agent wants to merge 2 commits into
Open
perfloop-agent wants to merge 2 commits into
perfloop-agent wants to merge 2 commits into
Conversation
keegancsmith
approved these changes
Nov 26, 2026
keegancsmith
left a comment
Member
There was a problem hiding this comment.
Thanks! ya need to rebase
Signed-off-by: Perfloop Agent <agent@perfloop.ai>
Signed-off-by: Perfloop Agent <agent@perfloop.ai>
perfloop
Bot
force-pushed
the
perfloop-pr-open-3ym993gb7r
branch
2 times, most recently
from
December 1, 2026 17:19
33eed9e to
b08b5a4
Compare
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.
Filename-only searches can point multi-branch file results at the wrong commit. This fixes branch-filtered
type:fileandtype:filenamequeries without changing their filename-only output or scores.cc @keegancsmith @stefanhengl
For a file shared by
main@sha-main,dev@sha-devandrelease@sha-release,type:file branch:dev hellocurrently reports[main dev release]andsha-main. It now reports[dev]andsha-dev. Subrepository versions follow that branch by name even when their branch list is reordered or shorter. A missing branch version is left empty.Branch selection now visits matched atoms inside filename-only wrappers. Fragment gathering and atom scoring still skip those children: the wrapper controls what is displayed, not which branch filters apply. Unmatched alternatives and negated filters remain excluded from branch collection. Queries without a matched positive branch filter retain the existing all-containing-branches fallback.
Local measurement:
type:file funcover 48 committed index Go files took 325,397.5 ns/search on Base and 325,365.5 ns/search on Patched (72 pairs). Paired Patched-minus-Base change: −437 ns/search, interval −2,650 to +7,236 ns/search; inconclusive.Test coverage
TestTypeFileNameBranchesinindex/eval_test.gocovers composed branch filters, wrapper placements and parsed queries.TestSubRepoBranchVersionsinindex/eval_test.gocovers unaligned and missing subrepository branches. The scoring check inindex/index_test.goreuses the existing filename-only fixture.Go index package tests passed.
The full-suite CI test job is left to target CI.
Case and evidence
Made by Perfloop. Human sponsor: Tomás Senart.