fix: full_up_scan didn't reach rank 1 when own rank is close to the top #8
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DasAoD/sf-guildscanner!8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/full-up-scan-low-rank-window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Reported at rank #62: with "Komplette Ehrenhalle bis Rang 1" checked, both the results table and the "Vollständige Ehrenhalle" view stopped at rank #42 instead of reaching #1 — and every entry shown was marked "Angreifbar: Ja", which should be impossible for a real full-ladder scan.
Root cause
rank_up_start = own_rank - 20. When that value is small enough (<= 51),page_lowbecomes0, meaning the mandatory-window pages (Phase 1a) already include page 0 — which covers ranks 1-51. But Phase 1a'sin_rank_windowfilter was hardcoded to[rank_up_start, rank_down_end]regardless offull_up_scan, so the already-fetched ranks 1 throughrank_up_start - 1got discarded before ever reachingall_hof_guilds. The separate extension phase meant to handle "scan further up" never ran either, since it's guarded bypage_low > 0— there was nothing left to extend, the gap was purely in the filter on data already in hand.This only affects accounts whose rank is close enough to #1 that
rank_up_start <= 51(roughly rank ≤ 71 with the default 20-rank window). At larger ranks (e.g. #2102, tested earlier) the separate extension phase already handles it correctly.Fix
in_rank_windownow widens torank <= rank_down_end(any rank above, down through the down-limit) whenfull_up_scanis set, instead of being clamped torank_up_start.Test
cargo build --all-targetscompiles without warnings. Real-world verification (re-running a scan at rank #62 with "Komplette Ehrenhalle bis Rang 1" checked, confirming it now reaches #1 with a mix of Ja/Nein attackable badges) still needs to happen after deploy.🤖 Generated with Claude Code