Run the shared app/ updaters and social posters from workers/updater:
- Scheduler Durable Object lanes: "fast" keeps the Node cron cadence
(quick at :00-:04, default at :05/:10/:15/:20/:30/:45) and posts to
social after checking SITE_URL serves the new data; "slow" runs X-Rank,
Splatfest rankings, and avatar updates hourly. Bounded retries, queued
manual runs, pause, and persisted automatic-scheduling state.
- RegionAuth Durable Object per region: the single owner of each
Nintendo login, serving bullet tokens to both lanes and renewing them
hourly at :35-:38.
- A five-minute cron watchdog that only re-arms alarms, bearer-token
control endpoints, and dev/production environments. DO migrations keep
Scheduler at v1 to match the earlier dev deployment.
- Per-run limits (RunLimits) and per-account NsoClient locks instead of
module-level limiters, since Durable Objects sharing an isolate cannot
share in-flight requests. Updaters without localization rules no longer
rewrite locale files.
- 20 workerd tests (npm run updater:test, included in npm test) with all
network access blocked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the remaining Node-only dependencies so the updaters and social
posters bundle and run in workerd, while the Node runner keeps working:
- Replace nxapi with app/splatnet/coral.mjs (fetch + WebCrypto), aligned
with nxapi 1.6.1-next.257: znca compatibility 3.5.0, the current client
version, and the slimmer Login parameter. Use one znca-api client per
Nintendo account, since its token binds to the first account it serves.
Cache the remote config in private storage instead of restarting daily.
Sessions cached by the nxapi package trigger a fresh login.
- Convert images through #image-converter: sharp in Node, the Images
binding in Workers. Read Bluesky aspect ratios from the PNG header.
- Replace twitter-api-v2 with OAuth 1.0a signed fetch; TwitterClient now
only updates the seasonal X profile (posts go through Buffer).
- Load avatars through #avatars (bundled as Data modules in Workers) and
keep the local Chrome driver out of Worker bundles via
#local-screenshot-driver.
- prefixedConsole forwards to the global console; shared code reports to
Sentry through @sentry/core.
Verified live: full credential refresh for all four regions in Node, and
the complete Coral → bullet token → GraphQL chain for EU inside workerd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Groundwork for running the existing updaters and social posters in a Worker:
- Derive IDs with @noble/hashes shake256; the Workers runtime's node:crypto
lacks shake256. A test pins an ID produced by node:crypto.
- Split updaters into fast (schedules, gear, co-op, festivals, stages; run
concurrently) and slow (X-Rank, Splatfest rankings; run one at a time).
The cron posts after the fast updaters, before the slow ones.
- Fetch X-Rank seasons and detail types sequentially, cutting peak heap per
division from ~85 MB to ~38 MB.
- Move Splatfest rankings into FestivalRankingsUpdater, driven by the
published festivals data, so results never wait on ranking pagination.
- Coalesce concurrent downloads of the same SplatNet image.
- Bring over the Browser-binding screenshot work from develop (f7293b6):
Cloudflare captures use the BROWSER binding with retries, Browserless is
removed, and workers/screenshots offers capture-only local testing. The
local driver keeps puppeteer-core with an installed Chrome, always serves
dist/, and fails on page-reported screenshot errors.
- Remove the Docker image, compose files, and GHCR deploy workflow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>