Repository navigation
test: time the SQL stripper as the fastest of five runs - #3494
Conversation
The 100 ms ReDoS ceiling failed on two unrelated PRs (about 102 and 104 ms) because a single cold run under coverage on a busy runner can cross it. Catastrophic backtracking slows every run, so the fastest of five keeps the guard while dropping warm-up and runner noise. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr
🤖 CodeAnt AI — Review Status
|
There was a problem hiding this comment.
BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis 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. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
PR Summary by QodoStabilize the SQL stripper performance test with five timed runs
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Merging this PR will improve performance by 29.52%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | answer-ranking: rankAnswerEvidence 40 results |
32.1 ms | 24.8 ms | +29.52% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/fix-sql-strip-timing-flake (7eae0d2) with main (2686f37)
Code Review by Qodo
1. Busy runners still fail the timing test
|
|
On the Qodo finding "Slow runs no longer fail the guard": leaving this as is. Generated by Claude Code |
CodeAnt PR Risk: Low Risk
Assessed commit: |
Code Review ✅ Approved🟢 Low risk · The SQL-stripper stress test only changes timing methodology; production code and interfaces are untouched, limiting impact to CI performance-regression detection. Changes the ReDoS timing check in the SQL stripper test to measure the fastest of five runs instead of a single cold call, keeping the 100 ms ceiling and content assertions. No issues found.
Review coverage🤖 Auto-approval Approved 📋 Rules No rules evaluated 🧪 Functional validation Not enabled · Set up OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
Code review by qodo was updated up to the latest commit 7eae0d2 |
The slowest-of-five bound from #3494 still failed once on the loaded coverage runner (107 ms against 100 ms). A slow stripper or catastrophic backtracking slows every run, so the median keeps catching it while one garbage-collection or scheduler pause no longer fails the build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr
…3497) * test(webkit): settle the last three Safari release-matrix failures - On Call More anchors: poll until the bar and the page agree; the bar resolves its words one animation frame after the page changes. - DSM compare remove: click, then poll the URL with toHaveURL. A soft ?ids= navigation fires no load event, and Promise.all hid whether the click landed. - Phone hidden tabs: poll briefly for the row to leave, and report the band's top, translate, animations and attributes on failure so a WebKit-only failure can be read from the CI log. No test skipped or loosened. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr * test: judge the SQL stripper timing on the median of five warm runs The slowest-of-five bound from #3494 still failed once on the loaded coverage runner (107 ms against 100 ms). A slow stripper or catastrophic backtracking slows every run, so the median keeps catching it while one garbage-collection or scheduler pause no longer fails the build. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr * test: keep an outlier ceiling beside the median SQL timing bound Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr --------- Co-authored-by: Claude <noreply@anthropic.com>
WebKit now runs in CI and its genuine failures were fixed test-side in #3492-#3494 and #3501-#3504. The last three were the same race, a keypress before React attached the handler; the update names the helper to use and the one check left (the first main run after #3504). Claude-Session: https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr Co-authored-by: Claude <noreply@anthropic.com>
User description
Summary
Before: the ReDoS check in
tests/challenger-m3-2-sql-and-lighthouse-stress.test.ts("Edge Case 10") timed one call tostripMigrationSqlagainst a 100 ms ceiling. Under coverage on a busy runner that single cold call crossed the line on two unrelated test-only PRs (#3492 at about 102 ms, #3493 at about 104 ms,Unit coverage partition (1)).After: the test keeps the fastest of five calls against the same 100 ms ceiling. Measured locally under coverage, the cold call takes about 49 ms and warm calls about 25 ms, so the guard keeps a wide margin, while catastrophic backtracking would still slow every call and fail.
How: a five-iteration loop that keeps the minimum duration; the content assertions still check the last result. No test skipped, disabled or quarantined; the ceiling is unchanged.
Areas touched: Delivery and assurance
Verification
npx vitest run tests/challenger-m3-2-sql-and-lighthouse-stress.test.ts→Tests 70 passed (70); prettier and eslint clean.Risk and rollout
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr
Generated by Claude Code
CodeAnt-AI Description
Reduce false failures in the SQL performance test
What Changed
Impact
✅ Fewer CI failures from cold SQL-stripping runs✅ ReDoS slowdowns still trigger the 100 ms limit💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by cubic
Fixes the SQL stripper ReDoS check in
tests/challenger-m3-2-sql-and-lighthouse-stress.test.tsso cold runs under coverage on busy CI runners no longer trip the 100 ms ceiling, while catastrophic backtracking still fails the test.Written for commit 7eae0d2. Summary will update on new commits.