Skip to content

docs: add WEP for reactive signals (push-pull algorithm)#769

Merged
gfx merged 3 commits intomainfrom
claude/review-reactive-signals-GcEHL
Apr 4, 2026
Merged

docs: add WEP for reactive signals (push-pull algorithm)#769
gfx merged 3 commits intomainfrom
claude/review-reactive-signals-GcEHL

Conversation

@gfx
Copy link
Copy Markdown
Member

@gfx gfx commented Apr 4, 2026

Summary

  • Extract the reactive system design from spec.md into a dedicated WEP (wep-2026-04-04-reactive-signals.md)
  • Document the internal push-pull algorithm with static dependency analysis, including: two-phase update model, glitch-free guarantee, equality-based propagation cut-off, and batching semantics
  • Replace the spec.md section with a brief summary + link to WEP + "not yet implemented" note

Motivation

The reactive system section in spec.md described the API surface (source/derived/observe) but left the internal algorithm unspecified. After reviewing Willy Brauner's article on push-pull reactive signals, several gaps were identified:

  • Push vs pull phase distinction was implicit
  • Glitch-free guarantee was mentioned only as "topological order"
  • Equality check for propagation cut-off was absent
  • Batching semantics were vague ("may be batched")
  • Static dependency analysis trade-offs were undocumented

Test plan

  • Verify WEP document renders correctly
  • Verify spec.md link to WEP works
  • Verify WEP index in AGENTS.md/CLAUDE.md includes the new entry

https://claude.ai/code/session_01RDhjhSgkX6NkwqFzAt7ExJ

claude added 3 commits April 4, 2026 10:51
…free, batching)

The reactive system section in spec.md only described the API surface
(source/derived/observe) but left the internal algorithm unspecified.
Add detailed documentation covering:

- Push-pull two-phase update model (dirty flag propagation + lazy re-evaluation)
- Static dependency analysis as a deliberate design choice (with over-subscription trade-off)
- Glitch-free guarantee via phase separation
- Equality check (Eq-based change propagation cut-off)
- Batching semantics for CLI vs event-looped worlds
- Explicit batch() API for CLI world

https://claude.ai/code/session_01RDhjhSgkX6NkwqFzAt7ExJ
Move the full reactive system design from spec.md into
wep-2026-04-04-reactive-signals.md. The spec now contains a brief
summary with a link to the WEP and a note that the feature is not
yet implemented.

https://claude.ai/code/session_01RDhjhSgkX6NkwqFzAt7ExJ
@gfx gfx enabled auto-merge April 4, 2026 11:12
@gfx gfx merged commit 0e20ca0 into main Apr 4, 2026
10 checks passed
@gfx gfx deleted the claude/review-reactive-signals-GcEHL branch April 4, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants