Conversation
Replaces N+1 update loop with a single batch update query in `AuditCanonicalUrls` command. Adds a reproduction feature test `SeoAuditCanonicalTest`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
QA Pipeline Results
Artifacts
Generated by core php qa pipeline |
- Remove stderr redirection (`2>&1`) from Psalm, PHPStan, Pint, and Composer Audit commands to prevent progress output from corrupting JSON/SARIF files. - Upgrade `github/codeql-action/upload-sarif` to `v4` to address deprecation warning and invalid SARIF handling.
Adds a post-processing step in the QA pipeline to sanitize `psalm.sarif` by ensuring all location coordinates (startLine, startColumn, etc.) are at least 1, as required by the SARIF schema. This resolves the `upload-sarif` action failure.
Uses `jq`'s `walk` function to recursively sanitize all `physicalLocation` objects in the SARIF file, ensuring startLine/startColumn/etc are always at least 1. This fixes validation errors from the `upload-sarif` action.
📝 WalkthroughWalkthroughGitHub Actions workflow updated with improved error handling and SARIF sanitization for Psalm. Console command refactored to use batch database updates instead of per-record persistence. Comprehensive feature test added for canonical URL auditing functionality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
💡 What: Optimized
AuditCanonicalUrlscommand to perform a batch update for protocol fixes instead of iterating and saving each record individually.🎯 Why: Solves the N+1 update performance issue where fixing many records would result in many database queries.
📊 Measured Improvement: Replaced N update queries with 1 update query. Verified with a new regression test
src/Core/Tests/Feature/SeoAuditCanonicalTest.phpwhich passes.PR created automatically by Jules for task 14844739723748388262 started by @Snider
Summary by CodeRabbit
Chores
Tests