Commit c0a175d
authored
* fix: anchor Fbe.mask_to_regex regex to prevent prefix collisions
The regex built by Fbe.mask_to_regex was unanchored, so
re.match? would match substrings. For exclusion masks like
'-zerocracy/judges-action', this caused repositories with
prefix collisions (e.g. 'zerocracy/judges-actions' or
'zerocracy/judges-action-old') to be incorrectly excluded.
Added \A and \z anchors to ensure full-string matching.
Wildcard masks (zerocracy/*) are unaffected since .*
already absorbs the entire tail.
Added four direct unit tests for Fbe.mask_to_regex:
- test_mask_to_regex_exact_match
- test_mask_to_regex_prefix_collision
- test_mask_to_regex_wildcard
- test_mask_to_regex_case_insensitive
* fix: update off_quota assertion for search threshold
1 parent ba322fb commit c0a175d
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
73 | 95 | | |
74 | 96 | | |
75 | 97 | | |
| |||
0 commit comments