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>
Prepare the shared updater and social code to run against R2 in a Worker
while keeping the local Node runner working:
- Add app/common/storage with public, private, and archive areas keyed like
the R2 objects. FilesystemStorage maps them onto dist/ and storage/ for
Node; BucketStorage wraps R2 bindings. Storage is configured once per
process; only image existence is cached, so JSON reads are always fresh.
- Move ValueCache, DataUpdater (data, calendars, archive snapshots),
ImageProcessor, LocalizationProcessor, festival updaters, status
generators, social translations, ImageWriter, and Buffer/Threads image
hosting onto storage. Query hashes are a JSON import.
- Add app/splatnet/auth.mjs: the existing bullet-token code behind auth(),
so the Worker can route token requests to per-region Durable Objects.
warmCaches uses auth().refresh().
- Remove the S3/R2 sync, vfs, the dual upload, the sync commands, and
s3-sync-client. Local runs no longer read from or write to remote buckets.
- Give every test fresh in-memory storage via app/test/setup.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deduplicate identical _calculateCacheExpiry methods from
SplatNet3Client and NsoClient into a shared calculateCacheExpiry
function in util.mjs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>