Rules drop posters at the header pass: the CelebMovie family (rule set version 3)
Test and deploy / test (push) Successful in 50s
Test and deploy / edge (push) Successful in 1m55s
Test and deploy / deploy (push) Successful in 1m47s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-16 11:36:46 +02:00
1 parent 093d0a71ad
commit 3d24db5565
9 files changed
+116 -9

No files matched your search

+18 -1
View File
@@ -3,7 +3,13 @@ import { DEFAULT_RULES, RuleSet, ownerOf, uploadTool, explored } from '#lib/rule
import { sevenZipVolume } from '#lib/files/index'
const rules = new RuleSet({ ...DEFAULT_RULES, samplePercent: 0, priorities: {}, droppedSignatures: ['nyuu\talt.binaries.misc'] })
const file = (name: string, totalParts: number, firstMessageId: string, group = 'alt.binaries.ath') => ({ name, totalParts, groups: [group], firstMessageId })
const file = (name: string, totalParts: number, firstMessageId: string, group = 'alt.binaries.ath', poster = 'someone@example.com (Someone)') => ({
name,
totalParts,
groups: [group],
firstMessageId,
poster,
})
const NGPOST = 'b94268bc702040f7b811d5318f727e4f@ngPost'
const NYUU = 'FmFwIaTpGgUiSfYcMwFlMeRo-1790637260478@nyuu'
@@ -17,6 +23,17 @@ test.group('rules / owner', () => {
})
test.group('rules / verdicts', () => {
test("a dropped poster's uploads are dropped whatever they are; others with the word in their name are not", ({ assert }) => {
const pics = (poster: string) => rules.judge('k', [file('!index0001.jpg', 1, NYUU, 'alt.binaries.erotica', poster)])
assert.include(pics('@_CelebMovie_@'), { rule: 'poster', key: 'celebmovie' })
assert.include(pics('@__Celeb_Movie__@'), { rule: 'poster', key: 'celebmovie' })
assert.include(pics('NudeCelebs@CelebWow.com'), { rule: 'poster', key: 'celebwow' })
assert.include(pics('@nude-celebs'), { rule: 'poster', key: 'nudecelebs' })
assert.deepEqual(pics('celeborn@not.here (Celeborn)'), { rule: null })
assert.deepEqual(pics('"CelebTA.com" <from@celebta.com>'), { rule: null })
assert.deepEqual(new RuleSet({ ...DEFAULT_RULES, droppedPosters: [], samplePercent: 0, priorities: {}, droppedSignatures: [] }).judge('k', [file('a.jpg', 1, NYUU, 'g', '@_CelebMovie_@')]), { rule: null })
})
test('a readable file keeps its whole release', ({ assert }) => {
assert.deepEqual(rules.judge('k', [file('Hs7dKq2LmZ9xWv3RtYp1Qa.part01.rar', 50, NGPOST), file('Some.Show.S01E01.1080p.nfo', 1, NGPOST)]), { rule: null })
})