Loop generator: identical candidates listed twice (no dedupe of survivors) #76
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer#76
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found by the #73 browser acceptance run (2026-11-06, live https://wanderer.bearoverse.com, test user
claude_test, source read fromorigin/deployc48b528d). Minor / UX.Summary
The loop generator can list the same loop more than once.
generateLoops(web/src/lib/routing/generator.ts) keeps one survivor per rotation and never removes candidates whose routed geometry is the same. With a must-visit point (or a constrained network such as a peninsula), several rotations snap to the same ways, and the list shows identical-looking entries.Repro
Expected
Each listed candidate is a different loop. Duplicates are dropped, or the next distinct rotation fills the slot.
Actual
Two candidates, both "7.07 km · ↑ 253 m · Score 21.6". Distance, D+ and score are all the same, so it is almost certainly the same route twice (the run spent its full 40-call budget for one real option). Without the must-visit point, the same start gave 2 distinct loops (4.62 km and 8.13 km).
Evidence
/root/tools/wanderer-shots/acceptance/out/t8l-must-visit-preview.png(candidate list on the left of the map)/root/tools/wanderer-shots/acceptance/out/t8-live-2026-11-06.json(check 8l)Suggested fix: in
generateLoops, dedupe survivors whose distance and D+ match within a few metres and whose geometry overlaps almost completely (or whose snapped via sets are the same) before ranking.Refs #73.
🤖 Generated with Claude Code
Fixed by #77 (duplicate loop candidates dropped). Live since 2026-11-06 (web deploy-e5a57df8, hf #924). t8 on live: 8l lists 1 candidate instead of 2 identical ones; 14/14 PASS.
🤖 Generated with Claude Code