🐛 fix(segment-filters): fixed repetition segment filters query#4621
Open
mauretto78 wants to merge 1 commit into
Open
🐛 fix(segment-filters): fixed repetition segment filters query#4621mauretto78 wants to merge 1 commit into
mauretto78 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the SQL used by the SegmentFilter feature to correctly qualify the segment_hash column in the repetition filter subquery, aiming to prevent segment-extraction/filtering issues caused by ambiguous or overlapping query behavior.
Changes:
- Qualifies
segment_hashreferences in the repetition filter’sGROUP BY/HAVINGclause (st.segment_hash) to align with the table alias used in the subquery.
Comment on lines
+292
to
+293
| GROUP BY st.segment_hash, CONCAT( id_job, '-', password ) | ||
| HAVING COUNT( st.segment_hash ) > 1 |
🧪 Test-Guard Report❌ FAIL — Some changed source files lack adequate test coverage. Coverage Analysis: ❌ FAILNo changed source files found in coverage report (threshold: 80%) 📋 1 files: 1 ❌ fail
Test File Matching:
|
| File | Verdict | Reason |
|---|---|---|
lib/Plugins/Features/SegmentFilter/Model/SegmentFilterDao.php |
Test file exists (tests/unit/Core/DAO/TestSegmentFilterDAO/SegmentFilterDaoTest.php) but was not modified in this PR |
Per-File Evaluation: ❌ FAIL
All files resolved by deterministic shortcuts.
📋 1 files: 1 ❌ fail
| File | Verdict | Reason |
|---|---|---|
lib/Plugins/Features/SegmentFilter/Model/SegmentFilterDao.php |
❌ fail | shortcut → no relevant tests in PR and no/low coverage |
Result: ❌ FAIL
Why this FAIL?
- Coverage Analysis: lib/Plugins/Features/SegmentFilter/Model/SegmentFilterDao.php was not included in the coverage report, indicating a coverage configuration issue → adjust coverage instrumentation or filters to include this file.
- Test File Matching: The existing test file tests/unit/Core/DAO/TestSegmentFilterDAO/SegmentFilterDaoTest.php was not modified in this PR → no action needed, but adding or updating tests could improve coverage.
- Per-File Evaluation: No relevant tests were changed or added for SegmentFilterDao.php, and coverage is missing → add or update tests to cover the changes.
To resolve: update or add tests for lib/Plugins/Features/SegmentFilter/Model/SegmentFilterDao.php and ensure coverage configuration includes this file.
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.
Summary
Avoid segment extraction errors overlapping
Type
fix— bug fixChanges
lib/Plugins/Features/SegmentFilter/Model/SegmentFilterDao.phpTesting
vendor/bin/phpunit --exclude-group=ExternalServices --no-coveragepassesAI Disclosure
GitHub Copilot (Claude)