Derived store (E3) stays on an error fallback the memo form heals — uncovered by the #4425 fix (async-gen 3289 #36981, 7 #46850)

Cerrado
#4,451 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, typescript
Área
frontend, testing

Línea de trabajo

Start with the scenario JSON in the PR run outputs fix-4425-diff-3289.txt and fix-4425-diff-7.txt, then read packages/web/test/async-gen/run.ts and the { store: true } variant in regression.spec.ts. Replay both cases and compare derived-store recovery with the plain-memo control. Done means the store form heals as expected and regression tests cover these cases.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Found by the async generator's 50k × 3 differential for the #4425 fix (PR #4434). Two cases gain an equivalence/E3 finding on the fixed build: the plain-memo form heals (the Errored recovers and shows its content / the inner Loading's fallback) while the derived-store form (createStore(d => { d.v = m() })) stays on the error fallback — later, or for the rest of the script.

The store variant's screens are byte-identical between next @ 5e68925cc and the fixed build (the #4425 gate is never reached there — no boundary is born in its recovery), so this is a pre-existing memo-vs-store recovery-timing gap that the #4425 wait was masking: before the fix, both forms were stuck on the error, so they agreed.

seed 3289 #36981
[s0=1 s1=1 m0=memo(latest(s1) !%4=2) m1=async(m0 !%4=2)]
<Show when=m0() fb><Loading><span fx[latest(m0),m1()]>m1()</span></Loading></Show>
:: S6 S5 f A(s1=3) t A(s0=0) S6 m S2 s1=2 S0
  • plain (fixed): [ROOT-E] ×5, then [L] from screen 5 on; final <span data-a0=lm0:3 data-a1=vm1:4>vm1:4</span>
  • store: [ROOT-E] throughout; same final
seed 7 #46850
[s0=2 m0=memo(latest(s0)+s0 !%4=3) m1=memo(m0 !%4=2) m2=async(s0 !%4=0)]
<Errored><Show when=m1() fb><span fx[m0(),isPending(m0)]>latest(m1)</span><Loading><span fx[isPending(m0)]>m2() m1()</span></Loading><span>latest(m2)</span></Show></Errored>
:: S3 f A(s0=3) A(s0=1) t m S4 f t m
  • plain (fixed): [E] ×5, then <span data-a0=vm0:4 data-a1=pm0:false>lm1:5</span>[L]<span></span> from screen 5 on; final [E]
  • store: [E] throughout

Scenario JSON for both is in the 50k diff output (fix-4425-diff-3289.txt, fix-4425-diff-7.txt in the PR run); replay with packages/web/test/async-gen/run.ts using the { store: true } variant (see regression.spec.ts).

Control: #36981 without the nested Loading stays [ROOT-E] on both forms on both builds — the gap needs the Errored to be able to heal.

Rules: E3 (a derived store reads like the memo it derives from), D-39 / #4273 (an errored boundary heals when a content input changes). The question for the fix is why the store's v slot does not carry the healed value to the boundary's content when the memo does — likely the store's write path (d.v = m() throwing → the store leaf keeps the error) against the memo's error-is-an-answer path.

Lenguaje dominante
TypeScript
Estrellas
36.2k
Forks
1.1k
Merge medio
11 h 28 min
PR fusionados (30 d)
461

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de solidjs/solid

Todos los issues de solidjs/solid

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.