Date: 2026-08-13 20:09 Summary: Diagnose upload:r2:changed failure: R2_ACCESS_KEY_ID is 31 chars (must be 32); add early validation.
[question] npm run upload:r2:changed … InvalidArgument: Credential access key has length 31, should be 32
[try to solve]
Not a delta-logic bug: all 1510 file hashes already matched (upload=0); failure happened while refreshing _meta/pages-build.json. Local .env had R2_ACCESS_KEY_ID length 31 (must be 32); Account ID=32 and Secret=64 were fine. Re-copy the Access Key from R2 → Manage API Tokens, or create a new token into .env, then rerun. Scripts now preflight credential lengths; ops handbook §9 documents this error.
[actions]
- Updated
scripts/lib/r2-s3-client.mjs(assertR2S3CredentialShape) - Updated
ops/worker-r2-ops.mdtroubleshooting row