Repository navigation
Mvp/round 16 - #142
Merged
Merged
Mvp/round 16#142
Conversation
…egal_rules Rewrite citation regexes with linear-time bounded patterns to prevent catastrophic backtracking on multi-article enumerations. Remove gold-set phrases and per-text exceptions. Add substring guards and fast paths. Bump RULES_VERSION to tr-legal-rules-2. Add performance regression tests.
The Python 3.11 and 3.13 coverage jobs pass the 82% coverage floor but fail strict 200 ms extraction/citation assertions while tracing those calls. Pause coverage only for the wall-clock tests using pytest-cov's no_cover marker. All tests still execute in the same mandatory CI jobs with their original inputs, assertions and 200 ms limits; functional and structural tests remain instrumented. Production code and coverage thresholds are unchanged.
Strict citation latency checks still failed after pausing coverage, with CI timeouts inside the allocation of one empty list per input character. Allocate offset buckets lazily while retaining the same linear sweep and match order. A sparse 32 KB input now peaks near 298 KB instead of 2.15 MB and triggers no collections in the controlled allocation probe (previously six). Add an isolated allocation regression that fails on the eager implementation. All complete ordered citation fields match on 30,000 seeded inputs with both default and scoped resolvers. Keep the original 200 ms latency limits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.