fix(#546): down-rank first-party tooling paths in searchContent rerank#557
Merged
Conversation
… implementation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…/install) in rerank Single-word searchContent queries rank by rerankSignalScore, which penalized tests/examples/vendor/docs but had no prior for first-party tooling directories. Mention-heavy files under bench/, scripts/, website/, and install/ tied or beat the implementing src file and won on the path-asc tiebreaker (live repo: 'snapshot' ranked install/install.sh above src/snapshot.zig, gold at rank 6; engram codedb-insights MRR 0.30 vs 0.60). Apply a 0.5 multiplier for bench/benchmarks/scripts/website/install path segments — milder than vendor (0.4), stronger than tests (0.6 on a usually-lower base). Post-fix 'snapshot' ranks src/snapshot.zig first on this repo. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
This was referenced Jun 10, 2026
This was referenced Jun 10, 2026
fix(#598): pre-boost occurrence cap stops mention-dense tooling files saturating the path prior
#599
Merged
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.
Problem
Part of #546 (structurally-relevant files rank below lexical hits). Single-word
codedb_search/CLIsearchqueries rank viarerankSignalScore, which penalizestests/examples/vendor/doc files but has no prior for first-party tooling directories. Mention-heavy files underbench/,scripts/,website/,install/tie the implementing source file and win the path-asc tiebreaker.Observed on this repo (audit run, 2026-06-10):
snapshot→install/install.shoutrankedsrc/snapshot.zig(gold at rank 6)cli status→scripts/codedb-cliat Bug: Agent.name stores borrowed memory (use-after-free risk) #2,src/main.zigat Bug: watcher enqueues dangling path pointer for modified events #3word index/trigram index→bench/run-benchmarks.*mixed into top-5codedb_insightsover 25 commits: codedb MRR 0.30 vs engram re-rank 0.60, diagnosis "lexical anti-correlates"Fix
One multiplier in
rerankSignalScore(src/explore.zig): path segmentsbench/benchmarks/scripts/website/install→ score ×0.5 (between vendor 0.4 and tests 0.6). BM25/searchContentRankedpath was checked and does not exhibit the bug in a minimal repro, so it is left untouched.Failing Test
test "issue-546: searchContent rerank penalizes non-source tooling paths (bench/install/scripts/website)"insrc/test_search.zig— 5 identical-content files; pre-fixbench/sample.zigranks first by path-asc, post-fixsrc/sample.zigwins. Committed red in 87e5386, fix in follow-up commit.Validation
zig build test: 728/728 passcodedb search snapshotnow rankssrc/snapshot.zigBug: edit.zig advisory lock not released on error paths #1;install/install.shno longer in the top page🤖 Generated with Claude Code