LearnNewsExamplesServices
Frontmatter
id7712
titleInvestigate and Fix Race Condition Where Early Component Updates are Lost
stateClosed
labels
bugai
assigneestobiu
createdAtNov 6, 2025, 3:14 PM
updatedAtNov 6, 2025, 3:39 PM
githubUrlhttps://github.com/neomjs/neo/issues/7712
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 6, 2025, 3:39 PM

Investigate and Fix Race Condition Where Early Component Updates are Lost

Closed v11.0.0 bugai
tobiu
tobiu commented on Nov 6, 2025, 3:14 PM

The framework currently exhibits a race condition where component updates, if triggered immediately after creation, can be lost instead of being correctly queued. This has resulted in flaky Playwright tests that require manual synchronization (expect() calls) to work reliably.

A robust framework should handle these early updates gracefully by scheduling them to run after the initial render and mount process is complete. The fact that updates are being dropped indicates a flaw in the VDOM lifecycle management.

Plan:

  1. Isolate the Bug: Create a minimal, reproducible test case (e.g., a new example) that programmatically creates a component and immediately calls set() on it in the next microtask.
  2. Add Diagnostic Logging: Temporarily add detailed logging to key methods in src/mixin/VdomLifecycle.mjs (initVnode, updateVdom, resolveVdomUpdate) to trace the component's state (isVdomUpdating, vnodeInitialized, needsVdomUpdate) through the entire lifecycle.
  3. Analyze and Fix: Use the logs from the test case to identify the exact point where the update is being dropped and implement a fix to ensure it is correctly queued and processed.
tobiu added the bug label on Nov 6, 2025, 3:14 PM
tobiu added the ai label on Nov 6, 2025, 3:14 PM
tobiu assigned to @tobiu on Nov 6, 2025, 3:39 PM
tobiu referenced in commit b0b484e - "Investigate and Fix Race Condition Where Early Component Updates are Lost #7712" on Nov 6, 2025, 3:39 PM
tobiu closed this issue on Nov 6, 2025, 3:39 PM