Repository navigation
Conversation
size-limit report 📦Compared: e343682 (PR test merge using develop at f58aeb8) Against: 71f41ed (develop) · base run #68183
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 7 not successful, 58 successful. See the run.
Successful checks
|
48f0c25 to
9aafb1f
Compare
1f3c7db to
f8bc1f2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f8bc1f2. Configure here.
f8bc1f2 to
a2f6943
Compare
a2f6943 to
1e88c9f
Compare
1e88c9f to
d68a3ce
Compare
96e3d2a to
920013b
Compare
214cfd6 to
a5777fc
Compare
a5777fc to
444634d
Compare
444634d to
56f21a1
Compare
| ? [loadRule(/^\+(page|layout)\.(js|ts|mjs|mts)$/, 'wrapLoadWithSentry', debug)] | ||
| : []; | ||
| const serverRules = wrapServerLoadEnabled | ||
| ? [loadRule(/^\+(page|layout)\.server\.(js|ts|mjs|mts)$/, 'wrapServerLoadWithSentry', debug)] |
There was a problem hiding this comment.
Route loads with Vite’s ?v= query are not auto-wrapped
When Vite passes a route module id such as +page.ts?v=123, the basename rules do not match, so the route’s load function is left unwrapped and its Sentry load span is missed. Preserve the intentional exclusion of special imports such as ?raw when handling query-bearing ids.
Evidence
- Auto-instrumentation is enabled by default, and
transformpasses the id directly to the rewriter without normalizing its query. - The rules use end-anchored basename patterns; the rewriter tests them against
basename(id), so+page.ts?v=123does not match+page.ts. makeEntryFileMatcherdocuments that Vite appends queries like?v=123to module ids and strips the query; its test confirms a query-bearing SvelteKit entry id is accepted.- The auto-instrumentation test only checks that
+page.ts?rawis excluded; it does not cover a version-query route id.
Identified by Warden · code-review · AC2-U3Q
There was a problem hiding this comment.
Fix attempt detected (commit 479d9d1)
The auto-instrumentation logic was directly rewritten, but the rewriter still tests end-anchored basename rules against basename(id) without stripping query strings, so +page.ts?v=123 remains unwrapped.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
There was a problem hiding this comment.
The load hook on develop tests the same end-anchored regex against basename(id), so query ids were not wrapped before either; we can add that in a follow-up.
s1gr1d
left a comment
There was a problem hiding this comment.
All good, but just one comment on the bugbot notice.
The `load` hook served a proxy module that re-exported the route file under a `?sentry-auto-wrap` query. That doubled the module count per route, leaked the query into stack frames and source maps, and could not wrap `export { load } from './shared'`.
The transform now wraps the `load` export in the route file itself, so the query and the code that stripped it again are gone. It reads the code Vite hands over instead of a second copy from disk, so acorn is no longer needed.
The proxy module renamed the route `load` to `load$1` in the bundle. In-place wrapping keeps the name.
… app Load functions are wrapped in the route file itself, so no module carries the `?sentry-auto-wrap` query.
56f21a1 to
479d9d1
Compare

Why: The
loadhook served a proxy module that re-exported each route file under a?sentry-auto-wrapquery. That doubled the module count per route, put the query into stack frames and source maps (which needed extra code inrewriteFramesIntegrationand the source map clean-up to remove it), and could not wrapexport { load } from './shared'. The transform now wraps theloadexport in the route file itself and skips loads the user wrapped by hand. It reads the code Vite passes in instead of reading the file from disk a second time, soacornand@sveltejs/acorn-typescriptare no longer dependencies.How to review: Start with
src/vite/autoInstrument.ts. The other source changes remove the query handling.Unsure about: At build time, a
loadthat ends insatisfies PageLoaddoesn't count as already wrapped. The runtime guard still stops a double wrap.Ref #25776