Skip to content

[codex] Fix Livewire and Blade view isolation under coroutines#3

Merged
adhikjoshi merged 2 commits into
mainfrom
codex/livewire-coroutine-mutex
May 30, 2026
Merged

[codex] Fix Livewire and Blade view isolation under coroutines#3
adhikjoshi merged 2 commits into
mainfrom
codex/livewire-coroutine-mutex

Conversation

@adhikjoshi
Copy link
Copy Markdown
Contributor

Summary

Adds coroutine-safe Livewire rendering support for Swoole and fixes per-coroutine Blade view isolation for Filament/Livewire pages.

The first fix serializes Livewire render/flush sections with a coroutine-aware reentrant mutex. Local app verification showed that was not sufficient by itself: Filament still failed because cloned view factories inherited the base __env share, so compiled Blade component stack state could escape the coroutine-scoped view factory. v0.8.13 updates RequestScope so each cloned view factory shares itself as __env.

Validation

  • /opt/homebrew/Cellar/php@8.3/8.3.29/bin/php ./vendor/bin/phpunit --filter 'LivewireCoroutineMutexTest|RequestScopeViewIsolationTest'
  • PHP syntax checks on modified fork files
  • Consumed from uncensored-chat-fullstack via tag v0.8.13
  • Docker verification app /admin/login returns 200 under Swoole after this tag; it failed under v0.8.12
  • 1000-request/100-concurrency app leakage test passed
  • Docker app probe handled 2000 requests at concurrency 200

Release

Tagged as v0.8.13 at f356514ab2d379126cb4ca892af871b34da52795.

@adhikjoshi adhikjoshi marked this pull request as ready for review May 30, 2026 07:42
@adhikjoshi adhikjoshi merged commit 884d5df into main May 30, 2026
2 checks passed
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.

1 participant