Tell a broken source apart from a stale one
CI failed on Infinity Nikki yielding no events, and was wrong to. Its snapshot parses to six events; every one of them had ended by the morning the build ran. The parser is fine — `--now 2026-08-14` gives six, today gives none — and the page simply has nothing current left on it. eventCount is counted after expired events are dropped, so "this parser has stopped reading a redesigned page" and "this page's events have all finished" arrived as the same zero. Only the first means our code is wrong, and only the first should redden a build. So the feed now records what each document yields parsed as of its own capture date, before expiry, and the check fails on that instead. Nikki cannot refresh itself out of this, either: docs/SOURCES.md records that Fandom refuses the Actions runner. A lane with an empty calendar is a real problem, but it is a refresh problem, so it is reported on the build log and left visible rather than thrown. parsedCount is nullable and defaulted, never required: the client validates the whole feed with safeParse and the service worker serves the last feed it downloaded, so a required field would have made every cached feed fail validation and taken the offline promise with it. Null also covers a source whose bytes were never confirmed live — there is no date to parse "as of", and a build is not failed on missing information. The rule moved to shared/feed.ts. A test did pin the old one, by grepping the workflow for the string — which proved the check existed, never that it was right. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
96d5230f29
commit
ef109f224b
@@ -341,10 +341,16 @@ Until then the `pages` job is skipped and the pipeline stays green. Pages is una
|
||||
repositories on the free plan. Both steps are done here, and the deploy lands at
|
||||
<https://stereotypicalcat.github.io/gacha-event-tracker/>.
|
||||
|
||||
The feed job fails if the event count collapses. A source that quietly stops yielding events is the
|
||||
failure mode a parser-only pipeline is most prone to, and nothing else would surface it. Tests run
|
||||
offline against checked-in fixtures, so a red pipeline always means the code changed rather than a
|
||||
wiki being down.
|
||||
The feed job fails if the event count collapses, or if any single source parses to nothing — nine
|
||||
healthy sources hide a tenth that has gone quiet, and the total stays comfortably over the floor
|
||||
while one game shows an empty calendar. That is the failure mode a parser-only pipeline is most
|
||||
prone to, and nothing else would surface it.
|
||||
|
||||
It distinguishes that from a source whose events have all simply *ended*, which is a stale page
|
||||
rather than a broken parser and is reported instead of thrown. The two used to be the same zero,
|
||||
because the count was taken after expired events were dropped — so Infinity Nikki reddened the
|
||||
build the morning its last event finished. Tests run offline against checked-in fixtures, so a red
|
||||
pipeline always means the code changed rather than a wiki being down.
|
||||
|
||||
### Refreshing the data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user