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

Aperta
#37 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
compilers

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
127
Fork
7
Merge medio
15h 42m
PR unite (30g)
63

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di solidjs/reactivescript

Tutte le issue di solidjs/reactivescript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.