Repository navigation
Conversation
This was referenced Nov 18, 2026
|
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
|
A fansub name says with its brackets what a scene name says with its
order. brackets, the one reading of the brackets of a name, now also gives
each bracket a role by what it holds: a group, a checksum, tags, numbers
alone, words alone, a year. The zones read its kinds as before, and a new
stage in the builder, in front of the zones, reads the roles:
- the group in parentheses that opens a name, which the owner of the
group makes a group tag: '(CBB) Aoki Hagane no Arpeggio' had the title
'CBB'
- the shape of the name: where the title starts, also in a bracket of its
own ('[Group][Title][01][1080p]') and behind a bracket of words that
names another group ('[WBDP] [Vivid] Title'), and where the head ends
- more than one title, behind a bar or a spaced slash, behind a bare
slash that sets a title in a CJK script apart from the next, or behind
a season. The first is Title and the others go to Alt: '[Cleo] Saihate
no Paladin | The Faraway Paladin' had both in Title. A bare slash cuts
beside a letter of such a script, or between a part that has one and a
part that has none ('魔法少女奈叶剧场版 1st/Mahou Shoujo Lyrical Nanoha
The Movie 1st'). 'In/Spectre', 'Bullet/Bullet' and 'Fate / stay night'
stay one title, and the number that ends 'Uchouten Kazoku / The
Eccentric Family 2' counts for both. A bracket that lists what the
release holds with a plus is no title ('[正片+其他动画短片+花絮]')
- another title in parentheses behind the title, when the name says that
it is one: the two are written in another script or in another
language. Of the languages the stage tells Japanese in Latin letters
from any other, by the particles, the small words and the share of
words made of open syllables on each side ('Shingeki no Kyojin (Attack
on Titan)', 'Hell's Paradise (Jigokuraku)'). In the language of the
title the bracket is a part of it or a note, which nothing tells apart,
and is left unread as before ('Kanteishi (Kari)', 'Muri Muri! (Muri ja
Nakatta)', '(The Animation)', '(The Final Season)')
- a number with a point in the title of a name that sets its words apart
with spaces: 'Evangelion 3.33 You Can (Not) Redo' was 'Evangelion 3 33
You Can', and the '3.0+1.0' of 'Evangelion 3.0+1.0 Thrice Upon a Time'
was read as two channel layouts
The stage reads a name with a bracket that sets its words apart with
spaces, when a fansub group wrote it or it has a sign of a video. The name
says the first itself: a bracket opens it that holds a group or words that
are no tag, or it has a checksum. A bracket of tags or a year opens any
kind of name. The meta lexer reads any one word in the bracket that opens
a name as its site, so the stage asks the vocabulary about that word: one
that it reads as a tag of any type but a group names no maker ('[BluRay]',
'[English]', '[PL]', '[Hi10]', '[Uncut]', '[700MB]', '[ENG SUB]'), and
neither does a year ('[2019]'). A known group stays one. The bracket
behind one that names no maker is then read for the group and the title
('[4K][DBD-Raws][Title][2160P]'). The tag of a tracker cannot be told from
a group and opens the name as one does ('[TGx]', '[YTS]'), and so does a
word of quality that the vocabulary does not hold ('[HD]'): no list of
either is kept. TestLeadWord holds the words.
A name the stage does not read keeps the tags the lexers made, each as it
was: the steps in front of the gate work on a copy, which
TestStructureKeepsTags holds. No name of the scene sets, of sports.txt or
of the probe sets changes.
A name with flags in a bracket in front is built in two steps: the rest
alone, then the flags back in front of it ('[REPACK] (Group) Title - 01').
The builder kept the tags of the rest only when their number had changed,
which is how it told that fixHalfEpisode had made new ones. The stage
reads some names in a copy that is as long, so the release of such a name
would keep the tags from before, and its group, its title and its
numbering would be read from tags it does not hold. The builder now tells
the tags apart by where they are kept. TestFlagsInFront holds that a name
behind flags is read as the name alone, tag for tag, and
TestNumberingBehindBrackets checks the numbering against the tags for
every name of tests.yaml and of TestStructure behind each kind of leading
bracket. The fuzz targets check the numbering of a name built whole and
of a hinted name as well.
TestStructureLinear times names made of what the stage reads, at two
lengths: the shapes it lists, and shapes made from every joiner and every
kind of bracket.
The zones read the tag at their anchor in one place, which gives a tag of
no type when the anchor is the end of the tags. A claim in front of a
closing bracket read past the end when a name was built with all of its
tags inside it. TestAnchorPastEnd builds every name of the tests and the
corpora that way, and the fuzz target every input.
Samples: nyaa-400 names 331 to 337, title 347 to 354, group 392 to 393.
nyaa-blind-140 names 27 to 36, title 63 to 81. 16 names leave the wrong
lines, all on the title: the titles with a bar or a slash, the
Evangelion titles and 'In This Corner (and Other Corners) of the World'.
One enters: '[Kametsu] Fate Stay Night: Unlimited Blade Works (TV)
(Prologue+S1+S2+Sunny Day)' keeps '(TV)' in its title until the next
commit reads it as what the release holds. Labelled floors: anitomy title
65 to 70 and group 92 to 93, habari title 70 to 74, anitogo title 65 to 71
and group 93 to 94. The habari season floor goes from 89 to the 91 it
measured before this change too.
tests.yaml: 'Mezzo(DSA)' is the title of '[RaX]Mezzo(DSA)_-_05' (was
'Mezzo' with 'DSA' unused), and 'Attack on Titan' and 'Shuumatsu no Harem'
are other titles and no unused words. Two names are new.
zze0s
force-pushed
the
feat/anime-titles
branch
from
November 18, 2026 16:11
56eb8e2 to
78e3776
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 #77. The anime stage is the second half of step 3 and comes as three PRs: this one (brackets and titles), #79 (extras, volumes, contents, the episode number) and #80 (CJK markers and brackets).
A fansub name says with its brackets what a scene name says with its order:
[Group] Title - 05 [tags][checksum].mkv. Until now the builder had no stage that read a name that way. This PR adds one, in front of the zone stage. It reads:bracketsinzone.gois still the one reading of the brackets of a name, and the zones, the new stage and the group owner all call it(CBB) Title[Group][Title][01][1080p]Title, the others go toAlt: behind a bar or a spaced slash, behind a bare slash beside a CJK letter, and in parentheses behind the title when the two are in another script or another languageEvangelion 3.33Examples
(CBB) Aoki Hagane no Arpeggio - The Complete Series (BD 1080p)(HEVC-x265-10bit)CBB, groupSeriesAoki Hagane no Arpeggio - The Complete Series, groupCBB[Cleo] Saihate no Paladin | The Faraway Paladin [Dual Audio 10bit 1080p][HEVC-x265]Saihate no Paladin | The Faraway PaladinSaihate no Paladin, altThe Faraway Paladin[Beatrice-Raws] Tonari no Totoro / My Neighbor Totoro [DCPrip 1998x1080 HEVC TrueHD].mkvMy Neighbor TotoroMy Neighbor Totoro[Judas] Shingeki no Kyojin (Attack on Titan) - S04E30 [1080p][HEVC x265 10bit][Multi-Subs] (Weekly)Attack on TitanAttack on Titan[UTW-THORA] Evangelion 3.33 You Can (Not) Redo [BD][1080p,x264,flac]Evangelion 3 33 You CanEvangelion 3.33 You Can (Not) Redo[MiraiAnime] In This Corner (and Other Corners) of the World (2019) [...]In This CornerIn This Corner (and Other Corners) of the World[WBDP] [Vivid] Uchouten Kazoku / The Eccentric Family 2 [BD][1080p-AAC]Uchouten KazokuUchouten Kazoku 2, altThe Eccentric Family 2[RaX]Mezzo(DSA)_-_05_-_[x264_ogg]_[585d9971].mkvMezzo, unusedDSAMezzo(DSA)The Complete Seriesleaves the first title in #79.Which names the stage reads
This is the part to review hardest. The first version read any spaced name with a bracket and a resolution, which is every YTS, QxR and Plex name, and two reviews found film names it got wrong. The rule now, stated in the comment of
shapeOf:TestStructureKeepsTagsholds overtests.yamland the corpora.[BluRay],[English],[PL],[Hi10],[2019].TestLeadWordholds 41 words.A tracker tag in front of a spaced title cannot be told from a group:
[TGx] Dante 01 1080p WEB-DL x264reads as episode 1 ofDante. No list of tracker tags is kept. The name is a probe row in the list of known wrong readings.What changes, by set
Against #77, at this commit:
sports.txttests.yamlnyaa.txt%ogives the name back on every name of every set.Accuracy
16 names leave the wrong lines, all on the title. One enters until #79:
[Kametsu] Fate Stay Night: Unlimited Blade Works (TV) (Prologue+S1+S2+Sunny Day)keeps(TV)in its title.Labelled floors: anitomy title 65 to 70 and group 92 to 93, habari title 70 to 74, anitogo title 65 to 71 and group 93 to 94. The habari season floor goes from 89 to 91, which it measured before this change too. No floor goes down.
Other titles in parentheses, and their limit
Shingeki no Kyojin (Attack on Titan)gives anAlt, andKanteishi (Kari)or(The Final Season)must not. The stage reads the bracket as another title only when the name says so: the two sides are in another script, or one is Japanese in Latin letters and the other is not. It tells that by Japanese particles, small English words and the share of words made of open syllables (another,tongueOf,romajiinanime.go).Measured on nyaa names that gain an
Altfrom a bracket: 0 wrong in two seeded samples, 160 and 106 names. The first version of the rule had 21 wrong of 160.Two limits, both in the comment of
another:Kimetsu no Yaiba (Hashira Training). Nothing in the name tells it from a translation. A reviewer made 40 such names and 13 read wrong. None of the 266 real ones did.Time and size
Rotating runs, 12 each, the same names on both sides:
tests.yamlnames)Allocations per nyaa name go from 54 to 55.5, and stay 41 and 47 on the other two sets within half an allocation. A name with no bracket pays for one pass over its tags.
TestStructureLineartimes names made of what the stage reads at two lengths: the shapes it lists, and shapes generated from every joiner and every kind of bracket. A crash came out of review, and it is older than this PR. A claim in front of a closing bracket read one tag past the end when a name was built with all of its tags inside it. #77 has the same hole (Show German]built that way panics there). The zones now read the tag at their anchor in one guarded place.TestAnchorPastEndbuilds every name of the tests and the corpora whole, and the fuzz target every input.A fix after the PR was opened
A later fuzz run found
[REPACK7](A000)00 000(000000: the release carried an episode that its own tags did not write. A name that opens with flags in a bracket is built in two steps, and the outer release kept the old tags whenever the inner build had not changed their count. This stage reads some names in a copy of the same length, so fields were read from tags the release did not hold.[REPACK] (CBB) Aoki Hagane no Arpeggio - ...had the groupCBBand no group tag.buildnow tells the tags apart by where they are kept.TestFlagsInFrontholds it, andTestNumberingBehindBracketsruns the numbering check and the round trip on every name oftests.yamlandTestStructurebehind 26 kinds of leading bracket. Ten minutes ofFuzzParseStringon the head of the three PRs found nothing more. No reading of a real name changes: no name in any set opens with flags.For you to decide
leadGroupingroup.gomakes the group tag of(CBB) Title. It has to run before the shape is read, since the group bracket decides where the title starts.TestGroupOwnerlists it, andTestOneOwnergains exemptions for the steps that must retype a tag in front of the zones (decimals,numbers,contents,handBackMarker, each with its reason in the test).Mezzo(DSA). The title is as the name writes it. Before it wasMezzowithDSAunused.Altvalues innyaa.txt.Downstream impact on autobrr and qui
No API changes. Readings change for fansub-style names only:
Altholds other titles where it was empty, andTitleis the first title where it was both.Groupis right for a group in parentheses in front.Unused()no longer holds the words of another title.Both apps build and pass against this commit with the ports of #77 and no further change: qui's 11 packages that use rls pass, and autobrr fails only the two tests that fail against master.
Review
Two independent reviews, each followed by a fix round, and my own probes of film, show and record names in the shapes of YTS, QxR, Plex and tracker listings. What they found in this PR's part, all fixed here: the crash above, a CJK bracket printed as an ASCII one in a title, wrong
Altvalues, and a lead[2019]or[BluRay]read as a group.Type of change
How has this been tested?
TestStructure(real names with the fields the stage owns),TestLeadWord,TestStructureKeepsTags,TestAnchorPastEnd,TestStructureLinear, and the group tests of refactor(group): give the group of a release one owner #75.go vet ./...,gofmt -l .with Go 1.26 and 1.27,go test ./...with the corpus present, thecmd/rlschecks, on a clean export of this commit.go test -race ./...and 60 s ofFuzzParseStringon the head of the three.Checklist
go fmtand the test suite passes locallytests.yamlfor any parsing changeAI disclosure
Yes, all of it. Claude Code (Claude Fable 5.2) wrote the stage and its tests. Two further model runs reviewed it, and the fixes for what they found are in this commit.