fix(reactivity): unlink effect scopes on out-of-order off#14734
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
|
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 (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughUpdated EffectScope.off() to safely unlink a scope when deactivated out-of-order, added tests for out-of-sequence scope disposal, and introduced a GC-only Vitest project plus SSR GC tests to validate server-side memory reclamation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 |
a843c23 to
93c1802
Compare
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
Pins @vue/* family to 3.5.33 via pnpm.overrides. Vue 3.5.33 (released 2026-04-22) lands the fix for vuejs/core#14733 (PR #14734) — onScopeDispose SSR memory leak where effect scopes survive request teardown when scope .off() is called out of order. Repro: 1000 fresh SSR apps shows 0 finalized on 3.5.32, all alive forever. Hypothesis fit (per six-agent week-of-Apr-20-26 audit): - Symptom: clicking Google login on /demo triggers ~80 MB retain per OAuth flow, OOM at 8 GB heap in 10-13 min, restart, repeat - Phase 0 confirmed (2026-04-27): idle anonymous traffic stays flat, leak is OAuth-trigger-specific - All six in-app code amplifiers (#1 AbortSignal.timeout, #2 i18n.lazy:false, #3 undici body retain, #4 Twilio per-call client, #5 rateLimitMap, #6 session-patch /auth/) already shipped on main HEAD — leak persisted - Frontend audit found NO top-level await in pages/index.vue + layouts/default.vue (clean component code) - Vue 3.5.32 → 3.5.33 is the only upstream version drift in the window that matches the symptom; pin held us back at 3.5.32 If memory chart stays flat after one OAuth round-trip + 30-min user soak, this resolves #447. If it doesn't, fall back to Phase 2 heap snapshot diff. Sources: - vuejs/core#14733 - vuejs/core#14734 - nuxt/nuxt#34071 - nuxt/nuxt#33080 - nuxt/nuxt#34324 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
close #14733
Summary by CodeRabbit
Bug Fixes
Tests