O-4a: O-3 doesn't follow a closure stored through an action argument, and a registration widget to price the fix

Abierto
#37 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
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
compilers

Línea de trabajo

Start with O-3 and O-3b in spec/03-regions.md, then read MO-3 and S-region-7 to trace how action arguments and retained closures are represented. Review the proposed widget port and scenario in examples/lib/, comparing REGION_ESCAPE results before and after the O-3 change. Done means the retained closure gap is closed and the scenarios record correctness, restructuring, and capability movement.

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

Descripción

Follow-up to #15. That issue's two soundness holes were fixed in #16 (O-3a/O-3b in spec/03-regions.md). Its main over-rejection example was registering through a source context (use fields := …). That shape went away when RG-7c was withdrawn on 2026-10-31: registration now goes through actions in the context's value (provide fields = { add, remove }, S-region-7).

That leaves the opposite problem, recorded in the spec as O-4a (known gap):

O-3 does not yet follow a closure handed to an action as an argument and stored by it (register(() => v) where register stores its parameter in an outer source). The same gap exists for an on* handler prop that stores its argument.

So a row-local closure registered through a provided add is accepted today, even when no cleanup removes it.

To do

  1. Close the gap. Have O-3 follow an action's parameter into a store, the way O-3b follows a prop: the closure passed for that argument must not capture a name that ends before the place the action stores it. Across modules this belongs in the signature (MO-3 retains(...)).
  2. Price it with the widget port #15 proposed. Port one headless widget built on child→parent registration (a listbox/combobox in the shape of Kobalte's, or field registration in the shape of TanStack Form) into examples/lib/ with its scenario. For each REGION_ESCAPE, record whether the program was correct, the restructuring, and whether the restructuring moved a capability out of the region it belongs to. Do this both before and after step 1.

The #15 point still stands for 08: say what O-3 is sound over (closures capturing reactive names, stored through .rx writes and actions) and what it leaves to the runtime (JS sinks, values that retain resources, CN-3b).

Lenguaje dominante
TypeScript
Estrellas
127
Forks
7
Merge medio
15 h 42 min
PR fusionados (30 d)
63

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/reactivescript

Todos los issues de solidjs/reactivescript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.