Root cause: The R2 bucket 'acb-data' is empty - no replay files were ever
uploaded. The matches/index.json lists test matches, but the corresponding
replay files return 404 when accessed via the Pages Function at /r2/.
Fix: Add tooling to generate test replays matching index.json entries and
upload them to R2. The viewer already has proper error handling (response.ok
check + user-visible error messages in replay.ts:1397-1402).
Changes:
- scripts/generate-test-replays.sh: Generate all 8 test replays from index.json
with correct match IDs, gzip them, place in test-replays/
- scripts/upload-test-replays.sh: Upload generated replays to R2 via wrangler
- scripts/README.md: Document the R2 setup and replay upload workflow
- .gitignore: Add test-replays/ (generated files, not committed)
Usage:
1. bash scripts/generate-test-replays.sh
2. npm install -g wrangler && wrangler login
3. bash scripts/upload-test-replays.sh
Verified: Generated replays have correct match_id, format_version="1.0",
and valid JSON structure. The viewer error path handles 404 correctly.
Closes: bf-360t