Repository navigation
Conversation
STRING_RE let a backslash match both the escape branch and the generic any-character branch, so lines with many escaped quotes and no closing quote took exponential time to scan. Use the unambiguous "(?:[^"\\]|\\.)*" form per quote character and add regression tests. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codeowners resolved asResolved from the full PR diff against |
Dependency direction analysis
|
There was a problem hiding this comment.
More details
Direct timing and detection probes support that all three quote forms avoid the reported backtracking while preserving anchor detection. No actionable regression was identified.
🤖 Bits Code Review · Commit 60790e7
Description
Fix the deprecated-anchor check so it no longer hangs on lines with many escaped quotes.
The check removes quoted strings from each added line before it looks for the deprecated label. The old string pattern let a backslash match two ways: as part of an escape pair and as a plain character. A line with many escaped quotes and no closing quote then took exponential time. The CI job ran until its timeout.
The new pattern uses the unambiguous form
"(?:[^"\\]|\\.)*"for each quote character (",'and a backtick). Each character has one way to match. Results for normal input do not change.Customer impact
None. This is a CI script.
Testing
Risks
None. The script only runs in CI.
Additional Notes
Edge case: an unterminated string that ends in a backslash before its last quote, such as
"abc\", is no longer treated as a closed string. This follows normal string rules. The check still matches the label anywhere on the line first, so no label is missed.🤖 Generated with Claude Code