feat(codes): mark a code dead once the owner confirms it in game

Game8 still lists Y1INABQB6DEX, 2BJ64QRZ7RT8 and PLDXIB886Y1S as active
Genshin codes after the game refused them. CODE_CHECKS records the
owner's in-game check; build-codes stamps the matching code confirmedDead,
and the Codes tab shows it expired: "Confirmed expired in game, 2026-10-20."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Winther
2026-10-20 03:34:52 +02:00
co-authored by Claude Opus 5.5
parent 7569aa6395
commit b8e8d44816
12 changed files with 178 additions and 12 deletions
+15
View File
@@ -69,3 +69,18 @@ test("the Settings marker counts unseen codes that can still be used", () => {
).map((c) => c.id);
expect(ids).toEqual(["fresh"]);
});
test("a code the owner confirmed dead is expired whatever its stated expiry", () => {
expect(codeExpired(code("a", { confirmedDead: "2026-10-20" }), now)).toBe(
true,
);
expect(
codeExpired(
code("a", {
confirmedDead: "2026-10-20",
expiresAt: "2026-12-01T00:00:00.000Z",
}),
now,
),
).toBe(true);
});