feat(metadata): fold naming value overrides into prepared metadata#260
feat(metadata): fold naming value overrides into prepared metadata#260maksii wants to merge 1 commit into
Conversation
Naming overrides only reached the release-name string, so every consumer that reads the component field kept the parsed value the user had just corrected: the UNIT3D payload ids, the tracker rules, the dupe checks, and the trackers that rebuild the name from components instead of ReleaseName.
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
When a user corrects a naming component in the GUI, the correction only ever reached the release-name string. The metadata fields themselves kept the parsed value, so every consumer that reads a component rather than
ReleaseNamesilently carried on with the value the user had just fixed:category_id,type_id,resolution_id,season_number,episode_numberReleaseName(UTP, RHD, TVC, ASC)So a user could fix the resolution in the name and still upload with the wrong
resolution_idattached.Fix
applyReleaseNameValueOverridesfolds the value overrides into the metadata itself, called fromRebuildReleaseNamebefore the name request is built. The name is unaffected —applyReleaseNameOverridesstill applies the same overrides to the request as before — but the component fields now agree with it.Release.Groupmoves withTag, becauseresolveGroup(trackers/rules.go,unit3d/additional) prefersRelease.GroupoverTag. Leaving it behind would have kept the parsed group in the banned-group and internal-group checks while the name showed the corrected one.What is deliberately not folded
Only value overrides. The name-suppression toggles (
NoSeason,NoYear,NoAKA) stay naming-only: droppingseason_numberfrom the payload because the user chose to hide the season in the name would be a different and much more surprising change.NoTagandNoEditiondo clear their fields, since those suppress the value rather than just its rendering.Scope
This changes what every tracker sees, not just the ones that rebuild names — that is the point of it, but it is worth reviewing with that in mind. The full Go suite passes (87 packages, no failures); new coverage in
internal/metadata/naming_test.go.