Repository navigation
Conversation
4 of 5 tasks
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Release.DynamicRange is a set of the seven formats of the hdr rows of taginfo.csv (DV, HDR, HDR+, HDR10, HDR10+, HLG, SDR). Strings gives them in that order whatever order the name writes them in, so 'HDR.Dolby.Vision' and 'DV.HDR' read the same. ParseDynamicRange reads the one spelling of a format in any case, and the set marshals to JSON as a list of spellings. A bit outside the seven is nothing to the set. A caller's hdr row whose tag is a format in another case counts as that format; a row with any other tag gives no format, and its tag stays in Tags. When unset gives a hdr tag of another release type back to the text, its format is cleared only when no other hdr tag left in the name gives it. With a caller's hdr rows that are exclusive to a type, every tag of those rows in a name of another type now goes back to the text, where before only the first tag of a value did: removing the value from HDR made the next tag with it no longer match. The built-in hdr rows are exclusive to no type, so the built-in vocabulary is not affected. The tests.yaml key hdr is now dynamicRange. cmd/rls keeps its dynamic_range key; the list is now sorted. BREAKING CHANGE: Release.HDR ([]string) is removed. Use Release.DynamicRange, whose Strings method gives the spellings in the fixed order DV, HDR, HDR+, HDR10, HDR10+, HLG, SDR instead of the order of the name.
zze0s
force-pushed
the
feat/anime-cjk
branch
from
November 18, 2026 16:11
d94402d to
7bfe389
Compare
zze0s
force-pushed
the
feat/dynamic-range
branch
from
November 18, 2026 16:11
54802f4 to
ff0c64c
Compare
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.
Description
Stacked on #80. Step 4 of the stack: decision 5, HDR printed sorted and the field renamed.
Release.HDRwas a[]stringin the order of the name, soHDR.DVandDV.HDRwere two different values to anything that compared them.Release.DynamicRangeis a set:This is the shape you approved. The seven formats are the tags of the
hdrrows oftaginfo.csv, and a test holds that the two lists agree.What changes
HDRbeforeDynamicRange.Strings()22.Bahnen.2025.GERMAN.2160p.HDR.DV.WEB.H265-MGEHDR,DVDV,HDRMovie.2020.2160p.UHD.BluRay.HDR10.DoVi.x265-GRPHDR10,DVDV,HDR10Show.S01E01.2160p.WEB-DL.DV.HDR.H.265-GRPDV,HDRDV,HDRAgainst #80, over every set:
nyaa.txttests.yaml,sports.txt, the three probe setsAll 25 are the first row of the table:
HDR,DVbecomesDV,HDR. The set of formats is the same in every one, and no other field of any name changes.No spelling changes. The fixed order equals
sort.Stringsof the seven spellings.tests.yamlrenames its keyhdr:todynamicRange:. None of its 45 values changes order.cmd/rlskeeps itsdynamic_rangekey, and the list it prints is sorted.Downstream impact on autobrr and qui
qui: 8 files, +22 −37 in a local port, not pushed. Reads of
r.HDRbecomer.DynamicRange.Strings(), andsimplifySeasonPackHDRTagsbecomes a set operation that is 17 lines shorter. Nothing qui stores or compares changes: every path that reads the list sorts it or compares it as a set already. With the port, qui builds and its 11 packages that use rls pass against this commit.autobrr: one line,
r.HDR = rel.DynamicRange.Strings().domain.Release.HDRstays autobrr's own[]string. With it, autobrr builds and fails only the two tests that fail against master.But the order reaches stored values in autobrr, for a name that lists two formats in another order than the fixed one:
hdrcolumn beforenormalized_hashThe.Best.Show.2020.S04E10.1080p.AMZN.WEB-DL.DDP.5.1.HDR.DV.H.264-GROUPHDR,DVDV,HDRDV.HDRDV,HDRDV,HDRHDR,DVkeeps its old hash and its oldhdrtext. The same name announced after the upgrade is not found as its duplicate, by the hash check (CheckIsDuplicateRelease) or by theDynamicRangeduplicate profile. That lasts as long as the old rows are kept. Removing the gap takes a migration that sortsrelease.hdrand recomputesnormalized_hash, and the hash needs Go's title normalisation, not SQL. I did not write one. Say if you want it.HDR.DVandDV.HDRversions of one release hash the same, which is the point of decision 5.{{.HDR}}macro, the notification payload and the API list show the new order.For you to decide
DynamicRangemarshals to JSON as a list of spellings.yaml.v3and anything else that does not use the JSON methods sees an integer. AddingMarshalTextwould cover those and would change the JSON to one string,"DV,HDR". Neither app encodes aReleasetoday.Type,SchemeandEpKindmarshal as integers, and this type as a list of spellings. I would settle all of them in step 7 (Q7f).Type of change
How has this been tested?
TestDynamicRange*: the set, its order, parsing in any case, JSON both ways, and thehdrrows oftaginfo.csvagainst the constants.hdrrow spelled in another case was not read, and that a decodednullpanicked. Both are fixed here.go vet ./...,gofmt -l .with Go 1.26 and 1.27,go test ./...with the corpus present,go test -race ./..., thecmd/rlschecks.Benchmarks, #80 against the last of the three typed PRs (#83), 8 rounds in alternating order: Parse, Build, ParseNyaa, ParseSports and ParseLong are within noise, and allocations are identical on every benchmark.
ParseClaims(Web.repeated 4,000 times) reads between +1.4% and +3.3% across runs. A profile gives none of the changed functions a sample there, and the extra time is in lexer code that no step touches, so I read it as code layout and could not pin it further.Checklist
go fmtand the test suite passes locallytests.yamlfor any parsing changeAI disclosure
Yes, all of it. Claude Code (Claude Fable 5.2) wrote it, a second model run reviewed it, and a third ported both apps in local worktrees.
BREAKING CHANGE:
Release.HDR([]string) is removed. UseRelease.DynamicRange, whoseStringsmethod gives the spellings in the fixed order DV, HDR, HDR+, HDR10, HDR10+, HLG, SDR and not in the order of the name.