Avoid caching temporary docs fallbacks - #1170
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughRepository file reads now return content with fallback status. ChangesFallback-aware caching
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Fallback documentation responses are no longer cached, while successful responses retain their existing cache behavior; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | e8b7ba4 | Commit Preview URL Branch Preview URL |
Aug 19 2026, 02:09 PM |
Evidence
PR #1167 raised the latest docs edge policy from 60 seconds to one hour plus 24 hours of stale-while-revalidate. Its review identified that
readRepoFileOrFallbackreturns a 200 “Content temporarily unavailable” placeholder for recoverable GitHub failures, and bothfetchDocsandfetchFileapplied the normal cache policy without knowing the response was a fallback.That can retain an outage placeholder at the edge for up to 25 hours after GitHub recovers.
Change
Track whether repository content came from the recoverable fallback. Normal documents keep their existing cache policy; fallback HTML and raw-file responses now send
Cache-Control: no-storeandCloudflare-CDN-Cache-Control: no-store.Follow-up to #1167.
Impact
A transient GitHub failure can still render the existing graceful placeholder, but the next request retries instead of receiving a cached outage page.
Validation
pnpm testgit diff --checkRisk
Low. Successful docs responses retain the cache durations introduced by #1167. Only recoverable fallback responses change caching behavior.
Summary by CodeRabbit