Files
8a0e956da3 fix(search): weak-top floor on autocut to stop cross-source result collapse
Takeover of #1863 (rebased onto master).

applyAutocut normalizes the cliff test by the top rerank score, so a weak
top (~0.317 on a rare-term cross-source pool) rescales to 1.0 and a normal
decay below it masquerades as a confident cliff — collapsing the pool to 1
result (`--source __all__` returned 1 while a single-source scoped query
returned ~12).

Fix: AutocutConfig.minTopScore (default 0.5) — below the floor autocut
no-ops and preserves recall; at/above it behavior is unchanged. Threaded
like autocut_jump (mode bundle → search.autocut_min_top_score config →
per-call → pick-chain). Gated on rerankerEmitsNormalizedScores(effective
model): raw-logit local rerankers (llama-server/Qwen3) get floor 0 since a
[0,1] threshold is meaningless on an unbounded logit scale.

Rebase deltas vs #1863: KNOBS_HASH_VERSION 12→13 (master took 12 for the
#2825 hard-exclude fold; acmts= folds into the key as the v=13 addition)
and version-pin tests/comments updated accordingly.

Co-authored-by: rayers <rayers@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:39:44 -07:00
..