Skip to content

@effect/atom-solid: RegistryProvider hardcodes defaultIdleTTL ?? 400, diverging from @effect/atom-react and making the TTL impossible to disable #7527

Closed

Description

@jonathn

What version of Effect is running?

[email protected] and @effect/[email protected]

What steps can reproduce the bug?

I was using Claude Opus 5 to evaluate Effect v4, and it uncovered this SolidJS adapter issue.
The following is the bug report prepared by Claude.


@effect/atom-solid's RegistryProvider substitutes a default idle TTL that the caller cannot
turn off, whereas @effect/atom-react's equivalent passes the option straight through:

// @effect/atom-solid/src/RegistryContext.ts
defaultIdleTTL: options.defaultIdleTTL ?? 400   // <- hardcoded fallback

// @effect/atom-react/src/RegistryContext.ts
defaultIdleTTL: options.defaultIdleTTL          // <- undefined unless supplied

Because the fallback is applied with ??, the only way to reach "no TTL" is defaultIdleTTL={0},
which is a different code path from undefined (and currently triggers
TimeoutNaNWarning: NaN is not a number from core). There is no way to express "behave like the
React binding's default".

What is the expected behavior?

The two bindings should have the same default registry behaviour, and defaultIdleTTL should be
fully caller-controlled — including being left undefined.

What do you see instead?

Identical atom graphs behave differently under the two bindings purely because of this line.

With a stream-backed atom consumed via a derived atom (see companion core issue #7526), the hardcoded
400ms TTL means the same code leaks under Solid but not under React's RegistryProvider:

SOLID  via derived atom, stock            LEAK  (finalizer never runs)
SOLID  via derived atom, defaultIdleTTL=0 CLEAN
REACT  via derived atom, RegistryProvider CLEAN
REACT  via derived atom, default registry LEAK  (that registry also sets 400)

Removing the fallback makes the Solid binding clean at every stream rate tested (50/100/300/2000ms):

- defaultIdleTTL: options.defaultIdleTTL ?? 400
+ defaultIdleTTL: options.defaultIdleTTL

Additional information

The underlying disposal bug is in core and is reported separately (#7526) — this issue is only about the
unexpected divergence between the two bindings, which turns a core edge case into a
framework-dependent behavioral difference and removes the user's ability to configure around it.

Activity

  1. added
    bug
    on Aug 30, 2026
  2. changed the title [-]`@effect/atom-solid`: `RegistryProvider` hardcodes `defaultIdleTTL ?? 400`, diverging from `@effect/atom-react` and making the TTL impossible to disable[/-] [+]`@effect/atom-solid`: RegistryProvider hardcodes `defaultIdleTTL ?? 400`, diverging from `@effect/atom-react` and making the TTL impossible to disable[/+] on Aug 30, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions