Skip to content

Commit 0f9efe4

Browse files
chore(search): drop write-only hasRepo field from semanticCellPage
The repo-only-page totals fix left hasRepo set but never read (trail finding 019f808b-f102). The classify loop keeps excluding repo rows from the upper-tier check and now breaks early on the first hit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013DZSbLpLDGjScbK8LWuDrf Entire-Checkpoint: 01KY09DWWNX3PWG7BHA8WA4PZK
1 parent 5fc1d24 commit 0f9efe4

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

cmd/entire/cli/search_v4.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,10 @@ func annOrScoreOf(r search.Result) float64 {
329329
}
330330

331331
// semanticCellPage is one cell's successful response plus the classification
332-
// bits the merge keys on.
332+
// bit the merge keys on.
333333
type semanticCellPage struct {
334334
body *search.Response
335335
hasUpper bool // any non-repo tier-0/1 row
336-
hasRepo bool // any repo-type row
337336
}
338337

339338
// classifySemanticCells splits per-cell outcomes into successful pages, hard
@@ -353,11 +352,11 @@ func classifySemanticCells(ctx context.Context, results []cellCallResult[*search
353352
case r.value != nil:
354353
p := semanticCellPage{body: r.value}
355354
for _, res := range r.value.Results {
356-
switch {
357-
case res.Type == search.TypeRepo:
358-
p.hasRepo = true
359-
case tierOf(res) == 0 || tierOf(res) == 1:
355+
// Repo rows never count as an upper tier — they're always
356+
// merged regardless of the cell's checkpoint/commit tiers.
357+
if res.Type != search.TypeRepo && (tierOf(res) == 0 || tierOf(res) == 1) {
360358
p.hasUpper = true
359+
break
361360
}
362361
}
363362
pages = append(pages, p)

0 commit comments

Comments
 (0)