fix(manifest): check upload-encoded storage keys#2320
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR broadens S3 manifest file sizing from single-path fallback to a multi-candidate strategy. Encoding utilities generate deduplicated candidate keys; attachment reads and S3 size resolution iterate candidates; backfill operations record attempted paths for visibility. ChangesMulti-Candidate S3 Key Strategy
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|



Summary (AI generated)
%2540when the database row contains%40.Motivation (AI generated)
Some legacy manifest rows still report missing metadata after trying both the stored
%40key and the decoded@key. The failed CSV shows the fallback ran, but both candidates 404. The remaining legacy shape is the upload URL encoded key, where%40becomes%2540during resumable upload routing.Business Impact (AI generated)
This makes delta manifest downloads and file-size repair more reliable for old bundles with encoded asset names. It reduces support load and prevents customers from seeing
metadata not foundwhen the object exists under the upload-location encoded R2 key.Test Plan (AI generated)
node --check scripts/backfill_manifest_file_sizes.mjsbun scripts/backfill_manifest_file_sizes.mjs --helpbunx vitest run tests/manifest-path-encoding.unit.test.ts tests/upload-path-encoding.unit.test.tsbunx eslint --no-ignore scripts/backfill_manifest_file_sizes.mjs supabase/functions/_backend/utils/manifest_encoding.ts supabase/functions/_backend/utils/s3.ts supabase/functions/_backend/files/util.ts tests/manifest-path-encoding.unit.test.ts tests/upload-path-encoding.unit.test.tsbun lintbun lint:backendSummary by CodeRabbit