mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 07:22:25 +00:00
The suggestion rounds don't run in rising cost: a MAP diacritic drop (11) comes before a REP confusion (10, 9 for Russian). The engine checked each candidate once, at the first cost it was offered, so the same word found again more cheaply kept the dearer cost and could rank one place too low. Czech's engine always did this, and the merged engine took it over. The candidate set is now a map to the cheapest cost offered so far, and an offer that is no cheaper is skipped as before. Found by CodeRabbit on storytold/wordcraft#4191. Tests: a_cheaper_later_offer_wins; skipping every repeat offer again fails it. Proof: 288 tests.