Repository navigation
fix(generic): keep an existing request.waitUntil - #309
Conversation
The generic adapter always redefined `request.waitUntil`, so a platform's `waitUntil` was replaced by one that only `server.close()` awaits, and a request passed through two generic servers threw "Cannot redefine property: waitUntil". Closes h3js#306 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@kaanisthatyou is attempting to deploy a commit to the unjs Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe generic fetch handler now preserves a request’s existing function-valued ChangesRequest waitUntil preservation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The adapter preserves platform or outer-server Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change restores platform and outer-server ownership of background work without changing the handler pipeline. No introduced security vulnerability was established. Integration risk remains because closing the current generic server does not await work registered with a preserved external callback, and deployment-specific ownership assumptions are not fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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. A rabbit guards the promise stream, Comment |
Closes #306.
The generic adapter's
fetchalways redefinedrequest.waitUntil. A platformwaitUntilset on the request was replaced by the adapter's own, which onlyserver.close()awaits. And sincedefinePropertiesmakes the property non-configurable, a request passed through two generic servers threwTypeError: Cannot redefine property: waitUntil.waitUntilis now only defined when the request does not already have one.Tests: two new cases in
test/generic.test.ts(platformwaitUntilis kept; nested generic servers). Both fail onmainand pass with the change. Full suite before/after differs only in these two; lint, format and typecheck pass.Summary by CodeRabbit