feat(ingest): read a summoning campaign as a banner
Every game names its gacha something else, and inferType only knew the five words the game8 sources use. Fate/Grand Order calls its banners "Summoning Campaign" — the whole of that page's banner vocabulary — so without this every FGO pull lands as "other" and the type filter stops meaning anything for that lane. Nothing on the current English page carries the word, so no checked-in expected output moves; the unit case is what pins the behaviour until the next refresh brings a banner in. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4698ebc0c7
commit
e42ac84b40
@@ -373,7 +373,11 @@ function parseRange(
|
|||||||
export function inferType(title: string): EventType {
|
export function inferType(title: string): EventType {
|
||||||
const t = title.toLowerCase();
|
const t = title.toLowerCase();
|
||||||
if (/\brerun\b/.test(t)) return "rerun";
|
if (/\brerun\b/.test(t)) return "rerun";
|
||||||
if (/\b(banner|wish|warp|convene|gacha)\b/.test(t)) return "banner";
|
// Every game names its gacha something else — "Summoning Campaign" is the
|
||||||
|
// Fate/Grand Order one, and it is the whole of that page's banner vocabulary.
|
||||||
|
if (/\b(banner|wish|warp|convene|gacha|summon(?:ing)?)\b/.test(t)) {
|
||||||
|
return "banner";
|
||||||
|
}
|
||||||
if (/\b(login|log-in|sign-in|check-in|daily bonus)\b/.test(t)) return "login";
|
if (/\b(login|log-in|sign-in|check-in|daily bonus)\b/.test(t)) return "login";
|
||||||
if (/\b(challenge|trial|onslaught|abyss|tower|test runs?|clash|combat)\b/.test(t))
|
if (/\b(challenge|trial|onslaught|abyss|tower|test runs?|clash|combat)\b/.test(t))
|
||||||
return "challenge";
|
return "challenge";
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ describe("inferType", () => {
|
|||||||
["Gold Clash", "challenge"],
|
["Gold Clash", "challenge"],
|
||||||
["Seize the Day Login Bonus", "login"],
|
["Seize the Day Login Bonus", "login"],
|
||||||
["Epitome Invocation Banner", "banner"],
|
["Epitome Invocation Banner", "banner"],
|
||||||
|
["Chaldea Boys Collection Summoning Campaign", "banner"],
|
||||||
["Mutual Aid in Bloom: Into the Frostlands", "other"],
|
["Mutual Aid in Bloom: Into the Frostlands", "other"],
|
||||||
];
|
];
|
||||||
test.each(cases)("%s → %s", (title, expected) => {
|
test.each(cases)("%s → %s", (title, expected) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user