feat(v10/cloudflare): Auto-instrument WorkerEntrypoint classes#22543
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ef96f7a. Configure here.
| const classId = classDecl.id; | ||
| const kind = classId ? ctx.classWrappers.get(classId.name) : undefined; | ||
| // Inline export: the exported name and the local class name are the same. | ||
| const kind = classId ? resolveWrapperKind(classId.name, classId.name, state) : undefined; |
There was a problem hiding this comment.
Exported base breaks subclass wrap
High Severity
Structural detection wraps every exported class in a WorkerEntrypoint chain, but the rewrite only renames the declaration and rebinds that name to a withSentry Proxy. Same-file subclasses still extends the old name, so they inherit the Proxy. instrumentWorkerEntrypoint does not forward newTarget, so subclass methods are lost and construction double-instruments.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit ef96f7a. Configure here.
size-limit report 📦
|


Backport of: #22493