fix(updater): bypass cache for encoded file fallbacks#2248
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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds a cache-bypass decision mechanism for attachment reads. When an attachment has multiple candidate read keys, the handler skips both cache lookups and cache writes, optionally logging the bypass decision. Otherwise, the handler serves cached responses and persists newly fetched responses to cache, with a best-effort background restore to R2 if the object is missing. ChangesAttachment cache bypass mechanism
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 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
🧪 Generate unit tests (beta)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|



Summary (AI generated)
Motivation (AI generated)
PR #2247 fixes the manifest/path mismatch, but an already cached bad response for an encoded file URL could still be returned before the worker checks R2. This follow-up makes affected encoded fallback requests ignore the file cache and read directly from the safe decoded/raw R2 candidates.
Business Impact (AI generated)
Customers do not need to re-upload, publish a native release, or wait for new CLI adoption for the already fixed uploads to begin working after deploy. Normal file URLs keep the existing cache behavior, so cache and performance impact is limited to special-character fallback requests that need this protection.
Test Plan (AI generated)
bunx vitest run tests/manifest-path-encoding.unit.test.ts tests/upload-path-encoding.unit.test.tsbun lint:backendbun typecheckgit diff --check origin/main...HEADGenerated with AI
Summary by CodeRabbit
Release Notes
New Features
Tests