Skip to content

Correction overruns its ten-second deadline on repeated-symbol input #136

Description

@BenWestgate

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.

Activity

  1. added 4 commits that reference this issue on Oct 7, 2026
    86a789d
    f1d223c
    3fe58cd
    56bba33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions