Skip to content

Policy: TK-M003 takes about 100 ms on 64 KiB in the fallback engine (a slow-runner flake) #650

Closed as not planned

Description

@LoopGlitch26

tests/test_policy2.py::Speed::test_every_pack_pattern_searches_64_kib_within_budget failed on CI's py3.13 macOS runner for #642, which doesn't change TK-M003:

TK-M003 pattern 104 ms on 'cc":; "to":[""," "to":["'

TK-M003 (tracekit/policy2/packs/server-comms.yaml: ten or more recipients, or a whole-company address, in to, cc or bcc) takes about 100 ms on 64 KiB of that repeated text in the regex fallback on a slow runner, which is right at the test's budget. So the test fails now and then.

What's wanted: a TK-M003 pattern that decides the same calls but stays well under the budget on 64 KiB (aim for under 20 ms in the fallback), for example by bounding the repetition that scans recipient lists.

Checks:

  • Same verdicts on E17's corpus and tests/data/policy (verdict diff against main: nothing loosened);
  • Speed passes on both engines;
  • E17/E21 run without --rebaseline.

Activity

  1. LoopGlitch26 commented on Nov 10, 2026

    @LoopGlitch26
    MemberAuthor

    Refreshed as #699 with current file paths.

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

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions