fix(ingest): read an open range written in slash dates
`parseOpenRange` only ever read a month-name start, because it delegates to `parseMonthDayYear`. So `Jul. 24, 2026 - End of 4.6` parsed and `09/02/2026 - TBA` did not. Game8 re-cut Endfield's upcoming table from version 1.4 to 1.5 and wrote the whole new schedule in the second notation. All nine rows became undatable and were dropped in silence: the source went from one event to zero, the parse gate kept the previous snapshot, and the run reported a shape change on a page whose shape had not changed. Nine announced events were invisible with no error anywhere — the failure § Working on parsers calls the dangerous one. Which notation a page uses is house style, not a statement about how certain the source is, so both are read. The year stays mandatory in either: this is the last reader tried, so nothing downstream would catch a guess, and Game8's year-less summary rows (`08/12 - 08/24`) must keep returning null rather than becoming confidently dated events. The two-digit year pivot moves out of `parseShortSlashRange` into `pivotYear` rather than being written a second time. Diffed across every pinned fixture and all nineteen live snapshots: no event moved. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
af6689365b
commit
843e27b4f1
@@ -144,6 +144,21 @@ describe("parseOpenRange", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("keeps a slash-dated start when the end is not a date", () => {
|
||||
// Game8 schedules a version before it announces the ends: Endfield's
|
||||
// upcoming table reads "Period: 09/02/2026 - TBA". That is the same honest
|
||||
// unknown as "End of 4.6", written in slashes instead of month names, and
|
||||
// dropping the row makes nine announced events vanish with no error.
|
||||
expect(parseOpenRange("09/02/2026 - TBA")).toEqual({
|
||||
start: { iso: "2026-09-02T00:00:00.000Z", precision: "day" },
|
||||
end: null,
|
||||
});
|
||||
expect(parseOpenRange("09/09/26 - TBA")).toEqual({
|
||||
start: { iso: "2026-09-09T00:00:00.000Z", precision: "day" },
|
||||
end: null,
|
||||
});
|
||||
});
|
||||
|
||||
test("returns null when there is no full date at all", () => {
|
||||
expect(parseOpenRange("08/12 - 08/24")).toBeNull();
|
||||
expect(parseOpenRange("Releases in Version 3.6")).toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user