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

Aberta
#37 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
28/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
compilers

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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).

Linguagem predominante
TypeScript
Estrelas
127
Forks
7
Merge médio
15h 42min
PRs com merge (30d)
63

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de solidjs/reactivescript

Todas as issues de solidjs/reactivescript

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.