Step 13.1: configurable noise-suffix list in SceneFilenameNormalizer#343
Merged
Conversation
Add an ordered (longest-first) NOISE_SUFFIXES const and a pure stripNoiseSuffixes() helper that repeatedly peels trailing edition/noise phrases (end-anchored, word-boundary, after optional separators) from the parsed title. Wired in after stripGroupSuffix()/stripBracketedTags() in both the bracketed-year branch and the main return path. Single-token noise is guarded so it never empties a title (e.g. "DC" -> "DC"); raw is never mutated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 27 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…ping Adds case-insensitivity (dataProvider), separator variants ( -._), 3x stacked suffixes, noise after/before a bracketed (YYYY) year, and mid-string noise-word negative cases (must NOT strip) — all using pure NOISE_SUFFIX phrases to isolate the Step 13.1 end-anchored peel from the pre-existing QUALITY_TOKENS token stripping. 87 tests / 200 assertions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #343 +/- ##
============================================
+ Coverage 60.18% 60.22% +0.04%
- Complexity 13155 13161 +6
============================================
Files 485 485
Lines 42615 42637 +22
============================================
+ Hits 25647 25678 +31
+ Misses 16968 16959 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
detain
added a commit
that referenced
this pull request
Jul 12, 2026
…343) * Step 13.1: configurable noise-suffix list in SceneFilenameNormalizer Add an ordered (longest-first) NOISE_SUFFIXES const and a pure stripNoiseSuffixes() helper that repeatedly peels trailing edition/noise phrases (end-anchored, word-boundary, after optional separators) from the parsed title. Wired in after stripGroupSuffix()/stripBracketedTags() in both the bracketed-year branch and the main return path. Single-token noise is guarded so it never empties a title (e.g. "DC" -> "DC"); raw is never mutated. * Step 13.1: add TestEngineer edge-case coverage for noise-suffix stripping Adds case-insensitivity (dataProvider), separator variants ( -._), 3x stacked suffixes, noise after/before a bracketed (YYYY) year, and mid-string noise-word negative cases (must NOT strip) — all using pure NOISE_SUFFIX phrases to isolate the Step 13.1 end-anchored peel from the pre-existing QUALITY_TOKENS token stripping. 87 tests / 200 assertions. ---------
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.
Step 13.1 — Configurable noise-suffix list in
SceneFilenameNormalizerAdds an ordered (LONGEST-FIRST)
NOISE_SUFFIXESconst and a purestripNoiseSuffixes()helper that repeatedly peels any matching TRAILING edition/noise phrase off the parsed title (end-anchored, word-boundary, after optional-._separators, also tolerating a dangling&left when token-level quality stripping removes one half of a phrase).Wired in after
stripGroupSuffix()/stripBracketedTags()in both:(YYYY)return branch, andBehavior
unrated directors cut,uncut & unrated,alternate ending,extended cut,directors cut,director's cut,theatrical cut,remastered,extended,uncut,yify,dc.DC→DC).raw(the original filename for display) is never mutated.Success conditions (all covered by new tests)
Blade Runner Directors Cut→Blade RunnerAliens 1986 Extended Cut 1080p→{title: Aliens, year: 1986}Dune UNCUT & UNRATED→DuneDistrict 9 ALTERNATE ENDING→District 9Foo YIFY→FooDC→DCrawunchangedVerification
vendor/bin/phpunit --filter SceneFilenameNormalizer— OK (69 tests, 170 assertions)vendor/bin/phpstan analyze src/Media/Metadata/SceneFilenameNormalizer.php --level=9 --no-progress— No errors (no baseline)vendor/bin/phpcs --standard=PSR12 -n src/Media/Metadata/SceneFilenameNormalizer.php— clean (exit 0)Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com