correct(CorrectionContext(Profile.MS), "ms10tests" + "q" * 122) returns after 14.2 s, not 10 s.
_search_target checks the deadline once per layer and once per 32 yielded views. indel._views skips duplicate edits within a run of one symbol, so some layers do millions of steps between yields. On a 126-character all-q string, the ('I', 'I', 'I', 'AT') traversal runs for 237 s without a single yield.
Found by Codex on #94. The fix is to poll the deadline inside the traversal; _competitors._known_swaps already does this.
correct(CorrectionContext(Profile.MS), "ms10tests" + "q" * 122)returns after 14.2 s, not 10 s._search_targetchecks the deadline once per layer and once per 32 yielded views.indel._viewsskips duplicate edits within a run of one symbol, so some layers do millions of steps between yields. On a 126-character all-qstring, the('I', 'I', 'I', 'AT')traversal runs for 237 s without a single yield.Found by Codex on #94. The fix is to poll the deadline inside the traversal;
_competitors._known_swapsalready does this.