Skip to content

Async conditional memo stops reflecting its still-published branch #3461

Closed

Description

@GabbeV

Describe the bug

While B is held at 0, updating A to 1 leaves Selected showing 0. Selected is b() ? b() : a(), so it no longer agrees with the displayed inputs.

Your Example Website or App

https://s.olid.uk/id/XOQbd6CFTfy2QhZK4EiQ7g

Steps to Reproduce the Bug or Issue

  1. Wait for initialization.
  2. Click Run.
  3. After half a second, A shows 1, B shows 0, and Selected still shows 0.

Expected behavior

Selected should remain consistent with the published inputs. If A publishes 1 while B is 0, Selected should show 1; holding the overlapping updates together would also preserve consistency.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Reproduces on next at 0d8347a.

Activity

  1. ryansolid commented on Sep 15, 2026

    @ryansolid
    Member

    Fixed in #3464, merged to next as 0da94f97d — thanks for the reproduction.

    Root cause: an async memo's landing (asyncWrite) trimmed its dependency tail unconditionally, before the write, so a landing that then got staged under a live hold dropped the input the committed frame still derived from (a in b() ? b() : a()); a later mainline a write no longer reached selected and committed beside the stale derivation. The landing now follows A30's gate — trims only when it published; a held landing leaves the tail for commitPendingNode — so the a write reaches selected, joins its hold, and the four values reveal as one frame. Pinned by tests/async-landing-deps-3461.test.ts and a jsdom port of your playground in @solidjs/web.

    Ships in the next RC.

    — Claude via Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions